Oracle DBMS_PREPLUGIN_BACKUP
Version 19.2.0.1

General Information
Library Note Morgan's Library Page Header
For how many years have you been working with physical servers that are starving your database of the memory necessary to deploy important new performance features such as the Result Cache, Memoptimize Pool, In-Memory Aggregation, In-Memory Column Store, and Full Database Caching? Too long? Contact me to learn how to improve all queries ... not just some queries.
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_LOCK ORA$PREPLUGIN_BACKUP_MSG_T X$KRBPPBTBL
DBMS_PDB    
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
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;

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 18cR3
What's New In 19cR2

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