Oracle DBMS_PREPLUGIN_BACKUP
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
"I spent my entire adult life looking out for the well-being, the training, the equipping of the troops for whom I was responsible. I will not be lectured about what our military needs by a five-deferment draft dodger,"
~ Sen. Tammy Duckworth
Purpose Defines the interface to restore pre-plugin backups
AUTHID CURRENT_USER
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_PDB ORA$PREPLUGIN_BACKUP_MSG_T X$KRBPPBTBL
Documented No
First Available 12.2.0.1
Security Model Owned by SYS with EXECUTE granted to SYSBACKUP
Source {ORACLE_HOME}/rdbms/admin/dbmspplb.sql
Subprograms
 
DROPX$RMANTBLES (new 12.2)
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 (new 12.2)
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 (new 12.2)
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 (new 12.2)
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$RMANTABLESAS JOB (new 12.2)
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 (new 12.2)
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 (new 12.2)
Truncate KRBPPBTBL tables procedure that can be invoked using DBMS_SQL dbms_preplugin_backup.truncateX$RmanTables;
exec dbms_preplugin_backup.truncateX$RmanTables;

Related Topics
Backup
Built-in Functions
Built-in Packages
DBMS_BACKUP_RESTORE
DBMS_RCVCAT
DBMS_RCVMAN
DBMS_RCVVPC
RMAN
RMAN Demos
What's New In 12cR1
What's New In 12cR2

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