【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資料庫增加控制檔案資料庫
- 控制檔案備份增加、破壞恢復系列實驗(上)
- 控制檔案備份增加、破壞恢復系列實驗(下)
- 【例項】增加控制檔案
- 增加oracle的控制檔案Oracle
- 【rac】實驗四:增加日誌組
- RAC下新增控制檔案
- 控制檔案損壞重建實驗(上)
- 控制檔案損壞重建實驗(下)
- 如何重建RAC的控制檔案
- RAC環境重建控制檔案
- 【RAC】Oracle 10g RAC 重建控制檔案Oracle 10g
- 【rac】實驗三:增加日誌組成員
- Oracle 增加控制檔案遇到的問題Oracle
- 詳述Oracle 多路複用的控制檔案——增加一個控制檔案副本Oracle
- 如何建立RAC叢集控制檔案
- 控制檔案維護(二)
- RAC環境中的快照控制檔案
- rman還原控制檔案(二)
- oracle rac on aix 下為表空間增加資料檔案OracleAI
- 備份恢復實驗(1)丟失部分控制檔案
- oracle實驗記錄 (恢復-關於控制檔案(1))Oracle
- oracle實驗記錄 (恢復-關於控制檔案(2))Oracle
- oracle實驗記錄 (恢復-關於控制檔案(3))Oracle
- oracle實驗記錄 (恢復-關於控制檔案(4))Oracle
- 控制檔案丟失恢復(二)
- 控制檔案的恢復方法(二)
- 實驗--檔案操作
- RAC控制檔案恢復(三種不同情況)
- 【控制檔案】映象控制檔案
- 【rac】實驗一:啟動關閉歸檔
- oracle 體系結構-控制檔案(二)Oracle
- ORACLE 11G RAC 增加日誌組及增大日誌檔案Oracle
- 【實驗】從RMAN備份中恢復controlfile控制檔案
- 【RAC】RAC 實現IP訪問控制
- 與控制檔案有關的恢復(二)
- 10G RAC 增加資料檔案需要注意下許可權
- oracle實驗記錄 (恢復-rman基於控制檔案的恢復)Oracle