 |
|
RMAN image copy command Tips
Donald K. Burleson
|
Explanation of RMAN Commands
IMAGE
COPY – As opposed to the backup set, an image copy is not a RMAN
specific format.
The image copy is a replica of an actual file. Image copies are
created using the COPY command.
Creating an Image Copy of the Primary
Database
To create an image copy of the primary
database, shutdown the primary database then cleanly, start and
mount it; however, the primary database should not be opened. Once
the database is started, connect to the target database using RMAN
as shown below:
DBA@jrbk01;
rman target sys/change_on_install@appsdb
On the RMAN prompt, execute the script
rman_image. This will create an image copy for each of the data
files and the control file of the primary database. This script will
have to be modified to suit individual requirements. The
v$datafile view can be used to get the file number information.
#Script: rman_image
# Copy the datafiles to backup area
Copy
Datafile 1 to '/oracle/appsdb/bkp/system01.dbf',
Datafile 2 to '/oracle/appsdb/bkp/undotbs01.dbf',
Datafile 3 to '/oracle/appsdb/bkp/userdata01.dbf',
Datafile 4 to '/oracle/appsdb/bkp/indxdata01.dbf',
Datafile 5 to '/oracle/appsdb/bkp/logstdby.dbf',
Datafile 6 to '/oracle/appsdb/bkp/userdata02.dbf',
Datafile 7 to '/oracle/appsdb/bkp/logstdby02.dbf',
# Copy the control file
CURRENT CONTROLFILE FOR STANDBY TO
'/oracle/appsdb/bkp/standbycontrol.ctl';
|