ORA-02019的處理
今天早上過來,檢視測試庫的告警日誌發現,一直不斷的報錯:ORA-02019,具體如下:
alert輸出如下:
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
Mon Feb 13 10:18:46 CST 2012
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
Mon Feb 13 10:19:34 CST 2012
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
Mon Feb 13 10:20:47 CST 2012
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
Mon Feb 13 10:22:35 CST 2012
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
Mon Feb 13 10:25:17 CST 2012
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
對應的trace檔案內容如下:
[oracle@testdb ~]$ more /oracle/admin/UAT/bdump/uat_reco_16233.trc
/oracle/admin/UAT/bdump/uat_reco_16233.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /oracle/product/10.2.0/db_1
System name: Linux
Node name: testdb
Release: 2.6.18-128.el5
Version: #1 SMP Wed Dec 17 11:41:38 EST 2008
Machine: x86_64
Instance name: UAT
Redo thread mounted by this instance: 1
Oracle process number: 5
Unix process pid: 16233, image: oracle@testdb (RECO)
*** SERVICE NAME:(SYS$BACKGROUND) 2012-02-13 10:18:13.429
*** SESSION ID:(1096.3) 2012-02-13 10:18:13.429
*** 2012-02-13 10:18:13.429
ERROR, tran=7.27.49932, session#=1, se=0:
ORA-02019: connection description for remote database not found
*** 2012-02-13 10:18:46.453
初步判斷以為是db-link問題,到資料庫裡查詢,並沒有這個db-link,仔細觀察trace檔案可以發現,這是個oracle的後臺程式(RECOVER程式),會話ID是1096,進一步觀察不難發現,應該是oracle的RECOVER程式要恢復一個transaction,其事務號:7.27.49932,而需要被恢復的資料庫連線名不正確,只要資料庫開啟狀態,該程式就會一直嘗試進行恢復,所以alert中會不斷的出現該錯誤,最後查詢metalink,有如下解釋:
When a failure occurs during commit processing, automatic recovery will
consistently resolve the results at all sites involved in the
transaction. However, if the remote database is destroyed or
recreated before recovery completes, then the entries used to
control recovery in DBA_2PC_PENDING and associated tables will never
be removed, and recovery will periodically retry. Procedure
purge_lost_db_entry allows removal of such transactions from the local site.
查詢對應檢視發現:
SELECT LOCAL_TRAN_ID,global_tran_id,STATE, MIXED,to_char(FAIL_TIME,'yyyy-mm-dd hh24:mi:ss')FAIL_TIME,
to_char(RETRY_TIME,'yyyy-mm-dd hh24:mi:ss')Retry_Time
FROM DBA_2PC_PENDING;
7.27.49932 UAT.bb70863a.7.27.49932 collecting no 2011-09-29 18:23:40 2012-02-13 10:58:13
有問題的db-link 就是上面紅色部分,該事務第1次失敗時間是:2011-09-29 18:23:40
最近的嘗試時間是:2012-02-13 10:58:13
此問題不影響測試資料庫的正常執行,可以忽略。
如需要解決,不再報錯,可以強制移掉此事務來解決。方法如下:
execute sys.dbms_transaction.purge_lost_db_entry('
執行完上面的語句後再觀察alert,這個錯誤終於消失了。
[oracle@testdb ~]$ tail -f /oracle/admin/UAT/bdump/alert_UAT.log
ORA-02019: connection description for remote database not found
Mon Feb 13 10:47:29 CST 2012
Thread 1 advanced to log sequence 9006 (LGWR switch)
Current log# 3 seq# 9006 mem# 0: /oracle/oradata/UAT/redo03.log
Mon Feb 13 10:47:37 CST 2012
Thread 1 advanced to log sequence 9007 (LGWR switch)
Current log# 1 seq# 9007 mem# 0: /oracle/oradata/UAT/redo01.log
Mon Feb 13 10:58:13 CST 2012
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
Mon Feb 13 11:08:30 CST 2012
ALTER SYSTEM ARCHIVE LOG
Mon Feb 13 11:08:30 CST 2012
Thread 1 advanced to log sequence 9008 (LGWR switch)
Current log# 5 seq# 9008 mem# 0: /oracle/oradata/UAT/redo05.log
Mon Feb 13 11:09:14 CST 2012
Thread 1 advanced to log sequence 9009 (LGWR switch)
Current log# 6 seq# 9009 mem# 0: /oracle/oradata/UAT/redo06.log
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25618347/viewspace-716114/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-02019 錯誤處理
- 多對一處理 和一對多處理的處理
- 處理百萬級以上的資料處理
- 影像處理或其他多媒體處理中的值溢位處理
- ARC 的處理
- Apache Beam,批處理和流式處理的融合!Apache
- 祂無處不在 -- 疾病的處理.
- error的處理方式Error
- CSS 的空格處理CSS
- 前%的處理--PostgreSQLSQL
- Swift Image 的處理Swift
- 如何處理例外的?
- KafkaSpout的處理流程Kafka
- EM 失效的處理
- 異常的處理
- Python 影像處理 OpenCV (6):影像的閾值處理PythonOpenCV
- 【故障處理】ORA-12162 錯誤的處理
- JSP 異常處理如何處理?JS
- windows批處理之一:字串處理Windows字串
- CPU(中央處理器)和GPU(影像處理器)的區別GPU
- go的錯誤處理Go
- Swift的時區處理Swift
- MySQL的表碎片處理MySql
- 微服務的故障處理微服務
- CMake出錯的處理
- 簡單的字串處理字串
- Oracle TX鎖的處理Oracle
- NSURLProtocol對WKWebView的處理ProtocolWebView
- redis的事務處理Redis
- 簡單的文字處理
- 串的簡單處理
- java中的事件處理Java事件
- java事務的處理Java
- DG報錯的處理
- 上下居中的處理方式
- 字串的封送處理字串
- 特殊字元的處理。。¥$$$字元
- 處理問題的方法