Oracle8i Backup and Recovery Guide Release 8.1.5 A67773-01 |
|
Use set to:
sets the target database datafile to its new filename on the auxiliary database. If you are performing TSPITR or using the duplicate command, setting this option allows you to pre-configure the filenames for use on the auxiliary database without manually specifying the auxiliary filenames during the procedure. For example, use this command during TSPITR if your datafiles are on raw disks and you want to restore auxiliary datafiles to raw disk for performance reasons. Typically, you set the auxname parameter in TSPITR for the datafiles of the SYSTEM tablespace and the tablespaces containing rollback segments. Take care not to overlay the files that are in use by the production database and which can be discarded after TSPITR completes. In essence, the auxname of a datafile is the location where TSPITR can create a temporary copy of it. When renaming files with the duplicate command, set auxname is an alternative to set newname. The difference is that once you set the auxname, you do not need to reset it when you issue another duplicate command: it remains in effect until you issue set auxname ... to null. In contrast, you must reissue the set newname command every time you rename files. See Also: To learn how to perform RMAN TSPITR, see Appendix A, "Performing Tablespace Point-in-Time Recovery with Recovery Manager". To learn how to duplicate a database, see Chapter 10, "Creating a Duplicate Database with Recovery Manager". |
||
|
to null |
unspecifies the current value for auxname for the specified datafile. |
dbid integer |
specifies the db identifier, which is a unique 32-bit identification number computed when the database is created. The DBID column of the V$DATABASE data dictionary view displays the identifier. The DBID is also stored in the DB table of the recovery catalog. The set dbid command is useful for restoring the control file when each of these conditions is met:
If these conditions are not met, RMAN will correctly identify the control file to restore, so you do not need to use the set dbid command. RMAN accepts set dbid only if you have not yet connected to the target database, i.e., set dbid must precede the connect target command. If the target database is mounted, then RMAN verifies that the user-specified DBID matches the DBID from the database; it not, RMAN signals an error. If the target database is not mounted, RMAN uses the user-specified DBID to restore the control file. Once you have restored the control file, you can mount the database to restore the rest of the database. |
|
echo [on | off] |
controls whether RMAN commands are displayed in the message log. When reading commands from a command file, RMAN automatically echoes those commands to the message log. When reading commands from STDIN, RMAN does not echo those commands to the message log unless the set echo on command is used.
The command is useful only when % rman target sys/sys_pwd@prod1 catalog rman/rman@rcat < input_file > output_file
By specifying set echo on, you enable the commands contained in |
|
snapshot controlfile name to 'filename' |
sets the snapshot control file name in the target database to the specified location. RMAN uses the snapshot control file to resynchronize the recovery catalog. For more information about snapshot control files, see "Determining the Snapshot Control File Location". |
This example uses the user-specified DBID to restore the control file. Once you have restored the control file, you can mount the database to restore the rest of the database.
set dbid = 862893450; connect target; startup nomount; run { allocate channel dev1 type disk; # restoring the control file from its default location automatically replicates it restore controlfile; alter database mount; }
This example specifies a new location for the snapshot control file and then resynchronizes the recovery catalog.
set snapshot controlfile name to '/oracle/dbs/snap.cf'; resync catalog;
This example duplicates a database to a remote host with a different directory structure, using set auxname to specify new filenames for the datafiles:
# set auxiliary names for the datafiles set auxname for datafile 1 to '/oracle/auxfiles/aux_1.f'; set auxname for datafile 2 to '/oracle/auxfiles/aux_2.f'; set auxname for datafile 3 to '/oracle/auxfiles/aux_3.f'; set auxname for datafile 4 to '/oracle/auxfiles/aux_4.f'; run { allocate auxiliary channel dupdb1 type disk; duplicate target database to dupdb logfile group 1 ('$ORACLE_HOME/dbs/dupdb_log_1_1.f', '$ORACLE_HOME/dbs/dupdb_log_1_2.f') size 200K, group 2 ('$ORACLE_HOME/dbs/dupdb_log_2_1.f', '$ORACLE_HOME/dbs/dupdb_log_2_2.f') size 200K reuse; } # Un-specify the auxiliary names for your datafiles so that they will not be overwritten # by mistake: set auxname for datafile 1 to null; set auxname for datafile 2 to null; set auxname for datafile 3 to null; set auxname for datafile 4 to null;