修改叢集資料庫的歸檔模式
以下簡要說一下如何修改叢集資料庫的歸檔模式:
----修改叢集資料庫為歸檔模式:
---檢視資料庫目前的狀態:
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Current log sequence 6
SQL>
#非歸檔模式:
---關閉叢集資料庫:
[oracle@node1 ~]$ srvctl stop database -d prod -o immediate
[oracle@node1 ~]$
SQL> select status from v$instance;
select status from v$instance
*
ERROR at line 1:
ORA-03135: connection lost contact
Process ID: 15511
Session ID: 68 Serial number: 1873
[oracle@node1 ~]$ exit
logout
#已經關閉。
---檢視資源情況:
[grid@node1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.LISTENER.lsnr
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.OCR_VOTE.dg
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.RCY.dg
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.asm
ONLINE ONLINE node1 Started
ONLINE ONLINE node2 Started
ora.eons
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.gsd
OFFLINE OFFLINE node1
OFFLINE OFFLINE node2
ora.net1.network
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.ons
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.registry.acfs
ONLINE ONLINE node1
ONLINE ONLINE node2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE node1
ora.node1.vip
1 ONLINE ONLINE node1
ora.node2.vip
1 ONLINE ONLINE node2
ora.oc4j
1 OFFLINE OFFLINE
ora.prod.db
1 OFFLINE OFFLINE Instance Shutdown
2 OFFLINE OFFLINE Instance Shutdown
ora.scan1.vip
1 ONLINE ONLINE node1
[grid@node1 ~]$
--將其中一個節點啟動到 :
[oracle@node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Nov 6 06:00:14 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 603983440 bytes
Database Buffers 239075328 bytes
Redo Buffers 5132288 bytes
Database mounted.
SQL>
---再次檢視歸檔模式:
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Current log sequence 6
SQL>
---修改歸檔模式:
SQL> alter database archivelog;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Next log sequence to archive 6
Current log sequence 6
SQL>
--節點1:開啟資料庫:
SQL> alter database open;
Database altered.
--節點2同時也直接開啟資料庫:
[oracle@node2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Nov 6 06:06:38 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 570429008 bytes
Database Buffers 272629760 bytes
Redo Buffers 5132288 bytes
Database mounted.
Database opened.
SQL>
---檢視修改後,節點2上檢視資料庫的歸檔模式:
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Next log sequence to archive 3
Current log sequence 3
SQL>
---同樣的操作方法與步驟,將叢集資料庫調節到非歸檔模式:
1> 節點1:
srvctl stop database -d prod -o immediate
2>節點1:
[oracle@peod1 ~]$ sqlplus / as sysdba
3>節點1:
startup mount;
4>節點1:
alter database noarchivelog;
5>節點1:(參考)
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 13
Current log sequence 14
6>開啟資料庫:
alter database open;
7>節點2:直接買開啟資料庫:
sqlplus / as sysdba
startup
叢集資料庫修改歸檔模式與單例項的修改相似,不同在於兩個例項的部分操作順序不同。
----修改叢集資料庫為歸檔模式:
---檢視資料庫目前的狀態:
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Current log sequence 6
SQL>
#非歸檔模式:
---關閉叢集資料庫:
[oracle@node1 ~]$ srvctl stop database -d prod -o immediate
[oracle@node1 ~]$
SQL> select status from v$instance;
select status from v$instance
*
ERROR at line 1:
ORA-03135: connection lost contact
Process ID: 15511
Session ID: 68 Serial number: 1873
[oracle@node1 ~]$ exit
logout
#已經關閉。
---檢視資源情況:
[grid@node1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.LISTENER.lsnr
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.OCR_VOTE.dg
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.RCY.dg
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.asm
ONLINE ONLINE node1 Started
ONLINE ONLINE node2 Started
ora.eons
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.gsd
OFFLINE OFFLINE node1
OFFLINE OFFLINE node2
ora.net1.network
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.ons
ONLINE ONLINE node1
ONLINE ONLINE node2
ora.registry.acfs
ONLINE ONLINE node1
ONLINE ONLINE node2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE node1
ora.node1.vip
1 ONLINE ONLINE node1
ora.node2.vip
1 ONLINE ONLINE node2
ora.oc4j
1 OFFLINE OFFLINE
ora.prod.db
1 OFFLINE OFFLINE Instance Shutdown
2 OFFLINE OFFLINE Instance Shutdown
ora.scan1.vip
1 ONLINE ONLINE node1
[grid@node1 ~]$
--將其中一個節點啟動到 :
[oracle@node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Nov 6 06:00:14 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 603983440 bytes
Database Buffers 239075328 bytes
Redo Buffers 5132288 bytes
Database mounted.
SQL>
---再次檢視歸檔模式:
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Current log sequence 6
SQL>
---修改歸檔模式:
SQL> alter database archivelog;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Next log sequence to archive 6
Current log sequence 6
SQL>
--節點1:開啟資料庫:
SQL> alter database open;
Database altered.
--節點2同時也直接開啟資料庫:
[oracle@node2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Nov 6 06:06:38 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 570429008 bytes
Database Buffers 272629760 bytes
Redo Buffers 5132288 bytes
Database mounted.
Database opened.
SQL>
---檢視修改後,節點2上檢視資料庫的歸檔模式:
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Next log sequence to archive 3
Current log sequence 3
SQL>
---同樣的操作方法與步驟,將叢集資料庫調節到非歸檔模式:
1> 節點1:
srvctl stop database -d prod -o immediate
2>節點1:
[oracle@peod1 ~]$ sqlplus / as sysdba
3>節點1:
startup mount;
4>節點1:
alter database noarchivelog;
5>節點1:(參考)
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 13
Current log sequence 14
6>開啟資料庫:
alter database open;
7>節點2:直接買開啟資料庫:
sqlplus / as sysdba
startup
叢集資料庫修改歸檔模式與單例項的修改相似,不同在於兩個例項的部分操作順序不同。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31392094/viewspace-2127890/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 修改資料庫的歸檔模式資料庫模式
- 將資料庫修改為歸檔模式資料庫模式
- oracle 修改資料庫為歸檔模式Oracle資料庫模式
- 檢視oracle資料庫是否歸檔和修改歸檔模式Oracle資料庫模式
- 檢視oracle資料庫是否歸檔和修改歸檔模式(轉)Oracle資料庫模式
- 修改資料庫歸檔模式(ARCHIVELOG/NOARCHIVELOG)資料庫模式Hive
- 修改歸檔模式的通用步驟(非RAC 資料庫)模式資料庫
- Oracle叢集資料庫中恢復歸檔日誌Oracle資料庫
- 【ARCHIVE】單機環境修改資料庫為歸檔模式Hive資料庫模式
- 【ARCHIVE】單機環境修改資料庫為非歸檔模式Hive資料庫模式
- 非歸檔模式下的資料檔案路徑修改模式
- redis資料庫叢集三種模式Redis資料庫模式
- 資料庫啟動歸檔模式資料庫模式
- 開啟資料庫歸檔模式資料庫模式
- 更改資料庫為歸檔模式資料庫模式
- OARCLE資料庫歸檔模式的設定資料庫模式
- 叢集資料庫新增控制檔案資料庫
- 非歸檔模式恢復資料庫模式資料庫
- Oracle資料庫切換歸檔模式Oracle資料庫模式
- Oracle 修改歸檔模式Oracle模式
- SequoiaDB資料庫之叢集模式的對比資料庫模式
- 資料庫叢集資料庫
- Oracle資料庫歸檔模式的切換ELOracle資料庫模式
- 如何設定資料庫為歸檔模式資料庫模式
- 叢集資料庫重要檔案的檢視管理資料庫
- RAC(ASM)歸檔模式修改ASM模式
- MySQL資料庫叢集MySql資料庫
- 今天早上將一個新的資料庫$ORACLE_SID修改成歸檔模式,修改步驟如下:資料庫Oracle模式
- 11g資料庫設定歸檔模式資料庫模式
- 檢視oracle資料庫是否為歸檔模式Oracle資料庫模式
- 【ARCHIVE】使用startup mount force啟動資料庫後無法修改歸檔模式的模擬Hive資料庫模式
- 歸檔模式下資料庫全恢復的過程模式資料庫
- Oracle資料庫歸檔模式的開啟和關閉Oracle資料庫模式
- 【轉】雙節點RAC下將資料庫從非歸檔模式更改到歸檔模式資料庫模式
- GBase XDM(單機/分片叢集)資料庫修改記錄資料庫
- 大資料Spark叢集模式配置大資料Spark模式
- 【資料庫】Redis叢集篇資料庫Redis
- RAC叢集資料庫搭建資料庫