Oracle DBMS_RCVCAT
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 RMAN repository catalog maintenance. This package is not installed by default but is created when CREATE CATALOG is executed in RMAN.
AUTHID DEFINER
Constants
Name Data Type Value
TRUE# NUMBER 1
FALSE# NUMBER 0
 
UPGRADE_COMPLETED NUMBER 1
 
RESYNC_FULL NUMBER 1
RESYNC_PARTIAL NUMBER 2
RESYNC_NONE NUMBER 3
 
CONFIGRESYNC_NO NUMBER 0
CONFIGRESYNC_TORC NUMBER 1
CONFIGRESYNC_TORF NUMBER 2
CONFIGRESYNC_TORC_TOCF NUMBER 3
 
CF_CURRENT NUMBER 1
CF_BACKUP NUMBER 2
CF_CREATED NUMBER 3
CF_STANDBY NUMBER 4
CF_CLONE NUMBER 5
CF_NOMOUNT NUMBER 6
 
ECODE_UNKNOWN_INC NUMBER -64735
 
THIS_DB_KEY NUMBER NULL
THIS_DBINC_KEY NUMBER NULL
 
RESYNC_REASON_NOACTION NUMBER 1
RESYNC_REASON_NONE NUMBER 2
RESYNC_REASON_DF NUMBER 3
RESYNC_REASON_TF NUMBER 4
RESYNC_REASON_TS NUMBER 5
RESYNC_REASON_THR NUMBER 6
RESYNC_REASON_ORL NUMBER 7
RESYNC_REASON_CONF NUMBER 8
RESYNC_REASON_DF NUMBER 9
RESYNC_REASON_RSL NUMBER 10
RESYNC_REASON_INC NUMBER 11
RESYNC_REASON_RESET NUMBER 12
RESYNC_REASON_PDB NUMBER 13
RESYNC_REASON NUMBER RESYNC_REASON_NONE
DORESYNCREASONS BOOLEAN FALSE
 
RESYNC_ACTION_ADD NUMBER 1
RESYNC_ACTION_DROP NUMBER 2
RESYNC_ACTION_CHANGE NUMBER 3
RESYNC_ACTION_RECREATE NUMBER 4
RESYNC_ACTION_RENAME NUMBER 5
RESYNC_ACTION_RESIZE NUMBER 6
 
RESYNC_OBJECT_TABLESPACE NUMBER 1
RESYNC_OBJECT_DATAFILE NUMBER 2
RESYNC_OBJECT_TEMPFILE NUMBER 3
RESYNC_OBJECT_REDOTHREAD NUMBER 4
RESYNC_OBJECT_ONLINELOG NUMBER 5
RESYNC_OBJECT_PDB NUMBER 6
 
RCVCAT_LEVEL_MIN NUMBER 1
RCVCAT_LEVEL_LOW NUMBER 5
RCVCAT_LEVEL_MID NUMBER 9
RCVCAT_LEVEL_HI NUMBER 12
RCVCAT_LEVEL_MAX NUMBER 15
RCVCAT_LEVEL_DEFAULT NUMBER RCVCAT_LEVEL_MID
Data Types TYPE fullResyncActions_t IS RECORD(
active    BOOLEAN,
valid     BOOLEAN,
lastobjno NUMBER,
objtype   NUMBER,
actTaken  resyncActionTaken_t,
actCount  resyncActionCounts_t);

fullResyncAction fullResyncActions_t; -- :=
-- fullResyncActions_t(FALSE, FALSE, -1, NULL,
-- RESYNC_ACTION_TAKEN_NONE,
-- RESYNC_ACTION_COUNTS_ZERO);


TYPE registerDbPending_t IS RECORD (
dbid number   := NULL,
con_id number := NULL,
guid raw(16)  := NULL);

registerDbPending registerDbPending_t;

TYPE resyncActionNames_t IS VARRAY(6) OF VARCHAR2(12);

RESYNC_ACTION_NAMES CONSTANT resyncActionNames_t :=
resyncActionNames_t('added', 'dropped',
                    'changed', 'recreated',
                    'renamed', 'resized');

TYPE resyncActionTaken_t IS VARRAY(6) OF BOOLEAN;

TYPE resyncActionCounts_t IS VARRAY(6) OF NUMBER;

TYPE resyncActionObjects_t IS VARRAY(5) OF VARCHAR2(16);

RESYNC_ACTION_OBJECTS CONSTANT resyncActionObjects_t :=
resyncActionObjects_t('Tablespace', 'Datafile',
                      'Tempfile', 'Redo thread',
                      'Online redo log');
Dependencies
AL PDBINC TF
ALL_SYNONYMS PDB_DBINC TS
ALL_TAB_PRIVS PLITBLM TSATT
ALL_USERS RASCHEMAVER USER_DB_LINKS
BCB RCFILE USER_OBJECTS
BCF RCI_BACKUP_DATAFILE USER_POLICIES
BCR RCI_BACKUP_PIECE USER_TAB_COLUMNS
BDF RCI_BACKUP_SET USER_TRIGGERS
BP RCI_BACKUP_SPFILE USER_USERS
BRL RCI_DATAFILE USER_VIEWS
BS RCI_PDBINC_THIS_DBINC UTL_HTTP
BSF RCI_PDBS UTL_RAW
CCB RCI_RA_UPSTREAM_DATABASE VPC_DATABASES
CCF RCI_SITE VPC_USERS
CDF RCI_TEMPFILE WATERMARKS
CKP RCVER XAL
CONF RC_BACKUP_REDOLOG XCF
CONFIG RC_CHECKPOINT XDF
DB RC_DATABASE XMLSTORE
DBINC RC_DATABASE_INCARNATION XMLTYPE
DBMS_ASSERT RC_DELETED_OBJECT _RS_RCI_BACKUP_CONTROLFILE_
DBMS_CATOWNER RC_OFFLINE_RANGE _RS_RCI_BACKUP_DATAFILE_
DBMS_DB_VERSION RC_PLUGGABLE_DATABASE_INC _RS_RCI_BACKUP_PIECE_
DBMS_LOB RC_RCVER _RS_RCI_BACKUP_SET_
DBMS_OUTPUT RC_REDO_LOG _RS_RCI_BACKUP_SPFILE_
DBMS_RCVMAN RC_REDO_THREAD _RS_RCI_DATAFILE_
DBMS_SESSION RC_SITE _RS_RCI_PDBS_
DBMS_SQL RC_TABLESPACE _RS_RCI_RA_UPSTREAM_DATABASE_
DBMS_STANDARD RC_WATERMARKS _RS_RCI_TEMPFILE_
DBMS_UTILITY RLH _RS_RC_BACKUP_REDOLOG_
DBMS_XMLGEN RMAN_SEQ _RS_RC_CHECKPOINT_
DELETED_OBJECT ROUT _RS_RC_DATABASE_INCARNATION_
DF RSR _RS_RC_DELETED_OBJECT_
DO_SEQ RT _RS_RC_GET_OBJECT_LIST_
DUAL SBT_TEMPLATE_DB _RS_RC_OFFLINE_RANGE_
FB SCR _RS_RC_PLUGGABLE_DATABASE_INC_
GRSP SCRL _RS_RC_RCVER_
NODE SERVER _RS_RC_REDO_LOG_
NRSP SESSION_PRIVS _RS_RC_REDO_THREAD_
OFFR SITE_DFATT _RS_RC_SITE_
ORL SITE_TFATT _RS_RC_TABLESPACE_
PDB TEMPRES _RS_RC_WATERMARKS_
Documented No
Exceptions
Error Code Reason
ORA-20525 Catalog schema is not multitenant enabled
ORA-20999 Invalid tenant csi or prefix no data found (get_tenant_key)
ORA-20999 Not a valid VPC user
First Available Not known
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {$ORACLE_HOME}/rdbms/admin/recover.bsq
CREATE USER rmandadmin
IDENTIFIED BY ...
DEFAULT TABLESPACE uwdata
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON uwdata;

GRANT recovery_catalog_owner TO rmanadmin;

SQL> host
[oracle@test21 dbhome_1]$ rman target / catalog rmanadmin@pdbdev

Recovery Manager: Release 21.0.0.0.0 - Production on Tue Mar 30 01:09:03 2021
Version 21.1.0.0.0

Copyright (c) 1982, 2020, Oracle and/or its affiliates. All rights reserved.

connected to target database: TEST21DB (DBID=2140826538)
recovery catalog database Password:
connected to recovery catalog database


RMAN> CREATE CATALOG;

catalog created.

RMAN> REGISTER DATABASE;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete


RMAN> exit
   
Subprograms
ADDDBIDTOIMPORT CLEARRESYNCACTIONS GET_CSI_USING_DB_KEY
ADDTIMEZONE CLEARUNARCHIVEDLOGS GET_CSI_USING_TENANT_KEY
ADD_DB COMMITCHANGES GET_CTX_TENANT_CSI
ASSERT_TENANT_USER CREATESCRIPT GET_CTX_TENANT_KEY
BEGINARCHIVEDLOGRESYNC CREATETEMPRESOURCE GET_OBJECT
BEGINBACKUPCORRUPTIONRESYNC CREATEXMLFILE GET_TENANT_KEY
BEGINBACKUPDATFILERESYNC CREATE_VIRTUAL_CATALOG GET_TENANT_KEY_USING_DB_KEY
BEGINBACKUPPIECERESYNC DEB GRANT_CATALOG
BEGINBACKUPREDOLOGRESYNC DEBOK GRANT_DB_ACCESS
BEGINBACKUPSETRESYNC DELETECONFIG GRANT_REGISTER
BEGINBACKUPSPFILERESYNC DELETECONFIG3 IMPORTSCHEMA
BEGINBLOCKCORRUPTIONRESYNC DELETESCRIPT INCRESYNCACTIONS
BEGINCKPT DELETEXMLFILE INITCLIENTTYPE
BEGINCONFIGRESYNC DELETE_BUCKET ISAMSCHEMA
BEGINCONFIGRESYNC2 DELETE_DB ISDUPLICATERECORD
BEGINCOPYCORRUPTIONRESYNC DELETE_OBJECT ISROUTDUPLICATERECORD
BEGINDATAFILECOPYRESYNC DODUPLICATEMINING IS_TENANT_GVPC
BEGINDATAFILERESYNC DOREPLICATIONRECONCILE LASTFULLCKPT
BEGINDATAFILERESYNCFORSTANDBY DROP_VIRTUAL_CATALOG LISTSCRIPTNAMES
BEGINDELETEDOBJECTRESYNC DUMPPKGSTATE LOCKDBIDTOIMPORT
BEGINGUARNANTEEDRPRESYNC DUMPRESYNCACTIONS LOCKFORCKPT
BEGININCARNATIONRESYNC ENABLERESYNCACTIONS LOCKTEMPRESOURCE
BEGINLOGHISTORYRESYNC ENDARCHIVEDLOGRESYNC LOG_DIAG_MESG
BEGINOFFLINERANGERESYNC ENDBACKUPCORRUPTIONRESYNC LOG_FIX_MESG
BEGINONLINEREDOLOGRESYNC ENDBACKUPDATAFILERESYNC PDBUNDOTORESYNC
BEGINPLUGGABLEDBINCRESYNC ENDBACKUPPIECERESYNC PUTLINE
BEGINPLUGGABLEDBRESYNC ENDBACKUPREDOLOGRESYNC PUT_BUCKET
BEGINPROXYRESYNC ENDBACKUPSETRESYNC PUT_OBJECT
BEGINRESTOREPOINTRESYNC ENDBACKUPSPFILERESYNC READBACKUPSECTIONS
BEGINRMANOUTPUTRESYNC ENDBLOCKCORRUPTIONRESYNC READFIXEDSECTIONS
BEGINRMANSTATUSRESYNC ENDCKPT - 105 READXMLFILE
BEGINTABLESPACERESYNC ENDCONFIGRESYNC REGISTERDATABASE
BEGINTEMPFILERESYNC ENDCONFIGRESYNC2 RENAMESITE
BEGINTEMPFILERESYNCFORSTANDBY ENDCOPYCORRUPTIONRESYNC RENORMALIZE
BEGINTHREADRESYNC ENDDATAFILECOPYRESYNC REPLACESCRIPT
BSSTATUSRECALC ENDDATAFILERESYNC RESETCONFIG
CANCELCKPT ENDDATAFILERESYNCFORSTANDBY RESETCONFIG2
CHANGEARCHIVEDLOG ENDDELETEDOBJECTRESYNC RESETDATABASE
CHANGEBACKJUPPIECE ENDGUARANTEEDRPRESYNC RESYNCADDDBUNAME
CHANGEBACKUPSET ENDINCARNATIONRESYNC REVOKE_ALL
CHANGECONTROLFILECOPY ENDLOGHISTORYRESYNC REVOKE_CATALOG
CHANGEDATAFILECOPY ENDOFFLINERANGERESYNC REVOKE_DB_ACCESS
CHANGEPROXYCOPY ENDONLINEREDOLOGRESYNC REVOKE_REGISTER
CHECKARCHIVEDLOG ENDPLUGGABLEDBINCRESYNC RSCLEANUPROUT
CHECKBACKUPCORRUPTION ENDPLUGGABLEDBRESYNC RSDELETEBACKUPPIECE
CHECKBACKUPDATAFILE ENDPROXYRESYNC RSWRITEWATERMARKS
CHECBACKUPPIECE ENDRESTOREPOINTRESYNC SANITYCHECK
CHECKBACKUPREDOLOG ENDRMANOUTPUTRESYNC SETARCHIVEFILESCOPEATTRIBUTES
CHECKBACKUPSET ENDRMANSTATUSRESYNC SETBACKUPFILESCOPEATTRIBUTES
CHECKBACKUPSPFILE ENDTABLESPACERESYNC SETCLONENAME
CHECKBLOCKCORRUPTION ENDTEMPFILERESYNC SETCONFIG
CHECKCOPYCORRUPTION ENDTEMPFILERESNCFORSTANDBY SETCONFIG2
CHECKDATAFILE ENDTHREADRESYNC SETCONFIG3
CHECKDATAFILECOPY FINICLIENTTYPE SETDATABASE
CHECKDATAFILEFORSTANDBY GETAMTSTLEVEL SETDATAFILESIZE
CHECKDELETEDOBJECT GETCATALOGVERSION SETDEBUGOFF
CHECKGUARANTEEDRP GETCLONENAME SETDEBUGON
CHECKINCARNATION GETCONFIG SETKEEPOUTPUTFORSESSION
CHECKLOGHISTORY GETCURRENTRECONCILEVERSION SETREASON
CHECKOFFLINERANGE GETDBID SETUPVPD
CHECKONLINEREDOLOG GETDBINC SET_TENANT_KEY
CHECKPLUGGABLEDB GETLINE TEMPFILETORESYNC
CHECKPLUGGABLEDBINC GETLOGHISTORYLOWSCN THROTTLE_ME
CHECKPROXYARCHIVEDLOG GETPACKAGEVERSION UNREGISTERDATABASE
CHECKPROXYDATAFILE GETPOLLEDREC UNREGISTERSITE
CHECKRESTOREPOINT GETREASON UNREGISTER_TENANT
CHECKRMANOUTPUT GETRESYNCACTIONS UNREGISTER_TENANT_USER
CHECKRMANSTATUS GETSCRIPT UPDATEOLDESTFLASHBACKSCN
CHECKTABLESPACE GETSCRIPTNAMES UPDATERMANSTATUSROW
CHECKTEMPFILE GETTHISSITEKEY UPDATEXMLFILE
CHECKTEMPFILEFORSTANDBY GETVALUEFROMCONFIG UPDATE_TENANT
CHECKTHREAD GETXMLFILEATTR WRITEBACKUPSECTIONS
CKPTNEEDED GET_BUCKET WRITEFIXEDSECTIONS
CLEANUPTEMPRESOURCE    
 
ADD_DB (new 21c)
Stores a support CSI number in the RMAN catalog dbms_rcvcat.add_db(
db_unique_name IN VARCHAR2,
csi            IN NUMBER);
conn rmanadmin/pdbdev
Password:

col status format a6

SELECT tenant_key, csi, name, status FROM tenant;

TENANT_KEY        CSI NAME                           STATUS
---------- ---------- ------------------------------ ------
         0          0 DEFAULT_TENANT                 E
         1          1 REP_TENANT                     E


show parameter unique

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------
db_unique_name                       string      test21db_iad25g


exec rmanadmin.dbms_rcvcat.add_db('test21db_iad25g', 22358645);
BEGIN rmanadmin.dbms_rcvcat.add_db('test21db_iad25g', 22358645); END;
*
ERROR at line 1:
ORA-20999: Invalid tenant csi or prefix no data found (get_tenant_key)
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 3339
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 3814
ORA-06512: at line 1
 
ASSERT_TENANT_USER (new 21c)
Undocumented dbms_rcvcat.assert_tenant_user(
p_user                    IN VARCHAR2,
p_csi                     IN NUMBER  DEFAULT 0,
p_err_on_nouser           IN BOOLEAN DEFAULT TRUE);
exec rmanadmin.dbms_rcvcat.assert_tenant_user(USER);
BEGIN dbms_rcvcat.assert_tenant_user(USER); END;
*
ERROR at line 1:
ORA-20999: Not a valid VPC user
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 3371
ORA-06512: at line 1
 
BEGINCKPT
Begin Checkpoint dbms_rcvcat.beginCkpt(
ckp_scn       IN NUMBER,
ckp_cf_seq    IN NUMBER,
cf_version    IN DATE,
ckp_time      IN DATE,
ckp_type      IN VARCHAR2,
ckp_db_status IN VARCHAR2,
high_df_recid IN NUMBER,
cf_type       IN VARCHAR2);
TBD
 
CHECKBLOCKCORRUPTION
Undocumented dbms_rcvcat.checkBlockCorruption(
bcr_recid       IN NUMBER,
bcr_stamp       IN NUMBER,
file#           IN NUMBER,
create_scn      IN NUMBER,
create_time     IN DATE,
block#          IN NUMBER,
blocks          IN NUMBER,
corrupt_scn     IN NUMBER,
corruption_type IN VARCHAR2);
TBD
 
CHECKRMANOUTPUT
Undocumented dbms_rcvcat.checkRMANOutput(
recid             IN NUMBER,
stamp             IN NUNBER,
session_recid     IN NUMBER,
session_stamp     IN NUMBER,
rman_status_recid IN NUMBER,
rman_status_stamp IN NUMBER,
output            IN VARCHAR2);
TBD
 
CHECKRMANSTATUS
Undocumented dbms_rcvcat.checkRMANStatus(
recid            IN NUMBER,
stamp            IN NUMBER,
parent_recid     IN NUMBER,
parent_stamp     IN NUMBER,
row_level        IN NUMBER,
row_type         IN VARCHAR2,
command_id       IN VARCHAR2,
operation        IN VARCHAR2,
status           IN VARCHAR2,
mbytes_processed IN NUMBER,
start_time       IN DATE,
end_time         IN DATE,
ibytes           IN NUMBER,
obytes           IN NUMBER,
optimized        IN VARCHAR2,
otype            IN VARCHAR2,
session_recid    IN NUMBER, 
session_stamp    IN NUMBER,
odevtype         IN VARCHAR2,
osb_allocated    IN VARCHAR2);
TBD
 
COMMITCHANGES
Execute a commit dbms_rcvcat.commitChanges;
exec rmanadmin.dbms_rcvcat.commitChanges;

PL/SQL procedure successfully completed.
 
CREATESCRIPT
Create an RMAN script

Overload 1
dbms_rcvcat.createScript(name IN VARCHAR2);
SQL> conn c##rmanadmin/rmanadmin
Connected.

SQL> exec dbms_rcvcat.setDatabase;

PL/SQL procedure successfully completed.

SQL> exec c##rmanadmin.dbms_rcvcat.createScript('RMANSCRIPT');

PL/SQL procedure successfully completed.

SQL> exec c##rmanadmin.dbms_rcvcat.putLine('This is a test');

PL/SQL procedure successfully completed.

SQL> exec c##rmanadmin.dbms_rcvcat.deleteScript('RMANSCRIPT');

PL/SQL procedure successfully completed.
Overload 2 dbms_rcvcat.createScript(
name    IN VARCHAR2,
scr_com IN VARCHAR2,
global  IN BOOLEAN);
TBD
 
CREATEXMLFILE
Undocumented dbms_rcvcat.createXMLFile(
name        IN VARCHAR2,
name_tag    IN VARCHAR2,
xmldoc      IN CLOB,
doctype     IN VARCHAR2,
xml_comment IN VARCHAR2,
schema_ver  IN VARCHAR2);
TBD
 
CREATE_VIRTUAL_CATALOG
Create the virtual RMAN catalog dbms_rcvcat.create_virtual_catalog;
exec dbms_rcvcat.create_virtual_catalog;

PL/SQL procedure successfully completed.
 
DEB (new 21c)
Debugging function dbms_rcvcat.deb(
line        IN VARCHAR2,
level       IN NUMBER   DEFAULT RCVCAT_LEVEL_DEFAULT,
prefix_msg1 IN VARCHAR2 DEFAULT 'RCVCAT: ',
prefix_msg2 IN VARCHAR2 DEFAULT 'DBGRCVCAT: ');
exec dbms_rcvcat.deb('catalog schema is multitenant enabled');

PL/SQL procedure successfully completed.
 
DELETE_DB (new 21c)
Deletes a support CSI number in the RMAN catalog dbms_rcvcat.delete_db(
db_unique_name IN VARCHAR2,
csi            IN NUMBER);
exec dbms_rcvcat.delete_db('test21db_iad25g', 22358645);
BEGIN dbms_rcvcat.delete_db('test21db_iad25g', 22358645); END;
*
ERROR at line 1:
ORA-20999: Invalid tenant csi or prefix no data found (get_tenant_key)
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 3339
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 3853
ORA-06512: at line 1
 
DROP_VIRTUAL_CATALOG
Drop the virtual RMAN catalog dbms_rcvcat.drop_virtual_catalog;
exec dbms_rcvcat.drop_virtual_catalog;

PL/SQL procedure successfully completed.
 
GETAMTSTLEVEL
Undocumented dbms_rcvcat.getAMTSTLevel
SELECT dbms_rcvcat.getAMTSTLevel
FROM dual;

GETAMTSTLEVEL
-------------
            0
 
GETCATALOGVERSION
Returns the database version of the RMAN catalog dbms_rcvcat.getCatalogVersion RETURN VARCHAR2;
conn c##rmanadmin/rmanadmin
Connected.

SELECT rmanadmin.dbms_rcvcat.getCatalogVersion
FROM dual;

GETCATALOGVERSION
------------------
21.01.00.00.00
 
GETCLONENAME
Undocumented dbms_rcvcat.getCloneName(
file#            IN NUMBER,
creation_change# IN NUMBER,
plugin_change#   IN NUMBER)
RETURN VARCHAR2;
TBD
 
GETCONFIG
Undocumented dbms_rcvcat.getConfig(
conf# OUT NUMBER,
name  IN  OUT VARCHAR2,
value IN  OUT VARCHAR2,
first IN  BOOLEAN);
TBD
 
GETDBID
Returns the catalog database's DBID dbms_rcvcat.getDBID RETURN NUMBER;
exec rmanadmin.dbms_rcvcat.setDatabase;

PL/SQL procedure successfully completed.

SELECT rmanadmin.dbms_rcvcat.getDBID
FROM dual;

   GETDBID
----------
2140826538
 
GETDBINC
  dbms_rcvcat.getDBInc RETURN NUMBER;
exec rmanadmin.dbms_rcvcat.setDatabase;

PL/SQL procedure successfully completed.

SELECT dbms_rcvcat.getDBInc
FROM dual;

 GETDBINC
---------
        2
 
GETLINE
Returns a line following a getScript dbms_rcvcat.getLine RETURN VARCHAR2;
SELECT rmanadmin.dbms_rcvcat.getLine
FROM dual;
*
ERROR at line 1:
ORA-20403: getScript not done
ORA-06512: at "C##RMANADMIN.DBMS_RCVCAT", line 9359
 
GETLOGHISTORYLOWSCN
Returns the lowest SCN from a catalog resync dbms_rcvcat.getLogHistoryLowSCN RETURN NUMBER;
SELECT rmanadmin.dbms_rcvcat.getLogHistoryLowSCN
FROM dual;
*
ERROR at line 1:
ORA-20031: Resync not started
ORA-06512: at "C##RMANADMIN.DBMS_RCVCAT", line 1037
ORA-06512: at "C##RMANADMIN.DBMS_RCVCAT", line 5201
 
GETPACKAGEVERSION
Returns the internal version numer of, most likely, the DBMS_RCVCAT package dbms_rcvcat.getPackageVersion RETURN VARCHAR2;
SELECT rmanadmin.dbms_rcvcat.getPackageVersion
FROM dual;

GETPACKAGEVERSION
-------------------
08.00.04.00.0
 
GETSCRIPT
Undocumented
Overload 1
dbms_rcvcat.getScript(name IN VARCHAR2);
TBD
Overload 2 dbms_rcvcat.getScript(
name IN VARCHAR2,
glob IN NUMBER);
TBD
 
GETSCRIPTNAMES
Undocumented dbms_rcvcat.getScriptNames(
dbname OUT VARCHAR2,
scnm   OUT VARCHAR2,
sccom  OUT VARCHAR2);
exec dbms_rcvcat.listScriptNames(1, 1);

DECLARE
 a VARCHAR2(30);
 b VARCHAR2(30);
 c VARCHAR2(30);
BEGIN
  dbms_rcvcat.getScriptNames(a, b, c);
  dbms_output.put_line(a);
  dbms_output.put_line(b);
  dbms_output.put_line(c);
END;
/
*
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "C##RMANADMIN.DBMS_RCVCAT", line 10635
ORA-06512: at line 6
 
GETTHISSITEKEY
Undocumented dbms_rcvcat.getThisSiteKey(db_unique_name IN VARCHAR2) RETURN NUMBER;
SELECT value
FROM v$parameter
WHERE name = 'db_unique_name';

VALUE
----------------
test21db_iad25g


SELECT dbms_rcvcat.GetThisSiteKey('test21db_iad25g')
FROM dual;

DBMS_RCVCAT.GETTHISSITEKEY('TEST21DB_IAD25G')
---------------------------------------------
                                            3
 
GET_CSI_USING_DB_KEY (new 21c)
Returns the Support CSI number based on the database key dbms_rcvcat.get_csi_using_db_key(db_key IN NUMBER) RETURN NUMBER;
TBD
 
GET_CSI_USING_TENANT_KEY (new 21c)
Returns the Support CSI number based on the tenant key dbms_rcvcat.get_csi_using_tenant_key(tenant_key IN NUMBER) RETURN NUMBER;
TBD
 
GET_OBJECT
Undocumented dbms_rcvcat.get_object(
bktname IN VARCHAR2,
objname IN VARCHAR2,
parms   IN VARCHAR2)
RETURN CLOB;
TBD
 
GET_TENANT_KEY (new 21c)
Returns the tenant key based on the CSI number dbms_rcvcat.get_tenant_key(
csi    IN NUMBER   DEFAULT 0,
prefix IN VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
SELECT dbms_rcvcat.get_tenant_key
FROM dual;

GET_TENANT_KEY
--------------
             0
 
GRANT_CATALOG
Grant privileges on the virtual private catalog

Overload 1
dbms_rcvcat.grant_catalog(
userid  IN VARCHAR2,
db_name IN VARCHAR2);
exec dbms_rcvcat.grant_catalog('RMANADMIN', 'TEST21DB');
BEGIN dbms_rcvcat.grant_catalog('RMANADMIN', 'TEST21DB'); END;
*
ERROR at line 1:
ORA-20153: recovery catalog does not have VPD support enabled!
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 19706
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 19813
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 19795
ORA-06512: at line 1


exec dbms_rcvcat.revoke_catalog('RMANADMIN', 'TEST21DB');
BEGIN dbms_rcvcat.revoke_catalog('RMANADMIN', 'TEST21DB'); END;
*
ERROR at line 1:
ORA-20153: recovery catalog does not have VPD support enabled!
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 19962
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 19944
ORA-06512: at line 1
Overload 2 dbms_rcvcat.grant_catalog(
userid             IN VARCHAR2,
dbid               IN NUMBER,
reg_db_unique_name IN VARCHAR2);
TBD
 
GRANT_DB_ACCESS (new 21c)
Undocumented dbms_rcvcat.grant_db_access(
userid         IN VARCHAR2,
db_unique_name IN VARCHAR2,
csi            IN NUMBER);
exec dbms_rcvcat.grant_db_access(USER, 'test21db_iad25g', 22358645);
 
GRANT_REGISTER
Undocumented dbms_rcvcat.grant_register(userid IN VARCHAR2);
exec rmanadmin.dbms_rcvcat.grant_register('ZZYZX');
*
ERROR at line 1:
ORA-20022: user ZZYZX not found
ORA-06512: at "C##RMANADMIN.DBMS_RCVCAT", line 12455
ORA-06512: at "C##RMANADMIN.DBMS_RCVCAT", line 12505
ORA-06512: at line 1


exec dbms_rcvcat.grant_register('UWCLASS');

exec dbms_rcvcat.revoke_register('UWCLASS');
 
LASTFULLCKPT
Undocumented dbms_rcvcat.lastFullCkpt RETURN NUMBER;
SELECT rmanadmin.dbms_rcvcat.lastFullCkpt
FROM dual;

LASTFULLCKPT
------------
 
 
LISTSCRIPTNAMES
Undocumented dbms_rcvcat.listScriptNames(
glob     IN NUMBER,
allnames IN NUMBER);
See GETSCRIPTNAMES Demo Above
 
LOCKDBIDTOIMPORT
Undocumented dbms_rcvcat.lockDBIdToImport(idb IN VARCHAR2);
TBD
 
LOCKFORCKPT
Undocumented dbms_rcvcat.lockForCkpt(orsinspect IN BOOLEAN);
exec rmanadmin.dbms_rcvcat.lockForCkpt(TRUE);

PL/SQL procedure successfully completed.
 
LOCKTEMPRESOURCE
Undocumented dbms_rcvcat.lockTempResource
name      IN VARCHAR2,
data_type IN VARCHAR2,
RETURN BOOLEAN;
TBD
 
LOG_DIAG_MESG (new 21c)
Undocumented dbms_rcvcat.log_diag_mesg(
input_msg         IN VARCHAR2,
param_char        IN VARCHAR2 DEFAULT NULL,
p_diag_param_char IN VARCHAR2 DEFAULT NULL);
exec rmanadmin.dbms_rcvcat.log_diag_mesg('Test Diagnostic Msg');
BEGIN dbms_rcvcat.log_diag_mesg('Test Diagnostic Msg'); END;
*
ERROR at line 1:
ORA-06550: line 5, column 25:
PLS-00201: identifier 'DBMS_RA_SCHEDULER.SEVERITY_DIAG_RECONCILE' must be declared
ORA-06550: line 1, column 8:
PL/SQL: Statement ignored
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 20666
ORA-06512: at line 1
 
LOG_FIX_MESG (new 21c)
Undocumented dbms_rcvcat.log_fix_mesg(
param_char        IN VARCHAR2 DEFAULT NULL,
p_diag_param_char IN VARCHAR2 DEFAULT NULL);
TBD
 
PUTLINE
Undocumented dbms_rcvcat.putline(line IN VARCHAR2);
See CREATESCRIPT Procedure Above
 
REGISTERDATABASE
The recovery catalog can store information about many target databases. A target database must be registered before any information about it can be recorded in the recovery catalog. dbms_rcvcat.registerDatabase(
db_id          IN NUMBER
db_name        IN VARCHAR2
reset_scn      IN NUMBER
reseet_time    IN DATE
db_unique_name IN VARCHAR2
con_id         IN NUMBER
guid           IN RAW);
TBD
 
RENAMESITE
Renames the metadata stored in recovery catalog for the given standby node dbms_rcvcat.renameSite(
from_db_unique_name IN VARCHAR2
to_db_unique_name   IN VARCHAR2);
exec dbms_rcvcat.renameSite('orabase' orabase2');
 
REVOKE_ALL
Undocumented
Overload 1
dbms_rcvcat.revoke_all(userid IN VARCHAR2);
exec dbms_rcvcat.revoke_all('UWCLASS');
 
REVOKE_CATALOG
Undocumented

Overload 1
dbms_rcvcat.revoke_catalog(
userid  IN VARCHAR2,
db_name IN VARCHAR2);
See GRANT_CATALOG Demo Above
Overload 2 dbms_rcvcat.revoke_catalog(
userid             IN VARCHAR2,
dbid               IN NUMBER,
reg_db_unique_name IN VARCHAR2);
TBD
 
REVOKE_DB_ACCESS (new 21c)
Undocumented dbms_rcvcat.revoke_db_access(
userid         IN VARCHAR2,
db_unique_name IN VARCHAR2,
csi            IN NUMBER);
TBD
 
REVOKE_REGISTER
Undocumented dbms_rcvcat.revoke_register(userid IN VARCHAR2);
See GRANT_REGISTER Demo Above
 
SANITYCHECK
Undocumented dbms_rcvcat.sanityCheck;
exec dbms_rcvcat.setDatabase;

exec dbms_rcvcat.sanityCheck;
 
SETDATABASE
Change set control file attributes of remote db_unique_name site

Overload 1
dbms_rcvcat.setDatabase(
db_name        IN VARCHAR2,
reset_scn      IN NUMBER,
reset_time     IN DATE,
db_id          IN NUMBER,
db_unique_name IN VARCHAR2,
dummy_instance IN BOOLEAN,
cf_type        IN NUMBER,
site_aware     IN BOOLEAN,
ors_instance   IN BOOLEAN);
DECLARE
 db_name    VARCHAR2(9);
 reset_scn  NUMBER;
 reset_time DATE;
 db_id      NUMBER;
 db_uniq    VARCHAR2(30);
 dummy_inst BOOLEAN := FALSE;
 ub4_cf     PLS_INTEGER := 1;   -- control file: 1= current, 4 = standby
 s_aware    BOOLEAN := TRUE;
BEGIN
  SELECT db.dbid, db.name, dbinc.resetlogs_change#, dbinc.resetlogs_time,
         DECODE(db.controlfile_type, 'CURRENT', 1, 4),
         UPPER(db.db_unique_name)
    INTO db_id, db_name, reset_scn, reset_time, ub4_cf, db_uniq
    FROM v$database db, v$database_incarnation dbinc
   WHERE dbinc.status = 'CURRENT';
/*
  dbms_rcvcat.setDatabase(db_name        => db_name,
                          reset_scn      => reset_scn,
                          reset_time     => reset_time,
                          db_id          => db_id,
                          db_unique_name => db_uniq,
                          dummy_instance => FALSE,
                          cf_type        => ub4_cf,
                          site_aware     => TRUE); */
END;
/
Overload 2 dbms_rcvcat.setDatabase(
db_name        IN VARCHAR2,
reset_scn      IN NUMBER,
reset_time     IN DATE,
db_id          IN NUMBER,
db_unique_name IN VARCHAR2);
TBD
Overload 3 dbms_rcvcat.setDatabase(dbinckey IN NUMBER);
exec dbms_rcvcat.setDatabase(2);
Overload 4 dbms_rcvcat.setDatabase;
exec dbms_rcvcat.setDatabase;
 
SETDEBUGOFF
Disable debug mode dbms_rcvcat.setDebugOff;
exec dbms_rcvcat.setDebugOff;
 
SETDEBUGON
Enable debug mode dbms_rcvcat.serDebugOn(dbglevel IN NUMBER DEFAULT RCVCAT_LEVEL_DEFAULT);
exec dbms_rcvcat.setDebugOn;
 
SET_TENANT_KEY (new 21c)
Undocumented dbms_rcvcat.set_tenant_key(
csi   IN  NUMBER,
tkey  OUT NUMBER,
cname OUT VARCHAR2);
DECLARE
 keyVal NUMBER;
 namVal dbms_id;
BEGIN
  dbms_rcvcat.set_tenant_key(22358645, keyVal, namVal);
  dbms_output.put_line(TO_CHAR(keyVal));
  dbms_output.put_line(namVal);
END;
/
DECLARE
*
ERROR at line 1:
ORA-20525: catalog schema is not multitenant enabled
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 26120
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 3458
ORA-06512: at line 5
 
THROTTLE_ME
Undocumented dbms_rcvcat.throttle_me(
p_oam_job_id    IN  VARCHAR2,
p_channels_reqd IN  NUMBER,
p_request_time  IN  DATE,
o_wait          OUT BOOLEAN,
o_error_str     OUT VARCHAR2);
TBD
 
UNREGISTERDATABASE
Unregister a database from the RMAN catalog

Overload 1
dbms_rcvcat.unregisterDatabase(
db_key IN NUMBER DEFAULT NULL,
db_id  IN NUMBER);
TBD
Overload 2 dbms_rcvcat.unregisterDatabase(idb IN VARCHAR2)
TBD
 
UNREGISTER_TENANT (new 21c)
Revokes a tenant registration dbms_rcvcat.unregister_tenant(
csi   IN NUMBER,
cname IN VARCHAR2);
TBD
 
UNREGISTER_TENANT_USER (new 21c)
Revokes privileges to a tenant user dbms_rcvcat.unregister_tenant_user(
userid IN VARCHAR2,
csi    IN NUMBER);
TBD
 
UPDATE_TENANT (new 21c)
Updates tenant information dbms_rcvcat.update_tenant(
csi       IN NUMBER,
cname     IN VARCHAR2,
status    IN VARCHAR2,  -- valid values D, E, N, R, S, T
group_vpc IN VARCHAR2 DEFAULT NULL);
exec dbms_rcvcat.update_tenant(22358645, 'test21db_iad25g', 'E');
     *
ERROR at line 1:
ORA-20525: catalog schema is not multitenant enabled
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 26120
ORA-06512: at "RMANADMIN.DBMS_RCVCAT", line 3650
ORA-06512: at line 1

Related Topics
Backup & Recovery
Built-in Functions
Built-in Packages
DBMS_BACKUP_RESTORE
DBMS_RA_DUMP
DBMS_RCVMAN
DBMS_RCVVPC
RMAN
RMAN Demos
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-2019 Daniel A. Morgan All Rights Reserved
  DBSecWorx