This content has been marked as final. Show 9 replies
Hello;1 person found this helpful
Can you post the results of this :
RMAN> list backup of controlfile;
If you are up for trying the restore again I have an example here that may help :
Edited by: mseberg on Nov 29, 2012 6:15 PM
where should I issue this command?source or target?
But if the output appears bogus then try it on the source too.
RMAN> list backup of controlfile;
using target database control file instead of recovery catalog
List of Backup Sets
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
29 Full 33.95M DISK 00:00:03 29-NOV-12
BP Key: 29 Status: AVAILABLE Compressed: NO Tag: TAG20121129T232835
Piece Name: +FRA/tst/autobackup/2012_11_29/s_800485820.2404.800666919
Standby Control File Included: Ckp SCN: 91383620735 Ckp time: 27-NOV-12
This is on target. The source db is a production standby.
since source is a production standby, I wonder do I have to do anything to the controlfile from autobackup? we want this test environment refreshed by production data. It should be open read write, not physical standby.
And there's the problem, the only control file is a standby one. Compare yours to this example from mine :
Notice the auto backup and y ".bak" version.
BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 4170117 Full 9.70M DISK 00:00:03 29-NOV-12 BP Key: 4170119 Status: AVAILABLE Compressed: NO Tag: TAG20121129T125327 Piece Name: /u01/oradata/RECOVER2_cold/control_RECOVER2_2821_20121129.bak Control File Included: Ckp SCN: 1307992402301 Ckp time: 29-NOV-12 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 4170127 Full 9.73M DISK 00:00:01 29-NOV-12 BP Key: 4170129 Status: AVAILABLE Compressed: NO Tag: TAG20121129T125332 Piece Name: /u01/app/oracle/flash_recovery_area/RECOVER2/autobackup/2012_11_29/o1_mf_s_800628756_8chcsf10_.bkp Control File Included: Ckp SCN: 1307992402301 Ckp time: 29-NOV-12
I think you need to take another backup. If you are using Oracle 11 I have some more options.
For example I refresh my test system using this :
Sometimes I save off the users, roles etc and replace them back afterwards.
You might be able to save what you have by creating a trace file on the source and then using it to recreate a control file on the copy.
You can save this as say cf.sql and then :
If you run a backup trace command daily you can probably pull some SQL from your daily trace file like this. CREATE CONTROLFILE REUSE DATABASE "RECOVER2" NORESETLOGS NOARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE ... ...
SQL> startup nomount Run the SQL as shown above SQL> @cf.sql Control file created. SQL> Check the status of the database SQL> select status from v$instance; -- should be mounted If the database is mounted, can it be opened? Open the database SQL> alter database open; Database altered.
Edited by: mseberg on Nov 29, 2012 7:10 PM
How come it only has standby controlfile backup?
On the prod standby, my backup command is like this:
configure controlfile autobackup on;
configure snapshot controlfile name to '/oracle_backup/rman/snapf.f';
configure device type disk backup type to compressed backupset;
BACKUP DATABASE TAG 'FULL';
backup archivelog all;
How do I be sure the next full backup has regular controlfile on?
You can force it like this :
allocate channel d1 type disk; backup format '/u01/oradata/RECOVER2_cold/%d_COLD_DB_%u' database; backup spfile format '/u01/oradata/RECOVER2_cold/spfile_%d_%s_%T.bak' tag = 'RECOVER2_SPFILE'; backup current controlfile format '/u01/oradata/RECOVER2_cold/control_%d_%s_%T.bak';
You might consider the control from trace idea I just added to my prior post.
backup format '/u03/oradata/RCATALOG_rman/al_t%t_s%s_p%p' archivelog all; backup current controlfile format '/u03/oradata/RCATALOG_rman/sb_t%t_s%s_p%p'; release channel d1;
ok, I will test it. Thanks, will update soon.