Assumptions
There is a full backup level0 with control file and spfile in +DATA/ocdb/rmandata, it can be any location not necessarily ASM
Restoring backup onto database ocdb, db_name=ocdb
Backup belongs to OCDB database.
Incarnation is set to correct one.
STEP1
Startup new instance with following
db_name=ocdb
CONTROL_FILES='+DATA','+RECO'
db_create_file_dest='+DATA'
DB_CREATE_ONLINE_LOG_DEST_1='+RECO'
DB_CREATE_ONLINE_LOG_DEST_2='+RECO'
DB_RECOVERY_FILE_DEST='+RECO'
startup nomount pfile='/tmp/init.ora'
STEP2
Run following to restore database untill time from old backup.
connect auxiliary /
run
{
ALLOCATE AUXILIARY CHANNEL ch1 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch2 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch3 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch4 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch5 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch6 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch7 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch8 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch9 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch10 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch11 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch12 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch13 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch14 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch15 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch16 DEVICE TYPE disk;
DUPLICATE DATABASE TO ocdb
BACKUP LOCATION '+DATA/ocdb/rmandata'
until time "to_date ('15-10-2014 21:00:00', 'DD-MM-YYYY HH24:MI:SS')"
NOFILENAMECHECK;
}
There is a full backup level0 with control file and spfile in +DATA/ocdb/rmandata, it can be any location not necessarily ASM
Restoring backup onto database ocdb, db_name=ocdb
Backup belongs to OCDB database.
Incarnation is set to correct one.
STEP1
Startup new instance with following
db_name=ocdb
CONTROL_FILES='+DATA','+RECO'
db_create_file_dest='+DATA'
DB_CREATE_ONLINE_LOG_DEST_1='+RECO'
DB_CREATE_ONLINE_LOG_DEST_2='+RECO'
DB_RECOVERY_FILE_DEST='+RECO'
startup nomount pfile='/tmp/init.ora'
STEP2
Run following to restore database untill time from old backup.
connect auxiliary /
run
{
ALLOCATE AUXILIARY CHANNEL ch1 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch2 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch3 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch4 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch5 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch6 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch7 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch8 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch9 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch10 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch11 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch12 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch13 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch14 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch15 DEVICE TYPE disk;
ALLOCATE AUXILIARY CHANNEL ch16 DEVICE TYPE disk;
DUPLICATE DATABASE TO ocdb
BACKUP LOCATION '+DATA/ocdb/rmandata'
until time "to_date ('15-10-2014 21:00:00', 'DD-MM-YYYY HH24:MI:SS')"
NOFILENAMECHECK;
}
No comments:
Post a Comment