以下文字摘自metalink:
Fact(s)
~~~~~~~~
You need to determine the dbid of your database for use with RMAN but you are
not sure how this can be done, especially in an unusual circumstance such as the
loss of all of your database files.Symptom(s)
~~~~~~~~~~
You may be in a situation where your database is down due to the loss of all
database files, you need the dbid to begin your recovery, you are not using a
recovery catalog, and you did not previously note the dbid of your database.
You need to know how at this point you can determine the dbid for your database.
Or, you may simple want to know the best method to determine the dbid of your
database.Fix
~~~~
There are several methods you can use to determine the dbid of your database.
This can be done both when the database is open / functioning normally and when
all the database files are lost causing your database to be unavailable for
queries that would allow you to display the dbid of your database via a query.1) If your database is open you may issue the following query:
SQL> SELECT dbid FROM v$database;
DBID
———-
1411146558
——————————————————————————–2) If you are using a recovery catalog then connect to the recovery catalog via
RMAN and issue the “list incarnation” command. You must first nomount the target
database. For example:D:\> rman target <user>/<pwd>@mydb rcvcat <user>/<pwd>@rcat
Recovery Manager: Release 8.1.7.4.1 – Production
RMAN-06193: connected to target database (not started)
RMAN-06008: connected to recovery catalog databaseRMAN> startup nomount
RMAN-06196: Oracle instance started
Total System Global Area 94980124 bytes
Fixed Size 75804 bytes
Variable Size 57585664 bytes
Database Buffers 37240832 bytes
Redo Buffers 77824 bytesRMAN> list incarnation;
RMAN-03022: compiling command: list
List of Database Incarnations
DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time
——- ——- ——– —————- — ———- ———-
1 2 ORCL817 1411146558 YES 282854 03-DEC-02
——————————————————————————–3) If you have a saved copy of the screen details from a previous RMAN session
you may refer to this output for the dbid. For example:D:\> rman target <user>/<pwd>@mydb rcvcat <user>/<pwd>@rcat
Recovery Manager: Release 8.1.7.4.1 – Production
RMAN-06005: connected to target database: ORCL817 (DBID=1411146558)
RMAN-06008: connected to recovery catalog database
——————————————————————————–4) If you are using RMAN with version 9i you have the ability to configure the
automatic backup of your control files. If you have this feature on locate one
of your control file autobackups. The name of this file will tell you the dbid
of your database. For example:D:\ORACLE\ORA92\DATABASE> dir
Volume in drive D has no label.
Volume Serial Number is 3E3B-12FDDirectory of D:\ORACLE\ORA92\DATABASE
11/20/2002 02:06p <DIR> .
11/20/2002 02:06p <DIR> ..
01/23/2003 11:12a 2,064,384 C-2282329623-20030123-00
…In this case 2282329623 is the dbid for this database.
——————————————————————————–5) If the four steps above are not available because you have lost all the files
for your database, you are not using a recovery catalog, you are not using
autobackup of your controlfile, etc., but you have an old control file available,
mount the database with the old control file then query v$database as in step 1
to obtain the dbid of your database.
© 2009, www.oracledatabase12g.com. 版权所有.文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.
相关文章 | Related posts:




最新评论