【例項】增加控制檔案
實驗:增加控制檔案至三個
[oracle@hong admin]$ echo $ORACLE_SID
CAI
[oracle@hong admin]$
[oracle@hong admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 15 01:37:16 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select status from v$instance;
STATUS
------------
OPEN
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /u01/app/oracle/oradata/CAI/control01.ctl, /u01/app/oracle/oradata/CAI/control02.ctl
control_management_pack_access string DIAGNOSTIC+TUNING
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/CAI/control01.ctl
/u01/app/oracle/oradata/CAI/control02.ctl
SQL> alter system set control_files='/u01/app/oracle/oradata/CAI/control01.ctl','/u01/app/oracle/oradata/CAI/control02.ctl','/u01/app/oracle/oradata/CAI/control03.ctl';
alter system set control_files='/u01/app/oracle/oradata/CAI/control01.ctl','/u01/app/oracle/oradata/CAI/control02.ctl','/u01/app/oracle/oradata/CAI/control03.ctl'
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
SQL> alter system set control_files='/u01/app/oracle/oradata/CAI/control01.ctl','/u01/app/oracle/oradata/CAI/control02.ctl','/u01/app/oracle/oradata/CAI/control03.ctl' scope=spfile;
System altered.
SQL> shutdown immediate;
(此步驟正常關閉資料庫,則觸發CKPT,對資料檔案、控制檔案、日誌檔案檢查保持SCN一致狀態)
Database closed.
Database dismounted.
ORACLE instance shut down.
――回到作業系統層增加控制檔案:
[oracle@hong CAI]$ cd /u01/app/oracle/oradata/CAI/
[oracle@hong CAI]$ ls
control01.ctl redo02.log system01.dbf users01.dbf
control02.ctl redo03.log temp01.dbf
redo01.log sysaux01.dbf undotbs01.dbf
[oracle@hong CAI]$ cp control01.ctl control03.ctl
[oracle@hong CAI]$ ls
control01.ctl redo01.log sysaux01.dbf undotbs01.dbf
control02.ctl redo02.log system01.dbf users01.dbf
control03.ctl redo03.log temp01.dbf
[oracle@hong CAI]$
[oracle@hong CAI]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 15 01:53:27 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
(重新讀取spfile,啟動資料庫,靜態引數修改生效)
ORACLE instance started.
Total System Global Area 939495424 bytes
Fixed Size 2258840 bytes
Variable Size 595593320 bytes
Database Buffers 335544320 bytes
Redo Buffers 6098944 bytes
Database mounted.
Database opened.
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /u01/app/oracle/oradata/CAI/control01.ctl, /u01/app/oracle/oradata/CAI/control02.ctl, /u01/app/oracle/oradata/CAI/control03.ctl
control_management_pack_access string DIAGNOSTIC+TUNING
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/CAI/control01.ctl
/u01/app/oracle/oradata/CAI/control02.ctl
/u01/app/oracle/oradata/CAI/control03.ctl
完成!!!!!!!!!!!!!!!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31397003/viewspace-2126702/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle單例項+ASM新增控制檔案Oracle單例ASM
- 增加oracle的控制檔案Oracle
- asm例項有沒有控制檔案嗎?ASM
- 控制檔案丟失恢復例項(3) - 使用重建控制檔案方式(noresetlogs)
- 如何複製控制檔案在ASM例項儲存ASM
- 【rac】實驗二:增加控制檔案
- 為rac資料庫增加控制檔案資料庫
- Oracle 增加控制檔案遇到的問題Oracle
- 控制檔案丟失恢復例項(2) - 控制檔案備份後物理結構未變化
- 詳述Oracle 多路複用的控制檔案——增加一個控制檔案副本Oracle
- 控制檔案丟失恢復例項(1) - 控制檔案備份後物理結構發生變化
- 給ASM例項增加diskgroupASM
- Java 例項 - 檔案寫入Java
- Vue單檔案模板例項Vue
- Oracle恢復例項之一:資料檔案、控制檔案、聯機日誌丟失Oracle
- servlet檔案下載例項剖析Servlet
- 使用普通檔案建立ASM例項ASM
- VS2022 csproject檔案增加發布時檔案項Project
- 【控制檔案】映象控制檔案
- jQuery解析xml檔案程式碼例項jQueryXML
- jQuery對xml檔案的解析例項jQueryXML
- Oracle資料檔案收縮例項Oracle
- RAC環境下單例項啟動Oracle資料庫重建控制檔案案例單例Oracle資料庫
- 例項分析JAVA CLASS的檔案結構Java
- Java Class檔案結構例項分析(下)Java
- Java Class檔案結構例項分析(上)Java
- javascript讀取xml檔案程式碼例項JavaScriptXML
- 【原創】使用普通檔案建立ASM例項ASM
- 轉化成Access檔案下載的例項
- 控制檔案備份增加、破壞恢復系列實驗(上)
- 控制檔案備份增加、破壞恢復系列實驗(下)
- 恢復控制檔案避免使用resetlogs選項
- js增加千分符程式碼例項JS
- jquery增加和刪除行程式碼例項jQuery行程
- Oracle 10g RAC增加節點例項Oracle 10g
- Thread 控制資源例項thread
- Argo 安裝和 workflow 例項配置檔案解析Go
- 動態引入外部javascript檔案程式碼例項JavaScript