[江楓]In Memory Undo與logical standby database
最近碰到了一個bug,導致邏輯備庫重建,相當的鬱悶。我們一個系統,包含一個主庫,一個物理備庫,一個邏輯備庫。系統不久前剛從9i升級到10.2.0.4。5.30號因為系統維護,將原主庫和物理備庫做了一次switchover,切換沒有什麼問題,做了很多次了。這是邏輯備庫突然報出了ora-600錯誤:
ORA-00600: internal error code, arguments: [2730], [331], [1], [13], [293130], [293130], [], []
ok,不用緊張,這個錯誤沒啥問題。因為主庫從9i升級到10g之後,為了保留降級的可能,compatible引數還是保留設定為9.2.0.0.0了,而這次切換,順便把compatible改成了10.2.0.0.0,所以出現主備庫的引數不一致了,就會報該錯誤。修改該引數即可。
但是,問題出來了:
ORA-00600: internal error code, arguments: [krvxbpx20], [1], [293141], [91], [96], [], [], []
Metalink上一查(Doc ID:761661.1),麻煩來了:
The ORA-00600: [KRVXBPX20] indicates that logical standby builder detects IMU (In Memory Undo) in the redo streams. Logical standby does not support IMU and enabling supplemental logging disables the IMU.
In customer’s case, supplemental logging is enabled in the original primary database, but it is not enabled in the original physical standby database. Prior to 11.2 (which has not been released yet at the time of writing), supplemental logging DDLs are not propagated to the physical standby database. Thus they had a situation where the primary has supplemental logging set, but the physical standby did not.
暈死,邏輯備庫不支援IMU(In Memory Undo,10g新特性),所以要使用邏輯備庫,必須在主庫禁用IMU,否則將導致邏輯備庫損壞,並只能重建。那為什麼原來主庫升級到10g之後,邏輯備庫是正常的,而執行switchover切換到物理備庫,才碰到問題呢?
我們的升級,是在主庫執行升級指令碼,然後備庫使用新版本的oracle軟體直接應用主庫傳過來的日誌的方式來完成整個系統的升級的。因為邏輯備庫是在主庫升級到10g後配置的,在執行exec dbms_logstdby.build生產資料字典資訊的時候自動配置了supplement logging,而開啟supplement logging將自動禁用IMU,所以未切換前邏輯備庫是正常的。而問題在於,主庫設定supplement logging的語句,並不會在物理備庫上自動應用,這樣實際上物理備庫還是原來9i預設的未開啟supplement logging的狀態,這樣一切換過來,問題就發生了。
如果你也在使用10g的邏輯保備庫,要避免該問題,則可以:
1.直接在主庫和物理備庫都設定_in_memory_undo=false
2.在主庫和物理備庫檢查supplement logging的狀態
select supplemental_log_data_min as supp_log, supplemental_log_data_pk as supp_pk, supplemental_log_data_ui as supp_ui from v$database; SUPP_LOG SUPP_PK SUPP_UI ---------- ---------- ---------- NO NO NO
只要上述結果中,任意一列值為NO,則需要執行(物理備庫可以mount狀態或者open readonly狀態執行):
alter database add supplemental log data (primary key, unique index) columns;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/1384/viewspace-611329/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle DG建立Logical Standby DatabaseOracleDatabase
- 4 Creating a Logical Standby Database 建立邏輯備庫Database
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- [20181113]Logical Standby建立2.txt
- 1.1 Logical Structure of Database ClusterStructDatabase
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase
- Setup Standby Database on One PC(轉)Database
- Oracle DG Standby Database型別OracleDatabase型別
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- Oracle 12.2 使用Database Link優化Standby Database WorkloadOracleDatabase優化
- [20230110]sql profile run standby database.txtSQLDatabase
- Managing Non-Volatile Memory in Database SystemsDatabase
- 在Oracle DG Standby庫上啟用flashback database功能OracleDatabase
- 透過RMAN備份standby database成功恢復還原Database
- oracle12.2 adg ORA-46952: standby database format mismatch for password fileOracleDatabaseORM
- Incorrect MEMORY_MAX_TARGET (> Available RAM) Can Lead To Database HangsAIDatabase
- [20230425]注意snapshot standby與activate standby的區別.txt
- oracle ocp 19c考題8,科目082考試題-logical and physical database structuresOracleDatabaseStruct
- Oracle 19c透過recover standby database from service修復GAP案例OracleDatabase
- Oracle 12c DG備庫啟動報錯standby database requires recoveryOracleDatabaseUI
- Go-ethereum 原始碼解析之 go-ethereum/ethdb/memory_database.goGo原始碼Database
- MySQL redo與undo日誌解析MySql
- [20180423]表空間閃回與snapshot standby
- How to Optimize PostgreSQL Logical ReplicationSQL
- Linux 建立LVM(Logical Volume)LinuxLVM
- allocator、polymorphic allocator 與 memory_resource
- 28、undo_1_2(undo引數、undo段、事務)
- Innodb undo之 undo結構簡析
- MySQL undoMySql
- 淺析MySQL事務中的redo與undoMySql
- [20210527]rman與undo表空間備份.txt
- vi編輯器開啟大檔案報錯0602-101 Out of memory saving lines for undo的解決方法
- memory
- Oracle的快照standbyOracle
- 2 新增standby masterAST
- Oracle Redo and UndoOracle Redo
- 2.3.1.1.3 Application Containers Use Case: Logical Data WarehouseAPPAI
- 晴楓個人部落格系統
- rust-quiz:021-closure-or-logical-or.rsRustUI