| Oracle9i Recovery Manager Reference Release 2 (9.2) Part Number A96565-01 |
|
RMAN Commands , 18 of 59

copy_option::=
copy_inputfile::=
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.
If CONFIGURE CONTROLFILE AUTOBACKUP is set to ON, then RMAN automatically backs up the control file after COPY commands. "BACKUP" describes the complete set of circumstances in which autobackups occur.
| See Also:
Oracle9i Recovery Manager User's Guide to learn how to copy files with RMAN |
| Syntax Element | Description |
|---|---|
|
|
Specifies optional parameters affecting either the input or output files or both. |
|
Specifies the tag of the input file or output file copy. Tag names are not case sensitive. RMAN gives each copy a default Note: You cannot apply a tag to a copy of an archived log, current control file, or standby control file. |
|
|
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 |
|
|
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. |
|
|
Tests data and index blocks that pass physical corruption checks for logical corruption, for example, corruption of a row piece or index entry. If RMAN finds logical corruption, then it logs the block in the Provided the sum of physical and logical corruptions detected for a file remain below its Note: For |
|
|
Overrides any configured retention policy for this copy so that the copy is not considered obsolete. See Also: "keepOption" |
|
|
|
specifies the type of input file, that is, the file that you want to copy. |
|
|
Specifies a list of one or more datafiles as input. See Also: "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 |
|
|
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 |
|
|
Specifies the current control file. If you specify the |
|
|
Specifies the filename of a control file copy. You can also set This command copies a control file copy. The copy can be:
RMAN inspects the header of the control file copy to determine whether it is a standby or nonstandby control file. 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 |
|
|
|
Specifies that Oracle should copy the input datafile to the filename specified in the |
|
|
Specifies the filename of the output file copy. |
This example copies the datafile tools01.dbf with the NOCHECKSUM option to the output file tools01.bak, specifying it as a level 0 backup:
COPY NOCHECKSUM DATAFILE '?/oradata/trgt/tools01.dbf' TO '?/oradata/tools01.bak' LEVEL 0;
This example copies the current control file:
COPY CURRENT CONTROLFILE TO '?/oradata/cf1.bak';
This example uses the preconfigured DISK channel to create a copy of the current target control file that can be used as a standby control file:
COPY CURRENT CONTROLFILE FOR STANDBY TO '?/oradata/cf_standby.cpy';
The following shell script copies the control file and two datafiles and exempts them from the retention policy:
#!/usr/bin/tcsh # a connection to the catalog is required for KEEP FOREVER rman TARGET / CATALOG rman/rman@rcat <<EOF SHUTDOWN IMMEDIATE; STARTUP MOUNT; COPY KEEP FOREVER NOLOGS CURRENT CONTROLFILE TO '?/oradata/cf_longterm.cpy', DATAFILE 1 TO '?/oradata/df1_longterm.cpy', DATAFILE 2 TO '?/oradata/df2_longterm.cpy'; ALTER DATABASE OPEN; EOF
|
![]() Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|