【例項】增加控制檔案
實驗:增加控制檔案至三個
[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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- VS2022 csproject檔案增加發布時檔案項Project
- Java 例項 - 檔案寫入Java
- 例項分析JAVA CLASS的檔案結構Java
- Java Class檔案結構例項分析(下)Java
- Java Class檔案結構例項分析(上)Java
- Argo 安裝和 workflow 例項配置檔案解析Go
- [20191128]11GR2 asm例項audit檔案.txtASM
- Linux與windows檔案傳輸詳解及例項LinuxWindows
- Java 例項 - 修改檔案最後的修改日期Java
- JavaScript讀取文字檔案內容程式碼例項JavaScript
- PHP+Mysql統計檔案下載次數例項PHPMySql
- JavaWeb之實現檔案上傳與下載例項JavaWeb
- Oracle 控制檔案Oracle
- 檔案系統管理 之 例項解說 fdisk 使用方法
- Oracle 表空間增加檔案Oracle
- .NET控制檯獲取依賴注入例項依賴注入
- Vue專案入門例項Vue
- 爬蟲的例項專案爬蟲
- Python專案實戰例項Python
- linux檔案管理命令例項分析【顯示、檢視、統計等】Linux
- 2.6.4 指定控制檔案
- matlab模糊控制工具箱使用和模糊控制pid例項參考Matlab
- 專案資源管理流程例項
- SpringBoot + ES基本專案搭建例項Spring Boot
- Android 簡單瀏覽器例項-webview控制元件Android瀏覽器WebView控制元件
- jQuery控制div顯示和隱藏程式碼例項jQuery
- MVVM+Reactive Cocoa專案完整例項MVVMReact
- SimpleRAG-v1.0.3:增加檔案對話功能
- 控制檔案損壞處理
- ORACLE 控制檔案(Control Files)概述Oracle
- AWS CLI 實現 S3與EC2例項間檔案複製S3
- ASM單例項安裝後,需要手動設定ASM的引數檔案ASM單例
- Jmeter-邏輯控制器If Controller的例項運用JMeterController
- 微控制器C程式設計例項指導pdfC程式程式設計
- mongodb配置檔案常用配置項MongoDB
- php例項化物件的例項方法PHP物件
- PLC程式設計例項(星三角形控制與交通燈控制)C程式程式設計
- Android專案常用功能綜合例項Android
- 【RMAN】Oracle中如何備份控制檔案?備份控制檔案的方式有哪幾種?Oracle