rman imagecopy type Backup

Two types of backup can be done using rman, those are backupset (default) and imagecopy. Second one is merely used and used for migration purpose only like ASM migration;



RMAN> show all;

RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'G:\ORACLE\PRODUCT\10.2.0\DB_2\DATABASE\SNCFORCL1.ORA'; # default

imagecopy backup can't be taken into tape directly, it has to be taken in disk first then can be moved to tape.



RMAN> backup as copy  database;

Starting backup at 27-APR-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile fno=00001 name=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\SYSTEM01.DBF
output filename=G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_SYSTEM_7SOS6JX9_.DBF tag=TAG20120427T112624 recid=2 stamp=781702009
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile fno=00003 name=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\SYSAUX01.DBF
output filename=G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_SYSAUX_7SOS7B8S_.DBF tag=TAG20120427T112624 recid=3 stamp=781702022
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile fno=00005 name=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\EXAMPLE01.DBF
output filename=G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_EXAMPLE_7SOS7SOH_.DBF tag=TAG20120427T112624 recid=4 stamp=781702031
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile fno=00002 name=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\UNDOTBS01.DBF
output filename=G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_UNDOTBS1_7SOS810H_.DBF tag=TAG20120427T112624 recid=5 stamp=781702035
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile fno=00004 name=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\USERS01.DBF
output filename=G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_USERS_7SOS84C7_.DBF tag=TAG20120427T112624 recid=6 stamp=781702036
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
copying current control file
output filename=G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\CONTROLFILE\O1_MF_TAG20120427T112624_7SOS85LK_.CTL tag=TAG20120427T112624 recid=7 stamp=781702038
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 27-APR-12
channel ORA_DISK_1: finished piece 1 at 27-APR-12
piece handle=G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\BACKUPSET\2012_04_27\O1_MF_NNSNF_TAG20120427T112624_7SOS87VC_.BKP tag=TAG20120427T112624 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 27-APR-12


RMAN> list copy;


List of Datafile Copies
Key     File S Completion Time Ckp SCN    Ckp Time        Name
------- ---- - --------------- ---------- --------------- ----
2       1    A 27-APR-12       728341     27-APR-12       G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_SYSTEM_7SOS6JX9_.DBF
5       2    A 27-APR-12       728370     27-APR-12       G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_UNDOTBS1_7SOS810H_.DBF
3       3    A 27-APR-12       728355     27-APR-12       G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_SYSAUX_7SOS7B8S_.DBF
6       4    A 27-APR-12       728372     27-APR-12       G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_USERS_7SOS84C7_.DBF
4       5    A 27-APR-12       728366     27-APR-12       G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_EXAMPLE_7SOS7SOH_.DBF

List of Control File Copies
Key     S Completion Time Ckp SCN    Ckp Time        Name
------- - --------------- ---------- --------------- ----
7       A 27-APR-12       728372     27-APR-12       G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\CONTROLFILE\O1_MF_TAG20120427T112624_7SOS85LK_.CTL

List of Archived Log Copies
Key     Thrd Seq     S Low Time  Name
------- ---- ------- - --------- ----
1       1    6       A 02-APR-12 G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\ARCHIVELOG\2012_04_24\O1_MF_1_6_7SFR28PG_.ARC
2       1    7       A 24-APR-12 G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\ARCHIVELOG\2012_04_27\O1_MF_1_7_7SOR6S98_.ARC



to switch Database to imagecopy backup, requires Database mount mode.



SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area  289406976 bytes
Fixed Size                  1248576 bytes
Variable Size              96469696 bytes
Database Buffers          184549376 bytes
Redo Buffers                7139328 bytes
SQL> alter database mount;

Database altered.




RMAN> switch database to copy;

datafile 1 switched to datafile copy "G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_SYSTEM_7SOS6JX9_.DBF"
datafile 2 switched to datafile copy "G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_UNDOTBS1_7SOS810H_.DBF"
datafile 3 switched to datafile copy "G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_SYSAUX_7SOS7B8S_.DBF"
datafile 4 switched to datafile copy "G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_USERS_7SOS84C7_.DBF"
datafile 5 switched to datafile copy "G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\DATAFILE\O1_MF_EXAMPLE_7SOS7SOH_.DBF"

Now, Original data files are set as imagecopy.



RMAN> list copy;


List of Datafile Copies
Key     File S Completion Time Ckp SCN    Ckp Time        Name
------- ---- - --------------- ---------- --------------- ----
8       1    A 27-APR-12       729323     27-APR-12       G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\SYSTEM01.DBF
9       2    A 27-APR-12       729323     27-APR-12       G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\UNDOTBS01.DBF
10      3    A 27-APR-12       729323     27-APR-12       G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\SYSAUX01.DBF
11      4    A 27-APR-12       729323     27-APR-12       G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\USERS01.DBF
12      5    A 27-APR-12       729323     27-APR-12       G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\EXAMPLE01.DBF

List of Control File Copies
Key     S Completion Time Ckp SCN    Ckp Time        Name
------- - --------------- ---------- --------------- ----
7       A 27-APR-12       728372     27-APR-12       G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\CONTROLFILE\O1_MF_TAG20120427T112624_7SOS85LK_.CTL

List of Archived Log Copies
Key     Thrd Seq     S Low Time  Name
------- ---- ------- - --------- ----
1       1    6       A 02-APR-12 G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\ARCHIVELOG\2012_04_24\O1_MF_1_6_7SFR28PG_.ARC
2       1    7       A 24-APR-12 G:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL1\ARCHIVELOG\2012_04_27\O1_MF_1_7_7SOR6S98_.ARC



you can set everything in previous state.



RMAN> switch database to copy;

datafile 1 switched to datafile copy "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\SYSTEM01.DBF"
datafile 2 switched to datafile copy "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\UNDOTBS01.DBF"
datafile 3 switched to datafile copy "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\SYSAUX01.DBF"
datafile 4 switched to datafile copy "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\USERS01.DBF"
datafile 5 switched to datafile copy "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\EXAMPLE01.DBF"



SQL> alter database open;

Database altered.

Thanks
A Rahim Khan

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: