ORACLE 資料庫 ASM磁碟組上新增控制檔案

xingfei80發表於2012-05-21
  ORACLE使用ASM儲存,建庫時預設只有一個控制檔案,如果想多加幾個控制檔案,需要透過手工來新增,以下是我測試文件,貼出來分享下。[@more@]1.檢視當前資料庫的控制檔案
SQL> select name from v$controlfile;

NAME
------------------------------------------------
+DATA01/orcl/controlfile/current.274.743672963

2.修改spfile中的控制檔案引數
SQL> alter system set control_files='+DATA01/orcl/controlfile/current.274.743672963','+DATA01','+DATA01' scope=spfile sid='*';

System altered.

3.將資料庫例項啟動到nomount狀態
SQL> shutdown immediate

[oracle@node1 ~]$ target /

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jul 20 11:27:44 2011

Copyright (c) 1982, , Oracle. All rights reserved.

connected to target database (not started)

RMAN> startup nomount

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 from '+DATA01/orcl/controlfile/current.274.743672963';

Starting restore at 20-JUL-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=147 instance=orcl1 devtype=DISK

channel ORA_DISK_1: copied control file copy
output filename=+DATA01/orcl/controlfile/current.274.743672963
output filename=+DATA01/orcl/controlfile/backup.285.756991697
output filename=+DATA01/orcl/controlfile/backup.286.756991699
Finished restore at 20-JUL-11


4.開啟資料庫
RMAN> 'alter database mount';

sql statement: alter database mount
released channel: ORA_DISK_1

RMAN> sql 'alter database open';

sql statement: alter database open

5.驗證控制檔案是否新增成功
SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA01/orcl/controlfile/current.274.743672963
+DATA01/orcl/controlfile/backup.285.756991697
+DATA01/orcl/controlfile/backup.286.756991699;

6.修改spfile中的新新增的控制檔案引數
SQL> alter system set

control_files='+DATA01/orcl/controlfile/current.274.743672963','+DATA01/orcl/controlfile/backup.285.756991697','+DATA01/orcl/controlfile/backup.286.756991699'

scope=spfile sid='*';
System altered.

7.使用新的spfile啟動資料庫

SQL> shutdown immediate

SQL> startup

參考文件:metalink 文件:How to duplicate a controlfile when ASM is involved [ID 345180.1]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14663377/viewspace-1058292/,如需轉載,請註明出處,否則將追究法律責任。

相關文章