您的位置:首页 > 其它

ORA-02041: client database did not begin a transaction

2014-01-24 13:40 148 查看

.NET中访问Oracle数据库链接:ORA-02041: client database did not begin a transaction 问题的处理。

[align=left].NET中访问Oracle中带有DB_LINK时对象时,会抛出一下异常[/align]
[align=left]ORA-02041: client database did not begin a transaction[/align]
[align=left] [/align]
[align=left]解决方案:[/align]
1.
To resolve the issue with Oracle's ODP.NET, you'd specify "enlist=false" in your connect string.

Microsoft's ODP.net has the same connection string attribute, but it does something different. I think what you want to use with system.data.oracleclient is OmitOracleConnectionName.

See also http://forums.oracle.com/forums/thread.jspa?messageID=2281429�

2.

To Resolve this problem, you only have to include "Omit Oracle Connection Name=True;" in your connection string, for example:

"User Id=MyUser;Password=MyPassword;Data Source=MyDB;Omit Oracle Connection Name=True;"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: