2010/12/05

Recover Copy of Database

You need to move a datafile from/to different filesystems or ASM.
and the backup/restore time is so long that you cannot stop production systems so long.

RMAN will have a good feature that is :
1-backup as copy level 0 ; then directly apply created redo,archived logs
2-Sometimes applying all changes redos may take longer then applying level 1 incremental backup. recovery with level 1 incremental backup + apply redo/archived logs.

Here is a just commands , I used in a customer evn which generated 200gb archived logs per day and level 0 backup takes 12 hours.




----- level 0 copy backup
run{
allocate channel dev1 type disk;
allocate channel dev2 type disk;
BACKUP AS COPY INCREMENTAL LEVEL 0 DATABASE FORMAT '/oradata01/npcdb/npcdata/%U9' TAG 'ORA_ASM_MIGRATION';
}

---- level 1 incremental backup
run {
backup incremental level 1 for recover of copy with tag 'ORA_ASM_MIGRATION' database ;
}

---- recover copy of database
run {
recover copy of database with tag 'ORA_ASM_MIGRATION';
}