Oracle DBMS_INTERNAL_LOGSTDBY
Version 12.1.0.1

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 12.1.0.1 to 12.1.0.2. Demos are being upgraded to reflect the new Container paradigm as well as EBR (Edition Based Redefinition) and may contain references to CDBs, PDBs, and other objects you may not be familiar with such as CDB_OBJECTS_AE: Welcome to 12c.

Interested in Oracle GoldenGate? Check out the IGGOUG,
Purpose Internal support utilities for Data Guard Logical Standby Databases
AUTHID DEFINER
Dependencies
ALL_OBJECTS DBMS_IJOB LOGSTDBY$EDS_TABLES
AUDIT_ACTIONS DBMS_INTERNAL_SAFE_SCN LOGSTDBY$EVENTS
CDEF$ DBMS_JOB LOGSTDBY$HISTORY
COL$ DBMS_LOB LOGSTDBY$PARAMETERS
DBA_LOGSTDBY_EDS_SUPPORTED DBMS_LOCK LOGSTDBY$SCN
DBA_LOGSTDBY_EDS_TABLES DBMS_LOGMNR_INTERNAL LOGSTDBY$SKIP
DBA_LOGSTDBY_LOG DBMS_LOGSTDBY LOGSTDBY$SKIP_SUPPORT
DBA_LOGSTDBY_PARAMETERS DBMS_LOGSTDBY_LIB LOGSTDBY$SKIP_TRANSACTION
DBA_LOGSTDBY_PROGRESS DBMS_SQL LOGSTDBY_INTERNAL
DBA_LOGSTDBY_UNSUPPORTED DBMS_STANDARD OBJ$
DBA_NESTED_TABLES DBMS_SYSTEM SYSLSBY_EDS_DDL_TRIG
DBA_OBJECT_TABLES DUAL TAB$
DBA_PROCEDURES IND$ TS$
DBA_REFS INDPART$ USER$
DBA_TABLES JOB$ UTL_RECOMP
DBA_TAB_COLS KUPM$MCP V$DATABASE
DBA_USERS KUPV$FT V$INSTANCE
DBA_VIEWS KUPV$FT_INT V$LOGSTDBY_STATE
DBMS_AQ_SYS_IMP_INTERNAL KUPW$WORKER V$PARAMETER
DBMS_ASSERT LOGMNR_LOG$ V$TRANSACTION
DBMS_AUDIT_MGMT LOGMNR_SESSION$ X$KRVSLVST
DBMS_DDL LOGSTDBY$APPLY_MILESTONE  
Documented No
First Available 12.1.0
Security Model Owned by SYS with no privileges granted
Source {ORACLE_HOME}/rdbms/admin/prvtlsis.plb
Subprograms
APPLY_GET EDS_REMOVE_TABLE_INT LSBY_UNLOCK_TABLE
APPLY_IS_OFF EDS_USER_CURSOR MATCHED_PRIMARY
APPLY_SET END_STREAM NEED_SCN
APPLY_STOP_NOWAIT END_STREAM_SHARED PARDEL
APPLY_UNSET FGADEL PARINS
AUDDEL FGAINS PARUPD
AUDINS FGAUPD PREPARE_FOR_NEW_PRIMARY
AUDUPD FLUSH_SRLS PRIMARY_DBID
BUILD GET_DB_ROLE PRINTLOB
CANCEL_FUTURE GET_EXPORT_DML_SCN PURGE_LOGS
CAPTURE_SCN GET_OBJ_NUM REBUILD
CHECK_SKIP_LIKE GET_SAFE_SCN REPAIR_LSBY
CLEAR_LOGICAL_INSTANTIATION GUARD_BYPASS_CHK REPLACE_DICTIONARY
CREATE_FUTURE_SESSION GUARD_BYPASS_OFF REPORT_ERROR
DATA_ONLY_PREREQ GUARD_BYPASS_ON RETRIEVE_STATEMENT
DESTROY_FUTURE_SESSION GUARD_CHECK SEQUENCE_UPDATE
DUMP_XDAT HIST_READ_RECORD SEQUPD
EDS_ADD_PREREQ HIST_SYNCH SET_EXPORT_SCN
EDS_ADD_TABLE_FINISH HIST_WRITE_RECORD_CANCEL SET_LOGICAL_INSTANTIATION
EDS_ADD_TABLE_INT HIST_WRITE_RECORD_CURRENT SET_TABLESPACE
EDS_CHECK_EVOLVE_STARTED HIST_WRITE_RECORD_FUTURE SET_TABLE_SCN
EDS_CLEANUP_METADATA HIST_WRITE_RECORD_PREVIOUS SKIP_SUPPORT
EDS_DROP_MVIEW HSTDEL SKIP_TRANSACTION
EDS_DROP_TRIGGER HSTINS UNLOCK_LSBY_CON
EDS_EVAL_CHANGE_VECTOR HSTUPD UNLOCK_LSBY_META
EDS_EVOLVE INSTANTIATE_TAB_LOG UNSKIP_TRANSACTION
EDS_EVOLVE_DISABLE INSTANTIATE_TAB_PREREQ UPCASE
EDS_EVOLVE_ENABLE IS_EDS_SUPPORTABLE UPDATE_DYNAMIC_LSBY_OPTION
EDS_EVOLVE_TABLE_CANCEL IS_LSBY_SUPPORTABLE VALIDATE_SET
EDS_EVOLVE_TABLE_END IS_PDB_ROOT VALIDATE_SKIP_ACTION
EDS_EVOLVE_TABLE_START JOBDEL VALIDATE_SKIP_AUTHID
EDS_GEN_MV JOBINS VERIFY_NOSESSION
EDS_GEN_TRIGGERS JOBUPD VERIFY_SESSION
EDS_GET_NAMES LOCK_LSBY_CON VERIFY_SESSION_LOGAUTODELETE
EDS_GET_TABLESPACE LOCK_LSBY_META (2) WAIT_FOR_SAFE_SCN
EDS_REMOVE_TABLE_FINISH LSBY_LOCK_TABLE  
 
CANCEL_FUTURE
This is totally undocumented and I have no idea what it does but the name was just too good to allow for resistance and the syntax mindlessly simple dbms_internal_logstdby.cancel_future;
exec dbms_internal_logstdby.cancel_future;
 
CAPTURE_SCN
Undocumented dbms_internal_logstdby.capture_scn;
exec dbms_internal_logstdby.capture_scn;
BEGIN dbms_internal_logstdby.capture_scn; END;
*
ERROR at line 1:
ORA-16287: operation not permitted due to active apply state
ORA-06512: at "SYS.DBMS_INTERNAL_LOGSTDBY", line 373
ORA-06512: at line 1
 
EDS_USER_CURSOR
Undocumented dbms_internal_logstdby.eds_user_cursor(
user_issued OUT BOOLEAN,
table_owner OUT VARCHAR2,
table_name  OUT VARCHAR2);
See {ORACLE_HOME}/rdbms/admin/catlsby.sql
 
GET_DB_ROLE
Returns the current database role

It would be interesting to know why anyone chose to do this with a proc rather than a function.
dbms_internal_logstdby.get_db_role(dbrole OUT VARCHAR2);
DECLARE
 lDBRole VARCHAR2(30);
BEGIN
  dbms_internal_logstdby.get_db_role(lDBRole);
  dbms_output.put_line(lDBRole);
END;
/
 
GET_OBJ_NUM
Return the object number for the identified table dbms_internal_logstdby.get_obj_num(
table_owner IN  VARCHAR2,
table_name  IN  VARCHAR2,
dblink      IN  VARCHAR2,
objno       OUT NUMBER);
conn / as sysdba

SELECT object_id
FROM dba_objects
WHERE object_name = 'OBJ$';

set serveroutput on

DECLARE
 objid obj$.obj#%TYPE;
BEGIN
  dbms_internal_logstdby.get_obj_num(USER, 'OBJ$', NULL, objid);
  dbms_output.put_line(TO_CHAR(objid));
END;
/
 
GET_SAFE_SCN
Appears to return the current SCN dbms_internal_logstdby.get_safe_scn(safe_scn OUT NUMBER);
DECLARE
 scnVal NUMBER;
BEGIN
  dbms_internal_logstdby.get_safe_scn(scnVal);
  dbms_output.put_line('Safe SCN: ' || TO_CHAR(scnVal));

  dbms_output.put_line('Curr SCN" ' || TO_CHAR(dbms_flashback.get_system_change_number));
END;
/
 
GUARD_CHECK
Undocumented dbms_internal_logstdby.guard_check;
exec dbms_internal_logstdby.guard_check;
 
IS_EDS_SUPPORTABLE
Extended Datatype Supportable dbms_internal_logstdby.is_eds_supportable(
owner      IN VARCHAR2,
table_name IN VARCHAR2)
RETURN BOOLEAN;
BEGIN
  IF dbms_internal_logstdby.is_eds_supportable(USER, 'OBJ$') THEN
    dbms_output.put_line('Extended Data Type Supportable');
  ELSE
    dbms_output.put_line('Not Extended Data Type Supportable');
  END IF; 
END;
/
 
IS_LSBY_SUPPORTABLE
Is Logical Standby Supported dbms_internal_logstdby.is_lsdby_suuportable(
owner      IN VARCHAR2,
table_name IN VARCHAR2)
RETURN BOOLEAN;
BEGIN
  IF dbms_internal_logstdby.is_lsby_supportable(USER, 'OBJ$') THEN
    dbms_output.put_line('Logical Standby Supportable');
  ELSE
    dbms_output.put_line('Not Logical Standby Supportable');
  END IF;
END;
/
 
IS_PDB_ROOT
Returns TRUE if the current container is CDB$ROOT otherwise appears to exit without returning FALSE dbms_internal_logstdby.is_pdb_root RETURN BOOLEAN;
conn / as sysdba

BEGIN
  IF dbms_internal_logstdby.is_pdb_root THEN
    dbms_output.put_line('Current container is CDB$ROOT');
  ELSE
    dbms_output.put_line('Current container is ' || SYS_CONTEXT('USERENV','CON_NAME'));
  END IF;
END;
/

alter session set container = 'PDBORCL';

BEGIN
  IF dbms_internal_logstdby.is_pdb_root THEN
    dbms_output.put_line('Current container is CDB$ROOT');
  ELSE
    dbms_output.put_line('Current container is ' || SYS_CONTEXT('USERENV','CON_NAME'));
  END IF;
END;
/
-- unfortunately an other example of Oracle doing EXCEPTION WHEN OTHERS THEN NULL
 
UPCASE
Apparently the UPPER function was inadequate for someone dbms_internal_logstdby.upcase(inname IN VARCHAR2) RETURN VARCHAR2;
SELECT dbms_internal_logstdby.upcase('tHiS is A JokE')
FROM dual;
 
VERIFY_NOSESSION
Undocumented dbms_internal_logstdby.verify_nosession;
exec dbms_internal_logstdby.verify_nosession;

Related Topics
Data Guard
DBMS_DG
DBMS_DRS
DBMS_LOGSTDBY
Packages

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-2014 Daniel A. Morgan All Rights Reserved