Hi everyone,
I have some issues and i don't know how to proceed.
I'm working on windows with oracle database 10.2.0.4.
i have two rman scripts:
1) backup script
run{
shutdown immediate;
startup mount;
allocate channel a1 type disk format 'c:\temp\cold_backup\cld_bkp_%Y%M%D_%n';
backup as compressed backupset database;
backup current controlfile format 'c:\temp\cold_backup\ctrl_%Y%M%D%n';
release channel a1;
alter database open;
}
2) restore and recover script
run{
shutdown immediate;
startup nomount;
allocate channel b1 type disk format 'c:\temp\cold_backup\cld_bkp_<%Y%M%D%n>';
restore controlfile from 'c:\temp\cold_backup\ctrl_<%Y%M%D%n>';
alter database mount;
restore database;
recover database noredo;
release channecl b1;
sql 'alter database open resetlogs';
}
both scripts run fine, but i don't really know how can i restore and recover a specific backup.
For example, I actually have the last 10 days of backups, if i want to restore/recover the 31st of January and i do:
run{
shutdown immediate;
startup nomount;
allocate channel b1 type disk format 'c:\temp\cold_backup\cld_bkp_31012017_oracletest>';
restore controlfile from 'c:\temp\cold_backup\ctrl_31012017_oracletest';
alter database mount;
restore database;
recover database noredo;
release channecl b1;
sql 'alter database open resetlogs';
}
and it show that the controlfile of 31-Jan-2017 are restored but the datafile restored are from the last backup (today)? how could it be possible if i allocate the restore into cld_bkp_<31-jan-2017>?
what i am doing wrong?