1> check the database and view the control file storage path
SQL> startup
Oracle instance started.
Total System Global Area 230686720 bytes
Fixed Size 1218676 bytes
Variable Size 71305100 bytes
Database Buffers 155189248 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> show parameter control;
NAME TYPE VALUE
-----------------------------------------------------------------------------
Control_file_record_keep_time integer 7
Control_files string + DATA/oradb/controlfile/backup
. 259.762002877 // control the file name
SQL> shutdown immediate; // closes the database
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount; // open the database to the nomount status
ORACLE instance started.
Total System Global Area 230686720 bytes
Fixed Size 1218676 bytes
Variable Size 71305100 bytes
Database Buffers 155189248 bytes
Redo Buffers 2973696 bytes
SQL>
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, OLAP and Data Mining options
[Oracle @ node1 ~] $ Rman target // enter RMAN
Recovery Manager: Release 10.2.0.1.0-Production on Fri Sep 16 16:36:09 2011
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected to target database: oradb (not mounted)
RMAN> restore controlfile to '+ data/oradb/controlfile/backup.259.762002875' from '+ data/oradb/controlfile/backup.259.762002877'; // use the current control file of the database, create a new control file
Starting restore at 16-SEP-11
Using target database control file instead of recovery catalog
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 156 devtype = DISK
Channel ORA_DISK_1: copied control file copy
Finished restore at 16-SEP-11
Recovery Manager complete.
RMAN> exit
[Oracle @ node1 ~] $ Export ORACLE_SID = + ASM
[Oracle @ node1 ~] $ Asmcmd // enter the ASM instance command
ASMCMD> + data/oradb/controlfile
ASMCMD> ls-ltr // view the newly created control file name
Type Redund Striped Time Sys Name
Controlfile high fine sep 16 16:00:00 Y backup.259.762002877
Controlfile high fine sep 16 16:00:00 Y backup.265.762021421
ASMCMD> exit
[Oracle @ node1 ~] $ Export ORACLE_SID = oradb
[Oracle @ node1 ~] $ Sqlplus/as sysdba // enter the database
SQL * Plus: Release 10.2.0.1.0-Production on Fri Sep 16 16:38:30 2011
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, OLAP and Data Mining options
SQL> create pfile = '/u01/oracle/product/10g/dbs/oradb. ora' from spfile; // create the pfile parameter file of the database
File created.
SQL> shutdown immediate; // closes the database
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> exit