ORA-03113錯誤解決一例
大家知道,ORA-03113錯誤是Oracle資料庫常見的錯誤,導致這個錯誤的原因比較複雜,各種各樣的原因。可能是網路中斷引起的、也可能是資料庫本身出現了問題。
下面就一個案例,分析一下ORA-03113錯誤。
故障現象:
開始alert檔案提示錯誤:
Error 1013 trapped in 2PC on transaction 1.60.1257421. Cleaning up.
Error stack returned to user:
ORA-02050: transaction 1.60.1257421 rolled back, some remote DBs may be in-doubt
ORA-01013: user requested cancel of current operation
ORA-06553: PLS-103: Encountered the symbol "EXCEPTION" when expecting one of the following:
begin case declare exit for function goto if loop mod null
package pragma procedure raise return select separate type
update while with
form. table call close current define delete fetch lock
Mon Feb 18 09:07:19 2008
DISTRIB TRAN SMSBOSS.09aad41c.1.60.1257421
is local tran 1.60.1257421 (hex=01.3c.132fcd)
insert pending collecting tran, scn=8914343855672 (hex=81b.884c8638)
然後時不時的會提示下面錯誤:
ERROR, tran=1.60.1257421, session#=1, se=0:
ORA-03113: end-of-file on communication channel
*** 2008-02-18 09:45:25.919
ERROR, tran=1.60.1257421, session#=1, se=0:
ORA-03113: end-of-file on communication channel
*** 2008-02-18 10:19:42.891
Oracle資料庫只有這些錯誤提示,其餘狀態均正常。
從錯誤提示看,應該是由於分佈事務由於人為cancel中止,引起的事務失敗,下面檢視相關資訊:
SQL> select LOCAL_TRAN_ID,GLOBAL_TRAN_ID,STATE,MIXED,HOST,COMMIT# from dba_2pc_pending;
LOCAL_TRAN_ID GLOBAL_TRAN_ID STATE MIX HOST COMMIT#
---------------------- -------------------- ---------------- --- -------------------- ----------------
1.60.1257421 SMSBOSS.09aad41c.1.60.1257421 collecting no WORKGROUP\LIUQING 8914343855672
SQL> select * from DBA_2PC_NEIGHBORS;
LOCAL_TRAN_ID IN_ DATABASE DBUSER_OWNER I DBID SESS# BRANCH
---------------------- --- --------------- ------------------------------ ----------------- ---------- --------------------
1.60.1257421 in BOSSMGR N 1 0000
1.60.1257421 out SMSDBN BOSSMGR N cc3ddb9b 1 4
select * from DBA_2PC_PENDING@smsdbn;
no rows selected
select * from DBA_2PC_NEIGHBORS@smsdbn;
no rows selected
dba_2pc_pending檢視記錄等待恢復的分散式事務的資訊
dba_2pc_neighbors檢視記錄未決的分散式事務的輸入輸出連線資訊
有上述資訊分析原因,1.60.1257421事務的狀態為collecting,本機資料庫資料流向為in,遠端smsdbn資料庫流向為out。
詢問業務人員,確實執行過這麼個一儲存,中途手工中止了。並且是從smsdbn資料庫裡select資料然後update本地資料庫。 這基本證實了我們的猜測。
下面嘗試force commit或者 force rollback此事務,
SQL> commit force '1.60.1257421';
commit force '1.60.1257421'
*
ERROR at line 1:
ORA-02058: no prepared transaction found with ID 1.60.1257421
上述錯誤的原因是由於collecting狀態的事務不需要commit/rollback force。
我們現在需要做的就是:
(1) Disable分散式恢復
SQL> ALTER SYSTEM DISABLE DISTRIBUTED RECOVERY;
System altered.
(2)Puege(清空)in-doubt transaction entry:
SQL> exec DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('1.60.1257421');
PL/SQL procedure successfully completed.
(3)然後enable 分散式恢復:
SQL> ALTER SYSTEM ENABLE DISTRIBUTED RECOVERY;
參考資訊/更多閱讀:
Note:1012842.102
ORA-2019 ORA-2058 ORA-2068 ORA-2050: Failed Distributed Transactions
Note:100664.1
How to Troubleshoot Distributed Transactions
Note:274321.1
Note:126069.1
Manually Resolving In-Doubt Transactions: Different Scenarios
--The End--
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7220098/viewspace-175853/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-03113錯誤分析與解決
- [Oracle] ORA-03113錯誤分析與解決Oracle
- RMAN-06133 錯誤解決一例
- rman-03004 ora-03113 錯誤解決方法
- MySQL 5.6 GTID常見錯誤解決一例MySql
- ORA-02063錯誤解決一例
- ORA-12514: 錯誤解決一例
- client backup was not attempted because backup window closed 錯誤解決一例client
- Linux共享連結庫錯誤解決一例(轉)Linux
- ORA-03113錯誤分析
- Ora-03113 錯誤分析
- ORA-03113 +0RA-07445 錯誤的痛苦解決過程
- ORA-03113 +0RA-07445 錯誤的痛苦解決過程
- ORA-02019錯誤解決一例
- ORA-03113錯誤分析(轉)
- Oracle恢復一例--ORA-03113、ORA-24324,ORA-01041錯誤Oracle
- GCS shadows traversed, 4001 replayed 錯誤解決一例GC
- 通過sql跟蹤解決ORA-00942錯誤一例SQL
- 轉貼 :ORA-03113錯誤分析
- 解決了一例Shutdown時碰到Ora-600錯誤的問題
- Ocelot錯誤解決
- 10.2.0.3 升級到 10.2.0.4 database upgrade 報ORA-03113錯誤解決方法Database
- catalog is missing 10 attribute(s)錯誤的解決辦法一例
- keepalived啟動報錯解決一例
- VIM 常用錯誤解決
- sqldeveloper for windows 錯誤解決SQLDeveloperWindows
- TNS-12547,TNS-12537錯誤解決方法一例
- ORA-01547、ORA-01994錯誤解決一例
- ORA-03113解決方法
- vsftpd 錯誤:530 and 500 錯誤解決方法FTP
- AIX中使用DBCA建立資料庫ora-12547錯誤解決一例AI資料庫
- timesten11218 ORA-12154錯誤解決一例
- latex 錯誤以及解決方案
- ora-27504錯誤解決
- Datastore error in 'dirbdb'錯誤解決ASTError
- ORA-27054 錯誤解決
- mysql與php錯誤解決MySqlPHP
- mysql錯誤解決總結MySql