ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
Provides subprograms to start, stop, and configure apply processes.
dbms_apply_adm.alter_apply(
apply_name IN VARCHAR2,
rule_set_name IN VARCHAR2 DEFAULT NULL,
remove_rule_set IN BOOLEAN DEFAULT FALSE,
message_handler IN VARCHAR2 DEFAULT NULL
remove_message_handler IN BOOLEAN DEFAULT FALSE,
ddl_handler IN VARCHAR2 DEFAULT NULL,
remove_ddl_handler IN BOOLEAN DEFAULT FALSE,
apply_user IN VARCHAR2 DEFAULT NULL,
apply_tag IN RAW DEFAULT NULL,
remove_apply_tag IN BOOLEAN DEFAULT FALSE,
precommit_handler IN VARCHAR2 DEFAULT NULL,
remove_precommit_handler IN BOOLEAN DEFAULT FALSE,
negative_rule_set_name IN VARCHAR2 DEFAULT NULL,
remove_negative_rule_set IN BOOLEAN DEFAULT FALSE);
Specifies whether to compare the old value of one or more columns in a row logical change record (row LCR) with the current value of the corresponding columns at the destination site during apply
Overload 1
dbms_apply_adm.compare_old_values(
object_name IN VARCHAR2,
column_list IN VARCHAR2,
operation IN VARCHAR2 DEFAULT 'UPDATE',
compare IN BOOLEAN DEFAULT TRUE,
apply_database_link IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2
dbms_apply_adm.compare_old_values(
object_name IN VARCHAR2,
column_table IN dbms_utility.lname_array,
operation IN VARCHAR2 DEFAULT 'UPDATE',
compare IN BOOLEAN DEFAULT TRUE,
apply_database_link IN VARCHAR2 DEFAULT NULL);
dbms_apply_adm.create_apply(
queue_name IN VARCHAR2,
apply_name IN VARCHAR2,
rule_set_name IN VARCHAR2 DEFAULT NULL,
message_handler IN VARCHAR2 DEFAULT NULL,
ddl_handler IN VARCHAR2 DEFAULT NULL,
apply_user IN VARCHAR2 DEFAULT NULL,
apply_database_link IN VARCHAR2 DEFAULT NULL,
apply_tag IN RAW DEFAULT '00',
apply_captured IN BOOLEAN DEFAULT FALSE,
precommit_handler IN VARCHAR2 DEFAULT NULL,
negative_rule_set_name IN VARCHAR2 DEFAULT NULL,
source_database IN VARCHAR2 DEFAULT NULL);
Returns the message payload from the error queue for the specified message number and transaction identifier
Overload 1
dbms_apply_adm.get_error_message(
message_number IN NUMBER,
local_transaction_id IN VARCHAR2)
RETURN SYS.ANYDATA;
TBD
Overload 2
dbms_apply_adm.get_error_message(
message_number IN NUMBER,
local_transaction_id IN VARCHAR2,
destination_queue_name OUT VARCHAR2,
execute OUT BOOLEAN)
RETURN SYS.ANYDATA;
Sets a dml conflict handler for the specified apply_name, target object, source object, operation_name, conflict_type, and method_name
Overload 1
dbms_apply_adm.set_conflict_handler(
apply_name IN VARCHAR2,
conflict_handler_name IN VARCHAR2,
object IN VARCHAR2 DEFAULT NULL,
operation_name IN VARCHAR2 DEFAULT NULL,
conflict_type IN VARCHAR2 DEFAULT NULL,
method_name IN VARCHAR2 DEFAULT NULL,
column_list IN VARCHAR2 DEFAULT NULL,
resolution_column IN VARCHAR2 DEFAULT NULL,
source_object IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2
dbms_apply_adm.set_conflict_handler(
apply_name IN VARCHAR2,
conflict_handler_name IN VARCHAR2,
object IN VARCHAR2 DEFAULT NULL,
operation_name IN VARCHAR2 DEFAULT NULL,
conflict_type IN VARCHAR2 DEFAULT NULL,
method_name IN VARCHAR2 DEFAULT NULL,
column_table IN dbms_utility.lname_array,
resolution_column IN VARCHAR2 DEFAULT NULL,
source_object IN VARCHAR2 DEFAULT NULL);
Alters operation options for a specified object with a specified apply process
dbms_apply_adm.set_dml_handler(
object_name IN VARCHAR2,
object_type IN VARCHAR2,
operation_name IN VARCHAR2,
error_handler IN BOOLEAN := FALSE,
user_procedure IN VARCHAR2,
apply_database_link IN VARCHAR2 DEFAULT NULL,
apply_name IN VARCHAR2 DEFAULT NULL,
assemble_lobs IN BOOLEAN := TRUE);
Records the specified instantiation SCN for the specified source database and, optionally, for the schemas at the source database and the tables owned by these schemas
dbms_apply_adm.set_global_instantiation_scn(
source_database_name IN VARCHAR2,
instantiation_scn IN NUMBER,
apply_database_link IN VARCHAR2 DEFAULT NULL,
recursive IN BOOLEAN DEFAULT FALSE,
source_root_name IN VARCHAR2 DEFAULT NULL);
Records the set of columns to be used as the substitute primary key for local apply purposes and removes existing substitute primary key columns for the specified object if they exist.
Column_list is a comma-separated list of columns, with no space between columns.
Overload 1
dbms_apply_adm.set_key_columns(
object_name IN VARCHAR2,
column_list IN VARCHAR2,
apply_database_link IN VARCHAR2 := NULL,
apply_name IN VARCHAR2 := NULL);
TBD
Index for column_table is is 1-based, increasing, dense, and terminated by a NULL.
Overload 2
dbms_apply_adm.set_key_columns(
object_name IN VARCHAR2,
column_table IN dbms_utility.name_array,
apply_database_link IN VARCHAR2 := NULL,
apply_name IN VARCHAR2 := NULL);
TBD
Index for column_table is is 1-based, increasing, dense, and terminated by a NULL
Overload 3
dbms_apply_adm.set_key_columns(
object_name IN VARCHAR2,
column_table IN dbms_utility.quoted_name_array,
apply_database_link IN VARCHAR2 := NULL,
apply_name IN VARCHAR2 := NULL);
Sets a reperror handler for an apply, src table, tgt table, and error number
dbms_apply_adm.set_reperror_handler(
apply_name IN VARCHAR2,
object IN VARCHAR2,
error_number IN NUMBER,
method IN VARCHAR2,
source_object IN VARCHAR2 DEFAULT NULL,
max_retries IN NUMBER DEFAULT NULL,
delay_csecs IN NUMBER DEFAULT 6000);
Records the specified instantiation SCN for the specified schema in the specified source database and, optionally, for the tables owned by the schema at the source database
dbms_apply_adm.set_schema_instantiation_scn(
source_schema_name IN VARCHAR2,
source_database_name IN VARCHAR2,
instantiation_scn IN NUMBER,
apply_database_link IN VARCHAR2 DEFAULT NULL,
recursive IN BOOLEAN DEFAULT FALSE,
source_root_name IN VARCHAR2 DEFAULT NULL);
Records the specified instantiation SCN for the specified table in the specified source database
dbms_apply_adm.set_table_instantiation_scn(
source_object_name IN VARCHAR2,
source_database_name IN VARCHAR2,
instantiation_scn IN NUMBER,
apply_database_link IN VARCHAR2 DEFAULT NULL
source_root_name IN VARCHAR2 DEFAULT NULL);
Adds, updates, or drops an update conflict handler for the specified object
dbms_apply_adm.set_update_conflict_handler(
object_name IN VARCHAR2,
method_name IN VARCHAR2,
resolution_column IN VARCHAR2,
column_list IN dbms_utility.name_array,
apply_database_link IN VARCHAR2 DEFAULT NULL);
DECLARE
cols dbms_utility.name_array;
BEGIN
cols(1) := 'salary';
cols(2) := 'commission_pct';