** Credit Web and Me
1) By Rman
% rman TARGET /
Recovery Manager: Release 10.2.0.4.0 - Production on Sun Jun 12 02:41:03 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
% rman TARGET /
Recovery Manager: Release 10.2.0.4.0 - Production on Sun Jun 12 02:41:03 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: RDBMS (DBID=774627068)
RMAN>
2) By Query
SELECT dbid, name FROM v$database
DBID NAME
---------- ---------
774627068 DEV
---------- ---------
774627068 DEV
3) By Auto Backup Controlfile
c-IIIIIIIIII-YYYYMMDD-QQ
c-774627068-20091230-22
Determining your DBID
In situations requiring the recovery of your SPFILE or control file from autobackup, such as disaster recovery when you have lost all database files, you will need to use your DBID. Your DBID should be recorded along with other basic information about your database, as recommended in "Deciding Between ARCHIVELOG and NOARCHIVELOG Mode".
If you do not have a record of the DBID of your database, there are two places you can find it without opening your database.
The DBID is used in forming the filename for the control file autobackup. Locate that file, and then refer to "Configuring the Control File Autobackup Format" to see where the DBID appears in below.
Configuring the Control File Autobackup Format
By default, the format of the autobackup file for all configured devices is the substitution variable %F. This variable format translates into c-IIIIIIIIII-YYYYMMDD-QQ, where:
IIIIIIIIII stands for the DBID.
YYYYMMDD is a time stamp of the day the backup is generated
QQ is the hex sequence that starts with 00 and has a maximum of FF
You can change the default format by using the following command, where deviceSpecifier is any valid device such as DISK or sbt, and 'string' must contain the substitution variable %F (and no other substitution variables) and is a valid handle for the specified device:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT
FOR DEVICE TYPE deviceSpecifier TO 'string';
For example, you can run the following command:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT
FOR DEVICE TYPE DISK TO '?/oradata/cf_%F';
The following example configures the autobackup to write to an Automatic Storage Management disk group:
CONFIGURE CONTROLFILE AUTOBACKUP
FOR DEVICE TYPE DISK TO '+dgroup1/%F';
To clear control file autobackup formats for a device, use the following commands:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE sbt CLEAR;
If you have any text files that preserve the output from an RMAN session, the DBID is displayed by the RMAN client when it starts up and connects to your database. Typical output follows:
0 comments:
Post a Comment