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歸檔模式/非歸檔模式下檔案建至本地儲存修復方法-ORA-01157模式
- RAC開啟資料庫歸檔資料庫
- Oracle RAC 11gR2開啟歸檔Oracle
- about oracle10g rac(轉)Oracle
- oracle 11g開啟歸檔模式及修改歸檔目錄Oracle模式
- ORACLE RAC開啟歸檔的正確姿勢與ORA-01126Oracle
- 【RAC】Oracle10g rac新增刪除節點命令參考Oracle
- langfuse使用的postgresql(docker)啟用歸檔SQLDocker
- Oracle RAC啟動歸檔時需要設定CLUSTER_DATABASE引數嗎?OracleDatabase
- Oracle資料庫歸檔模式的開啟和關閉Oracle資料庫模式
- 對歸檔模式下CLEAR 未歸檔日誌後恢復資料庫的一點看法模式資料庫
- rac使用預設閃回區歸檔空間滿
- Oracle 12c 關閉歸檔模式Oracle模式
- 便捷的檔案啟動器:Butler 啟用下載
- Oracle10g刪除資料檔案Oracle
- OGG整合抽取模式丟失歸檔處理模式
- vmware + 裸裝置 + crs + oracle10g RAC搭建步驟(二):安裝linuxOracleLinux
- Oracle資料庫歸檔模式的切換ELOracle資料庫模式
- Oracle歸檔檔案丟失導致OGG不用啟動Oracle
- 【BBED】丟失歸檔檔案情況下的恢復
- rac中文名檔名新增到本地路徑解決辦法(ORA-01157)-非歸檔
- Oracle 12c RAC CSSD程式無法啟動real time模式OracleCSS模式
- Oracle RAC 環境 引數檔案的啟動順序Oracle
- 設定Oracle9i為自動歸檔模式Oracle模式
- Docker批量操作(啟停、刪除、歸檔、載入)Docker
- Oracle RAC自啟動Oracle
- 比特幣開啟下金蛋模式比特幣模式
- oracle歸檔Oracle
- iOS匯入其他APP下載的檔案(用其他應用開啟)iOSAPP
- iOS 複雜物件的歸檔與反歸檔iOS物件
- RAC環境下的SEQUENCE對應用的影響
- [20190211]rac下解鎖應用出現的阻塞.txt
- Oracle檢視歸檔是否被備庫應用Oracle
- linux rac不重啟加盤Linux
- 如何輕鬆歸檔檔案?2種方法輕鬆建立歸檔檔案!
- 【Oracle】歸檔日誌管理-設定歸檔日誌路徑以及歸檔日誌冗餘Oracle
- 刪除歸檔
- 應用被其他app開啟時,不同啟動模式下activity任務棧的變化APP模式
- SharePlex跳過歸檔或從指定歸檔位置開始