Oracle DBMS_BACKUP_RESTORE
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 This package contains the interface to the kernel for creating and restoring backups of datafiles and archived logs. Backups can exist on sequential media such as tape. The kernel will read and write backups, but it is the responsibility of the caller to catalog the names of the backups.
AUTHID DEFINER
Constants
Name Data Type Value
ATTRIBUTE_NOTFOUND BINARY_INTEGER 2
ATTRIBUTE_REMOTE BINARY_INTEGER 1
MAXSCNVAL NUMBER 281474976710655
PROTOCOL_VERSION_NUMBER_MIN NUMBER 8
PROTOCOL_RELEASE_NUMBER_MIN NUMBER 0
PROTOCOL_UPDATE_NUMBER_MIN NUMBER 4
PROTOCOL_COMPONENT_NUMBER_MIN NUMBER 0
PROTOCOL_VERSION_NUMBER_MAX NUMBER 12
PROTOCOL_RELEASE_NUMBER_MAX NUMBER 1
PROTOCOL_UPDATE_NUMBER_MAX NUMBER 0
PROTOCOL_COMPONENT_NUMBER_MAX NUMBER 1
RETRYABLE_ERROR BINARY_INTEGER 19624
SIGNAL_CHANGE_TRACKING_ERROR BINARY_INTEGER 0
TBS_ATTR_ENCRYPT BINARY_INTEGER 1
TBS_ATTR_EXCLUDE BINARY_INTEGER 0
Proxy Constants
CAN_PROXY BINARY_INTEGER 0
CANNOT_PROXY BINARY_INTEGER 1
 Read Rate Constants
KBYTES BINARY_INTEGER 0
READRATE BINARY_INTEGER 1
PARALLEL BINARY_INTEGER 2
DUPCNT BINARY_INTEGER 3
VALIDATE_IN_USE BINARY_INTEGER 4
DUR_EST_SECS BINARY_INTEGER 5
DUR_ENDTIME BINARY_INTEGER 6
MAX_READ_KBYTES BINARY_INTEGER 7
SLEEP_SECS BINARY_INTEGER 8
DUR_SOFTENDTIME BINARY_INTEGER 9
 Valid Record Type Constants
RTYP_DB_INFO BINARY_INTEGER 0
RTYP_CKPTPROG BINARY_INTEGER 1
RTYP_THREAD BINARY_INTEGER 2
RTYP_LOGFILE BINARY_INTEGER 3
RTYP_DATAFILE BINARY_INTEGER 4
RTYP_FILENAME BINARY_INTEGER 5
RTYP_TABLESPACE BINARY_INTEGER 6
RTYP_RESERVED1 BINARY_INTEGER 7
RTYP_TEMPFILE BINARY_INTEGER 7
RTYP_RMAN_CONFIGURATION BINARY_INTEGER 8
RTYP_LOG_HISTORY BINARY_INTEGER 9
RTYP_OFFLINE_RANGE BINARY_INTEGER 10
RTYP_ARCHIVED_LOG BINARY_INTEGER 11
RTYP_BACKUP_SET BINARY_INTEGER 12
RTYP_BACKUP_PIECE BINARY_INTEGER 13
RTYP_BACKUP_DFILE BINARY_INTEGER 14
RTYP_BACKUP_LOG BINARY_INTEGER 15
RTYP_DFILE_COPY BINARY_INTEGER 16
RTYP_BACKUP_DFILE_CORR BINARY_INTEGER 17
RTYP_DFILE_COPY_CORR BINARY_INTEGER 18
RTYP_DELETED_OBJECT BINARY_INTEGER 19
RTYP_RESERVED3 BINARY_INTEGER 20
RTYP_PROXY BINARY_INTEGER 20
RTYP_RESERVED4 BINARY_INTEGER 21
RTYP_BACKUP_SPFILE BINARY_INTEGER 21
RTYP_DB2 BINARY_INTEGER 22
RTYP_INCARNATION BINARY_INTEGER 23
RTYP_FLASHBACK BINARY_INTEGER 24
RTYP_RA_INFO BINARY_INTEGER 25
RTYP_INST_RSVT BINARY_INTEGER 26
RTYP_AGED_FILES BINARY_INTEGER 27
RTYP_RMAN_STATUS BINARY_INTEGER 28
RTYP_THREAD_INST BINARY_INTEGER 29
RTYP_MTR BINARY_INTEGER 30
RTYP_DFH BINARY_INTEGER 31
RTYP_SDM BINARY_INTEGER 32
RTYP_RSP BINARY_INTEGER 33
RTYP_NRR BINARY_INTEGER 34
RTYP_BLOCK_CORRUPTION BINARY_INTEGER 35
RTYP_ACM_OPERATION BINARY_INTEGER 36
RTYP_FOREIGN_ARCHIVED_LOG BINARY_INTEGER 37
 Validate Constants
VALIDATE_OK BINARY_INTEGER 0
VALIDATE_RECORD_NOTFOUND BINARY_INTEGER 1
VALIDATE_RECORD_DIFFERENT BINARY_INTEGER 2
VALIDATE_FILE_DIFFERENT BINARY_INTEGER 4
VALIDATE_IN_USE BINARY_INTEGER 8
VALIDATE_DEL_FOR_SPACE BINARY_INTEGER 16
Data Types -- This record captures block statistics for a file validation.
--
TYPE blockStat_t IS RECORD (
filetype   BINARY_INTEGER, -- KSFD file type
dfNUMBER   NUMBER,         -- datafile NUMBER
thread     BINARY_INTEGER, -- archived log thread
sequence   NUMBER,         -- archived log sequence
highscn    NUMBER,         -- highest scn found in the datafile
examined   NUMBER,         -- total blocks examined
corrupt    NUMBER,         -- total blocks that are marked corrupt
empty      NUMBER,         -- total empty blocks
data_proc  NUMBER,         -- total data blocks that are processed
data_fail  NUMBER,         -- total data blocks that failed
index_proc NUMBER,         -- total index blocks that are processed
index_fail NUMBER,         -- total index blocks that failed
other_proc NUMBER,         -- total other blocks that are processed
other_fail NUMBER,         -- total other blocks that failed

-- Spare fields for future
spare1     NUMBER,
spare2     NUMBER,
spare3     NUMBER,
spare4     NUMBER,
spare5     NUMBER,
spare6     NUMBER,
spare7     DATE,
spare8     DATE);

-- Table of block statistics
TYPE blockStatTable_t IS TABLE OF blockStat_t
INDEX BY BINARY_INTEGER;

-- Record to describe a block range
TYPE blockRange_t IS RECORD (
blkNUMBER NUMBER,
dfNUMBER  NUMBER,
range     NUMBER,
spare1    NUMBER,
spare2    NUMBER,
spare3    NUMBER);

-- Table of block ranges
TYPE blockRangeTable_t IS TABLE OF blockRange_t
INDEX BY BINARY_INTEGER;

TYPE nrecs_array IS TABLE OF BINARY_INTEGER
INDEX BY BINARY_INTEGER;

TYPE register_auxdfc IS RECORD (
fname    VARCHAR2(1024),
dfnumber NUMBER,
tsnum    NUMBER,
blksize  NUMBER,
spare1   NUMBER DEFAULT NULL,
spare2   NUMBER DEFAULT NULL,
spare3   NUMBER DEFAULT NULL,
spare4   NUMBER DEFAULT NULL,
spare5   NUMBER DEFAULT NULL);

TYPE register_auxdfc_list IS TABLE OF register_auxdfc
INDEX BY BINARY_INTEGER;
Dependencies
DBMS_APPLICATION_INFO DBMS_FEATURE_RMAN_LOW DBMS_SYS_ERROR
DBMS_FEATURE_BACKUP_ENCRYPTION DBMS_FEATURE_RMAN_MEDIUM DUAL
DBMS_FEATURE_RMAN_BACKUP DBMS_FEATURE_RMAN_TAPE_BACKUP PLITBLM
DBMS_FEATURE_RMAN_BASIC DBMS_FEATURE_RMAN_ZLIB V$ARCHIVED_LOG
DBMS_FEATURE_RMAN_BZIP2 DBMS_IR V$DATABASE_INCARNATION
DBMS_FEATURE_RMAN_DISK_BACKUP DBMS_SERVER_ALERT V$INSTANCE
DBMS_FEATURE_RMAN_HIGH DBMS_STREAMS_TBS_INT X$KCCFN
Documented No
Exceptions
Error Code Reason
230 snapshot_enqueue_busy
231 snapshot_name_not_set
232 snapshot_not_made
235 inconsistant_read
ORA-19505 cant_identify_file
ORA-19551 The requested device is allocated to another session, or all devices of the requested type are busy
ORA-19557 The OSD returned an error
ORA-19560 An invalid limit number was specified
ORA-19563 File validation failure
ORA-19569 This session does not have a device allocated
ORA-19571 record_not_found
ORA-19579 archivelog_not_found
ORA-19580 backup conversation not active
ORA-19599 corrupt_block
ORA-19582 archivelog_validate_error
ORA-19608 not_a_backup_piece
ORA-19610 corrupt_directory
ORA-19625 File not found
ORA-19648 inc_scn_matches_df_scn
ORA-19658 different_resetlogs
ORA-19695 This is an internal error. The fixed table x$krbmaft was not populated using the function dbms_backup_restore.searchFiles
ORA-19699 Datafile copies with compression are not supported. If the function dbms_backup_restore.backuppieceCreate is called outside RMAN, then the incompatible values are being passed for the parameters docompress and imagcp. If this message occurs during an RMAN job, then this is an internal error in RMAN, and you should contact Oracle support.
ORA-19717 dbms_backup_restore.searchFiles was called with an empty pattern while the parameter omf was set to FALSE
ORA-19831 This version of database was incompatible with the the indicated dbms_backup_restore package installed in the database
backuppiece failover exceptions
ORA-19505 cant_identify_file
ORA-19599 corrupt_block
ORA-19608 The specified file is not a backup piece produced by the dbms_backup_restore package. Either the first block of the backup piece is corrupt or this file is not a backup piece.
ORA-19610 corrupt_directory
ORA-19624 retryable_error_exp
Used in SPFILE and controlfile restore from autobackup
ORA-19635 identical_input_output_file
ORA-19687 spfile_not_in_bs
ORA-19695 scf_not_in_bs
Used in copy code
ORA-19635 identical_input_output_file
Signaled if recovery area is not set
ORA-19801 ra_not_set
ORA-19899 xtts_name_files
First Available 12.1.0
Security Model Owned by SYS with no privileges granted
Source {ORACLE_HOME}/rdbms/admin/dbmsbkrs.sql
Subprograms
APPLYBACKUPPIECE DEVICECOMMAND PROXYGO
APPLYDATAFILETO DEVICEDEALLOCATE PROXYQUERYBACKUP
APPLYOFFLINERANGE DEVICEQUERY PROXYQUERYRESTORE
APPLYSETDATAFILE DEVICESTATUS PROXYRESTOREARCHIVEDLOG
AUTOBACKUPFLAG DOAUTOBACKUP PROXYRESTORECONTROLFILE
BACKUPARCHIVEDLOG DUPLICATEFILEEXISTS PROXYRESTOREDATAFILE
BACKUPBACKUPPIECE FAULT_INJECTOR PROXYVALIDATE
BACKUPCANCEL FETCHFILERESTORED PROXYVALONLY
BACKUPCONTROLFILE FINDAUTSEARCHFILETABLE READARCHIVEDLOGHEADER
BACKUPDATAFILE FLASHBACKADDFILE READFILEHEADER
BACKUPDATAFILECOPY FLASHBACKCANCEL REFRESHAGEDFILES
BACKUPDMPFILE FLASHBACKCONTROLFILE REGISTERAUXDFCOPY
BACKUPPIECECREATE FLASHBACKFILES REINIT
BACKUPPIECECRTDUPGET FLASHBACKSTART REMOTESQLEXECUTE
BACKUPPIECECRTDUPSET GENPIECENAME REMOVEDUPLICATEFILE
BACKUPPIECERESTORE GENTRANSPORTSCRIPT RENORMALIZEALLFILENAMES
BACKUPSETARCHIVEDLOG GETARCFILENAME RESDATAFILECOPY
BACKUPSETDATAFILE GETBLOCKSTAT RESETCFILESECTION
BACKUPSPFILE GETCKPT RESETCONFIG
BACKUPSTATUS GETCKPTSCN RESETDATABASE
BACKUPVALIDATE GETCNCTSTR RESTOREARCHIVEDLOG
BCTSET GETDEFAULTTAG RESTOREARCHIVEDLOGRANGE
BCTSWITCH GETDISKGROUPNAME RESTOREBACKUPPIECE
BMRADDBLOCK GETDUPLICATEDDATAFILECOPY RESTORECANCEL
BMRCANCEL GETFNO RESTORECONTROLFILETO
BMRDOMEDIARECOVERY GETLIMIT RESTOREDATAFILETO
BMRRESTOREFROMSTANDBY GETMAXINFO RESTOREDMPFILE
BMRGETFILE GETOMFFILENAME RESTORESETARCHIVEDLOG
BMRINITIALSCAN GETPARM RESTORESETDATAFILE
BMRRESTOREFROMFLASHBACK GETPRIMARYCONSTR RESTORESETPIECE
BMRSCANDATAFILECOPY GETSTANDBYCONSTR RESTORESETXTTFILE
BMRSTART GETTSNAMEFROMDATAFILECOPY RESTORESPFILETO
CANKEEPDATAFILES GETXTTSNAME RESTORESTATUS
CFILECALCSIZEARRAY GET_CONNECT_IDENTIFIER RESTOREVALIDATE
CFILECALCSIZELIST INCRARCHIVEDLOGBACKUPCOUNT RESTOREXTTFILETO
CFILEMAKEANDUSESNAPSHOT INCREMENTRECORDSTAMP RMAN_USAGE
CFILERESIZESECTION INITFRAMETADATA SCANARCHIVEDLOG
CFILESETSNAPSHOTNAME INITMSB SCANDATAFILE
CFILEUSECOPY INITMSC SCANDATAFILECOPY
CFILEUSECURRENT INITMSR SEARCHFILES
CFILEUSESNAPSHOT INITNAMESPACE SETCONFIG
CHANGEARCHIVEDLOG INSPECTARCHIVEDLOG SETDATAFILEAUX
CHANGEBACKUPPIECE INSPECTARCHIVEDLOGSEQ SETLIMIT
CHANGEBACKUPSET INSPECTBACKUPPIECE STMSB
CHANGEDATAFILECOPY INSPECTCONTROLFILE SETMSC
CHECKCOMPRESSIONALG INSPECTDATAFILECOPY SETPARMS
CHECKFILENAME IR_ICD_FINISH SETRMANSTATUSROWID
CLEANUPBACKUPRECORDS IR_ICD_START SETTABLESPACEATTR
CLEANUPFOREIGNARCHIVEDLOGS ISFILENAMEOMF SETTABLESPACEEXCLUDE
CLEANUPPGACONTEXT MANAGEAUXINSTANCE SET_CHARSET
CLEARCONTROLFILE NETWORKBACKUPARCHIVEDLOG SET_CLIENT_INFO
CLEARONLINELOGNAMES NETWORKBACKUPDATAFILE SETDBUNIQNAMETSPITR
CLEARRECOVERYDESTFLAG NETWORKBACKUPSPFILE SLEEP
CLEARUNARCHIVEDLOGS NETWORKFILETRANSFER SWITCHTEMPFILE
COMMITRMANSTATUSROW NETWORKREADFILEHEADER SWITCHTOCOPY
CONVERTDATAFILECOPY NETWORKSETMSB SWITCH_PRIMARY_BCT
CONVERTFILENAME NIDBEGIN TRANSPORTDBLOCK
COPYARCHIVEDLOG NIDEND TRANSPORTDBUNLOCK
COPYCONTROLFILE NIDGETNEWDBID UPDATEHEADERS
COPYDATAFILE NIDPROCESSCF UPDATERMASTATUSROW
COPYDATAFILECOPY NIDPROCESSDF VALIDATEARCHIVEDLOG
CREATEDATAFILE NORMALIZEFILENAME VALIDATEBACKUPPIECE
CREATEFRAAUXCFCOPY OAMPOLLEDRECORD VALIDATEBLOCK
CREATEFRAAUXDFCOPY ORACLESBTVERSION VALIDATEDATAFILECOPY
CREATERMANOUTPUTROW PIECECONTEXTGETNUMBER VALIDATETABLESPACE
CREATERMANSTATUSROW PROCESSSEARCHFILETABLE VALIDATIONADDPIECE
CROSSCHECKBACKUPPIECE PROXYBACKUPARCHIVEDLOG VALIDATIONEND
DBA2RFNO PROXYBACKUPCONTROLFILE VALIDATIONNEXTRESULT
DELETEARCHIVEDLOG PROXYBACKUPDATAFILE VALIDATIONSTART
DELETEBACKUPPIECE PROXYBACKUPDATAFILECOPY VALIDATIONVALIDATE
DELETECONFIG PROXYBEGINBACKUP VSSBACKEDRECORD
DELETEDATAFILECOPY PROXYBEGINRESTORE WRITEDUPLICATEDDATAFILECOPY
DELETED_GETDBINFO PROXYCANCEL WRITETRACE
DELETEFILE PROXYCHANGE XTTRESTORE
DEVICEALLOCATE PROXYDELETE ZERODBID
 
APPLYBACKUPPIECE
Reads one backup piece and writes its contents to the files in the restore list. Applies incremental backups to existing datafiles. dbms_backup_restore.applybackuppiece(
handle IN  VARCHAR2,
done   OUT BOOLEAN,
params IN  VARCHAR2 DEFAULT NULL);
TBD
 
APPLYDATAFILETO
Applies an incremental backup from the backup set to an existing copy of the datafile. The incremental backup and the datafile must have the same resetlogs stamp but this can not be detected until the restore is begun.
Overload 1
dbms_backup_restore.applydatafileto(
dfNUMBER       IN BINARY_INTEGER,
toname         IN VARCHAR2 DEFAULT NULL,
fuzziness_hint IN NUMBER   DEFAULT 0);
TBD
Overload 2 dbms_backup_restore.applydatafileto(
dfNUMBER       IN BINARY_INTEGER,
toname         IN VARCHAR2 DEFAULT NULL,
fuzziness_hint IN NUMBER   DEFAULT 0,
max_corrupt    IN BINARY_INTEGER);
TBD
Overload 3 dbms_backup_restore.applydatafileto(
dfNUMBER       IN BINARY_INTEGER,
toname         IN VARCHAR2 DEFAULT NULL,
fuzziness_hint IN NUMBER DEFAULT 0,
max_corrupt    IN BINARY_INTEGER,
islevel0       IN BINARY_INTEGER
,
recid          IN NUMBER,
stamp          IN NUMBER);
TBD
 
APPLYOFFLINERANGE
Applies an offline range record from the named controlfile to the named datafile

Overload 1
dbms_backup_restore.applyofflinerange(
cfname  IN VARCHAR2 DEFAULT NULL,
dfname  IN VARCHAR2 DEFAULT NULL,
blksize IN NUMBER   DEFAULT NULL,
recid   IN NUMBER   DEFAULT NULL,
stamp   IN NUMBER   DEFAULT NULL,
fno     IN BINARY_INTEGER);
TBD
Overload 2 dbms_backup_restore.applyofflinerange(
cfname  IN VARCHAR2 DEFAULT NULL,
dfname  IN VARCHAR2 DEFAULT NULL,
blksize IN NUMBER   DEFAULT NULL,
recid   IN NUMBER   DEFAULT NULL,
stamp   IN NUMBER   DEFAULT NULL,
fno     IN BINARY_INTEGER,
dfrecid IN NUMBER,
dfstamp IN NUMBER);
TBD
 
APPLYSETDATAFILE (new 12.1 overloads)
Begins a conversation that will apply incremental backups to existing datafiles
Overload 1
dbms_backup_restore.applysetdatafile;
exec dbms_backup_restore.applysetdatafile;
Overload 2 dbms_backup_restore.applysetdatafile(check_logical IN BOOLEAN);
exec dbms_backup_restore.applysetdatafile(FALSE);
Overload 3 dbms_backup_restore.applysetdatafile(
check_logical IN BOOLEAN,
cleanup       IN BOOLEAN);
exec dbms_backup_restore.applysetdatafile(FALSE, TRUE);
Overload 4 dbms_backup_restore.applysetdatafile(
check_logical IN BOOLEAN,
cleanup       IN BOOLEAN,
service       IN VARCHAR2
);
exec dbms_backup_restore.applysetdatafile(FALSE, TRUE, 'SYS$BACKGROUND');
Overload 5 dbms_backup_restore.applysetdatafile(
check_logical IN BOOLEAN,
cleanup       IN BOOLEAN,
service       IN VARCHAR2,
chunksize     IN BINARY_INTEGER,
rs_flags      IN BINARY_INTEGER
);
TBD
 
AUTOBACKUPFLAG
Turns the server tracking flag OFF or ON for generating autobackups on structural changes dbms_backup_restore.autobackupflag(flag IN BOOLEAN);
exec dbms_backup_restore.autobackupflag(TRUE);
 
BACKUPARCHIVEDLOG
Add an archived log to the redo log backup set

Overload 1
dbms_backup_restore.backuparchivedlog(arch_recid IN NUMBER, arch_stamp IN NUMBER);
TBD
Overload 2 dbms_backup_restore.backuparchivedlog(
arch_recid IN  NUMBER,
arch_stamp IN  NUMBER,
duplicate  OUT BOOLEAN);
TBD
 
BACKUPBACKUPPIECE (new 12.1 overloads)
Copies a backup piece originally written to an operating system file, onto sequential media. This requires allocating a sequential device first. Can copy to another operating system file if the NULL device is allocated.

Overload 1
dbms_backup_restore.backupbackuppiece(
bpname     IN  VARCHAR2,
fname      IN  VARCHAR2,
handle     OUT VARCHAR2,
comment    OUT VARCHAR2,
media      OUT VARCHAR2,
concur     OUT BOOLEAN,
recid      OUT NUMBER,
stamp      OUT NUMBER,
tag        IN  VARCHAR2       DEFAULT NULL,
params     IN  VARCHAR2       DEFAULT NULL,
media_pool IN  BINARY_INTEGER DEFAULT 0,
reuse      IN  BOOLEAN        DEFAULT FALSE);
TBD
Overload 2 dbms_backup_restore.backupbackuppiece(
bpname        IN  VARCHAR2,
fname         IN  VARCHAR2,
handle        OUT VARCHAR2,
comment       OUT VARCHAR2,
media         OUT VARCHAR2,
concur        OUT BOOLEAN,
recid         OUT NUMBER,
stamp         OUT NUMBER,
tag           IN  VARCHAR2       DEFAULT NULL,
params        IN  VARCHAR2       DEFAULT NULL,
media_pool    IN  BINARY_INTEGER DEFAULT 0,
reuse         IN  BOOLEAN        DEFAULT FALSE,
check_logical IN  BOOLEAN);
TBD
Overload 3 dbms_backup_restore.backupbackuppiece(
bpname        IN  VARCHAR2,
fname         IN  VARCHAR2,
handle        OUT VARCHAR2,
comment       OUT VARCHAR2,
media         OUT VARCHAR2,
concur        OUT BOOLEAN,
recid         OUT NUMBER,
stamp         OUT NUMBER,
tag           IN  VARCHAR2       DEFAULT NULL,
params        IN  VARCHAR2       DEFAULT NULL,
media_pool    IN  BINARY_INTEGER DEFAULT 0,
reuse         IN  BOOLEAN        DEFAULT FALSE,
check_logical IN  BOOLEAN,
copyno        IN  BINARY_INTEGER);
TBD
Overload 4 dbms_backup_restore.backupbackuppiece(
bpname        IN  VARCHAR2,
fname         IN  VARCHAR2,
handle        OUT VARCHAR2,
comment       OUT VARCHAR2,
media         OUT VARCHAR2,
concur        OUT BOOLEAN,
recid         OUT NUMBER,
stamp         OUT NUMBER,
tag           IN  VARCHAR2       DEFAULT NULL,
params        IN  VARCHAR2       DEFAULT NULL,
media_pool    IN  BINARY_INTEGER DEFAULT 0,
reuse         IN  BOOLEAN        DEFAULT FALSE,
check_logical IN  BOOLEAN,
copyno        IN  BINARY_INTEGER,
deffmt        IN  BINARY_INTEGER,
copy_recid    IN  NUMBER,
copy_stamp    IN  NUMBER,
npieces       IN  BINARY_INTEGER);
TBD
Overload 5 dbms_backup_restore.backupbackuppiece(
bpname        IN  VARCHAR2,
fname         IN  VARCHAR2,
handle        OUT VARCHAR2,
comment       OUT VARCHAR2,
media         OUT VARCHAR2,
concur        OUT BOOLEAN,
recid         OUT NUMBER,
stamp         OUT NUMBEr,
tag           IN  VARCHAR2       DEFAULT NULL,
params        IN  VARCHAR2       DEFAULT NULL,
media_pool    IN  BINARY_INTEGER DEFAULT 0,
reuse         IN  BOOLEAN        DEFAULT FALSE,
check_logical IN  BOOLEAN,
copyno        IN  BINARY_INTEGER,
deffmt        IN  BINARY_INTEGER,
copy_recid    IN  NUMBER
,
copy_stamp    IN  NUMBER
,
npieces       IN  BINARY_INTEGER
,
dest          IN  BINARY_INTEGER
);
TBD
Overload 6 dbms_backup_restore.backupbackuppiece(
bpname        IN  VARCHAR2,
fname         IN  VARCHAR2,
handle        OUT VARCHAR2,
comment       OUT VARCHAR2,
media         OUT VARCHAR2,
concur        OUT BOOLEAN,
recid         OUT NUMBER,
stamp         OUT NUMBER,
tag           IN  VARCHAR2       DEFAULT NULL,
params        IN  VARCHAR2       DEFAULT NULL,
media_pool    IN  BINARY_INTEGER DEFAULT 0,
reuse         IN  BOOLEAN        DEFAULT FALSE,
check_logical IN  BOOLEAN,
copyno        IN  BINARY_INTEGER,
deffmt        IN  BINARY_INTEGER,
copy_recid    IN  NUMBER,
copy_stamp    IN  NUMBER,
npieces       IN  BINARY_INTEGER,
dest          IN  BINARY_INTEGER,
pltfrmfr      IN  BINARY_INTEGER
);
TBD
Overload 7 dbms_backup_restore.backupbackuppiece(
bpname        IN  VARCHAR2,
fname         IN  VARCHAR2,
handle        OUT VARCHAR2,
comment       OUT VARCHAR2,
media         OUT VARCHAR2,
concur        OUT BOOLEAN,
recid         OUT NUMBER,
stamp         OUT NUMBER,
tag           IN  VARCHAR2       DEFAULT NULL,
params        IN  VARCHAR2       DEFAULT NULL,
media_pool    IN  BINARY_INTEGER DEFAULT 0,
reuse         IN  BOOLEAN        DEFAULT FALSE,
check_logical IN  BOOLEAN,
copyno        IN  BINARY_INTEGER,
deffmt        IN  BINARY_INTEGER,
copy_recid    IN  NUMBER,
copy_stamp    IN  NUMBER,
npieces       IN  BINARY_INTEGER,
dest          IN  BINARY_INTEGER,
pltfrmfr      IN  BINARY_INTEGER,
ors           IN  BOOLEAN,
bpsize        OUT NUMBER
);
TBD
 
BACKUPCANCEL
Cancels a backup conversation releasing the context dbms_backup_restore.backupcancel;
exec dbms_backup_restore.backupcancel;
 
BACKUPCONTROLFILE
Include the controlfile in the backup set
Overload 1
dbms_backup_restore.backupcontrolfile(cfname IN VARCHAR2 DEFAULT NULL);
-- a backup confirmation must be active for this to function

exec dbms_backup_restore.backupcontrolfile;
Overload 2 dbms_backup_restore.backupcontrolefile(
cfname IN VARCHAR2 DEFAULT NULL,
isstby IN BOOLEAN);
TBD
Overload 3 dbms_backup_restore.backupcontrolefile(
cfname      IN VARCHAR2 DEFAULT NULL,
isstby      IN BOOLEAN,
snapshot_cf IN BOOLEAN);
TBD
 
BACKUPDATAFILE
Add a data file to a backup set dbms_backup_restore.backupdatafile(
dfNUMBER     IN BINARY_INTEGER,
since_change IN NUMBER         DEFAULT 0,
max_corrupt  IN BINARY_INTEGER DEFAULT 0);
TBD
 
BACKUPDATAFILECOPY
Backups a copy of a datafile that was made via copyDataFile or some operating system utility dbms_backup_restore.backupdatafilecopy(
copy_recid   IN NUMBER,
copy_stamp   IN NUMBER,
since_change IN NUMBER         DEFAULT 0,
max_corrupt  IN BINARY_INTEGER DEFAULT 0);
TBD
 
BACKUPDMPFILE (new 12.1 )
Adds a datapump export dumpfile log to the backup set dbms_backup_restore.backupdmpfile(
dmpfile   IN VARCHAR2,
blksize   IN NUMBER,
dpckpscn  IN NUMBER,
dpckptime IN NUMBER,
dprlgscn  IN NUMBER,
dprlgtime IN NUMBER,
dpfno     IN NUMBER,
dbid      IN NUMBER);
TBD
 
BACKUPPIECECREATE
This procedure should be called to create the first (and any subsequent) backup piece after all calls to specify the file list have been issued. Multiple backupPieceCreate calls may be necessary.

Overload 1
dbms_backup_restore.backuppiececreate(
fname   IN  VARCHAR2,
pieceno OUT BINARY_INTEGER,
done    OUT BOOLEAN,
handle  OUT VARCHAR2,
comment OUT VARCHAR2,
media   OUT VARCHAR2,
concur  OUT BOOLEAN,
params  IN  VARCHAR2 DEFAULT NULL);

LOPT_FALSE CONSTANT BINARY_INTEGER := 1;
LOPT_TRUE  CONSTANT BINARY_INTEGER := 2;
TBD
Overload 2 dbms_backup_restore.backuppiececreate(
fname      IN  VARCHAR2,
pieceno    OUT BINARY_INTEGER,
done       OUT BOOLEAN,
handle     OUT VARCHAR2,
comment    OUT VARCHAR2,
media      OUT VARCHAR2,
concur     OUT BOOLEAN,
params     IN  VARCHAR2 DEFAULT NULL,
media_pool IN  BINARY_INTEGER);
TBD
Overload 3 dbms_backup_restore.backuppiececreate(
fname      IN VARCHAR2,
pieceno    OUT BINARY_INTEGER,
done       OUT BOOLEAN,
handle     OUT VARCHAR2,
comment    OUT VARCHAR2,
media      OUT VARCHAR2,
concur     OUT BOOLEAN,
params     IN  VARCHAR2       DEFAULT NULL,
media_pool IN  BINARY_INTEGER DEFAULT 0,
reuse      IN  BOOLEAN);
TBD
Overload 4 dbms_backup_restore.backuppiececreate(
fname     IN  VARCHAR2,
pieceno   OUT BINARY_INTEGER,
done      OUT BOOLEAN,
handle    OUT VARCHAR2,
comment   OUT VARCHAR2,
media     OUT VARCHAR2,
concur    OUT BOOLEAN,
params    IN  VARCHAR2 DEFAULT NULL,
sequence  IN  BINARY_INTEGER
,
year      IN  BINARY_INTEGER
,
month_day IN  BINARY_INTEGER
);
TBD
Overload 5 dbms_backup_restore.backuppiececreate(
fname      IN  VARCHAR2,
pieceno    OUT BINARY_INTEGER,
done       OUT BOOLEAN,
handle     OUT VARCHAR2,
comment    OUT VARCHAR2,
media      OUT VARCHAR2,
concur     OUT BOOLEAN,
params     IN  VARCHAR2 DEFAULT NULL,
media_pool IN  BINARY_INTEGER,
sequence   IN  BINARY_INTEGER,
year       IN  BINARY_INTEGER,
month_day  IN  BINARY_INTEGER);
TBD
Overload 6 dbms_backup_restore.backuppiececreate(
fname      IN  VARCHAR2,
pieceno    OUT BINARY_INTEGER,
done       OUT BOOLEAN,
handle     OUT VARCHAR2,
comment    OUT VARCHAR2,
media      OUT VARCHAR2,
concur     OUT BOOLEAN,
params     IN  VARCHAR2       DEFAULT NULL,
media_pool IN  BINARY_INTEGER DEFAULT 0,
reuse      IN  BOOLEAN,
sequence   IN  BINARY_INTEGER,
year       IN  BINARY_INTEGER,
month_day  IN  BINARY_INTEGER);
TBD
Overload 7 dbms_backup_restore.backuppiececreate(
fname            IN  VARCHAR2,
pieceno          OUT BINARY_INTEGER,
done             OUT BOOLEAN,
handle           OUT VARCHAR2,
comment          OUT VARCHAR2,
media            OUT VARCHAR2,
concur           OUT BOOLEAN,
params           IN  VARCHAR2       DEFAULT NULL,
media_pool       IN  BINARY_INTEGER DEFAULT 0,
reuse            IN  BOOLEAN DEFAULT FALSE,
sequence         IN  BINARY_INTEGER,
year             IN  BINARY_INTEGER,
month_day        IN  BINARY_INTEGER,
archlog_failover OUT BOOLEAN);
TBD
Overload 8 dbms_backup_restore.backuppiececreate(
fname            IN  VARCHAR2,
pieceno          OUT BINARY_INTEGER,
done             OUT BOOLEAN,
handle           OUT VARCHAR2,
comment          OUT VARCHAR2,
media            OUT VARCHAR2,
concur           OUT BOOLEAN,
params           IN  VARCHAR2       DEFAULT NULL,
media_pool       IN  BINARY_INTEGER DEFAULT 0,
reuse            IN  BOOLEAN DEFAULT FALSE,
sequence         IN  BINARY_INTEGER,
year             IN  BINARY_INTEGER,
month            IN  BINARY_INTEGER,
day              IN  BINARY_INTEGER,
archlog_failover OUT BOOLEAN,
deffmt           IN  BINARY_INTEGER,
recid            OUT NUMBER,
stamp            OUT NUMBER,
tag              OUT VARCHAR2);
TBD
Overload 9 dbms_backup_restore.backuppiececreate(
fname            IN  VARCHAR2,
pieceno          OUT BINARY_INTEGER,
done             OUT BOOLEAN,
handle           OUT VARCHAR2,
comment          OUT VARCHAR2,
media            OUT VARCHAR2,
concur           OUT BOOLEAN,
params           IN  VARCHAR2       DEFAULT NULL,
media_pool       IN  BINARY_INTEGER DEFAULT 0,
reuse            IN  BOOLEAN        DEFAULT FALSE,
archlog_failover OUT BOOLEAN,
deffmt           IN  BINARY_INTEGER,
recid            OUT NUMBER,
stamp            OUT NUMBER,
tag              OUT VARCHAR2,
docompress       IN  BOOLEAN
);
TBD
Overload 10 dbms_backup_restore.backuppiececreate(
fname            IN  VARCHAR2,
pieceno          OUT BINARY_INTEGER,
done             OUT BOOLEAN,
handle           OUT VARCHAR2,
comment          OUT VARCHAR2,
media            OUT VARCHAR2,
concur           OUT BOOLEAN,
params           IN  VARCHAR2       DEFAULT NULL,
media_pool       IN  BINARY_INTEGER DEFAULT 0,
reuse            IN  BOOLEAN        DEFAULT FALSE,
archlog_failover OUT BOOLEAN,
deffmt           IN  BINARY_INTEGER,
recid            OUT NUMBER,
stamp            OUT NUMBER,
tag              OUT VARCHAR2,
docompress       IN  BOOLEAN,
dest             IN  BINARY_INTEGER);
TBD
Overload 11 dbms_backup_restore.backuppiececreate(
fname            IN  VARCHAR2,
pieceno          OUT BINARY_INTEGER,
done             OUT BOOLEAN,
handle           OUT VARCHAR2,
comment          OUT VARCHAR2,
media            OUT VARCHAR2,
concur           OUT BOOLEAN,
params           IN  VARCHAR2       DEFAULT NULL,
media_pool       IN  BINARY_INTEGER DEFAULT 0,
reuse            IN  BOOLEAN        DEFAULT FALSE,
archlog_failover OUT BOOLEAN,
deffmt           IN  BINARY_INTEGER,
recid            OUT NUMBER,
stamp            OUT NUMBER,
tag              OUT VARCHAR2,
docompress       IN  BOOLEAN,
dest             IN  BINARY_INTEGER,
post10_2         IN  BOOLEAN)
;
TBD
Overload 12 dbms_backup_restore.backuppiececreate(
fname            IN  VARCHAR2,
pieceno          OUT BINARY_INTEGER,
done             OUT BOOLEAN,
handle           OUT VARCHAR2,
comment          OUT VARCHAR2,
media            OUT VARCHAR2,
concur           OUT BOOLEAN,
params           IN  VARCHAR2       DEFAULT NULL,
media_pool       IN  BINARY_INTEGER DEFAULT 0,
reuse            IN  BOOLEAN        DEFAULT FALSE,
archlog_failover OUT BOOLEAN,
deffmt           IN  BINARY_INTEGER,
recid            OUT NUMBER,
stamp            OUT NUMBER,
tag              OUT VARCHAR2,
docompress       IN  BOOLEAN,
dest             IN  BINARY_INTEGER,
post10_2         IN  BOOLEAN,
netalias         IN  VARCHAR2,
compressalg      IN  VARCHAR2);
TBD
Overload 13 dbms_backup_restore.backuppiececreate(
fname            IN  VARCHAR2,
pieceno          OUT BINARY_INTEGER,
done             OUT BOOLEAN,
handle           OUT VARCHAR2,
comment          OUT VARCHAR2,
media            OUT VARCHAR2,
concur           OUT BOOLEAN,
params           IN  VARCHAR2       DEFAULT NULL,
media_pool       IN  BINARY_INTEGER DEFAULT 0,
reuse            IN  BOOLEAN        DEFAULT FALSE,
archlog_failover OUT BOOLEAN,
deffmt           IN  BINARY_INTEGER,
recid            OUT NUMBER,
stamp            OUT NUMBER,
tag              OUT VARCHAR2,
docompress       IN  BOOLEAN,
dest             IN  BINARY_INTEGER,
post10_2         IN  BOOLEAN,
netalias         IN  VARCHAR2,
compressalg      IN  VARCHAR2,
compressasof     IN  NUMBER         DEFAULT 1,
compresslopt     IN  BINARY_INTEGER DEFAULT LOPT_TRUE
);
TBD
 
BACKUPPIECECRTDUPGET
Gets the output information (media, handle and comment) for the copy specified by copy_n and places it in the output variables dbms_backup_restore.backuppiecedupget(
copy_n  IN  BINARY_INTEGER,
handle  OUT VARCHAR2,
comment OUT VARCHAR2,
media   OUT VARCHAR2);
TBD
 
BACKUPPIECECRTDUPSET
Sets the output information (media, handle and comment) for the copy specified by copy_n and places it in the output variables dbms_backup_restore.backuppiececrtdupset(copy_n IN BINARY_INTEGER, fname IN VARCHAR2);
TBD
 
BACKUPPIECERESTORE
Restores a backup piece dbms_backup_restore.backuppiecerestore(
bpname        IN  VARCHAR2,
fname         IN  VARCHAR2,
handle        OUT VARCHAR2,
recid         OUT NUMBER,
stamp         OUT NUMBER,
tag           IN  VARCHAR2 DEFAULT NULL,
reuse         IN  BOOLEAN  DEFAULT FALSE,
check_logical IN  BOOLEAN);
TBD
 
BACKUPSETARCHIVEDLOG
Starts a backup conversation to backup archived redo logs

Overload 1
dbms_backup_restore.backupsetarchivedlog(
set_stamp  OUT NUMBER,
set_count  OUT NUMBER,
nochecksum IN  BOOLEAN DEFAULT FALSE);
DECLARE
 stmp NUMBER;
 cntr NUMBER;
BEGIN
  dbms_backup_restore.backupsetarchivedlog(stmp, cntr, FALSE);
  dbms_output.put_line(TO_CHAR(stmp));
  dbms_output.put_line(TO_CHAR(cntr));
END;
/

exec dbms_backup_restore.backupcancel;
Overload 2 dbms_backup_restore.backupsetarchivedlog(
set_stamp  OUT NUMBER,
set_count  OUT NUMBER,
nochecksum IN  BOOLEAN DEFAULT FALSE,
tag        IN  VARCHAR2);
TBD
Overload 3 dbms_backup_restore.backupsetarchivedlog(
set_stamp  OUT NUMBER,
set_count  OUT NUMBER,
nochecksum IN  BOOLEAN DEFAULT FALSE,
tag        IN  VARCHAR2,
imagcp     IN  BOOLEAN
);
TBD
Overload 4 dbms_backup_restore.backupsetarchivedlog(
set_stamp  OUT NUMBER,
set_count  OUT NUMBER,
nochecksum IN  BOOLEAN DEFAULT FALSE,
tag        IN  VARCHAR2,
imagcp     IN  BOOLEAN,
validate   IN  BOOLEAN
);
TBD
Overload 5 dbms_backup_restore.backupsetarchivedlog(
set_stamp    OUT NUMBER,
set_count    OUT NUMBER,
nochecksum   IN  BOOLEAN DEFAULT FALSE,
tag          IN  VARCHAR2,
imagcp       IN  BOOLEAN,
validate     IN  BOOLEAN,
keep_options IN  BINARY_INTEGER,
keep_until   IN  NUMBER
);
TBD
 
BACKUPSETDATAFILE
Starts a backup conversation to backup datafiles and possibly a controlfile

Overload 1
dbms_backup_restore.backupsetdatafile(
set_stamp    OUT NUMBER,
set_count    OUT NUMBER,
nochecksum   IN  BOOLEAN        DEFAULT FALSE,
tag          IN  VARCHAR2       DEFAULT NULL,
incremental  IN  BOOLEAN        DEFAULT FALSE,
backup_level IN  BINARY_INTEGER DEFAULT 0);
DECLARE
 stmp NUMBER;
 cntr NUMBER;
BEGIN
  dbms_backup_restore.backupsetdatafile(stmp, cntr, FALSE, NULL, FALSE, 0);
  dbms_output.put_line(TO_CHAR(stmp));
  dbms_output.put_line(TO_CHAR(cntr));
END;
/

exec dbms_backup_restore.backupcancel;
Overload 2 dbms_backup_restore.backupsetdatafile(
set_stamp     OUT NUMBER,
set_count     OUT NUMBER,
nochecksum    IN  BOOLEAN        DEFAULT FALSE,
tag           IN  VARCHAR2       DEFAULT NULL,
incremental   IN  BOOLEAN        DEFAULT FALSE,
backup_level  IN  BINARY_INTEGER DEFAULT 0,
check_logical IN  BOOLEAN);
TBD
Overload 3 dbms_backup_restore.backupsetdatafile(
set_stamp     OUT NUMBER,
set_count     OUT NUMBER,
nochecksum    IN  BOOLEAN  DEFAULT FALSE,
tag           IN  VARCHAR2 DEFAULT NULL,
incremental   IN  BOOLEAN  DEFAULT FALSE,
backup_level  IN  BINARY_INTEGER DEFAULT 0,
check_logical IN  BOOLEAN  DEFAULT FALSE,
keep_options  IN  BINARY_INTEGER,
keep_until    IN  NUMBER);
TBD
Overload 4 dbms_backup_restore.backupsetdatafile(
set_stamp     OUT NUMBER,
set_count     OUT NUMBER,
nochecksum    IN  BOOLEAN  DEFAULT FALSE,
tag           IN  VARCHAR2 DEFAULT NULL,
incremental   IN  BOOLEAN  DEFAULT FALSE,
backup_level  IN  BINARY_INTEGER DEFAULT 0,
check_logical IN  BOOLEAN  DEFAULT FALSE,
keep_options  IN  BINARY_INTEGER DEFAULT 0,
keep_until    IN  NUMBER   DEFAULT 0,
imagcp        IN  BOOLEAN
,
convertto     IN  BOOLEAN,
convertfr     IN  BOOLEAN,
pltfrmto      IN  BINARY_INTEGER,
pltfrmfr      IN  BINARY_INTEGER,
sameen        IN  BOOLEAN);
TBD
Overload 5 dbms_backup_restore.backupsetdatafile(
set_stamp     OUT NUMBER,
set_count     OUT NUMBER,
nochecksum    IN  BOOLEAN  DEFAULT FALSE,
tag           IN  VARCHAR2 DEFAULT NULL,
incremental   IN  BOOLEAN  DEFAULT FALSE,
backup_level  IN  BINARY_INTEGER DEFAULT 0,
check_logical IN  BOOLEAN  DEFAULT FALSE,
keep_options  IN  BINARY_INTEGER DEFAULT 0,
keep_until    IN  NUMBER   DEFAULT 0,
imagcp        IN  BOOLEAN,
convertto     IN  BOOLEAN,
convertfr     IN  BOOLEAN,
pltfrmto      IN  BINARY_INTEGER,
pltfrmfr      IN  BINARY_INTEGER,
sameen        IN  BOOLEAN,
convertdb     IN  BOOLEAN);
TBD
Overload 6 dbms_backup_restore.backupsetdatafile(
set_stamp     OUT NUMBER,
set_count     OUT NUMBER,
nochecksum    IN  BOOLEAN  DEFAULT FALSE,
tag           IN  VARCHAR2 DEFAULT NULL,
incremental   IN  BOOLEAN  DEFAULT FALSE,
backup_level  IN  BINARY_INTEGER DEFAULT 0,
check_logical IN  BOOLEAN  DEFAULT FALSE,
keep_options  IN  BINARY_INTEGER DEFAULT 0,
keep_until    IN  NUMBER   DEFAULT 0,
imagcp        IN  BOOLEAN,
convertto     IN  BOOLEAN,
convertfr     IN  BOOLEAN,
pltfrmto      IN  BINARY_INTEGER,
pltfrmfr      IN  BINARY_INTEGER,
sameen        IN  BOOLEAN,
convertdb     IN  BOOLEAN,
nocatalog     IN  BOOLEAN);
TBD
Overload 7 dbms_backup_restore.backupsetdatafile(
set_stamp        OUT NUMBER,
set_count        OUT NUMBER,
nochecksum    IN     BOOLEAN        DEFAULT FALSE,
tag           IN     VARCHAR2       DEFAULT NULL,
incremental   IN     BOOLEAN        DEFAULT FALSE,
backup_level  IN     BINARY_INTEGER DEFAULT 0,
check_logical IN     BOOLEAN        DEFAULT FALSE,
keep_options  IN     BINARY_INTEGER DEFAULT 0,
keep_until    IN     NUMBER         DEFAULT 0,
imagcp        IN     BOOLEAN,
convertto     IN     BOOLEAN,
convertfr     IN     BOOLEAN,
pltfrmto      IN     BINARY_INTEGER,
pltfrmfr      IN     BINARY_INTEGER,
sameen        IN     BOOLEAN,
convertdb     IN     BOOLEAN,
nocatalog     IN     BOOLEAN,
validate      IN     BOOLEAN,
validateblk   IN     BOOLEAN,
hdrupd        IN OUT BOOLEAN);
TBD
 
BACKUPSPFILE
Backup the current SPFILE in the backup set dbms_backup_restore.backupspfile;
exec dbms_backup_restore.backupspfile;
 
BACKUPSTATUS
Returns information about the current backup conversation. Useful for resyncing with a conversation after an error has interrupted normal execution. Can also be called if there is no conversation. dbms_backup_restore.backupstatus(
state       OUT BINARY_INTEGER,
setid       OUT NUMBER,
stamp       OUT NUMBER,
pieceno     OUT BINARY_INTEGER,
files       OUT BINARY_INTEGER,
datafiles   OUT BOOLEAN,
incremental OUT BOOLEAN,
nochecksum  OUT BOOLEAN,
device      OUT BOOLEAN);

BACKUP_NO_CONVERSATION CONSTANT BINARY_INTEGER := 0;
BACKUP_NAMING_FILES    CONSTANT BINARY_INTEGER := 1;
BACKUP_PIECE_CREATE    CONSTANT BINARY_INTEGER := 2;
BACKUP_PIECE_RETRY     CONSTANT BINARY_INTEGER := 3;
DECLARE
 state BINARY_INTEGER;
 setid NUMBER;
 stmp  NUMBER;
 pno   BINARY_INTEGER;
 files BINARY_INTEGER;
 dfile BOOLEAN;
 incr  BOOLEAN;
 nochk BOOLEAN;
 dev   BOOLEAN;
BEGIN
  dbms_backup_restore.backupstatus(state, setid, stmp, pno, files, dfile, incr, nochk, dev);
  dbms_output.put_line(state);
  dbms_output.put_line(setid);
  dbms_output.put_line(stmp);
  dbms_output.put_line(pno);
  dbms_output.put_line(files);
END;
/
 
BACKUPVALIDATE (new 12.1 overload)
Called to perform a validation backup
Overload 1
dbms_backup_restore.backupvalidate;
exec dbms_backup_restore.backupvalidate;
Overload 2 dbms_backup_restore.backupvalidate(archlog_failover OUT BOOLEAN);
set serveroutput on

DECLARE
 b BOOLEAN;
BEGIN
  dbms_backup_restore.backupvalidate
(b);

  IF b THEN
    dbms_output.put_line('TRUE');
  ELSE
    dbms_output.put_line('FALSE');
  END IF;
END;
/
Overload 3 dbms_backup_restore.backupvalidate(
archlog_failover OUT BOOLEAN,
nocleanup        IN  BOOLEAN);
TBD
Overload 4 dbms_backup_restore.backupvalidate(
archlog_failover OUT BOOLEAN,
nocleanup        IN  BOOLEAN,
compress_set     IN  BOOLEAN
);
TBD
 
BCTSET
Allows for runtime adjustment of various constants that affect the operation of the CTWR process. This routine should be used only by Oracle support personnel. dbms_backup_restore.bctset(
parmno  IN BINARY_INTEGER,
numval  IN NUMBER   DEFAULT NULL,
charval IN VARCHAR2 DEFAULT NULL);

BCTSET_CLEANLIMIT           CONSTANT BINARY_INTEGER := 1;
BCTSET_CKPFREQ              CONSTANT BINARY_INTEGER := 2;
BCTSET_MAXPEND              CONSTANT BINARY_INTEGER := 3;
BCTSET_MAXEXT               CONSTANT BINARY_INTEGER := 4;
BCTSET_OPTIONS              CONSTANT BINARY_INTEGER := 5;
BCTSET_CTWR_EMPTY_THRESHOLD CONSTANT BINARY_INTEGER := 6;
BCTSET_CTWR_REAP_THRESHOLD  CONSTANT BINARY_INTEGER := 7;
BCTSET_CTWR_CIC_SECONDS     CONSTANT BINARY_INTEGER := 8;
TBD
 
BCTSWITCH
Switches change tracking bitmaps for the specified list of files dbms_backup_restore.bctswitch(filelist IN VARCHAR2 DEFAULT NULL);
TBD
 
BMRADDBLOCK
Add each block in the range (starting from blkNUMBER) to the bmr context dbms_backup_restore.bmraddblock(
dfNUMBER  IN BINARY_INTEGER,
blkNUMBER IN BINARY_INTEGER,
range     IN BINARY_INTEGER DEFAULT 1);
TBD
 
BMRCANCEL
Ends/cancels previously started Block Media Recovery session dbms_backup_restore.bmrcancel;
exec dbms_backup_restore.bmrcancel;
 
BMRDOMEDIARECOVERY
Called to recover after BMR is setup dbms_backup_restore.bmrdomeidarecovery(alname IN VARCHAR2);
TBD
 
BMRGETFILE
Returns the file_id for blocks to be restored dbms_backup_restore.bmrgetfile(firstcall IN BOOLEAN) RETURN NUMBER;
DECLARE
 x NUMBER;
BEGIN
  x := dbms_backup_restore.bmrgetfile(FALSE);
END;
/
 
BMRINITIALSCAN
Scans for new blocks and eliminates the one in block list dbms_backup_restore.bmrinitialscan;
exec dbms_backup_restore.bmrinitialscan;
 
BMRRESTOREFROMFLASHBACK
Restore blocks from flashback logs dbms_backup_restore.bmrRestoreFromFlashback(
limitSCN    IN  NUMBER,
restoredNum OUT BINARY_INTEGER);
set serveroutput on

DECLARE
 i BINARY_INTEGER;
BEGIN
  dbms_backup_restore.bmrRestoreFromFlashback(5009999, i);
  dbms_output.put_line(n);
END;
/
 
BMRRESTOREFROMSTANDBY
Returns the number of restored blocks for Block Media Recovery after establishing a connection and restoring blocks from a physical standby dbms_backup_restore.bmrRestoreFromStandby(validate IN BOOLEAN) RETURN NUMBER;
DECLARE
 x BOOLEAN := TRUE;
BEGIN
  dbms_backup_restore.bmrSestoreFromStandby(TRUE);
END;
/
 
BMRSCANDATAFILECOPY
Copies blocks from datafilecopy dbms_backup_restore.bmrscanDatafileCopy(recid IN NUMBER, stamp IN NUMBER);
TBD
 
BMRSTART
Starts a BMR conversation

Overload 1
dbms_backup_restore.bmrStart(
save_all_blocks   IN BOOLEAN,
save_final_blocks IN BOOLEAN,
nofileupdate      IN BOOLEAN);
exec dbms_backup_restore.bmrStart(TRUE, TRUE, FALSE);
Overload 2 dbms_backup_restore.bmrStart(
save_all_blocks   IN BOOLEAN,
save_final_blocks IN BOOLEAN,
nofileupdate      IN BOOLEAN,
doclear           IN BOOLEAN);
exec dbms_backup_restore.bmrStart(TRUE, TRUE, FALSE, TRUE);
Overload 3 dbms_backup_restore.bmrStart(
save_all_blocks   IN BOOLEAN,
save_final_blocks IN BOOLEAN,
nofileupdate      IN BOOLEAN,
doclear           IN BOOLEAN,
flags_clear       IN BINARY_INTEGER DEFAULT 0
);
exec dbms_backup_restore.bmrStart(TRUE, TRUE, FALSE, TRUE, 1);
 
CANKEEPDATAFILES
Checks if the compatible setting is high enough to allow using the KEEP DATAFILES subclause in DROP TABLESPACE by checking kck_rls_check(DTSKPDRLS) dbms_backup_restore.canKeepDatafiles RETURN BINARY_INTEGER; -- 1 = Yes, 0 = No
set serveroutput on

DECLARE
 x BINARY_INTEGER;
BEGIN
  x := dbms_backup_restore.canKeepDatafiles;
  dbms_output.put_line(x);
END;
/
 
CFILECALCSIZEARRAY
Obsolete after 10gR2: Always returns 0 dbms_backup_restore.cfilecalcsizearray(num_recs IN nrecs_array)
RETURN BINARY_INTEGER;
Obsolete and deprecated
 
CFILECALCSIZELIST
Takes a list of parameters, for each record type, the NUMBER of record slots postulated for the section containing records of that type.

Obsolete from 10gR2 onward

Overload 1
dbms_backup_restore.cfileCalcSizeList(
num_ckptprog_recs          IN BINARY_INTEGER DEFAULT 0,
num_thread_recs            IN BINARY_INTEGER DEFAULT 0,
num_logfile_recs           IN BINARY_INTEGER DEFAULT 0,
num_datafile_recs          IN BINARY_INTEGER DEFAULT 0,
num_filename_recs          IN BINARY_INTEGER DEFAULT 0,
num_tablespace_recs        IN BINARY_INTEGER DEFAULT 0,
num_tempfile_recs          IN BINARY_INTEGER DEFAULT 0,
num_rmanconfiguration_recs IN BINARY_INTEGER DEFAULT 0,
num_loghistory_recs        IN BINARY_INTEGER DEFAULT 0,
num_offlinerange_recs      IN BINARY_INTEGER DEFAULT 0,
num_archivedlog_recs       IN BINARY_INTEGER DEFAULT 0,
num_backupset_recs         IN BINARY_INTEGER DEFAULT 0,
num_backuppiece_recs       IN BINARY_INTEGER DEFAULT 0,
num_backedupdfile_recs     IN BINARY_INTEGER DEFAULT 0,
num_backeduplog_recs       IN BINARY_INTEGER DEFAULT 0,
num_dfilecopy_recs         IN BINARY_INTEGER DEFAULT 0,
num_bkdfcorruption_recs    IN BINARY_INTEGER DEFAULT 0,
num_dfcopycorruption_recs  IN BINARY_INTEGER DEFAULT 0,
num_deletedobject_recs     IN BINARY_INTEGER DEFAULT 0,
num_proxy_recs             IN BINARY_INTEGER DEFAULT 0,
num_reserved4_recs         IN BINARY_INTEGER DEFAULT 0)
RETURN BINARY_INTEGER;
Obsolete and deprecated
Overload 2 dbms_backup_restore.cfileCalcSizeList(
num_ckptprog_recs          IN BINARY_INTEGER DEFAULT 0,
num_thread_recs            IN BINARY_INTEGER DEFAULT 0,
num_logfile_recs           IN BINARY_INTEGER DEFAULT 0,
num_datafile_recs          IN BINARY_INTEGER DEFAULT 0,
num_filename_recs          IN BINARY_INTEGER DEFAULT 0,
num_tablespace_recs        IN BINARY_INTEGER DEFAULT 0,
num_tempfile_recs          IN BINARY_INTEGER DEFAULT 0,
num_rmanconfiguration_recs IN BINARY_INTEGER DEFAULT 0,
num_loghistory_recs        IN BINARY_INTEGER DEFAULT 0,
num_offlinerange_recs      IN BINARY_INTEGER DEFAULT 0,
num_archivedlog_recs       IN BINARY_INTEGER DEFAULT 0,
num_backupset_recs         IN BINARY_INTEGER DEFAULT 0,
num_backuppiece_recs       IN BINARY_INTEGER DEFAULT 0,
num_backedupdfile_recs     IN BINARY_INTEGER DEFAULT 0,
num_backeduplog_recs       IN BINARY_INTEGER DEFAULT 0,
num_dfilecopy_recs         IN BINARY_INTEGER DEFAULT 0,
num_bkdfcorruption_recs    IN BINARY_INTEGER DEFAULT 0,
num_dfcopycorruption_recs  IN BINARY_INTEGER DEFAULT 0,
num_deletedobject_recs     IN BINARY_INTEGER DEFAULT 0,
num_proxy_recs             IN BINARY_INTEGER DEFAULT 0,
num_reserved4_recs         IN BINARY_INTEGER DEFAULT 0,
num_db2_recs               IN BINARY_INTEGER
,
num_incarnation_recs       IN BINARY_INTEGER)
RETURN BINARY_INTEGER;
TBD
Overload 3 dbms_backup_restore.cfileCalcSizeList(
num_ckptprog_recs          IN BINARY_INTEGER DEFAULT 0,
num_thread_recs            IN BINARY_INTEGER DEFAULT 0,
num_logfile_recs           IN BINARY_INTEGER DEFAULT 0,
num_datafile_recs          IN BINARY_INTEGER DEFAULT 0,
num_filename_recs          IN BINARY_INTEGER DEFAULT 0,
num_tablespace_recs        IN BINARY_INTEGER DEFAULT 0,
num_tempfile_recs          IN BINARY_INTEGER DEFAULT 0,
num_rmanconfiguration_recs IN BINARY_INTEGER DEFAULT 0,
num_loghistory_recs        IN BINARY_INTEGER DEFAULT 0,
num_offlinerange_recs      IN BINARY_INTEGER DEFAULT 0,
num_archivedlog_recs       IN BINARY_INTEGER DEFAULT 0,
num_backupset_recs         IN BINARY_INTEGER DEFAULT 0,
num_backuppiece_recs       IN BINARY_INTEGER DEFAULT 0,
num_backedupdfile_recs     IN BINARY_INTEGER DEFAULT 0,
num_backeduplog_recs       IN BINARY_INTEGER DEFAULT 0,
num_dfilecopy_recs         IN BINARY_INTEGER DEFAULT 0,
num_bkdfcorruption_recs    IN BINARY_INTEGER DEFAULT 0,
num_dfcopycorruption_recs  IN BINARY_INTEGER DEFAULT 0,
num_deletedobject_recs     IN BINARY_INTEGER DEFAULT 0,
num_proxy_recs             IN BINARY_INTEGER DEFAULT 0,
num_reserved4_recs         IN BINARY_INTEGER DEFAULT 0,
num_db2_recs               IN BINARY_INTEGER,
num_incarnation_recs       IN BINARY_INTEGER,
num_flashback_recs         IN BINARY_INTEGER
,
num_rainfo_recs            IN BINARY_INTEGER,
num_instrsvt_recs          IN BINARY_INTEGER,
num_agedfiles_recs         IN BINARY_INTEGER,
num_rmanstatus_recs        IN BINARY_INTEGER,
num_threadinst_recs        IN BINARY_INTEGER,
num_mtr_recs               IN BINARY_INTEGER,
num_dfh_recs               IN BINARY_INTEGER)
RETURN BINARY_INTEGER;
TBD
Overload 4 dbms_backup_restore.cfileCalcSizeList(
num_ckptprog_recs          IN BINARY_INTEGER DEFAULT 0,
num_thread_recs            IN BINARY_INTEGER DEFAULT 0,
num_logfile_recs           IN BINARY_INTEGER DEFAULT 0,
num_datafile_recs          IN BINARY_INTEGER DEFAULT 0,
num_filename_recs          IN BINARY_INTEGER DEFAULT 0,
num_tablespace_recs        IN BINARY_INTEGER DEFAULT 0,
num_tempfile_recs          IN BINARY_INTEGER DEFAULT 0,
num_rmanconfiguration_recs IN BINARY_INTEGER DEFAULT 0,
num_loghistory_recs        IN BINARY_INTEGER DEFAULT 0,
num_offlinerange_recs      IN BINARY_INTEGER DEFAULT 0,
num_archivedlog_recs       IN BINARY_INTEGER DEFAULT 0,
num_backupset_recs         IN BINARY_INTEGER DEFAULT 0,
num_backuppiece_recs       IN BINARY_INTEGER DEFAULT 0,
num_backedupdfile_recs     IN BINARY_INTEGER DEFAULT 0,
num_backeduplog_recs       IN BINARY_INTEGER DEFAULT 0,
num_dfilecopy_recs         IN BINARY_INTEGER DEFAULT 0,
num_bkdfcorruption_recs    IN BINARY_INTEGER DEFAULT 0,
num_dfcopycorruption_recs  IN BINARY_INTEGER DEFAULT 0,
num_deletedobject_recs     IN BINARY_INTEGER DEFAULT 0,
num_proxy_recs             IN BINARY_INTEGER DEFAULT 0,
num_reserved4_recs         IN BINARY_INTEGER DEFAULT 0,
num_db2_recs               IN BINARY_INTEGER,
num_incarnation_recs       IN BINARY_INTEGER,
num_flashback_recs         IN BINARY_INTEGER,
num_rainfo_recs            IN BINARY_INTEGER,
num_instrsvt_recs          IN BINARY_INTEGER,
num_agedfiles_recs         IN BINARY_INTEGER,
num_rmanstatus_recs        IN BINARY_INTEGER,
num_threadinst_recs        IN BINARY_INTEGER,
num_mtr_recs               IN BINARY_INTEGER,
num_dfh_recs               IN BINARY_INTEGER,
num_sdm_recs         
      IN BINARY_INTEGER,
num_grp_recs               IN BINARY_INTEGER,
num_rp_recs                IN BINARY_INTEGER)
RETURN BINARY_INTEGER;
TBD
Overload 5 dbms_backup_restore.cfileCalcSizeList(
num_ckptprog_recs          IN BINARY_INTEGER DEFAULT 0,
num_thread_recs            IN BINARY_INTEGER DEFAULT 0,
num_logfile_recs           IN BINARY_INTEGER DEFAULT 0,
num_datafile_recs          IN BINARY_INTEGER DEFAULT 0,
num_filename_recs          IN BINARY_INTEGER DEFAULT 0,
num_tablespace_recs        IN BINARY_INTEGER DEFAULT 0,
num_tempfile_recs          IN BINARY_INTEGER DEFAULT 0,
num_rmanconfiguration_recs IN BINARY_INTEGER DEFAULT 0,
num_loghistory_recs        IN BINARY_INTEGER DEFAULT 0,
num_offlinerange_recs      IN BINARY_INTEGER DEFAULT 0,
num_archivedlog_recs       IN BINARY_INTEGER DEFAULT 0,
num_backupset_recs         IN BINARY_INTEGER DEFAULT 0,
num_backuppiece_recs       IN BINARY_INTEGER DEFAULT 0,
num_backedupdfile_recs     IN BINARY_INTEGER DEFAULT 0,
num_backeduplog_recs       IN BINARY_INTEGER DEFAULT 0,
num_dfilecopy_recs         IN BINARY_INTEGER DEFAULT 0,
num_bkdfcorruption_recs    IN BINARY_INTEGER DEFAULT 0,
num_dfcopycorruption_recs  IN BINARY_INTEGER DEFAULT 0,
num_deletedobject_recs     IN BINARY_INTEGER DEFAULT 0,
num_proxy_recs             IN BINARY_INTEGER DEFAULT 0,
num_reserved4_recs         IN BINARY_INTEGER DEFAULT 0,
num_db2_recs               IN BINARY_INTEGER,
num_incarnation_recs       IN BINARY_INTEGER,
num_flashback_recs         IN BINARY_INTEGER,
num_rainfo_recs            IN BINARY_INTEGER,
num_instrsvt_recs          IN BINARY_INTEGER,
num_agedfiles_recs         IN BINARY_INTEGER,
num_rmanstatus_recs        IN BINARY_INTEGER,
num_threadinst_recs        IN BINARY_INTEGER,
num_mtr_recs               IN BINARY_INTEGER,
num_dfh_recs               IN BINARY_INTEGER,
num_sdm_recs               IN BINARY_INTEGER,
num_grp_recs               IN BINARY_INTEGER,
num_rp_recs                IN BINARY_INTEGER,
num_bcr_recs               IN BINARY_INTEGER,
num_acm_recs               IN BINARY_INTEGER,
num_rlr_recs               IN BINARY_INTEGER)
RETURN BINARY_INTEGER;
TBD
 
CFILEMAKEANDUSESNAPSHOT
Creates a snapshot of the current controlfile and stores it in a file it creates using the DEFAULT filename or previously specified via cfileSetSnapshotName

Overload 1
dbms_backup_restore.cfilemakeandusesnapshot;
BEGIN
  dbms_backup_restore.cfilesetsnapshotname('c:\temp\backup.ctl');
  dbms_backup_restore.cfilemakeandusesnapshot;
END;
/
If TRUE, indicates that the controlfile to make is a standby controlfile, else normal
Overload 2
dbms_backup_restore.cfilemakeandusesnapshot(isstby IN BOOLEAN);
exec dbms_backup_restore.cfilemakeandusesnapshot(FALSE);
Overload 3 dbms_backup_restore.cfilemakeandusesnapshot(
isstby         IN BOOLEAN,
source_dbuname IN VARCHAR2,
dest_cs        IN VARCHAR2,
source_cs      IN VARCHAR2,
for_resync     IN BOOLEAN);
TBD
 
CFILERESIZESECTION
Attempts to resize the controlfile, expanding or shrinking the section holding records of the specified "record_type" such that it will hold "desired_numrecs" (rounded up to the nearest block boundary) dbms_backup_restore.cfileresizesection(
record_type    IN  BINARY_INTEGER,
before_numrecs OUT BINARY_INTEGER,
after_numrecs  OUT BINARY_INTEGER,
delta_numrecs  IN  BINARY_INTEGER DEFAULT 0);
TBD
 
CFILESETSNAPSHOTNAME
Sets the filename to be used for the snapshot controlfile during subsequent invocations of cfileMakeAndUseSnapshot and cfileUseSnapshot dbms_backup_restore.cfilesetsnapshotname(fname IN VARCHAR2);
See CFILEMAKEANDUSESNAPSHOT Demo
 
CFILEUSECOPY
Sets up this process' PGA such that the X$KCC fixed tables will be redirected to read the named backup or standby controlfile dbms_backup_restore.cfileusecopy(fname IN VARCHAR2);
TBD
 
CFILEUSECURRENT (new 12.1 overload)
Sets up this process' PGA such that the X$KCC fixed tables will revert to reading the current controlfile
Overload 1
dbms_backup_restore.cfileusecurrent;
exec dbms_backup_restore.cfileusecurrent;
Overload 2 dbms_backup_restore.cfileusecurrent(allowmts IN BOOLEAN);
exec dbms_backup_restore.cfileusecurrent(FALSE);
 
CFILEUSESNAPSHOT
Sets up this process' PGA such that the X$KCC fixed tables will be redirected to read the snapshot controlfile previously created via cfileMakeAndUseSnapshot dbms_backup_restore.cfileusesnapshot;
exec dbms_backup_restore.cfileusesnapshot;
 
CHANGEARCHIVEDLOG
Undocumented

Overload 1
dbms_backup_restore.changearchivedlog(
recid            IN NUMBER,
stamp            IN NUMBER,
fname            IN VARCHAR2,
thread           IN NUMBER,
sequence         IN NUMBER,
resetlogs_change IN NUMBER,
first_change     IN NUMBER,
blksize          IN NUMBER,
new_status       IN VARCHAR2);
TBD
Overload 2 dbms_backup_restore.changearchivedlog(
recid            IN NUMBER,
stamp            IN NUMBER,
fname            IN VARCHAR2,
thread           IN NUMBER,
sequence         IN NUMBER,
resetlogs_change IN NUMBER,
first_change     IN NUMBER,
blksize          IN NUMBER,
new_status       IN VARCHAR2,
force            IN BINARY_INTEGER);
TBD
Overload 3 dbms_backup_restore.changearchivedlog(
recid            IN NUMBER,
stamp            IN NUMBER,
fname            IN VARCHAR2,
thread           IN NUMBER,
sequence         IN NUMBER,
resetlogs_change IN NUMBER,
first_change     IN NUMBER,
blksize          IN NUMBER,
new_status       IN VARCHAR2,
force            IN BINARY_INTEGER,
foreignal        IN BINARY_INTEGER
);
TBD
 
CHANGEBACKUPPIECE
Changes backup piece metadata

Overload 1
dbms_backup_restore.changebackuppiece(
recid     IN NUMBER,
stamp     IN NUMBER,
handle    IN VARCHAR2,
set_stamp IN NUMBER,
set_count IN NUMBER,
pieceno   IN BINARY_INTEGER,
status    IN VARCHAR2, -- 'D','S','A','U','X'
params    IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 dbms_backup_restore.changebackuppiece(
recid     IN NUMBER,
stamp     IN NUMBER,
handle    IN VARCHAR2,
set_stamp IN NUMBER,
set_count IN NUMBER,
pieceno   IN BINARY_INTEGER,
status    IN VARCHAR2, -- 'D','S','A','U','X'
params    IN VARCHAR2 DEFAULT NULL,
force     IN BINARY_INTEGER
);
TBD
 
CHANGEBACKUPSET
Undocumented
-- keep_options
-- 0x0000 - No keep
-- 0x0100 - RECOVERABLE
-- 0x0200 - UNRECOVERABLE
-- 0x0400 - CONSISTENT
-- keep_until 0 = forever, >0 - backup expire time
dbms_backup_restore.changebackupset(
recid        IN NUMBER,
stamp        IN NUMBER,
set_count    IN NUMBER,
keep_options IN BINARY_INTEGER,
keep_until   IN NUMBER);
TBD
 
CHANGEDATAFILECOPY
Undocumented

Overload 1
dbms_backup_restore.changedatafilecopy(
recid             IN NUMBER,
stamp             IN NUMBER,
fname             IN VARCHAR2,
dfNUMBER          IN BINARY_INTEGER,
resetlogs_change  IN NUMBER,
creation_change   IN NUMBER,
checkpoint_change IN NUMBER,
blksize           IN NUMBER,
new_status        IN VARCHAR2);
TBD
Overload 2 dbms_backup_restore.changedatafilecopy(
recid             IN NUMBER,
stamp             IN NUMBER,
fname             IN VARCHAR2,
dfNUMBER          IN BINARY_INTEGER,
resetlogs_change  IN NUMBER,
creation_change   IN NUMBER,
checkpoint_change IN NUMBER,
blksize           IN NUMBER,
new_status        IN VARCHAR2,
keep_options      IN BINARY_INTEGER,
keep_until        IN NUMBER);
TBD
Overload 3 dbms_backup_restore.changedatafilecopy(
recid             IN NUMBER,
stamp             IN NUMBER,
fname             IN VARCHAR2,
dfNUMBER          IN BINARY_INTEGER,
resetlogs_change  IN NUMBER,
creation_change   IN NUMBER,
checkpoint_change IN NUMBER,
blksize           IN NUMBER,
new_status        IN VARCHAR2,
keep_options      IN BINARY_INTEGER,
keep_until        IN NUMBER,
force             IN BINARY_INTEGER);
TBD
 
CHECKCOMPRESSIONALG
Validates the provided compression algorithm exists for the provided release. 1 = TRUE, 0 = FALSE dbms_backup_restore.checkcompressionalg(
algname   IN  VARCHAR2,       -- name of the algorithm to validate
asofrel   IN  NUMBER,         -- release to which algname refers
isvalid   OUT BINARY_INTEGER, -- 1 if valid
req_aco   OUT BINARY_INTEGER, -- 1 if requires Adv. Comp. option license
have_aco  OUT BINARY_INTEGER, -- 1 if Adv. Comp. is enabled
mincompat OUT VARCHAR2)       -- minimum release compatible with algorithm
RETURN BINARY_INTEGER;
desc v$rman_compression_algorithm

SELECT algorithm_name
FROM v$rman_compression_algorithm;

set serveroutput on

DECLARE
 ret BINARY_INTEGER;
 isv BINARY_INTEGER;
 req BINARY_INTEGER;
 hav BINARY_INTEGER;
 mct VARCHAR2(500);
BEGIN
  ret := dbms_backup_restore.checkCompressionAlg('MEDIUM', 99, isv, req, hav, mct);
  dbms_output.put_line(ret);
  dbms_output.put_line(isv);
  dbms_output.put_line(req);
  dbms_output.put_line(hav);
  dbms_output.put_line(mct);
END;
/
 
CHECKFILENAME
Returns 0 if the filename is not in use by the database as a controlfile, datafile, or online logfile. Returns 1 if the filename is in use. The filename must be normalized by the caller. dbms_backup_restore.checkfilename(name IN VARCHAR2) RETURN NUMBER;
SELECT file_name, dbms_backup_restore.checkfilename(file_name)
FROM dba_data_files;

SELECT dbms_backup_restore.checkfilename('ZZYZX.DBF') FROM dual;
 
CLEANUPBACKUPRECORDS
Called by RMAN at the end of delete/uncatalog command to mark bdf/bsf/brl/bs as deleted for which no backuppieces exists dbms_backup_restore.clearnupbackuprecords;
exec dbms_backup_restore.clearnupbackuprecords;
 
CLEANUPFOREIGNARCHIVEDLOGS
Deletes all foreign archivelogs created in the FRA as well as from the controlfile record. Called when downgrading to pre 11g dbms_backup_restore.cleanupforeignarchivedlogs;
exec dbms_backup_restore.cleanupforeignarchivedlogs;
 
CLEANUPPGACONTEXT (new 12.1)
Clears remoteConnection and aux dfc FRA context from the PGA dbms_backup_restore.cleanupPGAContext;
exec dbms_backup_restore.cleanupPGAContext;
 
CLEARCONTROLFILE
Clears the circular sections of the controlfile to remove all the backups and image copy records and supporting controlfile records Danger: This is done in preparation for a no target, no recovery catalog duplicate, be sure you understand the implications.
dbms_backup_restore.clearcontrolfile;
exec dbms_backup_restore.clearcontrolfile;
 
CLEARONLINELOGNAMES
For TSPITR when AUXILIARY DESTINATION is used, we need to clear all names of the online logs so that they are created in the specified location dbms_backup_restore.clearonlinelognames;
exec dbms_backup_restore.clearonlinelognames;
 
CLEARRECOVERYDESTFLAG
Set is_recovery_dest_file='NO' for the given record dbms_backup_restore.clearrecoverydestflag(
rectype IN BINARY_INTEGER,
recid   IN NUMBER,
stamp   IN NUMBER);
TBD
 
CLEARUNARCHIVEDLOGS (new 12.1)
Remove non archived entry from archived_log log dbms_backup_restore.clearunarchivedlogs;
exec dbms_backup_restore.clearunarchivedlogs;
 
COMMITRMANSTATUSROW
Commits the row into controlfile. The SGA version of the row is saved in the controlfile and the contolfile record is marked as finished.

Overload 1
dbms_backup_restore.commitrmanstatusrow(
row_id    IN NUMBER,
row_stamp IN NUMBER,
mbytes    IN NUMBER,
status    IN BINARY_INTEGER);
TBD
Overload 2 dbms_backup_restore.commitrmanstatusrow(
row_id    IN NUMBER,
row_stamp IN NUMBER,
mbytes    IN NUMBER,
status    IN BINARY_INTEGER,
ibytes    IN NUMBER,
obytes    IN NUMBER,
odevtype  IN VARCHAR2);
TBD
 
CONVERTDATAFILECOPY
Name one file for conversion at the target database dbms_backup_restore.convertdatafilecopy(
fname       IN VARCHAR2,
max_corrupt IN BINARY_INTEGER DEFAULT 0);
TBD
 
CONVERTFILENAME
Converts a filename with the appropriate conversion pattern

Overload 1
dbms_backup_restore.convertfilename(
fname IN VARCHAR2,
ftype IN BINARY_INTEGER)
RETURN VARCHAR2;
TBD
Overload 2 dbms_backup_restore.convertfilename(
fname   IN VARCHAR2,
ftype   IN BINARY_INTEGER,
osftype IN BOOLEAN)
RETURN VARCHAR2;
TBD
 
COPYARCHIVEDLOG
Makes a copy of a log that was already archived. This may be useful for moving redo to a different location, or for extra redundancy. A record is created in the controlfile as if this log was just archived. dbms_backup_restore.copyarchivedlog(
arch_recid IN  NUMBER,
arch_stamp IN  NUMBER,
fname      IN  VARCHAR2,
full_name  OUT VARCHAR2,
recid      OUT NUMBER,
stamp      OUT NUMBER,
nochecksum IN  BOOLEAN DEFAULT FALSE);
TBD
 
COPYCONTROLFILE
Makes copies of a controlfile that is already on disk in an operating system file. It is intended to be used to make copies of controlfiles for specifying multiple controlfiles in the initialization parameter.

Overload 1
dbms_backup_restore.copycontrolfile(
src_name  IN  VARCHAR2,
dest_name IN  VARCHAR2,
recid     OUT NUMBER,
stamp     OUT NUMBER,
full_name OUT VARCHAR2);
TBD
Overload 2 dbms_backup_restore.copycontrolfile(
src_name     IN  VARCHAR2,
dest_name    IN  VARCHAR2,
recid        OUT NUMBER,
stamp        OUT NUMBER,
full_name    OUT VARCHAR2,
keep_options IN  BINARY_INTEGER,
keep_until   IN  NUMBER);
TBD
 
COPYDATAFILE
Copies the named file in the database

Overload 1
dbms_backup_restore.copydatafile(
dfNumber    IN  BINARY_INTEGER,
fname       IN  VARCHAR2,
full_name   OUT VARCHAR2,
recid       OUT NUMBER,
stamp       OUT NUMBER,
max_corrupt IN  BINARY_INTEGER DEFAULT 0,
tag         IN  VARCHAR2       DEFAULT NULL,
nochecksum  IN  BOOLEAN        DEFAULT FALSE,
isbackup    IN  BOOLEAN        DEFAULT FALSE);
TBD
Overload 2 dbms_backup_restore.copydatafile(
dfNumber      IN  BINARY_INTEGER,
fname         IN  VARCHAR2,
full_name     OUT VARCHAR2,
recid         OUT NUMBER,
stamp         OUT NUMBER,
max_corrupt   IN  BINARY_INTEGER DEFAULT 0,
tag           IN  VARCHAR2       DEFAULT NULL,
nochecksum    IN  BOOLEAN        DEFAULT FALSE,
isbackup      IN  BOOLEAN        DEFAULT FALSE,
check_logical IN  BOOLEAN);
TBD
Overload 3 dbms_backup_restore.copydatafile(
dfNumber      IN  BINARY_INTEGER,
fname         IN  VARCHAR2,
full_name     OUT VARCHAR2,
recid         OUT NUMBER,
stamp         OUT NUMBER,
max_corrupt   IN  BINARY_INTEGER DEFAULT 0,
tag           IN  VARCHAR2       DEFAULT NULL,
nochecksum    IN  BOOLEAN        DEFAULT FALSE,
isbackup      IN  BOOLEAN        DEFAULT FALSE,
check_logical IN  BOOLEAN        DEFAULT FALSE,
keep_options  IN  BINARY_INTEGER,
keep_until    IN  NUMBER
);
TBD
 
COPYDATAFILECOPY
Used to make a copy of a copy

Overload 1
dbms_backup_restore.copydatafilecopy(
copy_recid  IN  NUMBER,
copy_stamp  IN  NUMBER,
full_name   OUT VARCHAR2,
recid       OUT NUMBER,
stamp       OUT NUMBER,
fname       IN  VARCHAR2       DEFAULT NULL,
max_corrupt IN  BINARY_INTEGER DEFAULT 0,
tag         IN  VARCHAR2       DEFAULT NULL,
nochecksum  IN  BOOLEAN        DEFAULT FALSE,
isbackup    IN  BOOLEAN        DEFAULT FALSE);
TBD
Overload 2 dbms_backup_restore.copydatafilecopy(
copy_recid    IN  NUMBER,
copy_stamp    IN  NUMBER,
full_name     OUT VARCHAR2,
recid         OUT NUMBER,
stamp         OUT NUMBER,
fname         IN VARCHAR2       DEFAULT NULL,
max_corrupt   IN BINARY_INTEGER DEFAULT 0,
tag           IN VARCHAR2       DEFAULT NULL,
nochecksum    IN BOOLEAN        DEFAULT FALSE,
isbackup      IN BOOLEAN        DEFAULT FALSE,
check_logical IN BOOLEAN);
TBD
Overload 3 dbms_backup_restore.copydatafilecopy(
copy_recid    IN  NUMBER,
copy_stamp    IN  NUMBER,
full_name     OUT VARCHAR2,
recid         OUT NUMBER,
stamp         OUT NUMBER,
fname         IN  VARCHAR2       DEFAULT NULL,
max_corrupt   IN  BINARY_INTEGER DEFAULT 0,
tag           IN  VARCHAR2       DEFAULT NULL,
nochecksum    IN  BOOLEAN        DEFAULT FALSE,
isbackup      IN  BOOLEAN        DEFAULT FALSE,
check_logical IN  BOOLEAN        DEFAULT FALSE,
keep_options  IN  BINARY_INTEGER,
keep_until    IN  NUMBER
);
TBD
 
CREATEDATAFILE
Re-createDatafile for RMAN. Functionally this is same as ALTER DATABASE CREATE DATAFILE from RMAN client point of view, when RMAN is doing recovery (i.e., recovery is TRUE) dbms_backup_restore.createdatafile(
fno      IN NUMBER,
newomf   IN BOOLEAN,
recovery IN BOOLEAN,
fname    IN VARCHAR2 DEFAULT NULL);
TBD
 
CREATEFRAAUXCFCOPY (new 12.1)
Creates an OMF copy of a controlfile and returns the file's path and name dbms_backup_restore.createfraauxcfcopy(
blksize IN NUMBER,
fsize   IN NUMBER)
RETURN VARCHAR2;
SELECT dbms_backup_restore.createfraauxcfcopy(8192, 97120)
FROM dual;

SQL> host

cd /oracle/product/fast_recovery_area/ORABASE/controlfile

ls
 
CREATEFRAAUXDFCOPY (new 12.1)
Creates an OMF copy of a datafile and returns the file's path and name dbms_backup_restore.createFraAuxDfCopy(
tsname  IN VARCHAR2,
blksize IN NUMBER,
fsize   IN NUMBER)
RETURN VARCHAR2;
conn / as sysdba

DECLARE
 n NUMBER;
BEGIN
  SELECT bytes
  INTO n/1024
  FROM dba_data_files
  WHERE tablespace_name = 'USERS';

  dbms_output.put_line(SELECT dbms_backup_restore.createfraauxdfcopy('USERS', 8192, n));
END;
/
 
CREATERMANOUTPUTROW
Creates an row in a V$RMAN_OUTPUT view. The function will create one row in SGA (krbmrort [Rman Output Row Table]).

Overload 1
dbms_backup_restore.creatermanoutputrow(
l0row_id    IN NUMBER,
l0row_stamp IN NUMBER,
row_id      IN NUMBER,
row_stamp   IN NUMBER,
txt         IN VARCHAR2);
TBD
Overload 2 dbms_backup_restore.creatermanoutputrow(
l0row_id    IN NUMBER,
l0row_stamp IN NUMBER,
row_id      IN NUMBER,
row_stamp   IN NUMBER,
txt         IN VARCHAR2,
sameline    IN BINARY_INTEGER
);
TBD
 
CREATERMANSTATUSROW
Creates an row for V$RMAN_STATUS view. The function will create one row in SGA (krbmrsrt [Rman Status Row Table] and create one controlfile record (kccrsr).

Overload 1
dbms_backup_restore.creatermanstatusrow(
level        IN  BINARY_INTEGER,
parent_id    IN  NUMBER,
parent_stamp IN  NUMBER,
status       IN  BINARY_INTEGER,
command_id   IN  VARCHAR2,
operation    IN  VARCHAR2,
row_id       OUT NUMBER,
row_stamp    OUT NUMBER);
TBD
Overload 2 dbms_backup_restore.creatermanstatusrow(
level        IN  BINARY_INTEGER,
parent_id    IN  NUMBER,
parent_stamp IN  NUMBER,
status       IN  BINARY_INTEGER,
command_id   IN  VARCHAR2,
operation    IN  VARCHAR2,
row_id       OUT NUMBER,
row_stamp    OUT NUMBER,
flags        IN  BINARY_INTEGER);
TBD
 
CROSSCHECKBACKUPPIECE
CrosscheckBackupPiece is obsolete: Use validateBackupPiece instead dbms_backup_restore.crosscheckbackuppiece(
recid     IN NUMBER,
stamp     IN NUMBER,
handle    IN VARCHAR2,
set_stamp IN NUMBER,
set_count IN NUMBER,
pieceno   IN BINARY_INTEGER,
params    IN VARCHAR2 DEFAULT NULL)
RETURN BINARY_INTEGER;
Obsolete and deprecated
 
DBA2RFNO (new 12.1 overload)
Translates DBA NUMBER to block# and relative_file#

Overload 1
dbms_backup_restore.dba2rfno(
dbano   IN  NUMBER,
rfno    OUT NUMBER,
blockno OUT NUMBER);
SELECT dbid FROM v$database;

DECLARE
 relFileNo NUMBER;
 blockNumb NUMBER;
BEGIN
  dbms_backup_restore.dba2rfno(1824802046, relFileNo, blockNumb);
  dbms_output.put_line('X: ' || relFileNo);
  dbms_output.put_line('Y: ' || blockNumb);
END;
/
Overload 2 dbms_backup_restore.d ba2rfno(
dbano   IN  NUMBER,
rfno    OUT NUMBER,
blockno OUT NUMBER,
tsnum   IN  BINARY_INTEGER);
TBD
Pluggable Database Overload

Overload 3
dbms_backup_restore.d ba2rfno(
dbano   IN  NUMBER,
rfno    OUT NUMBER,
blockno OUT NUMBER,
tsnum   IN  BINARY_INTEGER,
pdbid   IN  NUMBER
);
TBD
 
DELETEARCHIVEDLOG
Deletes an operating system file and mark its record in the controlfile as obsolete so that its row will not appear in the fixed view. If the stamp in the record does not match the stamp argument, the controlfile record will not be marked as obsolete.

Overload 1
dbms_backup_restore.deletearchivedlog(
recid            IN NUMBER,
stamp            IN NUMBER,
fname            IN VARCHAR2,
thread           IN NUMBER,
sequence         IN NUMBER,
resetlogs_change IN NUMBER,
first_change     IN NUMBER,
blksize          IN NUMBER);
TBD
Overload 2 dbms_backup_restore.deletearchivedlog(
recid            IN NUMBER,
stamp            IN NUMBER,
fname            IN VARCHAR2,
thread           IN NUMBER,
sequence         IN NUMBER,
resetlogs_change IN NUMBER,
first_change     IN NUMBER,
blksize          IN NUMBER,
force            IN BINARY_INTEGER
);
TBD
 
DELETEBACKUPPIECE
Delete a backup piece from the storage subsystem. If a controlfile record ID is given, it is marked as obsolete so that it will no longer appear in V$BACKUP_PIECE. If the stamp in the record does not match the stamp  argument, the controlfile record will not be marked as obsolete.

Overload 1
dbms_backup_restore.deletebackuppiece(
recid     IN NUMBER,
stamp     IN NUMBER,
handle    IN VARCHAR2,
set_stamp IN NUMBER,
set_count IN NUMBER,
pieceno   IN BINARY_INTEGER,
params    IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 dbms_backup_restore.deletebackuppiece(
recid     IN NUMBER,
stamp     IN NUMBER,
handle    IN VARCHAR2,
set_stamp IN NUMBER,
set_count IN NUMBER,
pieceno   IN BINARY_INTEGER,
params    IN VARCHAR2 DEFAULT NULL,
force     IN BINARY_INTEGER);
TBD
 
DELETECONFIG
Perform a delete of the RMAN configuration dbms_backup_restore.deleteconfig(conf# IN BINARY_INTEGER);
TBD
 
DELETEDATAFILECOPY
Deletes an operating system file and mark its record in the controlfile as obsolete so that its row will not appear in the fixed view. If the stamp in the record does not match the stamp argument, the controlfile record will not be marked as obsolete.

Overload 1
dbms_backup_restore.deletedatafilecopy(
recid             IN NUMBER,
stamp             IN NUMBER,
fname             IN VARCHAR2,
dfNUMBER          IN BINARY_INTEGER,
resetlogs_change  IN NUMBER,
creation_change   IN NUMBER,
checkpoint_change IN NUMBER,
blksize           IN NUMBER,
no_delete         IN BINARY_INTEGER);
TBD
Overload 2 dbms_backup_restore.deletedatafilecopy(
recid             IN NUMBER,
stamp             IN NUMBER,
fname             IN VARCHAR2,
dfNUMBER          IN BINARY_INTEGER,
resetlogs_change  IN NUMBER,
creation_change   IN NUMBER,
checkpoint_change IN NUMBER,
blksize           IN NUMBER,
no_delete         IN BINARY_INTEGER,
force             IN BINARY_INTEGER
);
TBD
 
DELETED_GETDBINFO
Placeholderfor the deleted function, getDbInfo, in order to maintain pl/sql compatibility dbms_backup_restore.deleted_getdbinfo;
exec dbms_backup_restore.deleted_getdbinfo;
 
DELETEFILE
Delete a file from the operating system dbms_backup_restore.deletefile(fname IN VARCHAR2);
-- create file c:\temp\zzyzx.txt using an editor such as vi or notepad

exec dbms_backup_restore.deletefile('c:\temp\zzyzx.txt');
 
DEVICEALLOCATE (new 12.1 overload)
Allocates a backup device

Overload 1
dbms_backup_restore.deviceAllocate(
type   IN  VARCHAR2 DEFAULT NULL,
name   IN  VARCHAR2 DEFAULT NULL,
ident  IN  VARCHAR2 DEFAULT NULL,
noio   IN  BOOLEAN  DEFAULT FALSE,
params IN  VARCHAR2 DEFAULT NULL)
RETURN VARCHAR2;
See RESTOREDATAFILETO Demo
Overload 2 dbms_backup_restore.deviceAllocate(
type   IN  VARCHAR2       DEFAULT NULL,
name   IN  VARCHAR2       DEFAULT NULL,
ident  IN  VARCHAR2       DEFAULT NULL,
noio   IN  BOOLEAN        DEFAULT FALSE,
params IN  VARCHAR2       DEFAULT NULL,
node   OUT VARCHAR2,
dupcnt IN  BINARY_INTEGER,
trace  IN  BINARY_INTEGER DEFAULT 0)
RETURN VARCHAR2;
TBD
Overload 3 dbms_backup_restore.deviceAllocate(
type        IN  VARCHAR2      DEFAULT NULL,
name        IN  VARCHAR2      DEFAULT NULL,
ident       IN  VARCHAR2      DEFAULT NULL,
noio        IN  BOOLEAN       DEFAULT FALSE,
params      IN  VARCHAR2      DEFAULT NULL,
node        OUT VARCHAR2,
dupcnt      IN  BINARY_INTEGER,
trace       IN  BINARY_INTEGER DEFAULT 0,
allowmts    IN  BOOLEAN,
ors_lib_key IN  NUMBER)
RETURN VARCHAR2;
TBD
 
DEVICECOMMAND
Sends an arbitrary command to the currently allocated device dbms_backup_restore.device_command(
cmd    IN VARCHAR2,
params IN VARCHAR2 DEFAULT NULL);
TBD
 
DEVICEDEALLOCATE
Releases the currently allocated device dbms_backup_restore.devicedeallocate(params IN VARCHAR2 DEFAULT NULL);
exec dbms_backup_restore.deviceDeallocate;
 
DEVICEQUERY
Request information about the device dbms_backup_restore.devicequery(question IN BINARY_INTEGER) RETURN VARCHAR2;

DEVICEQUERY_VENDOR   CONSTANT BINARY_INTEGER := 0;
DEVICEQUERY_PROXY    CONSTANT BINARY_INTEGER := 1;
DEVICEQUERY_MAXSIZE  CONSTANT BINARY_INTEGER := 2;
DEVICEQUERY_MAXPROXY CONSTANT BINARY_INTEGER := 3;
TBD
 
DEVICESTATUS
Returns information about the currently allocated device dbms_backup_restore.devicestatus(
state    OUT BINARY_INTEGER,
type     OUT VARCHAR2,
name     OUT VARCHAR2,
bufsz    OUT BINARY_INTEGER,
bufcnt   OUT BINARY_INTEGER,
kbytes   OUT NUMBER,
readrate OUT BINARY_INTEGER,
parallel OUT BINARY_INTEGER);

NO_DEVICE    CONSTANT BINARY_INTEGER := 0;
NO_IO_ALLOC  CONSTANT BINARY_INTEGER := 1;
EXCL_ALLOC   CONSTANT BINARY_INTEGER := 2;
CONCUR_ALLOC CONSTANT BINARY_INTEGER := 3;
FILESYSTEM   CONSTANT BINARY_INTEGER := 4;
set serveroutput on

DECLARE
 state BINARY_INTEGER;
 typ   VARCHAR2(30);
 name  VARCHAR2(30);
 bsiz  BINARY_INTEGER;
 bcnt  BINARY_INTEGER;
 kb    NUMBER;
 rdrt  BINARY_INTEGER;
 para  BINARY_INTEGER;
BEGIN
  dbms_backup_restore.devicestatus(state, typ, name, bsiz, bcnt, kb, rdrt, para);

  dbms_output.put_line(state);
  dbms_output.put_line(typ);
  dbms_output.put_line(name);
END;
/
 
DOAUTOBACKUP
Generates an Auto backup if autobackup is enabled. If no channel is allocated, a copy of autobackup will be written in controlfile autoformat to disk. Autobackup will contain the spfile if instance is started using the  server parameter file.
Overload 1
dbms_backup_restore.doautobackup(
ncopies  OUT BINARY_INTEGER,
cfaudate IN  DATE           DEFAULT NULL,
seq      IN  BINARY_INTEGER DEFAULT NULL,
format   IN  VARCHAR2       DEFAULT NULL);
TBD
Overload 2 dbms_backup_restore.doautobackup(
ncopies  OUT BINARY_INTEGER,
cfaudate IN  DATE           DEFAULT NULL,
seq      IN  BINARY_INTEGER DEFAULT NULL,
format   IN  VARCHAR2       DEFAULT NULL,
p1       IN  BINARY_INTEGER,
p2       IN  BINARY_INTEGER,
p3       IN  BINARY_INTEGER,
p4       IN  VARCHAR2);
TBD
 
DUPLICATEFILEEXISTS
Check if a ?/dbs/_rm_dup_@.dat file exists from a previous failed duplication. If it exists, it is read into the PGA memory of the channel and the function returns a non zero value. If the file does not exist, the function returns a zero value and the file is created in anticipation of a duplicate run. dbms_backup_restore.duplicatefileexists RETURN BINARY_INTEGER;
set serveroutput on

DECLARE
 x BINARY_INTEGER;
BEGIN
  x := dbms_backup_restore.duplicatefileexists;
  dbms_output.put_line(x);
END;
/
 
FAULT_INJECTOR
Used to simulate any oracle error in a backup_restore function dbms_backup_restore.fault_injector(
funcNo      IN NUMBER,
funcErr     IN NUMBER,
funcCounter IN NUMBER DEFAULT 1);
exec dbms_backup_restore.fault_injector(600, 600, 2);
 
FETCHFILERESTORED
Used to get the files which were restored successfully by the restore conversation.

Overload 1
dbms_backup_restore.fetchfilerestored(
firstcall  IN  BOOLEAN,
proxy      IN  BOOLEAN,
ftype      OUT BINARY_INTEGER,
fno        OUT BINARY_INTEGER,
thread     OUT BINARY_INTEGER,
sequence   OUT NUMBER,
resetSCN   OUT NUMBER,
resetStamp OUT NUMBER)
RETURN BINARY_INTEGER;
TBD
Overload 2 dbms_backup_restore.fetchfilerestored(
firstcall  IN  BOOLEAN,
proxy      IN  BOOLEAN,
ftype      OUT BINARY_INTEGER,
fno        OUT BINARY_INTEGER,
thread     OUT BINARY_INTEGER,
sequence   OUT NUMBER,
resetSCN   OUT NUMBER,
resetStamp OUT NUMBER,
fname      OUT VARCHAR2)
RETURN BINARY_INTEGER;
TBD
 
FINDAUTSEARCHFILETABLE
Returns auto backup piece from X$KRBMSFT which match the input criteria (mustspfile and until) dbms_backup_restore.findautsearchfiletable(
mustspfile IN BOOLEAN,
until    IN  NUMBER,
fname    OUT VARCHAR2,
year     OUT BINARY_INTEGER,
month    OUT BINARY_INTEGER,
day      OUT BINARY_INTEGER,
sequence OUT BINARY_INTEGER,
ats      OUT NUMBER)
RETURN BOOLEAN;
See SEARCHFILES Demo Below
 
FLASHBACKADDFILE
Adds the given file to the list that needs a flashback dbms_backup_restore.flashbackaddfile(fileno IN BINARY_INTEGER);
TBD
 
FLASHBACKCANCEL
Ends the flashback conversation dbms_backup_restore.flashbackcancel;
exec dbms_backup_restore.flashbackcancel;
 
FLASHBACKCONTROLFILE
Flashes back the controlfile to a given SCN

Warning: This may be very dangerous to do in isolation. Do not try this except on a dev/test system you can destroy.
dbms_backup_restore.flashbackcontrolfile(flashbackSCN IN NUMBER);
conn / as sysdba

SELECT current_scn-100000
FROM v$database;

shutdown immediate;

startup mount;

exec dbms_backup_restore.flashbackcontrolfile(874860);
 
FLASHBACKFILES
Does the real work of flashbacking the list added using flashbackAddFile to the SCN specified by flashbackStart dbms_backup_restore.flashbackfiles(alname IN VARCHAR2);
TBD
 
FLASHBACKSTART (new 12.1 overload)
Starts a flashback conversation to flashback the database to given flashbackSCN/flashbackTime.

Overload 1
dbms_backup_restore.flashbackstart(
flashbackSCN  IN NUMBER,
flashbackTime IN DATE,
scnBased      IN BINARY_INTEGER,
toBefore      IN BINARY_INTEGER);
TBD
Overload 2 dbms_backup_restore.flashbackstart(
flashbackSCN  IN NUMBER,
flashbackTime IN DATE,
scnBased      IN BINARY_INTEGER,
toBefore      IN BINARY_INTEGER,
resetSCN      IN NUMBER,
resetTime     IN DATE);
TBD
Pluggable Database Overload

Overload 3
dbms_backup_restore.flashbackstart(
flashbackSCN  IN NUMBER,
flashbackTime IN DATE,
scnBased      IN BINARY_INTEGER,
toBefore      IN BINARY_INTEGER,
resetSCN      IN NUMBER,
resetTime     IN DATE,
pdbId         IN NUMBER);
TBD
 
GENPIECENAME
Called to produce the name of the piece.

Overload 1
dbms_backup_restore.genpiecename(
pno IN NUMBER,
set_count IN NUMBER,
set_stamp IN NUMBER,
format    IN VARCHAR2,
copyno    IN NUMBER,
devtype   IN VARCHAR2,
year      IN VARCHAR2,
month     IN VARCHAR2,
day       IN VARCHAR2,
dbid      IN VARCHAR2,
ndbname   IN VARCHAR2,
pdbname   IN VARCHAR2,
cfseq     IN NUMBER)
RETURN VARCHAR2;
TBD
Overload 2 dbms_backup_restore.genpiecename(
pno       IN NUMBER,
set_count IN NUMBER,
set_stamp IN NUMBER,
format    IN VARCHAR2,
copyno    IN NUMBER,
devtype   IN VARCHAR2,
year      IN BINARY_INTEGER,
month     IN BINARY_INTEGER,
day       IN BINARY_INTEGER,
dbid      IN NUMBER,
ndbname   IN VARCHAR2,
cfseq     IN NUMBER,
fileno    IN NUMBER
,
tsname    IN VARCHAR2,
logseq    IN VARCHAR2,
logthr    IN NUMBER,
imagcp    IN BOOLEAN)

RETURN VARCHAR2;
TBD
Overload 3 dbms_backup_restore.genpiecename(
pno       IN NUMBER,
set_count IN NUMBER,
set_stamp IN NUMBER,
format    IN VARCHAR2,
copyno    IN NUMBER,
devtype   IN VARCHAR2,
year      IN BINARY_INTEGER,
month     IN BINARY_INTEGER,
day       IN BINARY_INTEGER,
dbid      IN NUMBER,
ndbname   IN VARCHAR2,
cfseq     IN NUMBER,
fileno    IN NUMBER,
tsname    IN VARCHAR2,
logseq    IN VARCHAR2,
logthr    IN NUMBER,
imagcp    IN BOOLEAN,
savepname IN BOOLEAN
)
RETURN VARCHAR2;
TBD
Overload 4 dbms_backup_restore.genpiecename(
pno       IN NUMBER,
set_count IN NUMBER,
set_stamp IN NUMBER,
format    IN VARCHAR2,
copyno    IN NUMBER,
devtype   IN VARCHAR2,
year      IN BINARY_INTEGER,
month     IN BINARY_INTEGER,
day       IN BINARY_INTEGER,
dbid      IN NUMBER,
ndbname   IN VARCHAR2,
cfseq     IN NUMBER,
fileno    IN NUMBER,
tsname    IN VARCHAR2,
logseq    IN VARCHAR2,
logthr    IN NUMBER,
imagcp    IN BOOLEAN,
savepname IN BOOLEAN,
fname     IN VARCHAR2
,
forcnvrt  IN BOOLEAN)
RETURN VARCHAR2;
TBD
 
GENTRANSPORTSCRIPT
Generates the transport script, pfile and convert script for transportable db

Overload 1
dbms_backup_restore.gentransportscript(
tscname      IN  VARCHAR2 DEFAULT NULL,
pfformat     IN  VARCHAR2 DEFAULT NULL,
rmtscname    IN  VARCHAR2 DEFAULT NULL,
pfname       OUT VARCHAR2,
newtscname   OUT VARCHAR2,
newrmtscname OUT VARCHAR2);
TBD
Overload 2 dbms_backup_restore.gentransportscript(
tscname      IN  VARCHAR2 DEFAULT NULL,
pfformat     IN  VARCHAR2 DEFAULT NULL,
rmtscname    IN  VARCHAR2 DEFAULT NULL,
pfname       OUT VARCHAR2,
newtscname   OUT VARCHAR2,
newrmtscname OUT VARCHAR2,
parallelism  IN  NUMBER
);
TBD
 
GETARCFILENAME
Undocumented dbms_backup_restore.getarcfilename(
thread   IN  NUMBER,
sequence IN  NUMBER,
rls_id   IN  NUMBER,
arcName  OUT VARCHAR2);
conn / as sysdba

SELECT thread#, sequence#
FROM v$log;

set serveroutput on

DECLARE
 x VARCHAR2(128);
BEGIN
  dbms_backup_restore.getarcfilename(1, 11, 1, x);
  dbms_output.put_line(x);
END;
/

C:\ORACLE\FAST_RECOVERY_AREA\ORABASE2\ARCHIVELOG\2013_09_21\O1_MF_1_11_%U_.ARC
 
GETBLOCKSTAT
Copy all the statictics that collected during a backup command dbms_backup_restore.getblockstat(blockStatTable OUT blockStatTable_t);
TBD
 
GETCKPT
Obtains an SCN and returns the high-recids from the controfile record section for each type of controlfile record. The recids and the SCN are allocated from inside a controlfile transaction. If the database is not open, then the SCN is calculated in the same way as for a backup controlfile. dbms_backup_restore.getckpt(
ckp_scn       OUT NUMBER,
high_cp_recid OUT NUMBER,
high_rt_recid OUT NUMBER,
high_le_recid OUT NUMBER,
high_fe_recid OUT NUMBER,
high_fn_recid OUT NUMBER,
high_ts_recid OUT NUMBER,
high_r1_recid OUT NUMBER,
high_rm_recid OUT NUMBER,
high_lh_recid OUT NUMBER,
high_or_recid OUT NUMBER,
high_al_recid OUT NUMBER,
high_bs_recid OUT NUMBER,
high_bp_recid OUT NUMBER,
high_bf_recid OUT NUMBER,
high_bl_recid OUT NUMBER,
high_dc_recid OUT NUMBER,
high_fc_recid OUT NUMBER,
high_cc_recid OUT NUMBER,
high_dl_recid OUT NUMBER,
high_r3_recid OUT NUMBER,
high_r4_recid OUT NUMBER);
DECLARE
 scn NUMBER;
 v01 NUMBER;
 v02 NUMBER;
 v03 NUMBER;
 v04 NUMBER;
 v05 NUMBER;
 v06 NUMBER;
 v07 NUMBER;
 v08 NUMBER;
 v09 NUMBER;
 v10 NUMBER;
 v11 NUMBER;
 v12 NUMBER;
 v13 NUMBER;
 v14 NUMBER;
 v15 NUMBER;
 v16 NUMBER;
 v17 NUMBER;
 v18 NUMBER;
 v19 NUMBER;
 v20 NUMBER;
 v21 NUMBER;
BEGIN
  dbms_backup_restore.getckpt(scn, v01, v02, v03, v04, v05, v06, v07,
                              v08, v09, v10, v11, v12, v13, v14,
                              v15, v16, v17, v18, v19, v20, v21);
  dbms_output.put_line(TO_CHAR(scn));
  dbms_output.put_line(TO_CHAR(v01));
  dbms_output.put_line(TO_CHAR(v02));
  dbms_output.put_line(TO_CHAR(v03));
  dbms_output.put_line(TO_CHAR(v04));
  dbms_output.put_line(TO_CHAR(v05));
  dbms_output.put_line(TO_CHAR(v06));
  dbms_output.put_line(TO_CHAR(v07));
  dbms_output.put_line(TO_CHAR(v08));
  dbms_output.put_line(TO_CHAR(v09));
  dbms_output.put_line(TO_CHAR(v10));
  dbms_output.put_line(TO_CHAR(v11));
  dbms_output.put_line(TO_CHAR(v12));
  dbms_output.put_line(TO_CHAR(v13));
  dbms_output.put_line(TO_CHAR(v14));
  dbms_output.put_line(TO_CHAR(v15));
  dbms_output.put_line(TO_CHAR(v16));
  dbms_output.put_line(TO_CHAR(v17));
  dbms_output.put_line(TO_CHAR(v18));
  dbms_output.put_line(TO_CHAR(v19));
  dbms_output.put_line(TO_CHAR(v20));
  dbms_output.put_line(TO_CHAR(v21));
END;
/
 
GETCKPTSCN
The same as getCkpt procedure but returns only the ckp_scn dbms_backup_restore.getckptscn RETURN NUMBER;
SELECT dbms_backup_restore.getckptscn
FROM dual;
 
GETCNCTSTR
Obtains from the server the connect string to use as defined in sparams.h; if escaped is TRUE then it performs sosd specific conversion to allow connect string to be passed to RMAN host command dbms_backup_restore.getcnctstr(
cnctstr OUT VARCHAR2,
orasid  IN  VARCHAR2,
escaped IN  BOOLEAN);

VALIDATION_OK               CONSTANT BINARY_INTEGER := 0;
VALIDATION_RECORD_NOTFOUND  CONSTANT BINARY_INTEGER := 1;
VALIDATION_RECORD_DIFFERENT CONSTANT BINARY_INTEGER := 2;
VALIDATION_FILE_DIFFERENT   CONSTANT BINARY_INTEGER := 4;
TBD
 
GETDEFAULTTAG
Constructs the DEFAULT tag for backups and image copies dbms_backup_restore.getDefaultTag(deftag OUT VARCHAR2);
DECLARE
 retVal VARCHAR2(64);
BEGIN
  dbms_backup_restore.getDefaultTag(retVal);
  dbms_output.put_line(retVal);
END;
/
 
GETDISKGROUPNAME
Given an ASM filename, return the disk group name dbms_backup_restore.getDiskGroupName(fname IN VARCHAR2) RETURN VARCHAR2;
SELECT dbms_backup_restore.getDiskGroupName('+DAT/mlib/controlfile/current.913.794202357')
FROM dual;
 
GETDUPLICATEDDATAFILECOPY
Returns a non zero value if the filenumber is found in the ?/dbs/_rm_dup_@.dat file, the name in the datafilecopy matches the newname (for non-OMF newnames), the datafilecopy refers to an existing datafilecopy, the creation scn of the datafilecopy matches the creation scn of the datafilecopy, the checkpoint of the datafilecopy is before the until scn, the dbid and the dbname of the datafilecopy also match. If all checks pass the datafilecopy name and checkpoint scn are returned to the caller together with the non-zero return value dbms_backup_restore.getduplicateddatafilecopy(
fno     IN  NUMBER,
newname IN  VARCHAR2,
crescn  IN  NUMBER,
untscn  IN  NUMBER,
dbid    IN  NUMBER,
dbname  IN  VARCHAR2,
fname   OUT VARCHAR2,
ckpscn  OUT NUMBER)
RETURN BINARY-INTEGER;
TBD
 
GETFNO
Expands the name and compares it with all the datafile names and returns the file NUMBER for the matching file dbms_backup_restore.getfno(
name            IN  VARCHAR2,
dfNUMBER        OUT BINARY_INTEGER,
creation_change OUT NUMBER);
SELECT file_name, file_id,
FROM dba_data_files;

set serveroutput on

DECLARE
 dfnum  BINARY_INTEGER;
 crchng NUMBER;
BEGIN
  dbms_backup_restore.getfno('C:\ORACLE\ORADATA\ORABASE\USERS01.DBF', dfnum, crchng);

  dbms_output.put_line(TO_CHAR(dfnum));
  dbms_output.put_line(TO_CHAR(crchng));
END;
/
 
GETLIMIT
Get a limit to a particular value dbms_backup_restore.getlimit(name IN BINARY_INTEGER, value OUT NUMBER);
DECLARE
 n NUMBER;
BEGIN
  dbms_backup_restore.getLimit(1, n);
  dbms_output.put_line(TO_CHAR(n));
END;
/
 
GETMAXINFO
This procedure is used to obtain the max values for the parameters used in the create controlfile command. These values cannot be obtained from tables, as are only kept in the SGA. dbms_backup_restore.getmaxinfo(
mlogf OUT BINARY_INTEGER,
mlogm OUT BINARY_INTEGER,
mdatf OUT BINARY_INTEGER,
minst OUT BINARY_INTEGER,
mlogh OUT BINARY_INTEGER,
chset OUT VARCHAR2);
DECLARE
 mlogf_out PLS_INTEGER;
 mlogm_out PLS_INTEGER;
 mdatf_out PLS_INTEGER;
 minst_out PLS_INTEGER;
 mlogh_out PLS_INTEGER;
 chset_out VARCHAR2(100);
BEGIN
  dbms_backup_restore.getmaxinfo(
    mlogf_out, mlogm_out, mdatf_out, minst_out, mlogh_out, chset_out);
  dbms_output.put_line(mlogf_out);
  dbms_output.put_line(mlogm_out);
  dbms_output.put_line(mdatf_out);
  dbms_output.put_line(minst_out);
  dbms_output.put_line(mlogh_out);
  dbms_output.put_line(chset_out);
END;
/
 
GETOMFFILENAME
Returns an OMF file name for a datafile in the given tablespace

Overload 1
dbms_backup_restore.getomffilename(tsname IN VARCHAR2, omfname OUT VARCHAR2);
set serveroutput on

DECLARE
 omfname VARCHAR2(30);
BEGIN
  dbms_backup_restore.getomffilename('MLDATA', omfname);
  dbms_output.put_line(omfname);
END;
/
Overload 2 dbms_backup_restore.getomffilename(
tsname  IN  VARCHAR2,
omfname OUT VARCHAR2,
isTemp  IN  BOOLEAN);
set serveroutput on

DECLARE
 omfname VARCHAR2(30);
BEGIN
  dbms_backup_restore.getomffilename('MLDATA', omfname, FALSE);
  dbms_output.put_line(omfname);
END;
/
 
GETPARM
Returns parameter string values

SNAPSHOT_NAME 0
CONTROL_FILE 1
DBF_CONVERT 2
LOG_CONVERT 3
SPFILE_DEFAULT 4
INCR_NOCT 5
CFAUTO_DISK_DEFAULT 6
CFAUTO_TAPE_DEFAULT 7
FORMAT_DEFAULT 8
FULL_NOOPTIM 9
PLATFORM_ID 10
TRACE_FILENAME 11
PASSWORD_FILENAME 12
dbms_backup_restore.getparam(
parmid IN BINARY_INTEGER,
parmno IN BINARY_INTEGER DEFAULT NULL)
RETURN VARCHAR2;
set serveroutput on

DECLARE
  l_parm VARCHAR2(500);
BEGIN
  FOR i IN 1..20 LOOP
    l_parm := dbms_backup_restore.getparm(i);

    IF LENGTH(l_parm) > 0 THEN
      dbms_output.put_line(l_parm);
    END IF;
  END LOOP;
END;
/
 
GETPRIMARYCONSTR (new 12.1)
Returns the connect string of primary. If executed on primary: Otherwise NULL. dbms_backup_restore.getPrimaryConstr RETURN VARCHAR2;
SELECT dbms_backup_restore.getPrimaryConstr
FROM dual;
 
GETSTANDBYCONSTR (new 12.1)
Returns the connect string of best standby by comparing the applied scn. If executed on standby, it will return the best cascading standby (if any): Otherwise NULL. dbms_backup_restore.getStandbyConstr RETURN VACHAR2;
SELECT dbms_backup_restore.getStandbyConstr
FROM dual;
 
GETTSNAMEFROMDATAFILECOPY
Obtains the tablespace name to which this datafilecopy belonged dbms_backup_restore.getTSNameFromDatafileCopy(
fname IN VARCHAR2,
fno   IN NUMBER)
RETURN VARCHAR2;
TBD
 
GETXTTSNAME (new 12.1)
Return the filenumber and the name of the foreign datafile that will be restored as stored in the restore context. When no more files are available returns 0. dbms_backup_restore.getXttsName(xfname OUT VARCHAR2) RETURN NUMBER;
TBD
 
GET_CONNECT_IDENTIFIER
Returns the connect identifier to  which a remote database can be connected dbms_backup_restore.get_connect_identifier(dbuname IN VARCHAR2) RETURN VARCHAR2;
set serveroutput on

BEGIN
 rci VARCHAR2(30);
BEGIN
  rci := dbms_backup_restore.get_connect_identifier('op1m01');
  dbms_output.put_line(rci);
END;
/
 
INCRARCHIVEDLOGBACKUPCOUNT
Called to increment BACKUP_COUNT column V$ARCHIVED_LOG dbms_backup_restore.incrarchivedlogbackupcount(
fname        IN  VARCHAR2,
thread       OUT NUMBER,
sequence     OUT NUMBER,
first_change OUT NUMBER,
all_logs     IN  BOOLEAN DEFAULT TRUE);
TBD
 
INCREMENTRECORDSTAMP
Increment record stamp for given record type dbms_backup_restore.incrementrecordstamp(
rectype IN BINARY_INTEGER,
recid   IN NUMBER,
stamp   IN NUMBER);
TBD
 
INITFRAMETADATA
Clears FRA meta-data and re-initializes it by inspecting each FRA file w.r.t current FRA setting. This was invented to re-init -- FRA meta-data on clone instance. Note that database isn't mounted as CLONE when rman does duplicate. So, this has be to re-initialized using an explicit call. dbms_backup_restore.initFRAmetaData;
exec dbms_backup_restore.initFRAmetaData;
 
INITMSB
Initialize multi-section backup processing for the specified file dbms_backup_restore.initmsb(
dfnumber  IN  NUMBER,
file_size OUT NUMBER,
set_stamp OUT NUMBER,
set_count OUT NUMBER);
TBD
 
INITMSC (new 12.1)
Front load the file name before backup piece create to get the name of the file, all the channels need to write to on a multi-section copy dbms_backup_restore.initmsc(
fname  IN  VARCHAR2,
deffmt IN  BINARY_INTEGER,
dest   IN  BINARY_INTEGER,
handle OUT VARCHAR2);
TBD
 
INITMSR
Initialize file for multi-section full restore dbms_backup_restore.initmsr(dfnumber IN number,fname OUT VARCHAR2);
TBD
 
INITNAMESPACE
Used for testing to create locations because oratst doesn't support creating locations with uppercase. It initializes controlfile, logfile and datafile locations for db_create_file_dest dbms_backup_restore.initnamespace;
exec dbms_backup_restore.initnamespace;
 
INSPECTARCHIVEDLOG
Reads the header from an archived redo log and constructs a record in the controlfile as if the file had just been archived or created via copyArchivedLog.

Overload 1
dbms_backup_restore.inspectarchivedlog(
fname      IN  VARCHAR2,
full_name  OUT VARCHAR2,
recid      OUT NUMBER,
stamp      OUT NUMBER);
TBD
Overload 2 dbms_backup_restore.inspectarchivedlog(
fname      IN  VARCHAR2,
full_name  OUT VARCHAR2,
recid      OUT NUMBER,
stamp      OUT NUMBER,
change_rdi IN  BOOLEAN);
TBD
 
INSPECTARCHIVEDLOGSEQ
Undocumented

Overload 1
dbms_backup_restore.inspetarchivedlogseq(
log_dest  IN  VARCHAR2,
format    IN  VARCHAR2 DEFAULT NULL,
thread    IN  BINARY_INTEGER,
sequence  IN  NUMBER,
full_name OUT VARCHAR2);
TBD
Overload 2 dbms_backup_restore.inspectarchivedlogseq(
log_dest     IN  VARCHAR2,
format       IN  VARCHAR2 DEFAULT NULL,
thread       IN  BINARY_INTEGER,
sequence     IN  NUMBER,
full_name    OUT VARCHAR2,
resetlogs_id IN  NUMBER);
TBD
 
INSPECTBACKUPPIECE
Reads the header from a backuppiece and creates the corresponding backupset, backuppiece, backup datafile or backup redo log records as if the file had just been created with RMAN backup command dbms_backup_restore.inspectbackuppiece(
handle      IN  VARCHAR2,
full_handle OUT VARCHAR2,
recid       OUT NUMBER,
stamp       OUT NUMBER);
TBD
 
INSPECTCONTROLFILE
Reads the header from a backup controlfile and creates a record in the current controlfile as if the file had just been created with 'alter database backup controlfile' or copyControlFile or restoreControlFileTo dbms_backup_restore.inspectcontrolfile(
fname     IN  VARCHAR2,
full_name OUT VARCHAR2,
recid     OUT NUMBER,
stamp     OUT NUMBER);
TBD
 
INSPECTDATAFILECOPY
Reads the header from an operating system datafile copy, and makes a record in the controlfile as if the copy had just been made via copyDataFile.

Overload 1
dbms_backup_restore.inspectdatafilecopy(
fname      IN  VARCHAR2,
full_name  OUT VARCHAR2,
recid      OUT NUMBER,
stamp      OUT NUMBER,
tag        IN  VARCHAR2 DEFAULT NULL,
isbackup   IN  BOOLEAN  DEFAULT FALSE,
change_rdi IN  BOOLEAN);
TBD
Overload 2 dbms_backup_restore.inspectdatafilecopy(
fname      IN  VARCHAR2,
full_name  OUT VARCHAR2,
recid      OUT NUMBER,
stamp      OUT NUMBER,
tag        IN  VARCHAR2 DEFAULT NULL,
isbackup   IN  BOOLEAN  DEFAULT FALSE);
TBD
 
IR_ICD_FINISH
Called at end of DBMS_IR interface it is same as icdFinish in prvtbkrs.pls that sets the current RPC count as FINISHED in v$session.action dbms_backup_restore.ir_icd_finish;
exec dbms_backup_restore.ir_icd_finish;
 
IR_ICD_START
Called at begining of DBMS_IR interface it is same as icdStart in prvtbkrs.pls that increments the RPC count and sets the v$session.action field to STARTED dbms_backup_restore.ir_icd_start(fn IN NUMBER);
TBD
 
ISFILENAMEOMF
Does the filename belongs to an OMF or ASM family

Overload 1
dbms_backup_restore.isFileNameOMF(
fname IN  VARCHAR2,
isOMF OUT BOOLEAN,
isASM OUT BOOLEAN);
SELECT file_name
FROM dba_data_files;

DECLARE
 isO BOOLEAN;
 isA BOOLEAN;
BEGIN
  dbms_backup_restore.isFileNameOMF('C:\ORACLE\ORADATA\ORABASE2\SYSTEM01.DBF', isO, isA);
  IF isO THEN
    dbms_output.put_line('File is OMF');
  ELSIF isA THEN
    dbms_output.put_line('File is ASM');
  ELSE
    dbms_output.put_line('Not OMF or ASM');
  END IF;
END;
/
Does the filename belong to an Oracle Template

Overload 2
dbms_backup_restore.isfilenameomf(
fname   IN  VARCHAR2,
isOMF   OUT BOOLEAN,
isASM   OUT BOOLEAN,
isTMPLT OUT BOOLEAN);
DECLARE
 isO BOOLEAN;
 isA BOOLEAN;
 isT BOOLEAN;
BEGIN
  dbms_backup_restore.isFileNameOMF('C:\ORACLE\ORADATA\ORABASE2\SYSTEM01.DBF', isO, isA);
  IF isO THEN
    dbms_output.put_line('File is OMF');
  ELSIF isA THEN
    dbms_output.put_line('File is ASM');
  ELSIF isT THEN
    dbms_output.put_line('File is Oracle Template');
  ELSE
    dbms_output.put_line('Not OMF, ASM, or Template');
  END IF;
END;
/
 
MANAGEAUXINSTANCE
Used by RMAN to manage the auxiliary instance for those OSs that require OS setup dbms_backup_restore.manageAuxInstance(
orasid  IN VARCHAR2,
cleanup IN BINARY_INTEGER);
TBD
 
NETWORKBACKUPARCHIVEDLOG
Sets the indicated archivelog as the backup target on a remote server dbms_backup_restore.networkBackupArchivedLog(
arch_recid IN NUMBER,
arch_stamp IN NUMBER);
TBD
 
NETWORKBACKUPDATAFILE
Sets the specified datafile as backup target on a remote server dbms_backup_restore.networkBackupDataFile(dfnumber IN BINARY_INTEGER);
TBD
 
NETWORKBACKUPSPFILE
Sets the spfile as a backup target in remote server dbms_backup_restore.networkBackupSPFile;
exec dbms_backup_restore.networkBackupSPFile;
 
NETWORKFILETRANSFER
Undocumented

Overload 1
dbms_backup_restore.networkfiletransfer(
dbname    IN VARCHAR2,
username  IN VARCHAR2 DEFAULT NULL,
passwd    IN VARCHAR2 DEFAULT NULL,
srcfile   IN VARCHAR2,
destfile  IN VARCHAR2,
operation IN VARCHAR2)
RETURN BOOLEAN;
TBD
Overload 2 dbms_backup_restore.networkfiletransfer(
dbname    IN  VARCHAR2,
username  IN  VARCHAR2 DEFAULT NULL,
passwd    IN  VARCHAR2 DEFAULT NULL,
role      IN  VARCHAR2,
srcfile   IN  VARCHAR2,
destfile  IN  VARCHAR2,
operation IN  VARCHAR2,
retcode   OUT NUMBER
)
RETURN BOOLEAN;
TBD
Overload 3 dbms_backup_restore.networkfiletransfer(
dbname      IN VARCHAR2,
username    IN VARCHAR2 DEFAULT NULL,
passwd      IN VARCHAR2 DEFAULT NULL,
role        IN VARCHAR2,
srcfile     IN VARCHAR2,
destfile    IN VARCHAR2,
operation   IN VARCHAR2,
ftype_check IN  BOOLEAN,
retcode     OUT NUMBER)
RETURN BOOLEAN;
TBD
 
NETWORKREADFILEHEADER
Reads the file header from a remote server dbms_backup_restore.networkReadFileHeader(
service   IN  VARCHAR2,
dfNUMBER  IN  BINARY_INTEGER,
blksize   IN  NUMBER,
blocks    OUT NUMBER,
crescn    OUT NUMBER,
rlgscn    OUT NUMBER,
ckpscn    OUT NUMBER,
afzscn    OUT NUMBER,
rfzscn    OUT NUMBER,
fhdbi     OUT NUMBER,
fhfdbi    OUT NUMBER,
fhplus    OUT NUMBER);
TBD
 
NETWORKSETMSB
Sets section size for multi-section backup in remote server dbms_backup_restore.networkSetMSB(
dfnumber      IN NUMBER,
section_size  IN NUMBER,
first_section IN NUMBER,
section_count IN NUMBER,
pieceno       IN NUMBER,
piececnt      IN NUMBER);
TBD
 
NIDBEGIN
Undocumented dbms_backup_restore.nidbegin(
newdbname IN VARCHAR2,
olddbname IN VARCHAR2,
newdbid   IN NUMBER,
olddbid   IN NUMBER,
dorevert  IN BINARY_INTEGER,
dorestart IN BINARY_INTEGER,
events IN NUMBER);
TBD
 
NIDEND
Undocumented dbms_backup_restore.nidend;
exec dbms_backup_restore.nidend;
 
NIDGETNEWDBID
Undocumented dbms_backup_restore.nidgetnewdbid(dbname IN VARCHAR2, ndbid OUT NUMBER);
TBD
 
NIDPROCESSCF
Undocumented dbms_backup_restore.nidprocesscf(
chgdbid   OUT BINARY_INTEGER,
chgdbname OUT BINARY_INTEGER);
TBD
 
NIDPROCESSDF
Undocumented dbms_backup_restore.nidprocessdf(
fno       IN  NUMBER,
istemp    IN  BINARY_INTEGER,
skipped   OUT BINARY_INTEGER,
chgdbid   OUT BINARY_INTEGER,
chgdbname OUT BINARY_INTEGER);
TBD
 
NORMALIZEFILENAME
Normalizes the file name according to the rules of the target database and returns the normalized filename dbms_backup_restore.normalizeFileName(fname IN VARCHAR2) RETURN VARCHAR2;
SELECT dbms_backup_restore.normalizefilename('test.dbf')
FROM dual;
 
OAMPOLLEDRECORD (new 12.1)
The record, if it belongs to FRA, will be marked as polled by OAM to enable automatic file purging dbms_backup_restore.oamPolledRecord(
rectype IN BINARY_INTEGER,
recid   IN NUMBER,
stamp   IN NUMBER);
TBD
 
ORACLESBTVERSION
Checks if our SBT tape channel is using Oracle Backup. If so, sets isOracle to TRUE and returns the version number as a text string in the form of "AAA.BBB.CCC.DDD". dbms_backup_restore.oraclesbtversion(isOracle OUT BOOLEAN, version OUT VARCHAR2);
TBD
 
PIECECONTEXTGETNUMBER
Gets a numeric value from the backup piece context dbms_backup_restore.piececontextgetnumber(
parmid IN  BINARY_INTEGER,
value  OUT BINARY_INTEGER);
TBD
 
PROCESSSEARCHFILETABLE
Reads header for all files from search file table (X$KRBMSFT)

Overload 1
dbms_backup_restore.processsearchfiletable(
catalog  IN BOOLEAN,         -- TRUE = try to catalog the search result
implicit IN BINARY_INTEGER);
See SEARCHFILES Demo Below
Overload 2

FORFTYPE: one of KSFD's filetypes to process. If all supported filetype has to be processed, then pass it as UB2MAXVAL
dbms_backup_restore.processsearchfiletable(
catalog  IN BOOLEAN,
implicit IN BINARY_INTEGER,
forftype IN BINARY_INTEGER);
TBD
 
PROXYBACKUPARCHIVEDLOG
Specifies one archived log to be backed up during a proxy copy session dbms_backup_restore.proxybackuparchivedlog(
arch_recid IN NUMBER,
arch_stamp IN NUMBER,
handle     IN VARCHAR2);
TBD
 
PROXYBACKUPCONTROLFILE
Specifies one controlfile to be backed up with proxy copy dbms_backup_restore.proxybackupcontrolfile(
name   IN VARCHAR2 DEFAULT NULL,
handle IN VARCHAR2);
TBD
 
PROXYBACKUPDATAFILE
Specifies one datafile to be backed up during a proxy copy session dbms_backup_restore.proxybackupdatafile(
file#  IN BINARY_INTEGER,
handle IN VARCHAR2);
TBD
 
PROXYBACKUPDATAFILECOPY
Specifies one datafile copy to be backed up during a proxy copy session dbms_backup_restore.proxybackupdatafilecopy(
copy_recid IN NUMBER,
copy_stamp IN NUMBER,
handle     IN VARCHAR2);
TBD
 
PROXYBEGINBACKUP
Begin a proxy backup session. The database must be mounted for proxy backups, so that the backups can be recorded in the controlfile.

Overload 1
dbms_backup_restore.proxybeginbackup(
tag         IN  VARCHAR2       DEFAULT NULL,
incremental IN  BOOLEAN        DEFAULT FALSE,
media_pool  IN  BINARY_INTEGER DEFAULT 0,
set_stamp   OUT NUMBER,
set_count   OUT NUMBER);
TBD
Overload 2 dbms_backup_restore.proxybeginbackup(
tag          IN  VARCHAR2 DEFAULT NULL,
incremental  IN  BOOLEAN DEFAULT FALSE,
media_pool   IN  BINARY_INTEGER DEFAULT 0,
set_stamp    OUT NUMBER,
set_count    OUT NUMBER,
keep_options IN  BINARY_INTEGER
,
keep_until   IN  NUMBER
);
TBD
 
PROXYBEGINRESTORE
Begin a proxy restore session.

Overload 1
dbms_backup_restore.proxyBeginRestore(destination IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 dbms_backup_restore.proxyBeginRestore(
destination IN VARCHAR2 DEFAULT NULL,
cleanup     IN BOOLEAN);
TBD
 
PROXYCANCEL
Ends the proxy conversation dbms_backup_restore.proxyCancel;
exec dbms_backup_restore.proxyCancel;
 
PROXYCHANGE
Undocumented

Overload 1
dbms_backup_restore.proxychange(
recid  IN NUMBER,
stamp  IN NUMBER,
handle IN VARCHAR2,
status IN VARCHAR2, -- 'D','A','U','X'
params IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 dbms_backup_restore.proxychange(
recid        IN NUMBER,
stamp        IN NUMBER,
handle       IN VARCHAR2,
status       IN VARCHAR2, -- 'D','A','U','X','K'
params       IN VARCHAR2 DEFAULT NULL,
keep_options IN BINARY_INTEGER
,
keep_until   IN NUMBER
);
TBD
Overload 3 dbms_backup_restore.proxychange(
recid        IN NUMBER,
stamp        IN NUMBER,
handle       IN VARCHAR2,
status       IN VARCHAR2, -- 'D','A','U','X','K'
params       IN VARCHAR2 DEFAULT NULL,
keep_options IN BINARY_INTEGER,
keep_until   IN NUMBER,
force        IN BINARY_INTEGER
);
TBD
 
PROXYDELETE
Change proxy delete from the storage subsystem, or validate that a proxy backup exists in the storage subsystem.

Overload 1
dbms_backup_restore.proxydelete(
recid  IN NUMBER,
stamp  IN NUMBER,
handle IN VARCHAR2,
params IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 dbms_backup_restore.proxydelete(
recid  IN NUMBER,
stamp  IN NUMBER,
handle IN VARCHAR2,
params IN VARCHAR2 DEFAULT NULL,
force  IN BINARY_INTEGER);
TBD
 
PROXYGO
Called after all the files have been named. Does not return until the proxy copy is complete. All of the data movement is performed here. dbms_backup_restore.proxygo;
exec dbms_backup_restore.proxygo;
 
PROXYQUERYBACKUP
Checks to see if the file can be backed up using proxy copy dbms_backup_restore.proxyquerybackup(name in VARCHAR2)
RETURN BINARY_INTEGER;
SELECT dbms_backup_restore.proxyquerybackup('C:\ORACLE\ORADATA\ORABASE2\USERS01.DBF')
FROM dual;
 
PROXYQUERYRESTORE
Determines whether the indicated datafile can be restored from the specified proxy backup file dbms_backup_restore.proxyqueryrestore(
handle IN VARCHAR2,
toname IN VARCHAR2)
RETURN BINARY_INTEGER;
TBD
 
PROXYRESTOREARCHIVEDLOG
Specifies one archived log to be restored during a proxy session

Overload 1
dbms_backup_restore.proxyrestorearchivedlog(
handle   IN VARCHAR2,
thread   IN BINARY_INTEGER,
sequence IN NUMBER);
TBD
Overload 2 dbms_backup_restore.proxyrestorearchivedlog(
handle       IN VARCHAR2,
thread       IN BINARY_INTEGER,
sequence     IN NUMBER,
resetlogs_id IN NUMBER,
blksize      IN BINARY_INTEGER,
blocks       IN NUMBER);
TBD
 
PROXYRESTORECONTROLFILE
Names a controlfile to be restored with proxy copy
Overload 1
dbms_backup_restore.proxyrestorecontrolfile(
handle IN VARCHAR2,
toname IN VARCHAR2);
TBD
Overload 2 dbms_backup_restore.proxyrestorecontrolfile(
handle  IN VARCHAR2,
toname  IN VARCHAR2,
blksize IN BINARY_INTEGER,
blocks  IN NUMBER);
TBD
 
PROXYRESTOREDATAFILE
Specifies one datafile to be restored during a proxy session

Overload 1
dbms_backup_restore.proxyrestoredatafile(
handle IN VARCHAR2,
file#  IN BINARY_INTEGER,
toname IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 dbms_backup_restore.proxyrestoredatafile(
handle  IN VARCHAR2,
file#   IN BINARY_INTEGER,
toname  IN VARCHAR2 DEFAULT NULL,
tsname  IN VARCHAR2,
blksize IN BINARY_INTEGER,
blocks  IN NUMBER);
TBD
 
PROXYVALIDATE
Change proxy backup statusfrom the storage subsystem, or validate that a proxy backup exists in the storage subsystem.

Changes status in the controlfile to 'A' or 'X' appropriately.
dbms_backup_restore.proxyvalidate(
recid  IN NUMBER,
stamp  IN NUMBER,
handle IN VARCHAR2,
params IN VARCHAR2 DEFAULT NULL)
RETURN BINARY_INTEGER;
TBD
 
PROXYVALONLY
Same as proxyValidate, except that it does not change the status in the controlfile, it just validates dbms_backup_restore.proxyvalonly(
recid  IN NUMBER,
stamp  IN NUMBER,
handle IN VARCHAR2,
params IN VARCHAR2 DEFAULT NULL)
RETURN BINARY_INTEGER;
TBD
 
READARCHIVEDLOGHEADER
Reads the header of a archived redo log and returns thread, sequence, first_change# and next_change#. No controlfile record is added. dbms_backup_restore.readarchivedlogheader(
fname            IN  VARCHAR2,
full_name        OUT VARCHAR2,
thread           OUT NUMBER,
sequence         OUT NUMBER,
first_change     OUT NUMBER,
next_change      OUT NUMBER,
resetlogs_change OUT NUMBER,
resetlogs_time   OUT DATE);
TBD
 
READFILEHEADER
Used to obtain information from the file header of a datafile that is being cross-platform converted at the target.
In this case the file does not belong to the database (yet) and its block format is not the same of the database that is doing the conversion.
dbms_backup_restore.readfileheader(
fname   IN  VARCHAR2,
dbname  OUT VARCHAR2,
dbid    OUT NUMBER,
tsname  OUT VARCHAR2,
fno     OUT BINARY_INTEGER,
nblocks OUT NUMBER,
blksize OUT BINARY_INTEGER,
plid    OUT BINARY_INTEGER,
sameen  IN  BINARY_INTEGER);
TBD
 
REFRESHAGEDFILES
Undocumented dbms_backup_restore.refreshagedfiles;
exec dbms_backup_restore.refreshagedfiles;
 
REGISTERAUXDFCOPY
Reads the header from an operating system datafile copy, and makes a record in the controlfile section V$AUXILIARY_DATAFILE_COPY. This is used later to extract the undo for a PDB during open resetlogs operation of a PDB. dbms_backup_restore.registerAuxDFCopy(
pdbname    IN VARCHAR2,
clnscnwrp  IN NUMBER,
clnscnbas  IN NUMBER,
auxdfcList IN register_auxdfc_list);
TBD
 
REINIT
Reset all limits to infinity dbms_backup_restore.reinit;
exec dbms_backup_restore.reinit;
 
REMOTESQLEXECUTE
Allows executing a generic SQL statement at a remote database identified by source_cs connect string and source_dbuname db_unique_name parameter. It can be used to execute a simple SQL stmt or a SELECT statement that returns only one row, the value is returned by the function. dbms_backup_restore.remotesqlexecute(
source_dbuname IN VARCHAR2,
source_cs      IN VARCHAR2,
stmt           IN VARCHAR2)
RETURN VARCHAR2;
TBD
 
REMOVEDUPLICATEFILE
Removes the ?/dbs/_rm_dup_@.dat file. If the file cannot be removed the failure is logged in the trace file but no error is signaled dbms_backup_restore.removeduplicatefile;
exec dbms_backup_restore.removeduplicatefile;
 
RENORMALIZEALLFILENAMES
Undocumented dbms_backup_restore.reNormalizeAllFileNames;
exec reNormalizeAllFileNames;
 
RESDATAFILECOPY
A special version of copyDataFileCopy, but is used when performing a duplicate, in this case, there is no controlfile at the duplicate

Overload 1
dbms_backup_restore.resdatafilecopy(
cname         IN  VARCHAR2,
fname         IN  VARCHAR2,
full_name     OUT VARCHAR2,
max_corrupt   IN  BINARY_INTEGER DEFAULT 0,
check_logical IN  BOOLEAN,
blksize       IN  BINARY_INTEGER,
blocks        IN  BINARY_INTEGER,
fno           IN  BINARY_INTEGER,
scnstr        IN  VARCHAR2,
rfno          IN  BINARY_INTEGER);
TBD
Overload 2 dbms_backup_restore.resdatafilecopy(
cname         IN  VARCHAR2,
fname         IN  VARCHAR2,
full_name     OUT VARCHAR2,
max_corrupt   IN  BINARY_INTEGER DEFAULT 0,
check_logical IN  BOOLEAN,
blksize       IN  BINARY_INTEGER,
blocks        IN  BINARY_INTEGER,
fno           IN  BINARY_INTEGER,
scnstr        IN  VARCHAR2,
rfno          IN  BINARY_INTEGER,
tsname        IN  VARCHAR2);
TBD
 
RESETCFILESECTION
Attempts to reset the circular controlfile section. Record type is one the RTYPE constants above dbms_backup_restore.resetCFileSection(record_type IN BINARY_INTEGER);
exec dbms_backup_restore.resetCFileSection(dbms_backup_restore.rtyp_log_history);
 
RESETCONFIG
Deletes all RMAN configurations dbms_backup_restore.resetconfig;
exec dbms_backup_restore.resetconfig;
 
RESETDATABASE
Change the recovery destination incarnation dbms_backup_resetdatabase(dbinc_key IN NUMBER);
TBD
 
RESTOREARCHIVEDLOG
Restore logs from a redo log backup set, and where to restore them. The logs are specified by giving a thread and sequence NUMBER(restoreArchivedLog). Multiple calls can be made to specify thread and sequence NUMBERs. Only one SCN range and destination can be given per restore. dbms_backup_restore.restorearchivedlog(
thread   IN BINARY_INTEGER,
sequence IN NUMBER);
TBD
 
RESTOREARCHIVEDLOGRANGE
Restore logs from a redo log backup set, and where to restore them. The logs are specified by giving an SCN range(restoreArchivedLogRange). Multiple calls can be made to specify thread and sequence NUMBERs. Only one SCN range and destination can be given per restore. dbms_backup_restore.restorearchivedlogrange(
low_change  IN NUMBER DEFAULT 0,
high_change IN NUMBER DEFAULT 281474976710655);
TBD
 
RESTOREBACKUPPIECE
Reads one backup piece and writes its contents to the files in the restore list. Creates files from complete backups.

Overload 1
dbms_backup_restore.restorebackuppiece(
handle   IN  VARCHAR2,
done     OUT BOOLEAN,
params   IN  VARCHAR2 DEFAULT NULL,
fromdisk IN  BOOLEAN  DEFAULT FALSE);
TBD
Overload 2 dbms_backup_restore.restorebackuppiece(
done      OUT BOOLEAN,
params    IN  VARCHAR2 DEFAULT NULL,
outhandle OUT VARCHAR2,
outtag    OUT VARCHAR2,
failover  OUT BOOLEAN);
TBD
 
RESTORECANCEL
Aborts a restore conversation
Overload 1
dbms_backup_restore.restorecancel;
exec dbms_backup_restore.restorecancel;
Overload 2 dbms_backup_restore.restorecancel(check_files IN BOOLEAN);
exec dbms_backup_restore.restorecancel(TRUE);
 
RESTORECONTROLFILETO
Copies the controlfile from the backup set to an operating system file. If the database is mounted, the name must NOT match any of the current controlfiles.
Overload 1
dbms_backup_restore.restorecontrolfileto(cfname IN VARCHAR2);
TBD
Overload 2 dbms_backup_restore.restorecontrolfileto(
cfname IN VARCHAR2,
isstby IN BOOLEAN);
TBD
Overload 3 dbms_backup_restore.restorecontrolfileto(
cfname   IN VARCHAR2
isstby   IN BOOLEAN
nocfconv IN BOOLEAN
);
TBD
 
RESTOREDATAFILETO
Creates the output file from a complete backup in the backup set

Overload 1
dbms_backup_restore.restoredatafileto(
dfNUMBER IN BINARY_INTEGER,
toname   IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 dbms_backup_restore.restoredatafileto(
dfNUMBER    IN BINARY_INTEGER,
toname      IN VARCHAR2 DEFAULT NULL,
max_corrupt IN BINARY_INTEGER);
TBD
Overload 3 dbms_backup_restore.restoredatafileto(
dfNUMBER    IN BINARY_INTEGER,
toname      IN VARCHAR2 DEFAULT NULL,
max_corrupt IN BINARY_INTEGER,
tsname      IN VARCHAR2);
set echo off;
set serveroutput on;

DECLARE
 omfname VARCHAR2(512) := NULL;
 done    BOOLEAN;
 devname VARCHAR2(255);
BEGIN
  dbms_output.put_line(' ');
  dbms_output.put_line(' Allocating device.... ');
  dbms_output.put_line(' Specifying datafiles... ');

  devname := dbms_backup_restore.deviceAllocate;

  dbms_output.put_line(' Specifing datafiles... ');

  dbms_backup_restore.restoreSetDataFile;
  dbms_backup_restore.restoreDataFileTo(1,'c:\oracle\product\oradata\orabase\SYSTEM01.DBF', 0, 'SYSTEM');
  dbms_backup_restore.restoreDataFileTo(2,'c:\oracle\product\oradata\orabase\SYSAUX01.DBF', 0, 'SYSAUX');
  dbms_backup_restore.restoreDataFileTo(3,'c:\oracle\product\oradata\orabase\UNDOTBS01.DBF', 0, 'UNDOTBS1');
  dbms_backup_restore.restoreDataFileTo(4,'c:\oracle\product\oradata\orabase\USERS01.DBF', 0, 'USERS');

  dbms_output.put_line(' Restoring ... ');

  dbms_backup_restore.restoreBackupPiece('c:\oracle\product\12.0.1\db_2\assistants\dbca\templates\Seed_Database.dfb', done);

  IF done THEN
    dbms_output.put_line(' Restore done.');
  ELSE
    dbms_output.put_line(' ORA-XXXX: Restore failed ');
  END IF;

  dbms_backup_restore.deviceDeallocate;
END;
/
 
RESTOREDMPFILE
Add the datapump dump file to the restore conversation when restoring datafiles that do not belong to this database dbms_backup_restore.restoreDMPFile(dmpfile IN VARCHAR2);
-- a restore conversation must be active to proceed

exec dbms_backup_restore.restoreDMPFile('$HOME/noaa.dmp');
 
RESTORESETARCHIVEDLOG
Begins a conversation that will restore archived redo logs so that they can be applied by recovery
Overload 1
dbms_backup_restore.restoresetarchivedlog(
destination IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 dbms_backup_restore.restoresetarchivedlog(
destination IN VARCHAR2 DEFAULT NULL,
cleanup     IN BOOLEAN);
TBD
Overload 3 dbms_backup_restore.restoresetarchivedlog(
destination IN VARCHAR2,
cleanup     IN BOOLEAN,
service     IN VARCHAR2);
TBD
 
RESTORESETDATAFILE (new 12.1 overloads)
Begins a conversation that will completely recreate datafiles and possibly a  controlfile from the backup
Overload 1
dbms_backup_restore.restoresetdatafile;
exec dbms_backup_restore.restoresetdatafile;
Overload 2 dbms_backup_restore.restoresetdatafile(check_logical IN BOOLEAN);
TBD
Overload 3 dbms_backup_restore.restoresetdatafile(
check_logical IN BOOLEAN,
cleanup       IN BOOLEAN);
TBD
Overload 4 dbms_backup_restore.restoresetdatafile(
check_logical IN BOOLEAN,
cleanup       IN BOOLEAN,
service       IN VARCHAR2);
TBD
Overload 5 dbms_backup_restore.restoresetdatafile(
check_logical IN BOOLEAN,
cleanup       IN BOOLEAN,
service       IN VARCHAR2,
chunksize     IN BINARY_INTEGER,
rs_flags      IN BINARY_INTEGER);
TBD
 
RESTORESETPIECE
Sets up the handle for restoreBackupPiece to use. When multiple copies of piece exists, call restoreSetPiece to for each copy before calling restoreBackupPiece. This will enable RESTORE FAILOVER feature inside kernel. dbms_backup_restore.restoresetpiece(
handle   IN VARCHAR2,
tag      IN VARCHAR2,
fromdisk IN BOOLEAN,
recid    IN NUMBER,
stamp    IN NUMBER);
TBD
 
RESTORESETXTTFILE
Initiates a restore conversation for files that do not belong to this database from backup pieces that are not part of the database to transport a tablespace dbms_backup_restore.restoreSetXTTFile(
pltfrmfr IN BINARY_INTEGER,
xttincr  IN BOOLEAN);
TBD
 
RESTORESPFILETO
Copies the SPFILE from the backup set to an operating system file dbms_backup_restore.restorespfileto(
pfname IN VARCHAR2 DEFAULT NULL,
sfname IN VARCHAR2 DEFAULT NULL);
TBD
 
RESTORESTATUS
Returns information about the current restore conversation. It is useful for resyncing with a conversation after some error has interrupted normal execution, and it is now time to resume the conversation. It can also be called when there is no conversation. dbms_backup_restore.restorestatus(
state       OUT BINARY_INTEGER,
pieceno     OUT BINARY_INTEGER,
files       OUT BINARY_INTEGER,
datafiles   OUT BOOLEAN,
incremental OUT BOOLEAN,
device      OUT BOOLEAN);

RESTORE_NO_CONVERSATION CONSTANT BINARY_INTEGER := 0;
RESTORE_NAMING_FILES    CONSTANT BINARY_INTEGER := 1;
RESTORE_PIECE_READ      CONSTANT BINARY_INTEGER := 2;
RESTORE_PIECE_RETRY     CONSTANT BINARY_INTEGER := 3;
set serveroutput on

DECLARE
 stt BINARY_INTEGER;
 pno BINARY_INTEGER;
 fil BINARY_INTEGER;
 dfs BOOLEAN;
 inc BOOLEAN;
 dev BOOLEAN;
BEGIN
  dbms_backup_restore.restorestatus(stt, pno, fil, dfs, inc, dev);

  dbms_output.put_line(stt);
  dbms_output.put_line(pno);
  dbms_output.put_line(fil);
END;
/
 
RESTOREVALIDATE
Forces the reading of the entire backup set as if all files in the backup were being restored but no data is written to any files. Incremental backup application does not require a valid file to applying the changes. dbms_backup_restore.restorevalidate;

-- After the conversation is complete, a report is written to an
-- trace file, giving the status of all the files in the backup set.
--
-- Restore Conversation File Status Report
-- File  Start Finish OK Name
-- ----- ----- ------ -- --------------------
--     2     Y      Y  Y
--     4     Y      Y  Y
--     6     Y      Y  Y
--     3     Y      Y  Y
--     5     Y      Y  Y
exec dbms_backup_restore.restorevalidate;
 
RESTOREXTTFILETO
Add a file to the restore conversation for files that do not belong
to this database that will be restored
dbms_backup_restore.restoreXTTFileTo(
xtype   IN BINARY_INTEGER,
xfno    IN BINARY_INTEGER,
xtsname IN VARCHAR2,
xfname  IN VARCHAR2);
TBD
 
RMAN_USAGE
Appears to return the number of recorded RMAN usages that meet the input criteria dbms_backup_restore.rman_usage(
diskonly    IN BOOLEAN,
nondiskonly IN BOOLEAN,
encrypted   IN BOOLEAN,
compalg     IN VARCHAR2) -- compression algorithm
RETURN BINARY_INTEGER;
set serveroutput on

DECLARE
 retVal NUMBER;
BEGIN
  retVal := dbms_backup_restore.rman_usage(FALSE, FALSE, FALSE, NULL);
  dbms_output.put_line(TO_CHAR(retVal));
END;
/
 
SCANARCHIVEDLOG
Scans a file and verifies the checksum (if present) in each block dbms_backup_restore.scanarchivedlog(
recid IN NUMBER,
stamp IN NUMBER);
TBD
 
SCANDATAFILE
Scans a file and verifies the checksum (if present) in each block

Overload 1
dbms_backup_restore.scanDataFile(
dfNUMBER         IN BINARY_INTEGER,
max_corrupt      IN BINARY_INTEGER DEFAULT 0,
update_fuzziness IN BOOLEAN        DEFAULT TRUE)
RETURN NUMBER;
TBD
Overload 2 dbms_backup_restore.scandatafile(
dfNUMBER         IN BINARY_INTEGER,
max_corrupt      IN BINARY_INTEGER DEFAULT 0,
update_fuzziness IN BOOLEAN        DEFAULT TRUE,
check_logical    IN BOOLEAN)
RETURN NUMBER;
TBD
 
SCANDATAFILECOPY
Scans a file and verifies the checksum (if present) in each block

Overload 1
dbms_backup_restore.scanDataFileCopy(
recid            IN NUMBER,
stamp            IN NUMBER,
max_corrupt      IN BINARY_INTEGER DEFAULT 0,
isbackup         IN BOOLEAN DEFAULT FALSE,
update_fuzziness IN BOOLEAN DEFAULT TRUE)
RETURN NUMBER;
TBD
Overload 2 dbms_backup_restore.scanDataFileCopy(
recid            IN NUMBER,
stamp            IN NUMBER,
max_corrupt      IN BINARY_INTEGER DEFAULT 0,
isbackup         IN BOOLEAN        DEFAULT FALSE,
update_fuzziness IN BOOLEAN        DEFAULT TRUE,
check_logical    IN BOOLEAN)
RETURN NUMBER;
TBD
 
SEARCHFILES (new 12.1 overload)
Populates X$KRBMSFT with files that match the specified pattern

Overload 1
dbms_backup_restore.searchFles(
pattern IN OUT VARCHAR2,
ns      IN OUT VARCHAR2,
ccf     IN     BOOLEAN  DEFAULT FALSE,
omf     IN     BOOLEAN  DEFAULT FALSE,
ftype   IN     VARCHAR2 DEFAULT NULL);
set serveroutput on

DECLARE
 TYPE file_rec IS RECORD (FileName dbms_sql.varchar2_table);
 frec file_rec;

 CURSOR fcur IS
 SELECT fname_krbmsft AS FileName
 FROM x$krbmsft
 WHERE fname_krbmsft LIKE '%.%';

 dirname VARCHAR2(1024) := 'c:\temp';
 ns      VARCHAR2(1024);
BEGIN
  dbms_backup_restore.searchFiles(dirname, ns);

  OPEN fcur;
  FETCH fcur BULK COLLECT INTO frec;
  CLOSE fcur;

  FOR i IN 1 .. frec.FileName.COUNT LOOP
    dbms_output.put_line(frec.FileName(i));
  END LOOP;
END;
/

DECLARE
 fn  VARCHAR2(100);
 yr  PLS_INTEGER;
 mo  PLS_INTEGER;
 dy  PLS_INTEGER;
 seq PLS_INTEGER;
 ts  NUMBER;
 b BOOLEAN;
BEGIN
  b := dbms_backup_restore.findAutSearchFileTable(FALSE, 1, fn, yr, mo, dy, seq, ts);
  dbms_output.put_line(fn);
  dbms_output.put_line(yr);
  dbms_output.put_line(mo);
  dbms_output.put_line(dy);
  dbms_output.put_line(seq);
  dbms_output.put_line(ts);
END;
/

exec dbms_backup_restore.processSearchFileTable(TRUE, 1);
Overload 2 dbms_backup_restore.searchfiles(
pattern IN OUT VARCHAR2,
ns      IN OUT VARCHAR2,
ccf     IN     BOOLEAN  DEFAULT FALSE,
omf     IN     BOOLEAN  DEFAULT FALSE,
ftype   IN     VARCHAR2 DEFAULT NULL,
onlyfnm IN     BOOLEAN,
normfnm IN     BOOLEAN
);
TBD
 
SETCONFIG
Saves configuration parameters seting the RMAN configuration dbms_backup_restore.setconfig(
name  IN VARCHAR2,
value IN VARCHAR2 DEFAULT NULL)
RETURN BINARY_INTEGER;
TBD
 
SETDATAFILEAUX
Sets an auxiliary filename dbms_backup_restore.setdatafileaux(
dfNUMBER IN BINARY_INTEGER,
fname    IN VARCHAR2 DEFAULT NULL);
TBD
 
SETDBUNIQNAMETSPITR
Sets (or resets if dbuname is NULL) the SGA variable krbdbutspitr, used to force a db_unique_name for ASM datafiles dbms_backup_restore.setdbuniqnametspitr(dbuname IN VARCHAR2);
exec dbms_backup_restore.setdbuniqnametspitr('MLIBDB');
 
SETLIMIT
Set a limit to a particular value. The limit keeps this value until the current device is deallocated, or a call is made to change the limit dbms_backup_restore.setlimit(name IN BINARY_INTEGER, value IN NUMBER);
TBD
 
SETMSB
Set section size for multi-section backup dbms_backup_restore.setmsb(
dfnumber      IN NUMBER,
section_size  IN NUMBER,
first_section IN NUMBER,
section_count IN NUMBER,
set_stamp     IN NUMBER,
set_count     IN NUMBER,
pieceno       IN NUMBER,
piececnt      IN NUMBER);
TBD
 
SETMSC (new 12.1)
Sets the fname into the backup conversation context. The fname parameter is the shared filename for a multisection copy. dbms_backup_restore.setmsc(fname IN VARCHAR2);
TBD
 
SETPARMS
Undocumented dbms_backup_restore.setparms(
p0 IN NUMBER   DEFAULT NULL,
p1 IN NUMBER   DEFAULT NULL,
p2 IN NUMBER   DEFAULT NULL,
p3 IN NUMBER   DEFAULT NULL,
p4 IN NUMBER   DEFAULT NULL,
p5 IN VARCHAR2 DEFAULT NULL,
p6 IN VARCHAR2 DEFAULT NULL,
p7 IN VARCHAR2 DEFAULT NULL,
p8 IN VARCHAR2 DEFAULT NULL,
p9 IN VARCHAR2 DEFAULT NULL);
TBD
 
SETRMANSTATUSROWID
By calling this function all operation by this foreground will be associated with a V$RMAN_STATUS row. That's what the doc says ... I didn't write it. dbms_backup_restore.setrmanstatusrowid(
rsid IN NUMBER,
rsts IN NUMBER);
TBD
 
SETTABLESPACEATTR (new 12.1 overload)
Undocumented

Overload 1
dbms_backup_restore.settablespaceattr(
code  IN NUMBER,
tsid  IN BINARY_INTEGER,
clear IN BINARY_INTEGER,
onoff IN BINARY_INTEGER);
TBD
Pluggable Database Overload

Overload 2
dbms_backup_restore.settablespaceattr(
code  IN NUMBER,
tsid  IN BINARY_INTEGER,
clear IN BINARY_INTEGER,
onoff IN BINARY_INTEGER,
pdbid IN NUMBER);
TBD
 
SETTABLESPACEEXCLUDE (new 12.1 overload)
Sets a tablespace "excluded from backup" flag

Overload 1
dbms_backup_restore.settablespaceexclude(
tsid IN BINARY_INTEGER,
flag IN BINARY_INTEGER); -- 0 = No, 1 = Yes
SELECT ts#, name
FROM ts$;

exec dbms_backup_restore.settablespaceexclude(11, 1);
Pluggable Database Overload

Overload 2
dbms_backup_restore.settablespaceexclude(
tsid   IN BINARY_INTEGER,
flag   IN BINARY_INTEGER,
pdbid  IN NUMBER);
SELECT con_id, name, open_mode
FROM v$pdbs;

SELECT ts#, name
FROM ts$;

exec dbms_backup_restore.settablespaceexclude(11, 1, 3);
 
SET_CHARSET
If the database is closed sets the session charset dbms_backup_restore.set_charset(charset_name IN VARCHAR2);
SELECT value
FROM v$nls_valid_values
ORDER BY 1;

SELECT *
FROM nls_database_parameters
WHERE parameter ='NLS_CHARACTERSET';

exec dbms_backup_restore.set_charset('WE8MSWIN1252');
 
SET_CLIENT_INFO
Equivalent to dbms_application_info.set_client_info. Was added so RMAN could call it from recover.bsq without needing to make the x$kqp326 package spec public. dbms_backup_restore.set_client_info(client_info IN VARCHAR2);
See the DBMS_APPLICATION_INFO Demos
 
SLEEP
Sleep for the specified NUMBER of seconds dbms_backup_restore.sleep(secs IN BINARY_INTEGER);
exec dbms_backup_restore.sleep(3);
 
SWITCHTEMPFILE (new 12.1 overload)
Renames a controlfile tempfile record. Will add missing tempfile and tablespace records if they are missing.

Overload 1
dbms_backup_restore.switchtempfile(
tsnum       IN NUMBER,
tsname      IN VARCHAR2,
tfnum       IN NUMBER,
tfname      IN VARCHAR2,
create_time IN DATE,
create_scn  IN NUMBER,
blocks      IN NUMBER,
blocksize   IN BINARY_INTEGER,
rfnum       IN NUMBER,
exton       IN BOOLEAN,
isSFT       IN BOOLEAN,
maxsize     IN NUMBER,
nextsize    IN NUMBER);
TBD
Pluggable Database Overload

Overload 2
dbms_backup_restore.switchtempfile(
tsnum       IN NUMBER,
tsname      IN VARCHAR2,
tfnum       IN NUMBER,
tfname      IN VARCHAR2,
create_time IN DATE,
create_scn  IN NUMBER,
blocks      IN NUMBER,
blocksize   IN BINARY_INTEGER,
rfnum       IN NUMBER,
exton       IN BOOLEAN,
isSFT       IN BOOLEAN,
maxsize     IN NUMBER,
nextsize    IN NUMBER
pdbId       IN NUMBER);
TBD
 
SWITCHTOCOPY
Causes the filename in the indicated datafile copy record to become the current named datafile
Overload 1
dbms_backup_restore.switchtocopy(
copy_recid IN NUMBER,
copy_stamp IN NUMBER);
TBD
Overload 2 dbms_backup_restore.switchtocopy(
copy_recid IN NUMBER,
copy_stamp IN NUMBER,
catalog    IN BOOLEAN);
TBD
 
SWITCH_PRIMARY_BCT
Executed once per backup at a standby when the backup is an incremental backup and the standby has block change tracking enabled dbms_backup_restore.switch_primary_bct;
exec dbms_backup_restore.switch_primary_bct;
 
TRANSPORTDBLOCK
Sets a lock on transportable db context. The name of the new database to be created on the target platform can be passed to transportable db context, too. dbms_backup_restore.transportdblock(newdbname IN VARCHAR2 DEFAULT NULL);
TBD
 
TRANSPORTDBUNLOCK
Frees the lock on transportable db context dbms_backup_restore.transportdbunlock;
exec dbms_backup_restore.transportdbunlock;
 
UPDATEHEADERS
Called by RMAN when headers of locally managed datafiles need to be updated after the database compatibility has been upgraded to 10.2 or above dbms_backup_restore.updateheaders RETURN BOOLEAN;
set serveroutput on

BEGIN
  IF dbms_backup_restore.updateheaders THEN
    dbms_output.put_line('TRUE');
  ELSE
    dbms_output.put_line('FALSE');
  END IF;
END;
/

-- 11gR2 error
ERROR at line 1:
ORA-00600: internal error code, arguments: [krbbUpdLocManHeaders_noctx], [], [], [], [], [], [], [],
ORA-06512: at "SYS.DBMS_BACKUP_RESTORE", line 7583
ORA-06512: at line 2

-- 12cR1 error
ERROR at line 1:
ORA-00600: internal error code, arguments: [krbbUpdLocManHeaders_noctx], [], [], [], [], [], [], [], [], [], [], []
ORA-06512: at "SYS.DBMS_BACKUP_RESTORE", line 7923
ORA-06512: at line 2
 
UPDATERMASTATUSROW
Updates a row in the V$RMAN_STATUS view in the SGA dbms_backup_restore.updatermanstatusrow(
row_id    IN NUMBER,
row_stamp IN NUMBER,
status    IN BINARY_INTEGER);
TBD
 
VALIDATEARCHIVEDLOG
Validates the correctness of archived log information in the recovery catalog and controlfile

Overload 1
dbms_backup_restore.validatearchivedlog(
recid            IN NUMBER,
stamp            IN NUMBER,
fname            IN VARCHAR2,
thread           IN NUMBER,
sequence         IN NUMBER,
resetlogs_change IN NUMBER,
first_change     IN NUMBER,
blksize          IN NUMBER)
RETURN BINARY_INTEGER;
TBD
Overload 2 dbms_backup_restore.validatearchivedlog(
recid            IN NUMBER,
stamp            IN NUMBER,
fname            IN VARCHAR2,
thread           IN NUMBER,
sequence         IN NUMBER,
resetlogs_change IN NUMBER,
first_change     IN NUMBER,
blksize          IN NUMBER,
signal           IN BINARY_INTEGER)
RETURN BINARY_INTEGER;
TBD
Overload 3 dbms_backup_restore.validatearchivedlog(
recid            IN NUMBER,
stamp            IN NUMBER,
fname            IN VARCHAR2,
thread           IN NUMBER,
sequence         IN NUMBER,
resetlogs_change IN NUMBER,
first_change     IN NUMBER,
blksize          IN NUMBER,
signal           IN BINARY_INTEGER,
terminal         IN BINARY_INTEGER)
RETURN BINARY_INTEGER;
TBD
Overload 4 dbms_backup_restore.validatearchivedlog(
recid            IN NUMBER,
stamp            IN NUMBER,
fname            IN VARCHAR2,
thread           IN NUMBER,
sequence         IN NUMBER,
resetlogs_change IN NUMBER,
first_change     IN NUMBER,
blksize          IN NUMBER,
signal           IN BINARY_INTEGER,
terminal         IN BINARY_INTEGER,
foreignal 
       IN BINARY_INTEGER)
RETURN BINARY_INTEGER;
TBD
 
VALIDATEBACKUPPIECE
Validates the correctness of backup piece information in the recovery catalog and controlfile

Overload 1
dbms_backup_restore.validatebackuppiece(
recid     IN NUMBER,
stamp     IN NUMBER,
handle    IN VARCHAR2,
set_stamp IN NUMBER,
set_count IN NUMBER,
pieceno   IN BINARY_INTEGER,
params    IN VARCHAR2 DEFAULT NULL)
RETURN BINARY_INTEGER;
TBD
Overload 2 dbms_backup_restore.validatebackuppiece(
recid      IN NUMBER,
stamp      IN NUMBER,
handle     IN VARCHAR2,
set_stamp  IN NUMBER,
set_count  IN NUMBER,
pieceno    IN BINARY_INTEGER,
params     IN VARCHAR2 DEFAULT NULL,
hdl_isdisk IN BINARY_INTEGER
)
RETURN BINARY_INTEGER;
TBD
Overload 3 dbms_backup_restore.validatebackuppiece(
recid      IN  NUMBER,
stamp      IN  NUMBER,
handle     IN  VARCHAR2,
set_stamp  IN  NUMBER,
set_count  IN  NUMBER,
pieceno    IN  BINARY_INTEGER,
params     IN  VARCHAR2 DEFAULT NULL,
hdl_isdisk IN  BINARY_INTEGER,
media      OUT VARCHAR2)
RETURN BINARY_INTEGER;
TBD
 
VALIDATEBLOCK
Adds the specified block range to the backup context for validation dbms_backup_restore.validateblock(blockRangeTable IN blockRangeTable_t);
TBD
 
VALIDATEDATAFILECOPY
Validates the correctness of datafile copy information in the recovery catalog and controlfile

Overload 1
dbms_backup_restore.validatedatafilecopy(
recid             IN NUMBER,
stamp             IN NUMBER,
fname             IN VARCHAR2,
dfNUMBER          IN BINARY_INTEGER,
resetlogs_change  IN NUMBER,
creation_change   IN NUMBER,
checkpoint_change IN NUMBER,
blksize           IN NUMBER)
RETURN BINARY_INTEGER;
TBD
Overload 2 dbms_backup_restore.validatedatafilecopy(
recid             IN     NUMBER,
stamp             IN     NUMBER,
fname             IN     VARCHAR2,
dfNUMBER          IN     BINARY_INTEGER,
resetlogs_change  IN     NUMBER,
creation_change   IN     NUMBER,
checkpoint_change IN OUT NUMBER,
checkpoint_time   IN OUT BINARY_INTEGER,
blksize           IN     NUMBER,
signal            IN     BINARY_INTEGER)
RETURN BINARY_INTEGER;
TBD
Overload 3 dbms_backup_restore.validatedatafilecopy(
recid             IN NUMBER,
stamp             IN NUMBER,
fname             IN VARCHAR2,
dfNUMBER          IN BINARY_INTEGER,
resetlogs_change  IN NUMBER,
creation_change   IN NUMBER,
checkpoint_change IN NUMBER,
blksize           IN NUMBER,
signal            IN BINARY_INTEGER)
RETURN BINARY_INTEGER;
TBD
 
VALIDATETABLESPACE (new 12.1 overload)
Validate that the tablespace has not  been recreated when performing TSPITR

Overload 1
dbms_backup_restore.validatetablespace(
tsid IN BINARY_INTEGER,
cSCN IN NUMBER) -- Minimum SCN of all TBSP datafiles at the PIT of the TSPITR
RETURN BINARY_INTEGER; -- 0 if recreated, 1 if not
TBD
Pluggable Database Overload

Overload 2
dbms_backup_restore.validatetablespace(
tsid  IN BINARY_INTEGER,
cSCN  IN NUMBER, -- Minimum SCN of all TBSP datafiles at the PIT of the TSPITR
pdbId IN NUMBER)
RETURN BINARY_INTEGER; -- 0 if recreated, 1 if not
TBD
 
VALIDATIONADDPIECE
Adds a backup piece to the list of pieces to validate dbms_backup_restore.validationaddpiece(
recid      IN NUMBER,
stamp      IN NUMBER,
handle     IN VARCHAR2,
set_stamp  IN NUMBER,
set_count  IN NUMBER,
pieceno    IN NUMBER,
params     IN VARCHAR2 DEFAULT NULL,
hdl_isdisk IN BINARY_INTEGER);
TBD
 
VALIDATIONEND
This procedure ends the restore conversation dbms_backup_restore.validationEnd;
exec dbms_backup_restore.validationEnd;
 
VALIDATIONNEXTRESULT
Gets the next result.- If no more results are found, then HANDLE is null

Overload 1
dbms_backup_restore.validationnextresult(
handle    OUT VARCHAR2,
recid     OUT NUMBER,
set_stamp OUT NUMBER,
set_count OUT NUMBER,
pieceno   OUT NUMBER,
msca      OUT BINARY_INTEGER,
m1        OUT VARCHAR2,
m2        OUT VARCHAR2,
m3        OUT VARCHAR2,
m4        OUT VARCHAR2,
m5        OUT VARCHAR2,
m6        OUT VARCHAR2,
m7        OUT VARCHAR2,
m8        OUT VARCHAR2,
m9        OUT VARCHAR2,
m10       OUT VARCHAR2,
m11       OUT VARCHAR2,
m12       OUT VARCHAR2,
m13       OUT VARCHAR2,
m14       OUT VARCHAR2,
m15       OUT VARCHAR2,
m16       OUT VARCHAR2,
m17       OUT VARCHAR2,
m18       OUT VARCHAR2,
m19       OUT VARCHAR2,
m20       OUT VARCHAR2);
TBD
Overload 2 dbms_backup_restore.validationnextresult(
handle     OUT VARCHAR2,
recid      OUT NUMBER,
set_stamp  OUT NUMBER,
set_count  OUT NUMBER,
pieceno    OUT NUMBER,
msca       OUT BINARY_INTEGER,
m1         OUT VARCHAR2,
m2         OUT VARCHAR2,
m3         OUT VARCHAR2,
m4         OUT VARCHAR2,
m5         OUT VARCHAR2,
m6         OUT VARCHAR2,
m7         OUT VARCHAR2,
m8         OUT VARCHAR2,
m9         OUT VARCHAR2,
m10        OUT VARCHAR2,
m11        OUT VARCHAR2,
m12        OUT VARCHAR2,
m13        OUT VARCHAR2,
m14        OUT VARCHAR2,
m15        OUT VARCHAR2,
m16        OUT VARCHAR2,
m17        OUT VARCHAR2,
m18        OUT VARCHAR2,
m19        OUT VARCHAR2,
m20        OUT VARCHAR2,
attributes OUT BINARY_INTEGER);
TBD
 
VALIDATIONSTART
Initializes restore conversation and the list of backup pieces to validate dbms_backup_restore.validationstart;
exec dbms_backup_restore.validationstart;
 
VALIDATIONVALIDATE
Performs "the" validation ... whatever that means
Overload 1
dbms_backup_restore.validationvalidate;
exec dbms_backup_restore.validationvalidate;
Overload 2 dbms_backup_restore.validationvalidate(flags IN BINARY_INTEGER);
TBD
 
VSSBACKEDRECORD
"All the record with stamp less than input stamp value are backed up by the VSS infrastructure." At least that's what the file says. dbms_backup_restore.vssbackedrecord(
rectype IN BINARY_INTEGER,
recid   IN NUMBER,
stamp   IN NUMBER);
 
 
WRITEDUPLICATEDDATAFILECOPY
Writes one record to the ?/dbs/_rm_dup_@.dat file and flushes the record to disk. If the write fails the failure is logged in the trace file but no error is signaled dbms_backup_restore.writeduplicateddatafilecopy(fno IN NUMBER, fname IN VARCHAR2);
TBD
 
WRITETRACE (new 12.1)
Writes a message to a trace file if krb_trace is enabled to help identify trace files created by RMAN dbms_backup_restore.writeTrace(txt IN VARCHAR2);
exec dbms_backup_restore.writeTrace('Test Performed by MadDog Morgan');
 
XTTRESTORE (new 12.1)
Reads the piece specified as its parameter and writes it contents to the files provided by restoreXttFileTo dbms_backup_restore.xttrestore(
handle IN VARCHAR2,
done OUT BOOLEAN);
TBD
 
ZERODBID
Used to update the header of a datafile so that the a new dbid will be calculated later on by a create controlfile statement dbms_backup_restore.zerodbid(fno IN BINARY_INTEGER);
exec dbms_backup_restore.zerodbid(0);
 
Restore Demo
The following is from $ORACLE_HOME/ cfgtoollogs/dbca/orabase/ rmanRestoreDatafiles.sql set echo off
set serveroutput on

SELECT TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') FROM dual;

variable devicename VARCHAR2(255);

DECLARE
 omfname VARCHAR2(512) := NULL;
 done    BOOLEAN;
BEGIN
  dbms_output.put_line(' ');
  dbms_output.put_line(' Allocating device.... ');
  dbms_output.put_line(' Specifying datafiles... ');

  :devicename := dbms_backup_restore.deviceAllocate;

  dbms_output.put_line(' Specifing datafiles... ');
  dbms_backup_restore.restoreSetDataFile;
  dbms_backup_restore.restoreDataFileTo(1, 'C:\oracle\product\oradata\orabase\SYSTEM01.DBF', 0, 'SYSTEM');
  dbms_backup_restore.restoreDataFileTo(2, 'C:\oracle\product\oradata\orabase\UNDOTBS01.DBF', 0, 'UNDOTBS1');
  dbms_backup_restore.restoreDataFileTo(3, 'C:\oracle\product\oradata\orabase\SYSAUX01.DBF', 0, 'SYSAUX');
  dbms_backup_restore.restoreDataFileTo(4, 'C:\oracle\product\oradata\orabase\USERS01.DBF', 0, 'USERS');
  dbms_output.put_line(' Restoring ... ');
  dbms_backup_restore.restoreBackupPiece('C:\oracle\product\ora102\assistants\dbca\templates\Seed_Database.dfb', done);

  IF done THEN
    dbms_output.put_line(' Restore done.');
  ELSE
    dbms_output.put_line(' ORA-XXXX: Restore failed ');
  END IF;

  dbms_backup_restore.deviceDeallocate;
END;
/

SELECT TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') FROM dual;

Related Topics
DBMS_APPLICATION_INFO
DBMS_IR
DBMS_RCVCAT
DBMS_RCVMAN
Feature Usage Procs
Packages
RMAN
RMAN Demos

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