Skip Headers
Oracle® Database PL/SQL Packages and Types Reference
11g Release 2 (11.2)

Part Number E25788-04
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub
ARPLS66432

74 DBMS_HS_PARALLEL

ARPLS450The DBMS_HS_PARALLEL PL/SQL package enables parallel processing for heterogeneous targets access. This package is designed to improve performance when retrieving data from a large foreign table.

This chapter discusses the following topics:

ARPLS72906

Using DBMS_HS_PARALLEL

DBMS_HS_PARALLEL is compiled with the authorization ID of CURRENT_USER, which uses invoker's rights. In other words, all procedures in this package are executed with the privileges of the calling user.

ARPLS72907

Summary of DBMS_HS_PARALLEL Subprograms

ARPLS72908Table 74-1 DBMS_HS_PARALLEL Package Subprograms

Subprogram Description

CREATE_OR_REPLACE_VIEW

Creates (or replaces) a read-only view to be referenced for retrieving the data from a remote table in parallel.

CREATE_TABLE_TEMPLATE

Writes out a CREATE TABLE template based on information gathered from the remote table. You can use the information to add any optimal Oracle CREATE TABLE clauses.

DROP_VIEW

Drops the view and internal objects created by the CREATE_OR_REPLACE_VIEW procedure. If the view has not already been created by the CREATE_OR_REPLACE_VIEW procedure, an error message is returned.

LOAD_TABLE

Loads the data from a remote table to a local Oracle table in parallel. If the local Oracle table does not already exist, it is created automatically.


ARPLS72909

CREATE_OR_REPLACE_VIEW

This procedure creates (or replaces) a read-only view to be referenced for retrieving the data from a remote table in parallel.

ARPLS72910

Syntax

CREATE_OR_REPLACE_VIEW (remote_table, database_link, oracle_view, parallel_degree)
ARPLS72911

Parameters

ARPLS72912Table 74-2 CREATE_OR_REPLACE_VIEW Parameter

Parameter Value Description

remote_table

IN VARCHAR2 NOT NULL

The name of the remote database table. It is specified as [remote_schema_name.]remote_table_name.

database_link

IN VARCHAR2 NOT NULL

The remote database link name. The call can only be applied to a heterogeneous services database link.

oracle_view

IN VARCHAR2

The name of the Oracle view. It is specified as [schema_name.]oracle_view_name. The default schema name is the current user. If the oracle_view parameter is not specified, the remote table name will be used as the view name.

parallel_degree

IN NUMBER

The number of parallel processes for the operation is computed based on the range-partition number if applicable, or the number of CPUs. The range of values is 2 to 16.


Usage Notes

ARPLS72913

CREATE_TABLE_TEMPLATE

This procedure writes out a CREATE TABLE template based on information gathered from the remote table. You can use the information to add any optimal Oracle CREATE TABLE clauses.

ARPLS72914

Syntax

CREATE_TABLE_TEMPLATE (remote_table, database_link, oracle_table, create_table_template_string)
ARPLS72915

Parameters

ARPLS72916Table 74-3 CREATE_TABLE_TEMPLATE Parameter

Parameter Value Description

remote_table

IN VARCHAR2 NOT NULL

The name of the remote database table. It is specified as [remote_schema_name.]remote_table_name.

database_link

IN VARCHAR2 NOT NULL

The remote database link name. The call can only be applied to a heterogeneous services database link.

oracle_table

IN VARCHAR2

The name of the local Oracle table the data will be loaded into. It is specified as [schema_name.]oracle_table_name. The default schema name is the current user. If the oracle_table parameter is not specified, the remote table name will be used as the local Oracle name.

create_table_template_string

OUT VARCHAR2

Contains the Oracle CREATE TABLE SQL template when the procedure is returned.


ARPLS72917

DROP_VIEW

This procedure drops the view and internal objects created by the CREATE_OR_REPLACE_VIEW procedure. If the view has not already been created by the CREATE_OR_REPLACE_VIEW procedure, an error message is returned.

ARPLS72918

Syntax

DROP_VIEW (oracle_view)
ARPLS72919

Parameters

ARPLS72920Table 74-4 DROP_VIEW Parameter

Parameter Value Description

oracle_view

IN VARCHAR2 NOT NULL

The name of the Oracle view created by the CREATE_OR_REPLACE_VIEW procedure. If the view has not been created by the CREATE_OR_REPLACE_VIEW procedure, an error is returned.


ARPLS72921

LOAD_TABLE

This procedure loads the data from a remote table to a local Oracle table in parallel. If the local Oracle table does not already exist, it is created automatically.

ARPLS72922

Syntax

LOAD_TABLE (remote_table, database_link, oracle_table, truncate, parallel_degree, row_count)
ARPLS72923

Parameters

ARPLS72924Table 74-5 LOAD_TABLE Parameters

Parameter Value Description

remote_table

IN VARCHAR2 NOT NULL

The name of the remote database table. It is specified as [remote_schema_name.]remote_table_name

database_link

IN VARCHAR2 NOT NULL

The remote database link name. The call can only be applied to a heterogeneous services database link.

oracle_table

IN VARCHAR2

The name of the local Oracle table the data will be loaded into. It is specified as [schema_name.]oracle_table_name. The default schema name is the current user. If the oracle_table parameter is not specified, the remote table name will be used as the local Oracle name.

truncate

IN BOOLEAN

Determines whether the Oracle table is truncated before the data is loaded. The value is either TRUE or FALSE. The default value is TRUE which means the Oracle table is truncated first. When set to FALSE, the Oracle table will not be truncated before the data is loaded.

parallel_degree

IN NUMBER

The number of parallel processes for the operation is computed based on the range-partition number if applicable, or the number of CPUs. The range of values is 2 to 16.

row_count

OUT NUMBER

Contains the number of rows just added with the load table operation.


Usage Notes

Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Page

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF