如何克服“无法从表中获取对记录的记录锁定"? [英] How to overcome "Failure getting record lock on a record from table"?

查看:136
本文介绍了如何克服“无法从表中获取对记录的记录锁定"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用OpenQuery运行查询,并得到了一个特殊的错误.

I am running a query using OpenQuery and getting a peculiar error.

这是我的查询:

select * from OpenQuery("CAPITAOC",'SELECT per.*
    FROM pub."re-tenancy" AS t 
       INNER JOIN pub."re-tncy-person" AS per
       ON t."tncy-sys-ref" = per."tncy-sys-ref" 
       INNER JOIN pub."re-tncy-place" AS place
       ON t."tncy-sys-ref" = place."tncy-sys-ref"
    WHERE t."tncy-status" = ''CUR'' and place."place-ref"=''GALL01000009''') 

这是错误消息:

链接服务器"CAPITAOC"的OLE DB访问接口"MSDASQL"返回消息"[DataDirect] [ODBC进度OpenEdge Wire Protocol驱动程序] [OPENEDGE]无法从表PUB.RE-TNCY-PERSON获取记录的记录锁定." . 链接服务器"CAPITAOC"的OLE DB提供程序"MSDASQL"返回了消息"[DataDirect] [ODBC进度OpenEdge Wire Protocol驱动程序]错误.". Msg 7330,第16级,州2,第1行 无法从OLE DB提供程序"MSDASQL"获取链接服务器"CAPITAOC"的行.

OLE DB provider "MSDASQL" for linked server "CAPITAOC" returned message "[DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Failure getting record lock on a record from table PUB.RE-TNCY-PERSON.". OLE DB provider "MSDASQL" for linked server "CAPITAOC" returned message "[DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Error in row.". Msg 7330, Level 16, State 2, Line 1 Cannot fetch a row from OLE DB provider "MSDASQL" for linked server "CAPITAOC".

如何读取此数据?

推荐答案

记录锁定错误: 在多用户环境中,锁定要更新的记录以防止其他用户会话访问该记录很有用.这样可以防止脏读"您的数据.

The record lock error: In a multi-user environment it is useful to lock records that are being updated to prevent an other user session from accessing that record. This prevents a "dirty read" of your data.

要解决此问题,建议您看一下这篇文章: http://knowledgebase.progress.com/articles/Article/20255

To overcome this issue, I suggest looking at this article : http://knowledgebase.progress.com/articles/Article/20255

必须先设置事务隔离级别 会话中的交易.

The Transaction Isolation Level must be set prior to any other transactions within the session.

这是您发现世卫组织已锁定您的记录的方式: http://knowledgebase.progress.com/articles/Article/19833

And this is how you find out WHO has locked your record : http://knowledgebase.progress.com/articles/Article/19833

此外,我想建议您,如果使用的是诸如SQL Explorer这样的东西,除非您提出要求,否则它不会自动提交更新,那么数据库表可能会被锁定,直到您提交更改为止.

Also, I would like to suggest that if you are using something like SQL explorer which does not Auto-commit your updates unless you ask it to, then the database table might be locked until you commit your changes.

这篇关于如何克服“无法从表中获取对记录的记录锁定"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆