asm下的控制檔案的複製

n-lauren發表於2012-10-08

在asm管理下的oracle資料庫,當進行資料庫的控制檔案增添時,如何進行控制檔案的複製。

SQL> show parameter control_files

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +PP/peng/control01.ctl, +PP/peng/control02.ctl

增加控制檔案個數:

SQL> alter system set control_files='+PP/peng/control01.ctl','+PP/peng/control02.ctl','+PP/peng/control03.ctl' scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount
ORACLE instance started.

Total System Global Area 285212672 bytes
Fixed Size 2083368 bytes
Variable Size 104859096 bytes
Database Buffers 171966464 bytes
Redo Buffers 6303744 bytes
Database mounted.

啟動的mount狀態後,用備份命令進行控制檔案的複製。
SQL> alter database backup controlfile to '+PP/peng/control03.ctl';

Database altered.

複製完成後進行控制檔案的增添:

SQL> alter system set control_files='+PP/peng/control01.ctl','+PP/peng/control02.ctl','+PP/peng/control03.ctl' scope=spfile;

System altered.

最後進行資料庫的啟動。

SQL> startup force
ORACLE instance started.

Total System Global Area 285212672 bytes
Fixed Size 2083368 bytes
Variable Size 104859096 bytes
Database Buffers 171966464 bytes
Redo Buffers 6303744 bytes
Database mounted.

檢視結果:

SQL> show parameter control_files

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +PP/peng/control01.ctl, +PP/pe
ng/control02.ctl, +PP/peng/con
trol03.ctl

Database opened.

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

相關文章