1.查看当前系统的控制文件信息
[oracle@rac02 dbs]$ exit
exit
SQL> show parameter control_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DISKGRP1/orac/controlfile/bac
kup.257.719218371
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
2.用RAMN复制控制文件到新的地方
[oracle@rac02 dbs]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Sun Jul 4 05:00:02 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORAC (DBID=986088201, not open)
RMAN> shutdown immediate;
database dismounted
Oracle instance shut down
RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 88082676 bytes
Database Buffers 75497472 bytes
Redo Buffers 2973696 bytes
RMAN> restore controlfile to '+FLS' from '+DISKGRP1/orac/controlfile/backup.257.719218371';
Starting restore at 04-JUL-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=150 instance=ORAC2 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=149 instance=ORAC2 devtype=DISK
channel ORA_DISK_2: skipped, autobackup already found
channel ORA_DISK_1: copied control file copy
Finished restore at 04-JUL-10
RMAN> RMAN> exit
Recovery Manager complete.
3.查找新控制文件的位置
[oracle@rac02 dbs]$ export ORACLE_SID=+ASM2
[oracle@rac02 dbs]$ asmcmd
ASMCMD> find -t controlfile . *
+DISKGRP1/orac/CONTROLFILE/backup.257.719218371
+FLS/ORAC/CONTROLFILE/backup.273.723445753
ASMCMD> exit
4.修改控制文件参数
[oracle@rac02 dbs]$ export ORACLE_SID=ORAC2
[oracle@rac02 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 4 05:13:58 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> show parameter control_files;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DISKGRP1/orac/controlfile/bac
kup.257.719218371
SQL> alter system set control_files='+DISKGRP1/orac/controlfile/backup.257.719218371',
'+FLS/ORAC/CONTROLFILE/backup.273.723445753' scope=spfile;
System altered.
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
5.从新启动数据库
SQL> startup;
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 88082676 bytes
Database Buffers 75497472 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> select * from v$controlfile;
/
STATUS NAME
------- ------------------------------------------------------------------------
+DISKGRP1/orac/controlfile/backup.257.719218371
+FLS/orac/controlfile/backup.273.723445753
SQL> show parameter control_files;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DISKGRP1/orac/controlfile/bac
kup.257.719218371, +FLS/orac/c
ontrolfile/backup.273.72344575
3