Oracle8i Backup and Recovery Guide
Release 8.1.5






Prev Prev Next






Create an image copy of a file. The output file is always written to disk. You can copy the following types of files:

In many cases, copying datafiles is more beneficial than backing them up, since the output is suitable for use without any additional processing. In contrast, you must process a backup set with a restore command before it is usable. So, you can perform media recovery on a datafile copy, but not directly on a backup set, even if it backs up only one datafile and contains a single backup piece.


Keywords and Parameters


specifies optional parameters affecting either the input or output files or both.  


tag tag_name  

specifies the tag of the input file or output file copy.  


level integer  

includes the input file or output file copy in the incremental backup strategy by making it serve as a basis for subsequent incremental backup sets. Typically, you specify level 0. If you do not use the level option, then the datafile copy has no impact on the incremental backup strategy.  



suppresses block checksums. Unless you specify this option, Oracle computes a checksum for each block. RMAN verifies the checksum when restoring the copy. If the database is already maintaining block checksums, then this flag has no effect.  


check logical  

tests data and index blocks that pass physical corruption checks for logical corruption, e.g., corruption of a row piece or index entry. If RMAN finds logical corruption, it logs the block in the alert.log and server session trace file.

Provided the sum of physical and logical corruptions detected for a file remain below its maxcorrupt setting, the RMAN command completes and Oracle populates V$BACKUP_CORRUPTION and V$COPY_CORRUPTION with corrupt block ranges. If maxcorrupt is exceeded, the command terminates without populating the views.

Note: For copy and backup the maxcorrupt setting represents the total number of physical and logical corruptions permitted on a file.  

copy_inputfile clause  

specifies the type of input file, i.e., the file that you want to copy.  


datafile datafileSpec  

specifies a list of one or more datafiles as input. See "datafileSpec".

Note: If you specify a filename, then it must be the name of a current datafile as listed in the control file.  



specifies a list of one or more datafile copies as input. Specify the datafile copies by 'filename' or tag = tag_name. The filename must not be the name of a current datafile listed in the control file. The existing copy may have been created by either a previous copy command or by an external O/S utility.  


archivelog 'filename'  

specifies the filename of an input archived redo log. The archived log may have been created by the Oracle archiving session or by a previous copy command. Specify the archived redo log by filename.  


current controlfile  

specifies the current control file.  


controlfilecopy 'filename'  

specifies the filename of a control file copy. You can also set tag = tag_name to specify a list of one or more control file copies.

Note: The control file copy is marked as a backup control file, so media recovery will be necessary if you mount the control file copy. This command is equivalent to the ALTER DATABASE BACKUP CONTROLFILE TO '...' statement.  

to 'filename'  

specifies the filename of the output file copy.  

to auxname  

specifies that Oracle should copy the input datafile to the filename specified in an earlier set auxname command for the input datafile.  


Copying a Datafile

This example copies the datafile tbs_01.f with the nochecksum option to the output file temp3.f, marking it as a level 0 backup:

run {
     allocate channel dev1 type disk;
       datafile '$ORACLE_HOME/dbs/tbs_01.f' 
         to '$ORACLE_HOME/copy/temp3.f'
       level 0;
Copying the Control File

This example copies the current control file and gives the copy the tag weekly_cf_copy:

run {
     allocate channel dev1 type disk;
       current controlfile 
         to '$ORACLE_HOME/copy/cf1.f' 
       tag = 'weekly_cf_copy';

Related Topics





Copyright © 1999 Oracle Corporation.

All Rights Reserved.