General Information
Library Note
Morgan's Library Page Header
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
Defines the interface to restore pre-plugin backups
AUTHID
DEFINER
Data Types
CREATE TYPE SYS.ORA$PREPLUGIN_BACKUP_MSG_T AS OBJECT(con_id NUMBER);
/
Dependencies
ALL_TAB_COLUMNS
DBMS_SCHEDULER
V$DATABASE
DBMS_AQ
DBMS_SQL
V$PDBS
DBMS_ASSERT
DBMS_SYS_ERROR
X$KCCPDB
DBMS_LOCK
ORA$PREPLUGIN_BACKUP_MSG_T
X$KRBPPBTBL
DBMS_PDB
Documented
No
First Available
12.2
Security Model
Owned by SYS with EXECUTE granted to SYSBACKUP
Source
{ORACLE_HOME}/rdbms/admin/dbmspplb.sql
Subprograms
DROPX$RMANTBLES
Purges all X$ tables used by RMAN to restore and recover pre-plugin backup from ROOT
dbms_preplugin_backup.dropX$RmanTables(p_con_id IN NUMBER);
conn / as sysdba
SELECT con_id, name,
FROM v$containers
ORDER BY 1;
exec dbms_preplugin_backup.dropX$RmanTables (4);
EXPORTX$RMANTABLES
Exports all X$ tables used by RMAN to restore and recover pre-plugin backup into PDB dictionary
1 - export only tables required for media recovery / 2 - export only backup meta-data tables
dbms_preplugin_backup.exportX$RmanTables(
p_pdb_name IN VARCHAR2 DEFAULT NULL,
p_type IN NUMBER DEFAULT NULL);
exec dbms_preplugin_backup.exportX$RmanTables ('PDBTEST', 1);
EXPORTX$RMANTABLESASPDB
Export X$ Rman tables procedure that can be invoked using dbms_sql
1 - export only tables required for media recovery / 2 - export only backup meta-data tables
dbms_preplugin_backup.exportX$RmanTablesAsPdb(p_type IN NUMBER);
exec dbms_preplugin_backup.exportX$RmanTablesAsPdb (4);
IMPORTX$RMANTABLES
Imports all X$ tables used by RMAN to restore and recover pre-plugin backup from PDB dictionary to ROOT based on container name
dbms_preplugin_backup.importX$RmanTables(p_pdb_name IN VARCHAR2);
exec dbms_preplugin_backup.importX$RmanTables ('PDBTEST');
IMPORTX$RMANTABLESASJOB
Same as importX$RmanTables except that it is executed as async using DBMS_SCHEDULER
dbms_preplugin_backup.importX$RmanTablesAsJob(p_con_id IN NUMBER);
exec dbms_preplugin_backup.importX$RmanTablesAsJob (4);
The code at right can be found in $ORACLE_HOME/rdbms/admin/catpplb.sql
dbms_scheduler.create_program(
program_name => l_program_name,
program_type => 'STORED_PROCEDURE',
program_action => 'sys.dbms_preplugin_backup.importX$RmanTablesUsingConId ',
number_of_arguments => 1,
enabled => FALSE,
comments => 'Program to import preplugin backups');
dbms_scheduler.define_metadata_argument(
program_name => l_program_name,
metadata_attribute => 'event_message',
argument_position => 1,
argument_name => 'p_con_id');
dbms_scheduler.enable(name => l_program_name);
IMPORTX$TABLESUSINGCONID
Imports all X$ tables used by RMAN to restore and recover pre-plugin backup from PDB dictonary to ROOT based on container ID
dbms_preplugin_backup.importX$RmanTablesUsingConId(
p_msg IN sys.ora$preplugin_backup_msg_t);
DECLARE
conIdVal sys.ora$preplugin_backup_msg_t := 4;
BEGIN
dbms_preplugin_backup.importX$RmanTablesUsingConId (conIdVal);
END;
/
TRUNCATEX$RMANTABLES
Truncate KRBPPBTBL tables procedure that can be invoked using DBMS_SQL
dbms_preplugin_backup.truncateX$RmanTables;
exec dbms_preplugin_backup.truncateX$RmanTables ;