Please use RMAN and RMAN Recovery Catalog for all of your database backups. If you are not, stop what you are doing and FIX IT! You’ll be glad you did when (not if) you need to restore your database from a catastrophic failure (yes, I know this from experience).
If you need to restore your database including your spfile and control file, you’ll need to know the DBID of the database. You should have a record the DBID before disaster strikes, but in the event you don't there's still hope, and if you are using an RMAN catalog, that hope is just a few commands away. My backup process (RMAN including catalog, and NetBackup) includes an email sent to me upon completion, so I always have important database information in my email archives. If you have an RMAN catalog (and you should) you can get easily get the DBID of your database.
-- In this example the database is down.
-- From your target start RMAN and connect to the catalog.
First restore your file system if necessary. We want our init.ora to start the database.
#rman target / catalog rman_user/rman_user_passwd@RCVCAT
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Jul 28 09:25:27 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: HRPROD (not mounted)
connected to recovery catalog database
-- The DBID is listed in RED below with the following RMAN command:
RMAN> list incarnation of database HRPROD;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
191122317 198582218 HRPROD 3800958841 CURRENT 1 25-JUN-10
-- Set your DBID while connected to RMAN
RMAN> SET DBID 3800958841;
executing command: SET DBID
database name is "DEV" and DBID is 3800958841
-- You can now proceed with the SPFILE restore, restore controlfile from autobackup, and restore database.
RMAN> startup nomount pfile='$ORACLE_HOME/dbs/inithrprod.ora';
Oracle instance started
RMAN>restore spfile from autobackup;
Remember your dreams
Subscribe to:
Post Comments (Atom)
Proactive Oracle DBA
This is a series of posts. I am working this to share some of the many scripts I schedule to automatically run to alert me of any current o...
-
Oracle 12.1.0.2.0 RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested i...
-
How to get Oracle's runInstaller to run on Linux or Unix environment using from Windows using Cygwin as an xterm emulator. Download an...
-
A great security measure is to monitor who is trying to unsuccessfully log into your database. Whether it's an innocent developer who fo...
Thank you so much for the information on secure with oracle disaster recovery solutions. I found this blog post very helpful.
ReplyDelete