Database Reference
In-Depth Information
Creating Image Copies:
After connecting to RMAN and at the RMAN prompt execute
the following command to create the image copy of data file and
control file.
RMAN> RUN {
ALLOCATE CHANNEL ch1 TYPE DISK;
COPY
DATAFILE 1 TO 'c:\backup\system01.dbf',
CURRENT CONTROLFILE TO 'c:\backup\control.ctl';
RELEASE CHANNEL ch1;
}
In the command above data file 1 will get copied to the backup
location. Oracle assigns each data file a unique number in the
database. To find out tablespaces names and the associated data
files numbers use the following query which is basically a tool
for DBA as explained before.
SELECT b.name, a.file#, a.ts#, status
FROM v$datafile a, v$tablespace b
WHERE a.ts# = b.ts#
ORDER BY file#;
NAME FILE# TS# STATUS
------------------------ ---------- ---------- ------
SYSTEM 1 0 SYSTEM
UNDOTBS 2 1 ONLINE
CWMLITE 3 2 ONLINE
DRSYS 4 3 ONLINE
EXAMPLE 5 4 ONLINE
INDX 6 5 ONLINE
TOOLS 7 7 ONLINE
USERS 8 8 ONLINE
8 rows selected.
If you want to copy more than one data file use the following
command at the RMAN prompt.
Search WWH ::




Custom Search