Oracle DBMS_LOGREP_IMP
Version 21c

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose Log file replication support utilities

Eight of the objects in this package, APPLY_ERROR, APPLY_ERROR_TXN, APPLY_MULESTONE, APPLY_PROGRESS, INSTANTIATE, INSTANTIATE_SCHEMA, PREPARE_DDL, PRIVILEGED_USER, and STREAMS_RULES are also present in the DBMS_LOGREP_IMP package.
AUTHID CURRENT_USER
Dependencies
DBMS_APPLY_ADM DBMS_LOGREP_IMP_INTERNAL DBMS_STREAMS_ADM
DBMS_APPLY_ADM_INTERNAL DBMS_LOGREP_LIB DBMS_STREAMS_ADM_UTL
DBMS_AQADM DBMS_LOGREP_UTIL DBMS_STREAMS_DATAPUMP_UTIL
DBMS_CAPTURE_ADM DBMS_PRIV_CAPTURE DBMS_STREAMS_DECL
DBMS_CAPTURE_ADM_INTERNAL DBMS_PROPAGATION_ADM DBMS_UTILITY
DBMS_DATAPUMP DBMS_STANDARD PLITBLM
DBMS_FILE_GROUP_IMP    
Documented No
First Available Not known
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/prvthlin.plb
{ORACLE_HOME}/rdbms/admin/prvtblin.plb
Subprograms
 
APPLY_ERROR
Undocumented dbms_logrep_imp.apply_error(
local_tid           IN VARCHAR2,
source_tid          IN VARCHAR2,
source_db           IN VARCHAR2,
queue_owner         IN VARCHAR2,
queue_name          IN VARCHAR2,
apply_name          IN VARCHAR2,
message_number      IN NUMBER,
message_count       IN NUMBER,
min_step_no         IN NUMBER,
recipient_name      IN VARCHAR2,
source_commit_scn   IN NUMBER,
error_number        IN NUMBER,
error_message       IN VARCHAR2,
aq_tid              IN VARCHAR2,
spare1              IN NUMBER,
spare2              IN NUMBER,
spare3              IN NUMBER,
error_creation_time IN DATE);
TBD
 
APPLY_ERROR_TXN
Undocumented dbms_logrep_imp.apply_error_txn(
local_tid          IN VARCHAR2,
msgid              IN RAW,
txn_message_number IN NUMBER,
error_number       IN NUMBER,
error_message      IN VARCHAR2,
flags              IN NUMBER,
spare1             IN NUMBER,
spare2             IN NUMBER,
spare3             IN VARCHAR2,
spare4             IN VARCHAR2,
spare5             IN RAW,
spare6             IN DATE,
src_obj_owner      IN VARCHAR2,
src_obj_name       IN VARCHAR2,
dest_obj_owner     IN VARCHAR2,
dest_obj_name      IN VARCHAR2,
primary_key        IN VARCHAR2,
position           IN RAW,
message_flags      IN NUMBER,
operation          IN VARCHAR2);
TBD
 
APPLY_MILESTONE
Undocumented dbms_logrep_imp.apply_milestone(
apply_name            IN VARCHAR2,
source_db             IN VARCHAR2,
oldest_scn            IN NUMBER,
commit_scn            IN NUMBER,
synch_scn             IN NUMBER,
epoch                 IN NUMBER,
processed_scn         IN NUMBER,
apply_time            IN VARCHAR2,
msg_create_time       IN VARCHAR2,
spare1                IN NUMBER,
start_scn             IN NUMBER,
oldest_transaction_id IN VARCHAR2,
spill_lwm_scn         IN NUMBER,
lwm_external_pos      IN VARCHAR2,
spare2                IN NUMBER,
spare3                IN VARCHAR2);
TBD
 
APPLY_PROGRESS
Undocumented dbms_logrep_imp.apply_progress(
apply_name IN VARCHAR2,
source_db  IN VARCHAR2,
xidusn     IN NUMBER,
xidslt     IN NUMBER,
xidsqn     IN NUMBER,
commit_scn IN NUMBER,
spare1     IN NUMBER);
TBD
 
BUMP_SCN
Undocumented

Doesn't appear to do what one might assume it does
dbms_logrep_imp.bump_scn(scn IN NUMBER);
SELECT current_scn FROM v$database;

CURRENT_SCN
-----------
   79903707


exec sys.dbms_logrep_imp.bump_scn(10000);

SELECT current_scn FROM v$database;

CURRENT_SCN
-----------
   79903726
 
CREATE_APPLY
Undocumented dbms_logrep_imp.create_apply(
apply_name             IN VARCHAR2,
queue_owner            IN VARCHAR2,
queue_name             IN VARCHAR2,
apply_captured         IN BINARY_INTEGER,
ruleset_owner          IN VARCHAR2,
ruleset_name           IN VARCHAR2,
apply_user             IN VARCHAR2,
apply_dblink           IN VARCHAR2,
apply_tag              IN VARCHAR2,
ddl_handler            IN VARCHAR2,
message_handler        IN VARCHAR2,
precommit_handler      IN VARCHAR2,
start_date             IN DATE,
end_date               IN DATE,
negative_ruleset_owner IN VARCHAR2,
negative_ruleset_name  IN VARCHAR2,
error_number           IN NUMBER,
error_message          IN VARCHAR2,
i_customer_id          IN BINARY_INTEGER,
uan_handler            IN VARCHAR2,
ua_ruleset_owner       IN VARCHAR2,
ua_ruleset_name        IN VARCHAR2);
TBD
 
CREATE_CAPTURE
Undocumented dbms_logrep_imp.create_capture(
queue_owner            IN VARCHAR2,
queue_name             IN VARCHAR2,
capture_name           IN VARCHAR2,
ruleset_owner          IN VARCHAR2,
ruleset_name           IN VARCHAR2,
capture_username       IN VARCHAR2,
start_date             IN DATE,
end_date               IN DATE,
source_database        IN VARCHAR2,
logfile_assignment     IN VARCHAR2,
use_database_link      IN VARCHAR2,
negative_ruleset_owner IN VARCHAR2,
negative_ruleset_name  IN VARCHAR2,
i_customer_id          IN BINARY_INTEGER);
TBD
 
CREATE_PROPAGATION
Undocumented dbms_logrep_imp.create_propagation(
propagation_name       IN VARCHAR2,
src_queue_owner        IN VARCHAR2,
src_queue_name         IN VARCHAR2,
dest_queue_owner       IN VARCHAR2,
dest_queue_name        IN VARCHAR2,
dest_dblink            IN VARCHAR2,
ruleset_owner          IN VARCHAR2,
ruleset_name           IN VARCHAR2,
negative_ruleset_owner IN VARCHAR2,
negative_ruleset_name  IN VARCHAR2,
queue_to_queue         IN BOOLEAN);
TBD
 
CREATE_SYNC_CAPTURE
Undocumented dbms_logrep_imp.create_sync_capture(
queue_owner      IN VARCHAR2,
queue_name       IN VARCHAR2,
capture_name     IN VARCHAR2,
ruleset_owner    IN VARCHAR2,
ruleset_name     IN VARCHAR2,
capture_username IN VARCHAR2);
TBD
 
DATE_CONVERT
Undocumented dbms_logrep_imp.date_convert(
day    IN VARCHAR2,
format IN VARCHAR2)
RETURN DATE;
SELECT dbms_logrep_imp.date_convert('01-JAN-2022', 'DD-MON-RR')
FROM dual;

DBMS_LOGREP_IMP.DATE
--------------------
01-JAN-2022 00:00:00
 
INCLUDE_EXTRA_ATTRIBUTE
Undocumented dbms_logrep_imp.include_extra_attribute(
capture_name   IN VARCHAR2,
attribute_name IN VARCHAR2,
include        IN VARCHAR2);
TBD
 
INSTANTIATE
Undocumented dbms_logrep_imp.instantiate(
object_owner   IN VARCHAR2,
object_name    IN VARCHAR2,
object_type    IN BINARY_INTEGER,
export_db_name IN VARCHAR2,
inst_scn       IN NUMBER,
ignore_scn     IN NUMBER);
TBD
 
INSTANTIATE_SCHEMA
Undocumented dbms_logrep_imp.instantiate_schema(
schema_name    IN VARCHAR2,
export_db_name IN VARCHAR2,
inst_scn       IN NUMBER);
TBD
 
IS_IMPORT_CONFIGURATION
Undocumented dbms_logrep_imp.is_import_configuration RETURN BOOLEAN;
BEGIN
  IF dbms_logrep_imp.is_import_configuration THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
END;
/
T

PL/SQL procedure successfully completed.
 
IS_IMPORT_INSTANTIATION
Undocumented dbms_logrep_imp.is_import_instantiation RETURN BOOLEAN;
BEGIN
  IF dbms_logrep_imp.is_import_instantiation THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
END;
/
F

PL/SQL procedure successfully completed.
 
IS_SWITCH_USER
Undocumented dbms_logrep_imp.is_switch_user RETURN BOOLEAN;
BEGIN
  IF dbms_logrep_imp.is_switch_user THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
END;
/
F

PL/SQL procedure successfully completed.
 
MESSAGE_CONSUMERS
Undocumented dbms_logrep_imp.message_consumers(
canon_streams_name   IN VARCHAR2,
canon_queue_owner    IN VARCHAR2,
canon_queue_name     IN VARCHAR2,
canon_rset_owner     IN VARCHAR2,
canon_rset_name      IN VARCHAR2,
canon_neg_rset_owner IN VARCHAR2,
canon_neg_rset_name  IN VARCHAR);
TBD
 
MESSAGE_RULES
Undocumented dbms_logrep_imp.message_rules(
canon_streams_name   IN VARCHAR2,
streams_type         IN NUMBER,
canon_msg_type_owner IN VARCHAR2,
canon_msg_type_name  IN VARCHAR2,
canon_msg_rule_var   IN VARCHAR2,
canon_rule_owner     IN VARCHAR2,
canon_rule_name      IN VARCHAR2,
rule_condition       IN VARCHAR2);
TBD
 
PREPARE_DDL
Undocumented

Compare with the same procedure in DBMS_LOGREP_IMP_INTERNAL which an be executed directly by SYS
dbms_logrep_imp.prepare_ddl(
schema_name IN VARCHAR2,
flags       IN BINARY_INTEGER);
conn c##safedba
Enter password:
Connected.

exec sys.dbms_logrep_imp.prepare_ddl('C##SAFEDBA', 1);

PL/SQL procedure successfully completed.
 
PREPARE_OBJECT
Undocumented dbms_logrep_imp.prepare_object(
table_owner IN VARCHAR2,
table_name  IN VARCHAR2,
flags       IN BINARY_INTEGER);
TBD
 
PREPARE_SYNC_OBJECT
Undocumented dbms_logrep_imp.prepare_sync_object(
table_owner IN VARCHAR2,
table_name  IN VARCHAR2);
conn / as sysdba

GRANT imp_full_database to c##safedba;

Grant succeeded.

conn c##safedba
Enter password:
Connected.

exec sys.dbms_logrep_imp.prepare_sync_object('C##SAFEDBA', 'T1');

PL/SQL procedure successfully completed.
 
PRIVILEGED_USER
Undocumented dbms_logrep_imp.privileged_user(
canon_username IN VARCHAR2,
privs          IN NUMBER);
TBD
 
SET_APPLY_PARAM
Undocumented dbms_logrep_imp.set_apply_param(
apply_name      IN VARCHAR2,
parameter_name  IN VARCHAR2,
parameter_value IN VARCHAR2);
TBD
 
SET_APPLY_SOURCE_OBJ
Undocumented dbms_logrep_imp.set_apply_source_obj(
source_db  IN VARCHAR2,
owner      IN VARCHAR2,
name       IN VARCHAR2,
type       IN BINARY_INTEGER,
inst_scn   IN NUMBER,
ignore_scn IN NUMBER,
dblink     IN VARCHAR2,
spare1     IN NUMBER);
TBD
 
SET_APPLY_SOURCE_SCHEMA
Undocumented dbms_logrep_imp.set_apply_source_schema(
source_db   IN VARCHAR2,
global_flag IN BINARY_INTEGER,
name        IN VARCHAR2,
dblink      IN VARCHAR2,
inst_scn    IN NUMBER,
spare1      IN NUMBER);
TBD
 
SET_CAPTURE_PARAM
Undocumented dbms_logrep_imp.set_capture_param(
capture_name    IN VARCHAR2,
parameter_name  IN VARCHAR2,
parameter_value IN VARCHAR2);
TBD
 
SET_DML_HANDLER
Undocumented dbms_logrep_imp.set_dml_handler(
object_owner   IN VARCHAR2,
object_name    IN VARCHAR2,
operation_name IN VARCHAR2,
user_procedure IN VARCHAR2,
error_handler  IN NUMBER,
apply_dblink   IN VARCHAR2,
apply_name     IN VARCHAR2,
assemble_lobs  IN NUMBER);
TBD
 
SET_IMPORT_MODE
Undocumented dbms_logrep_imp.set_import_mode(import_mode IN BINARY_INTEGER);
exec dbms_logrep_imp.set_import_mode(1);

PL/SQL procedure successfully completed.
 
SET_KEY_COLUMNS
Undocumented dbms_logrep_imp.set_key_columns(
object_owner IN VARCHAR2,
object_name  IN VARCHAR2,
column_name  IN VARCHAR2,
apply_dblink IN VARCHAR2);
TBD
 
SET_UPDATE_CONFLICT_HANDLER
Undocumented dbms_logrep_imp.set_update_conflict_handler(
object_owner      IN VARCHAR2,
object_name       IN VARCHAR2,
resolution_id     IN BINARY_INTEGER,
method_name       IN VARCHAR2,
resolution_column IN VARCHAR2,
column_name       IN VARCHAR2,
dblink            IN VARCHAR2);
TBD
 
START_APPLY
Undocumented dbms_logrep_imp.start_apply(apply_name IN VARCHAR2);
TBD
 
START_CAPTURE
Undocumented dbms_logrep_imp.start_capture(capture_name IN VARCHAR2);
TBD
 
START_QUEUE
Undocumented dbms_logrep_imp.start_queue(
queue_owner     IN VARCHAR2,
queue_name      IN VARCHAR2
enqueue_enabled IN BINARY_INTEGER,
dequeue_enabled IN BINARY_INTEGER);
TBD
 
STREAMS_RULES
Undocumented dbms_logrep_imp.streams_rules(
streams_name         IN VARCHAR2,
streams_type         IN BINARY_INTEGER,
rule_type            IN BINARY_INTEGER,
include_tagged_lcr   IN BINARY_INTEGER,
source_database      IN VARCHAR2,
rule_owner           IN VARCHAR2,
rule_name            IN VARCHAR2,
rule_condition       IN VARCHAR2,
dml_condition        IN VARCHAR2,
subsetting_operation IN BINARY_INTEGER,
schema_name          IN VARCHAR2,
object_name          IN VARCHAR2,
object_type          IN BINARY_INTEGER,
spare1               IN NUMBER,
spare2               IN NUMBER,
spare3               IN NUMBER,
source_root_name     IN VARCHAR2);
TBD

Related Topics
Built-in Functions
Built-in Packages
Database Security
DBMS_LOGREP_EXP
DBMS_LOGREP_IMP_INTERNAL
DBMS_LOGREP_UTIL
DBMS_LOGREP_UTIL_INVOK
What's New In 19c
What's New In 20c-21c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2021 Daniel A. Morgan All Rights Reserved
  DBSecWorx