restore controlfile

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

restore controlfile

Roshan
Oracle Database 12c
Hi,

I am planning to restore controlfile from tape after a crash. Below is my script

connect target sys/m@cbstst;
connect auxiliary /;

run {

ALLOCATE AUXILIARY CHANNEL CH4 TYPE 'SBT_TAPE';

SEND 'NSR_ENV=(NSR_SERVER=rhis-nwdd-1202,NSR_CLIENT=10.210.228.7)';
#restore clone primary controlfile to '/archicom/ora12c/oradata/control1.ctl';
restore until time 'sysdate-4' clone primary controlfile;
}

I have connected target to a test instance because production has crashed. I am getting error below

released channel: CH4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/07/2017 08:47:14
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore

RMAN> **end-of-file**

I can see the controlfile has been backed up on tape.

Thanks,
Roshan
Reply | Threaded
Open this post in threaded view
|

Re: restore controlfile

ErmanArslansOracleBlog
Administrator
Where is that backup information recorded?
You don't have any catalogs, you don't have a controlfile and you say, your are connecting to the test instance.

I mean you say: "I have connected target to a test instance because production has crashed."
Where is the location of your backup (controlfile) written? Does the TEST instance know your backup exist anyways?

Update me if I understand your situation correctly.
If not, update me with the detailed info. Use RMAN> crosscheck backup; RMAN> crosscheck copy; and consider to use > CATALOG START WITH '/your_backup_directory'


Reply | Threaded
Open this post in threaded view
|

Re: restore controlfile

Roshan
The controlfile is on tape backup. I have to restore controlfile. Can you please help with the script? DB is in nomount mode

connect target / ;
connect auxiliary /;
set DBID=878411589

run {

ALLOCATE AUXILIARY CHANNEL CH4 TYPE 'SBT_TAPE';

SEND 'NSR_ENV=(NSR_SERVER=rhis-nwdd-1202,NSR_CLIENT=10.210.228.7)';
#restore clone primary controlfile to '/archicom/ora12c/oradata/control1.ctl';
restore controlfile from 'c-878411589-20170728-00';
}


Thanks
Reply | Threaded
Open this post in threaded view
|

Re: restore controlfile

ErmanArslansOracleBlog
Administrator
What is the name/tag of the backup?
Use it in restore command.
For ex: RESTORE CONTROLFILE FROM ‘bk_TRWSVAL_20110526_142_1’;

Take a look at this note as well: HOW TO CATALOG TAPE BACKUP PIECES [ID 550082.1]