Oracle10g RAC下啟用歸檔模式
環境:兩個節點的Oracle10g RAC 環境,資料庫建立在獨立的磁碟陣列上的裸裝置上,資料庫在非歸檔模式中,現在需要改為歸檔模式,具體步驟如下:
在節點1:
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Wed Jun 20 21:26:57 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /oracle/product/10.2.0/db/dbs/arch
Oldest online log sequence 94
Current log sequence 96
SQL> alter system set cluster_database=false scope=spfile sid='*';
System altered.
SQL> alter system set log_archive_dest_1='location=/databak/archivelog' scope=spfile sid='*';
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
[@more@]在節點2:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
在節點1:
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1610612736 bytes
Fixed Size 2096632 bytes
Variable Size 1023410696 bytes
Database Buffers 570425344 bytes
Redo Buffers 14680064 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /databak/archivelog
Oldest online log sequence 94
Next log sequence to archive 96
Current log sequence 96
SQL> alter database open;
Database altered.
SQL> alter system set cluster_database=true scope=spfile sid='*';
System altered.
節點2:
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1610612736 bytes
Fixed Size 2096632 bytes
Variable Size 1124073992 bytes
Database Buffers 469762048 bytes
Redo Buffers 14680064 bytes
ORA-01183: cannot mount database in SHARED mode
該提示說明資料庫的cluster_database=true引數因scope=spfile原因只會影響到spfile上,而現有記憶體上的實際狀態為cluster_database=false,因此節點2的例項無法啟動。要讓該引數最新值的生效,需要重啟節點1的例項...
節點1:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1610612736 bytes
Fixed Size 2096632 bytes
Variable Size 1040187912 bytes
Database Buffers 553648128 bytes
Redo Buffers 14680064 bytes
Database mounted.
Database opened.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /databak/archivelog
Oldest online log sequence 94
Next log sequence to archive 96
Current log sequence 96
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
節點2現在可以mount並開啟資料庫:
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1610612736 bytes
Fixed Size 2096632 bytes
Variable Size 1124073992 bytes
Database Buffers 469762048 bytes
Redo Buffers 14680064 bytes
Database mounted.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /databak/archivelog
Oldest online log sequence 44
Next log sequence to archive 46
Current log sequence 46
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-01126: database must be mounted in this instance and not open in any
instance
為什麼會提示這個呢?是因為spfile在共享儲存上,而每個節點相應initSID.ora檔案中做了連結,這個有助於兩個例項引數內容不一致導致的一些異常情況的避免。
-bash-3.2$ cd product/10.2.0/db/dbs/
-bash-3.2$ ls
hc_gderp1.dat init.ora initdw.ora inittest1.ora orapwtest1
-bash-3.2$ more inittest1.ora
SPFILE='/dev/raw/raw14'
-bash-3.2$
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /databak/archivelog
Oldest online log sequence 44
Next log sequence to archive 46
Current log sequence 46
最後分別在連個節點多做幾次alter system switch logfile 或 alter system archive log current操作檢視歸檔是否成功並歸檔到正確位置。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/18841027/viewspace-1058607/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RAC下啟動日誌歸檔模式模式
- oracle 10g rac 啟用歸檔模式Oracle 10g模式
- oracle RAC開啟歸檔模式Oracle模式
- rac下啟動關閉與更改歸檔模式模式
- ORACLE RAC 啟用歸檔Oracle
- rac下啟動關閉與更改歸檔模式(zt)模式
- Oracle10G歸檔模式應用Oracle模式
- RAC 環境下修改歸檔模式模式
- ORACLE RAC模式下歸檔模式和非歸檔模式的切換方法Oracle模式
- archive啟用歸檔模式Hive模式
- 改變oracle10g rac(rhel4)歸檔模式Oracle模式
- oracle11g RAC 啟動歸檔模式Oracle模式
- rac更改歸檔模式模式
- oracle 10g rac下啟動關閉與更改歸檔模式Oracle 10g模式
- oracle10g 歸檔模式和非歸檔模式的轉換Oracle模式
- RAC(ASM)歸檔模式修改ASM模式
- rac下啟動關閉與更改歸檔模式 時CLUSTER_DATABASE 作用模式Database
- oracle入門之1 rac下啟動關閉與更改歸檔模式Oracle模式
- RAC環境中非歸檔改為歸檔模式模式
- 10g R2 RAC 歸檔模式開啟模式
- 【轉】雙節點RAC下將資料庫從非歸檔模式更改到歸檔模式資料庫模式
- 10g , 11g RAC 環境下開啟歸檔模式的方法模式
- oracle入門之1 rac下啟動關閉與更改歸檔模式 (zt)Oracle模式
- 更改oracle10g的歸檔模式和歸檔路徑Oracle模式
- 開啟歸檔模式模式
- RAC 開啟歸檔日誌
- logical standby 在非歸檔模式下,無法實時應用 for ORACLE10G模式Oracle
- Oracle11新特性——DATA GUARD開啟模式下應用歸檔Oracle模式
- RAC開啟資料庫歸檔資料庫
- rac歸檔模式/非歸檔模式下檔案建至本地儲存修復方法-ORA-01157模式
- 常見問題--oracle10g歸檔模式Oracle模式
- Oracle9i RAC 更改歸檔模式Oracle模式
- 修改11g RAC 為歸檔模式模式
- 【DBCA -SILENT】靜默安裝如何啟用歸檔模式模式
- DBCA靜默方式建庫及啟用歸檔模式模式
- RAC資料庫啟用歸檔和閃回的步驟資料庫
- LINUX平臺上RAC開歸檔模式Linux模式
- 【RAC】RAC環境下歸檔日誌格式約定