暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Sessions remains and increase cumulatively never close if you use DEDICATED with XA transaction + shared dblink.

原创 Anbob 2015-10-24
1156
A web application using Tuxedo always keep 50 long connection to local database which then issues a SELECT from local db to remote db over shared db link(it’s created last weekend). But to run for a period of time after the found the remote db sessions become full(ora-18), look like the connections opened  at remote database are never closed , the db link session open forever, and the session STAUS value is ‘INACTIVE’,  the database version both are 11.2.0.3, I trying to create session(using TOAD client) to local DB  issues a select via shared db link, then the remote db opend session count is two, one is PSEUDO other is DEDICATED, but when I close the session of local db , The related two sessions will be released on remote db. Why use Tuxedo the session never closed?
AP(Tuxedo) -(DEDICATED)-> DB1(DEDICATED) –shared dblink(DEDICATED)-> DB2(DEDICATED)
the Tuxedo app had XA application, and  we had used Dedicated server mode, the db parameter shared_servers value is 0 ,  Use dblink in an XA application, there is no requirement must be Shared dblink, but there are requirements must use a Shared server, otherwise the XA transaction will cause error ORA-24777 or ora-24778, the ORACLE doc records

Oracle XA applications can access other Oracle Database instances through database links with the following restrictions:
They must use the shared server configuration. ”
I found a Bug 18394488 in 11.2.0.4,Does not conform to this case. For non-shared database links, which must use dispatcher for XA connections,PMON can close the link by getting the dispatcher to do it. However, for shared db links, the dispatcher is not used, and PMON has no real network connection to use to end the remote process and session. Anyway this is not a standard environment.
Temporary solution:
1,Program code to close the dblink after an XA transaction manually
alter session close database linkname;
or
2. Configure the database to allow the use of shared servers and then let the
application use these as per the following documentation
http://docs.oracle.com/cd/E11882_01/server.112/e25494/manproc003.htm#ADMIN0050
OR
3. TO modify applications use short connection way to connect  LOCAL DB(used-the-close)
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论