ORA-01591故障处理
日期:2007年7月21日 作者: 查看:[大字体 中字体 小字体]-
早晨到办公室听同事说表被锁了,一试,发现表中某字段为1111111的行都被锁了,SELECT都不行。报错误ORA-01591,打开TOAD的Knowledge eXPert,描述很少,只是说由于分布式事务错误而造成锁定。 询问同事,昨天通过一个存储过程调用另一个存储过程出了错误,而后者通过透明网关insert一些数据到SQl Server数据库。
立即想到打开OEM,谁知道大失所望,进入锁,根本没发现相关的对象被锁定,开始有点郁闷。转而检查会话,该用户有5个会话,都是INACTIVE,不管三七二十一,全部杀掉。结果依旧,并且锁也没有出现。远程登陆上主机,发现CPU和进程都正常,也没有发现透明网关进程挂死(之前曾发现TG4SQL在无业务量时也会出现25%左右的CPU,挂死)。
突然想到看看alert.log,经过仔细搜索,终于发现:
Wed Nov 17 00:00:04 2004
Errors in file d:\Oracle\admin\xdcj\udump\xdcj_j006_3020.trc:
ORA-12012: 自动执行作业 82 出错
ORA-01591: 锁定已被有问题的分配事务处理6.5.887985挂起
ORA-06512: 在line 6
这正是出错的地方,往前追溯:
Tue Nov 16 17:35:04 2004
Error 28500 trapped in 2PC on transaction 6.5.887985. Cleaning up.
Error stack returned to user:
ORA-02054: 事务处理6.5.887985有问题
ORA-28500: 连接 ORACLE 到非 Oracle 系统时返回此信息:
[Transparent gateway for MSSQL]
ORA-02063: 紧接着2 lines(源于ZSMOS_CRM)
Tue Nov 16 17:35:04 2004
DISTRIB TRAN QDCJ.US.ORACLE.COM.5ae32328.6.5.887985
is local tran 6.5.887985 (hex=06.05.d8cb1)
insert pending prepared tran, scn=6606197672830 (hex=602.2010cb7e)
Tue Nov 16 17:35:07 2004
Errors in file d:\oracle\admin\xdcj\bdump\xdcj_reco_3024.trc:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Transparent gateway for MSSQL][Microsoft][ODBC SQL Server Driver][SQL Server]用户 'RECOVER' 登录失败。 (SQL State: 28000; SQL Code: 18456)
ORA-02063: preceding 2 lines from ZSMOS_CRM
Tue Nov 16 17:35:12 2004
Errors in file d:\oracle\admin\xdcj\bdump\xdcj_reco_3024.trc:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Transparent gateway for MSSQL][Microsoft][ODBC SQL Server Driver][SQL Server]用户 'RECOVER' 登录失败。 (SQL State: 28000; SQL Code: 18456)
ORA-02063: preceding 2 lines from ZSMOS_CRM
这就是事发地点了。看来是昨天下午远程事务失败,但是又没有返回造成分布式事务挂死,从而锁定了行。终于找到了详细的错误ORA-02054,进入TOAD一查,说是要等待或者提交该事务,可是怎么操作呢。还是打开官方文档搜索相关内容,在Adminstrator Guide中发现如下内容:
Discovering Problems with a Two-Phase Commit
The user application that commits a distributed transaction is informed of a problem by one of the following error messages:
ORA-02050: transaction ID rolled back,
some remote dbs may be in-douBT
ORA-02051: transaction ID committed,
some remote dbs may be in-doubt
ORA-02054: transaction ID in-doubt
A robust application should save information about a transaction if it receives any of the above errors. This information can be used later if manual distributed transaction recovery is desired.
No action is required by the administrator of any node that has one or more in-doubt distributed transactions due to a network or system failure. The automatic recovery features of Oracle transparently complete any in-doubt transaction so that the same outcome occurs on all nodes of a session tree (that is, all commit or all roll back) after the network or system failure is resolved.
In extended outages, however, you can force the commit or rollback of a transaction to release any locked data. Applications must account for sUCh possibilities.
Determining Whether to Perform a Manual Override
Override a specific in-doubt transaction manually only when one of the following situations exists:
The in-doubt transaction locks data that is required by other transactions. This situation occurs when the ORA-01591 error message interferes with user transactions.
An in-doubt transaction prevents the extents of a rollback segment from being used by other transactions. The first portion of an in-doubt distributed transaction's local transaction ID corresponds to the ID of the rollback segment, as listed by the data dictionary views DBA_2PC_PENDING and DBA_ROLLBACK_SEGS.
The failure preventing the two-phase commit phases to complete cannot be corrected in an acceptable time period. Examples of such cases include a telecommunication network that has been damaged or a damaged database that requires a long recovery time.
Normally, you should make a decision to locally force an in-doubt distributed transaction in consultation with administrators at other locations. A wrong decision can lead to database inconsistencies that can be difficult to trace and that you must manually correct.
If the conditions above do not apply, always allow the automatic recovery features of Oracle to complete the transaction. If any of the above criteria are met, however, consider a local override of the in-doubt transaction.
看来是建议差不多,后面Oracle总是试图登录SQl Server就是要自动恢复,可是总不成功。 - [1] [2] [3] 下一页
-
- ORA-01591故障处理 相关文章:
- ·ORA-01591故障处理
- ORA-01591故障处理 相关软件
- 特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作
- 者.文章版权归文章原始作者所有.对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转
- 载的文章有版权问题请联系编辑人员,我们尽快予以更正. 转载请注明来源:http://www.hackhome.com
下一篇:Oracle已经过时?
精品推荐
热点TOP10
- ·9istatspack使用手册
- ·ORACLE UPDATE 语句语法与性能分析的一点看法
- ·ORACLE备份&恢复案例--ORACLE BACKUP&RESTORE SCHEME
- ·关于oracle日期函数的介绍和使用
- ·Oracle的SQL*PLUS命令的使用大全
- ·oracle函数之常见单行字符串函数
- ·ORACLE傻瓜手册长篇连载
- ·详细介绍ORACLE sqlplus命令
- ·Decode 函数的用法
- ·ORACLE 培训教程(1)
- ·Oracle 游标使用大全
- ·把Oracle数据库移植到Microsoft SQL Server 7.0
- ·Oracle数据库检查死锁的sql
- ·Oracle的SQL语句执行效率问题查找与解决方法
- ·Oracle常用的OCI函数
- ·用正则表达式函数验证身份证号码合法性
- ·oracle中pro*c的学习
- ·VMware下RedHat安装Oracle 9i RAC全攻略
- ·Oracle 9i 分析函数参考手册
- ·数据库备份与恢复测试(8)
特别推荐
- ·Oracle环境下APACHE虚拟服务器如何设置
- ·常见Oracle HINT的用法
- ·ORA-00257: archiver error. Connect internal only, until freed.
- ·oracle的update问题
- ·小议索引的使用
- ·oracle产品服务和技术级别介绍,OrACLE服务
- ·Oracle 数据类型
- ·Oracle数据库检查死锁的sql
- ·怎样将冷备份移植到另一台Solaris机器上
- ·Oracle 动态SQL返回单条结果和结果集
- ·手动建立 Oracle9i 数据库
- ·Oracle内存结构(二)----Shared Pool的详细信息
- ·DELPHI 调用 Oracle 存储过程并返回数据集的例子.
- ·关于block中行数据的存储与空间重组三
- ·Sybase及SQL Anywhere SQL语句小结
- ·ORACLE备份&恢复案例--ORACLE BACKUP&RESTORE SCHEME
- ·Oracle ERP 11业务调研报告-AP应付帐
- ·在 Oracle 数据库上构建 .NET 应用程序
- ·Oracle的SQL语句执行效率问题查找与解决方法
- ·oracle中pro*c的学习
