How to discover DBID having RMAN backup files [message #261514] |
Wed, 22 August 2007 21:44 |
mson77
Messages: 208 Registered: August 2007 Location: Brazil
|
Senior Member |
|
|
Hello ALL,
I have the backup files from rman (oracle 10.2.0.1).
Unfortunately... these file names are not based on "dbid".
The target database and server are crashed (it is just an experience... just a test case).
Having only these backup files I want to recover the original database on a new server.
I was reading:
http://www.orafaq.com/forum/t/87129/0/#msg_num_4
and following the DreamzZ suggestion on link:
http://www.orafusion.com/art_rman3.htm
but in my case... I don't know the DBID of the original database and the backup files do not tell DBID on their file names.
How to discover DBID having backup files from rman?
Thanks,
mson77
|
|
|
|
|
Re: How to discover DBID having RMAN backup files [message #261670 is a reply to message #261514] |
Thu, 23 August 2007 05:28 |
cbruhn2
Messages: 41 Registered: January 2007
|
Member |
|
|
Hi there,
I found an interesting note on Metalink DOCID 372996.1 about restoring from rman.
As I read this note there should be a possibility to recover from "all loss" using an Internal note
Quote: | b. Raise a Service Request with Oracle Support Services
Request assistance to extract the controlfile (and spfile if necessary) as per Internal Note 60545.1 How to Extract Controlfiles, Datafiles, and Archived Logs from RMAN Backupsets.
|
this is probably using some PL/SQL procedure.
Why Oracle hasn't made this note public beats me as I think, it would be very nice to be able to extract directly from rman backupsets.
best regards
Carl Bruhn
|
|
|
|
Re: How to discover DBID having RMAN backup files [message #261699 is a reply to message #261678] |
Thu, 23 August 2007 06:42 |
mson77
Messages: 208 Registered: August 2007 Location: Brazil
|
Senior Member |
|
|
Hello ALL,
Thanks for YOUR attention.
Well... I don't have an old controlfile as "ebrian" pointed out.
I tried to run pl/sql script as "cbruhn2" but inside the pl/sql block this comment:
-- CFNAME must be the exact path and filename of a controlfile that was backed-up
DBMS_BACKUP_RESTORE.restoreControlFileTo(cfname=>'/app/oracle/oradata/orcl/control01.ctl');
and I don't have the EXACT PATH as that backed up.
My OS is Win2003 and the target database was on drive "E:" and now I have only "C:" drive.
Unfortunately I don't have access to oracle metalink.
Now regarding Michel Cadot note:
Michel Cadot | Find your database name in the file.
The 4 bytes just before it is the dbid.
Take care of endian format.
|
I have opened one of this backup set file with an editor and have no idea of how to hack DBID... I didn't find any 10 decimal digit block that may describe an DBID. I opened via wordpad. The second and the last backup set file is too large and no editor open it. Any suggestion of editor to open this quite 2GB in size file?
Thank you.
mson77
|
|
|
|
Re: How to discover DBID having RMAN backup files [message #261740 is a reply to message #261710] |
Thu, 23 August 2007 08:30 |
mson77
Messages: 208 Registered: August 2007 Location: Brazil
|
Senior Member |
|
|
Hello Michel,
LOL...
YOU are the hacker!!!!
Simply the best!
I took the 4bytes at the address you said (hexa value)... and converted to decimal value... and used this decimal value as below:
RMAN> set dbid 1234567890
RMAN> startup nomount
RMAN> here I have to recover the spfile/controlfile from backupset
... and voila!
Now I will try to recover the database (this is my next step).
Thank you very much!
Regards,
mson77
|
|
|
|
|
|
|
|
|
|
|
|
|