【rac】實驗二:增加控制檔案
1. 準備工作
1.1. 檢視當前控制檔案數量及位置、名稱
1) 方法一:
[oracle@node2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 27 07:53:57 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SYS@PROD1>show parameter control_files
NAME TYPE VALUE
------------------------------------ -----------
control_files string +DATA/prod/controlfile/current
.256.926241707, +FRA/prod/cont rolfile/current.256.926241707
2)方法二:
[grid@node2 ~]$ asmcmd
ASMCMD>
ASMCMD> cd data/prod/controlfile
ASMCMD> ls
Current.256.926241707
1.2. 關閉資料庫並將一個節點啟動到 nomount
[grid@node2 ~]$ srvctl stop database -d prod -o immediate;
[grid@node2 ~]$
[oracle@node2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 27 08:09:57 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SYS@PROD1>startup nomount;
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 562040400 bytes
Database Buffers 281018368 bytes
Redo Buffers 5132288 bytes
SYS@PROD1>
1.3. 備份引數檔案( 可選)
在做引數調整的時候,最好備份一下引數檔案,如果出現問題便於回退。在其中一個節點做備份即可。
[oracle@node2 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 27 08:13:51 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SYS@PROD1>create pfile='/home/oracle/initPROD1.ora' from spfile;
File created.
2. 建立控制檔案
2.1. 利用 RMAN 完成建立
在一個節點完成操作即可。 另:控制檔案的名稱要以實驗環境實際的名稱為準
[oracle@node2 dbs]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Oct 27 08:16:33 2016
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: PROD (not mounted)
RMAN> restore controlfile to '+DATA' from '+DATA/PROD/controlfile/current.256.926241707';
Starting restore at 27-OCT-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=33 instance=PROD1 device type=DISK
channel ORA_DISK_1: copied control file copy
Finished restore at 27-OCT-16
2.2. 確認已生成的控制檔案
[grid@node2 ~]$ asmcmd
ASMCMD> cd data/prod/controlfile
ASMCMD> pwd
+data/prod/controlfile
ASMCMD> ls
Current.256.926241707
current.268.926324431
ASMCMD>
3. 修改引數檔案
3.1. 修改引數檔案, 使其新增控制檔案生效
此時 1 節點應該在 nomout 狀態下, 在此節點完成修改即可。
[oracle@node2 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 27 08:29:33 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SYS@PROD1>select inst_id,host_name,status from gv$instance;
INST_ID HOST_NAME STATUS
-----------------------------------------------------------------------
1 node2 STARTED
SYS@PROD1> alter system set control_files='+DATA/prod/controlfile/current.256.926241707','+FRA/prod/controlfile/current.256.926241707','+DATA/prod/controlfile/current.268.926324431' scope=spfile;
System altered.
SYS@PROD1>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@PROD1>
3.2. 啟動資料庫
[oracle@node2 ~]$ srvctl start database -d prod
[oracle@node2 ~]$
3.3. 驗證
一節點:
[oracle@node2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 27 09:50:19 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SYS@PROD1>show parameter control_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DATA/prod/controlfile/current
.256.926241707, +FRA/prod/cont
rolfile/current.256.926241707,
+DATA/prod/controlfile/curren
t.268.926324431
SYS@PROD1>
二節點:
[oracle@node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 27 09:51:16 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SYS@PROD2>show parameter control_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DATA/prod/controlfile/current
.256.926241707, +FRA/prod/cont
rolfile/current.256.926241707,
+DATA/prod/controlfile/curren
t.268.926324431
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31397003/viewspace-2128192/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RAC控制檔案恢復(三種不同情況)
- RAC 增加SCAN IP
- oracle rac 增加磁碟Oracle
- golang: 給二進位制檔案增加版本資訊Golang
- 與控制檔案有關的恢復(二)
- Oracle RAC引數檔案管理Oracle
- 實驗七 檔案相關
- Oracle 控制檔案Oracle
- Oracle RAC修改引數檔案位置Oracle
- oracle快速拿到重建控制檔案語句的方法二Oracle
- Oracle 表空間增加檔案Oracle
- 二進位制檔案和符號檔案(PDB)如何校驗是否匹配符號
- VS2022 csproject檔案增加發布時檔案項Project
- Oracle RAC NFS掛載檔案系統OracleNFS
- 資料匯入與預處理實驗二---json格式檔案轉換JSON
- 2.6.4 指定控制檔案
- 實驗二
- 實驗7 檔案應用程式設計程式設計
- C語言實現檔案複製功能(包括文字檔案和二進位制檔案)C語言
- 判斷檔案為文字檔案還是二進位制檔案(C語言實現)C語言
- DIY 實現 ThinkPHP 核心框架 (二)入口檔案PHP框架
- input 實現檔案上傳,並驗證檔案不大於5M
- jq驗證檔案
- 如何在rac環境中增加監聽
- 實驗7_檔案應用程式設計程式設計
- 12c複製 RAC ASM中的密碼檔案到檔案系統ASM密碼
- SimpleRAG-v1.0.3:增加檔案對話功能
- ORACLE 控制檔案(Control Files)概述Oracle
- 控制檔案損壞處理
- Git檔案操作(二)Git
- ORACLE RAC ASM資料檔案遷移OMF檔案報錯ORA-01276解決OracleASM
- 記一次Oracle RAC for aix 儲存雙控鎖盤導致ASM控制檔案損壞恢復OracleAIASM
- Caffeinated 6.828:實驗 5:檔案系統、Spawn 和 Shell
- 【RMAN】Oracle中如何備份控制檔案?備份控制檔案的方式有哪幾種?Oracle
- 【/proc/檔案淺析】另類辦法恢復資料檔案和控制檔案
- Oracle RAC一鍵部署004(RAC引數校驗)Oracle
- 增加程式碼的通用性-解析配置檔案
- Java實驗二:類程式設計實驗Java程式設計
- 實驗一和實驗二截圖