Home » RDBMS Server » Backup & Recovery » get DBID of crashed database
get DBID of crashed database [message #583139] Fri, 26 April 2013 04:55 Go to next message
neetesh87
Messages: 280
Registered: September 2011
Location: bhopal
Senior Member
hello experts,

how should i get DBID to recover my database after server crashed to restore it on new host.

i have only:

1) controlfile autobackup was on so i have control file and spfile.
2) copy of recent backup including archivelog files.

to restore and recover database with same name on new host i need to set DBID , then how should i get it?


thanks in advance...........

[Updated on: Fri, 26 April 2013 04:56]

Report message to a moderator

Re: get DBID of crashed database [message #583140 is a reply to message #583139] Fri, 26 April 2013 05:02 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
I don't see why you need to know the DBID. Use the syntax

restore controlfile from 'name_of_the_autobackup_file' ;

Re: get DBID of crashed database [message #583161 is a reply to message #583140] Fri, 26 April 2013 06:47 Go to previous messageGo to next message
neetesh87
Messages: 280
Registered: September 2011
Location: bhopal
Senior Member
thanks alot for your response,



Quote:

I don't see why you need to know the DBID. Use the syntax


ok sir.


and one more question:

i am restoring my old database on new host-

during startup in nomount mode it gives error:


C:\>echo %oracle_sid%
lupindev

C:\>net start oracleservicelupindev
The OracleServicelupindev service is starting.
The OracleServicelupindev service was started successfully.


C:\>RMAN

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Apr 26 14:03:29 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

RMAN> CONNECT TARGET /

connected to target database (not started)

RMAN> startup force nomount;

startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file 'C:\PRODUCT\11.2.0\DBHOME\DATABASE\INIT
lupindev.ORA'

starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started

Total System Global Area     158662656 bytes

Fixed Size                     2173840 bytes
Variable Size                 88081520 bytes
Database Buffers              62914560 bytes
Redo Buffers                   5492736 bytes

RMAN> set controlfile autobackup format for device type disk to 'C:\flash_recove
ry_area\lupindev\AUTOBACKUP\DB11G_%F';

executing command: SET CONTROLFILE AUTOBACKUP FORMAT

RMAN> RESTORE SPFILE TO 'C:\product\11.2.0\dbhome\database\SPFILElupindev.ora';

Starting restore at 26-APR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=96 device type=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/26/2013 16:14:20
RMAN-06563: control file or SPFILE must be restored using FROM AUTOBACKUP


RMAN>  RESTORE SPFILE TO 'C:\product\11.2.0\dbhome\database\SPFILElupindev.ora'
from "C:\flash_recovery_area\lupindev\AUTOBACKUP\DB11G_C-3035971715-20130426-05";

Starting restore at 26-APR-13
using channel ORA_DISK_1

channel ORA_DISK_1: restoring spfile from AUTOBACKUP C:\flash_recovery_area\aepd
vfcg\AUTOBACKUP\DB11G_C-3035971715-20130426-05
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 26-APR-13

RMAN> shutdown immediate;

Oracle instance shut down


RMAN> startup force nomount;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 04/26/2013 16:37:55
RMAN-04014: startup failed: ORA-48108: invalid value given for the diagnostic_de
st init.ora parameter
ORA-48140: the specified ADR Base directory does not exist [c:\app\administrator]
ORA-48187: specified directory does not exist
OSD-00002: additional error information
O/S-Error: (OS 2) The system cannot find the file specified.
RMAN-04017: startup error description: ORA-32004: obsolete or deprecated paramet
er(s) specified for RDBMS instance


RMAN>







as there is different directotry structure on new host for base directory
and i don't know the original base directory on crashed server then what is the best option to startup in nomount mode?

thanks.......
Re: get DBID of crashed database [message #583164 is a reply to message #583161] Fri, 26 April 2013 07:44 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Create a pfile from the spfile and edit it.
Or use ALTER SYSTEM to modify the spfile.

Regards
Michel
Re: get DBID of crashed database [message #583210 is a reply to message #583164] Sat, 27 April 2013 08:13 Go to previous messageGo to next message
neetesh87
Messages: 280
Registered: September 2011
Location: bhopal
Senior Member
thanks alot sir,


i have done it.

but on next step while restoring the database i have copied the backupset in any directory on new host successfully.

then 1 problem :

as we know backup location and backup related other information are stored in controlfile.

now i have restored controlfile from autobackup
now i dont know what location is stored for backup location in this controlfile
so i can put backupset as that was in the crashed host.

then question is that how should i change this location in controlfile?
or
how should i get the original backup location?


thanks alot again.......
Re: get DBID of crashed database [message #583212 is a reply to message #583210] Sat, 27 April 2013 08:39 Go to previous messageGo to next message
neetesh87
Messages: 280
Registered: September 2011
Location: bhopal
Senior Member
i am ok with location.

RMAN> crosscheck backup;

using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=C:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\AEPDVFCG\BACKUPSET\
2013_04_26\O1_MF_NCNNF_TAG20130426T155853_8QNOQ9LL_.BKP RECID=12 STAMP=813867621

Crosschecked 1 objects


RMAN> list backup;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
12      Full    9.55M      DISK        00:00:00     26-APR-13
        BP Key: 12   Status: AVAILABLE  Compressed: NO  Tag: TAG20130426T155853
        Piece Name: C:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\AEPDVFCG\BACKUPSET\
2013_04_26\O1_MF_NCNNF_TAG20130426T155853_8QNOQ9LL_.BKP
  Control File Included: Ckp SCN: 43857510     Ckp time: 26-APR-13

RMAN> restore database;

Starting restore at 27-APR-13
using channel ORA_DISK_1

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/27/2013 19:20:20
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

RMAN>



what is the problem here?

tanks..........
Re: get DBID of crashed database [message #583238 is a reply to message #583210] Sun, 28 April 2013 03:00 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The lone backup you have contains only the control file (given its size 9.55M, I doubt it contains the whole database).

What is the state of your database? (nomount? mount?)
Have you a backup of the data files? Where (directory)?

Regards
Michel
Re: get DBID of crashed database [message #583278 is a reply to message #583238] Mon, 29 April 2013 01:49 Go to previous messageGo to next message
neetesh87
Messages: 280
Registered: September 2011
Location: bhopal
Senior Member
thanks sir,

Quote:

What is the state of your database? (nomount? mount?)



rman> restore database;

i executes it in in MOUNT mode.


Quote:

Have you a backup of the data files? Where (directory)?


i backed-up my database as :

rman> backup database;

it should backup whole database containing datafiles also.

am i missing anything else in my backup command?
to backup :
1) datafiles
2) redologfiles
3)controlfiles

so that i can restore database successfully on new host.

thanks again.....


Re: get DBID of crashed database [message #583281 is a reply to message #583278] Mon, 29 April 2013 02:10 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
From what you showed us, you missed to move ALL the backup files on the new server.

Regards
Michel

[Updated on: Mon, 29 April 2013 02:10]

Report message to a moderator

Re: get DBID of crashed database [message #583282 is a reply to message #583281] Mon, 29 April 2013 02:18 Go to previous messageGo to next message
neetesh87
Messages: 280
Registered: September 2011
Location: bhopal
Senior Member
thanks.

rman> backup database;

it was my backup command on old server which i need to recover.

then i copied backupset folder and arechivelog folder and the autobackup folder to new host.

and then

on new host, i restored spfile and even controlfile from autobackup
and open database in MOUNT mode then run :

rman> restore database;


then it throws errors

am i missing something to copy?

thanks again........
Re: get DBID of crashed database [message #583283 is a reply to message #583282] Mon, 29 April 2013 02:23 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You are missing to register the new backup location in the control file:
CATALOG START WITH '<the top directory containing the backup files>';

Regards
Michel
Re: get DBID of crashed database [message #584030 is a reply to message #583283] Wed, 08 May 2013 01:43 Go to previous message
forkausar
Messages: 4
Registered: May 2013
Junior Member
There are two places where you can find it without opening your database.

1- DBID is the part of filename of control file auto-backup. Locate file
2- Any RMAN saved session. DBID is displayed by the RMAN client when it starts up and connects to your database

http://www.learnoracledatabase.com/oracle-recovery/oracle-dbid

[Updated on: Wed, 08 May 2013 02:06]

Report message to a moderator

Previous Topic: Duplicate target RMAN cloning
Next Topic: Delete Obsolete Files backed up to Tapes using RMAN
Goto Forum:
  


Current Time: Fri Mar 29 01:51:17 CDT 2024