i do not think so
just try
startup nomount;
restore controlfile;
if it fails try
restore controlfile from and try your backuppieaces most of the time you can identify it by looking
Main Topics
Browse All TopicsI used this script to backup.
connect target /
shutdown immediate;
startup mount;
run {
backup
format '/u05/%d_%s_%p'
filesperset 4
maxsetsize 30G
(database include current controlfile);
}
BACKUPCOMPLETED
Now I need to restore everything starting with the controlfile, but everything i've seen shows i need to know the DBID in order to restore the controlfile. I don't know what that DBID is. Is there a way to restore the controlfile, then completely restore the database without knowing the DBID?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
if you rae not using either a flash recovery area or a recovery catalog.
You are trying to restore a control file as follows, and you receive an error message stating
that you must explicitly set the database identifier (DBID):
RMAN> connect target /
RMAN> startup nomount;
RMAN> restore controlfile from autobackup;
RMAN specifically instructs you to set the DBID first:
RMAN-06495: must explicitly specify DBID with SET DBID command
You dont know the DBID for your database, and you arent sure how to find the DBID.
Without a control file for your database, you cant mount the database and query the DBID
value from the V$DATABASE view.
You can determine the DBID of your database in one of the following ways:
" You can derive the DBID from an autobackup file.
" You can retrieve the DBID from RMAN output.
" You can write the DBID to the alert.log file.
Can you explain your scenario? Is this a true failure, or are you practicing?
Setting the DBID is needed only under certain conditions, such as not using an RMAN catalog and not using a flash_recovery_area with standard naming. I rarely ever need to know the DBID.
If you use autobackups, all that is required is to set the ORACLE_SID and have db_recovery_file_dest set in the init.ora when starting.
The best practice is to configure and use RMAN such that setting the DBID is not required. Knowing the DBID to do the restore is only needed if you are neither using an RMAN catalog nor using flash_recovery_area with autobackups, and don't know the backup piece to restore from.
You should always turn on controlfile autobackups.
RMAN> configure controlfile autobackup on;
For each backup, or structural change to the database, RMAN will write a separate autobackup to the <flash_recovery_area>/<ORACLE
RMAN> recover controlfile from autobackup;
Correct, i'm not using flashback and not using a catalog. 8-(
Kinda long story. I had database with SID of bb60. I want to set up a test standby on the same machine with the name bb60 so i used a utility to change the SID to bb90. At the same time i changed the dbid.
The RMAN backup took place before all this happened. Anyhow i got tangled to the point I thought it just best to just clear out the datafiles etc and restore from RMAN. The only thing i have that might resemble a controlfile is whatever is included in the (including current controlfile) of the rman backup.
Ok. Well it is always a good practice to record the DBID when you first create a database. I keep it in a file dbids.txt. You can query it from V$DATABASE, or when you first do an RMAN backup, you'll see DBID printed when RMAN connects.
But that doesn't help you now. You can still restore the controlfile explicitly from the backup piece. Look for a small backuppiece in the backupset.
Example:
RMAN> restore controlfile from 'F:\flash_recovery_area\te
Starting restore at 03-NOV-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=99 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=C:\ORACLE\ORADATA\TES
output file name=C:\ORACLE\ORADATA\TES
Finished restore at 03-NOV-09
RMAN> restore controlfile from '/u05/BB60_19_1';
Starting restore at 03-NOV-09
using channel ORA_DISK_1
channel ORA_DISK_1: restoring control file
RMAN-00571: ==========================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ==========================
RMAN-03002: failure of restore command at 11/03/2009 10:49:09
ORA-19697: standby control file not found in backup set
Mmmmm....third try, it restored something ?
RMAN> restore controlfile from '/u05/BB60_16_1';
Starting restore at 03-NOV-09
using channel ORA_DISK_1
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
output filename=/u01/app/oracle/p
output filename=/u01/app/oracle/p
output filename=/u01/app/oracle/p
Finished restore at 03-NOV-09
RMAN>
No the /u05 is the directory the other is a filename for a backuppiece. I forgot to put up the list a couple steps back.
drwxr-xr-x 3 oracle oracle 1024 Oct 28 13:04 .
drwxr-xr-x 14 root root 8192 Oct 5 20:03 ..
-rw-r----- 1 oracle oracle 15489114112 Oct 27 19:23 BB60_10_1
-rw-r----- 1 oracle oracle 12027756544 Oct 27 20:06 BB60_11_1
-rw-r----- 1 oracle oracle 11537432576 Oct 27 20:45 BB60_12_1
-rw-r----- 1 oracle oracle 4320755712 Oct 27 21:04 BB60_13_1
-rw-r----- 1 oracle oracle 8484102144 Oct 27 21:32 BB60_14_1
-rw-r----- 1 oracle oracle 7056531456 Oct 27 21:57 BB60_15_1
-rw-r----- 1 oracle oracle 3153084416 Oct 27 22:09 BB60_16_1
-rw-r----- 1 oracle oracle 146776064 Oct 27 22:10 BB60_17_1
-rw-r----- 1 oracle oracle 33357824 Oct 27 22:10 BB60_18_1
-rw-r----- 1 oracle oracle 1638400 Oct 27 22:10 BB60_19_1
-rw-r----- 1 oracle oracle 23359881216 Oct 27 14:29 BB60_6_1
-rw-r----- 1 oracle oracle 21278253056 Oct 27 15:43 BB60_7_1
-rw-r----- 1 oracle oracle 21348368384 Oct 27 17:06 BB60_8_1
-rw-r----- 1 oracle oracle 17956732928 Oct 27 18:21 BB60_9_1
RMAN says it cannot creat the datafile. The directory is there so i don't know why not??
RMAN> restore datafile 1;
Starting restore at 03-NOV-09
using channel ORA_DISK_1
creating datafile fno=1 name=/u01/app/oracle/orada
RMAN-00571: ==========================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ==========================
RMAN-03002: failure of restore command at 11/03/2009 13:00:15
ORA-01180: can not create datafile 1
ORA-01110: data file 1: '/u01/app/oracle/oradata/B
RMAN> restore database;
Starting restore at 03-NOV-09
using channel ORA_DISK_1
creating datafile fno=1 name=/u01/app/oracle/orada
RMAN-00571: ==========================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ==========================
RMAN-03002: failure of restore command at 11/03/2009 13:01:34
ORA-01180: can not create datafile 1
ORA-01110: data file 1: '/u01/app/oracle/oradata/B
RMAN> connect target /
connected to target database: BB60 (DBID=2427457603, not open)
using target database control file instead of recovery catalog
RMAN> catalog start with '/u05';
searching for all files that match the pattern /u05
no files found to be unknown to the database
RMAN> catalog start with '/u05/%d_%s_%p';
searching for all files that match the pattern /u05/%d_%s_%p
no files found to be unknown to the database
RMAN>
:-)
RMAN> catalog start with '/u05/';
using target database control file instead of recovery catalog
searching for all files that match the pattern /u05/
List of Files Unknown to the Database
==========================
File Name: /u05/BB60_16_1
File Name: /u05/BB60_17_1
File Name: /u05/BB60_18_1
File Name: /u05/BB60_19_1
File Name: /u05/rman/BB60_370_1
File Name: /u05/rman/BB60_363_1
File Name: /u05/rman/BB60_371_1
File Name: /u05/rman/BB60_364_1
File Name: /u05/rman/BB60_372_1
File Name: /u05/rman/BB60_373_1
File Name: /u05/rman/BB60_365_1
File Name: /u05/rman/BB60_374_1
File Name: /u05/rman/BB60_375_1
File Name: /u05/rman/BB60_366_1
File Name: /u05/rman/BB60_367_1
File Name: /u05/rman/BB60_368_1
File Name: /u05/rman/BB60_369_1
File Name: /u05/rman/mget
it-rex may be right. I did not read the metalink article he referred to yet.
Granted, the backup included the controlfile would not know about the backup pieces taken after the controlfile was backed up, but cataloging should do the trick. Try cataloguing the full, explicit path of the piece.
catalog backuppiece '/u05/BB60_17_1';
Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u05/BB60_16_1
File Name: /u05/BB60_17_1
File Name: /u05/BB60_18_1
File Name: /u05/BB60_19_1
File Name: /u05/rman/BB60_370_1
File Name: /u05/rman/BB60_363_1
File Name: /u05/rman/BB60_371_1
File Name: /u05/rman/BB60_364_1
File Name: /u05/rman/BB60_372_1
File Name: /u05/rman/BB60_373_1
File Name: /u05/rman/BB60_365_1
File Name: /u05/rman/BB60_374_1
File Name: /u05/rman/BB60_375_1
File Name: /u05/rman/BB60_366_1
File Name: /u05/rman/BB60_367_1
File Name: /u05/rman/BB60_368_1
File Name: /u05/rman/BB60_369_1
List of Files Which Where Not Cataloged
==========================
File Name: /u05/rman/mget
RMAN-07517: Reason: The file header is corrupted
Or that! Good eye, it-rex.
This is why controlfile autobackups are preferred, they are taken after the backup, so they include all the backup pieces and archivelog info from the backup. When you include them in the backupset itself, the record is written _after_ the controlfile copy is taken, so it is not until the next backup that the controlfile backup includes that. It is always 1 behind.
Right or not, at least it's not erroring out as quickly
It looks like it's seriously trying to recover !
RMAN> restore database;
Starting restore at 03-NOV-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=540 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00003 to /u01/app/oracle/product/9.
channel ORA_DISK_1: reading from backup piece /u05/BB60_14_1
ORA-19870: error reading backup piece /u05/BB60_14_1
ORA-19504: failed to create file "/u01/app/oracle/product/9
ORA-27040: file create error, unable to create file
SVR4 Error: 2: No such file or directory
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00038 to /u01/app/oracle/oradata/BB
restoring datafile 00039 to /u01/app/oracle/oradata/BB
channel ORA_DISK_1: reading from backup piece /u05/BB60_19_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/u05/BB60_19_1 tag=TAG20091027T130747
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00020 to /u01/app/oracle/oradata/BB
restoring datafile 00028 to /u01/app/oracle/oradata/BB
restoring datafile 00035 to /u01/app/oracle/oradata/BB
restoring datafile 00036 to /u01/app/oracle/oradata/BB
channel ORA_DISK_1: reading from backup piece /u05/rman/BB60_370_1
My error again mrjoltcola, you were right about that recover. Before opening is had to key in a bunch of verbiage even though it had previously been noarchivelog mode.
SQL> recover database until cancel;
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 3313418737689 generated at 10/22/2009 14:18:52 needed for
thread 1
ORA-00289: suggestion :
/u01/app/oracle/product/10
ORA-00280: change 3313418737689 for thread 1 is in sequence #13314
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SQL> alter database open resetlogs;
Database altered.
Business Accounts
Answer for Membership
by: xoxomosPosted on 2009-11-03 at 10:07:35ID: 25731705
Here i'm trying to restore. There is a directory e$ ls -la
ta/BB60/sy stem01.dbf ========== ========== ========== === ========== ========== ========== === B60/system 01.dbf'
oracle@bb7b:/u01/app/oracl
total 80
drwxr-xr-x 5 oracle oracle 8192 Nov 3 09:35 .
drwxr-xr-x 3 oracle oracle 1024 Mar 9 2005 ..
drwxr-xr-x 3 oracle oracle 1024 Nov 2 15:33 admin
drwxr-xr-x 3 oracle oracle 1024 Nov 3 09:35 oradata
drwxr-xr-x 3 oracle oracle 1024 Oct 30 16:14 product
but RMAN does not recognize it?
RMAN> run {
2> allocate channel c1 device type disk
3> format '/u05/%d_%s_%p';
4> restore database;
5> }
allocated channel: c1
channel c1: sid=543 devtype=DISK
Starting restore at 03-NOV-09
creating datafile fno=1 name=/u01/app/oracle/orada
released channel: c1
RMAN-00571: ==========================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ==========================
RMAN-03002: failure of restore command at 11/03/2009 09:57:17
ORA-01180: can not create datafile 1
ORA-01110: data file 1: '/u01/app/oracle/oradata/B