Solved

DBLINK session can't be automatically closed ?

Posted on 2006-10-30
7
2,857 Views
Last Modified: 2013-12-11
SAP  program(DB: ORACLE 9.2.0.7) using DBLINK to access remote ORACLE DB(10.2.0.1).
After SAP progarm end, the dblink session (in remote db) is still alive.
Why? How to correct it ?
Please help ,thanks a lot!
0
Comment
Question by:gc0626
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
7 Comments
 
LVL 28

Accepted Solution

by:
Naveen Kumar earned 500 total points
ID: 17945371
Hi,
 
In PRO*C precompiler prorams, we say commit work release; at the end of the program if everything is successful.
This will commit the changes to the database and then release the connection.

If you code has commit or rollback then add ' work release' and try, though i am not sure whether it will help you or not.

Thanks
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 18235660
you can use

ALTER SESSION CLOSE DATABASE LINK <name>;

or

DBMS_SESSION.CLOSE_DATABASE_LINK ( dblink VARCHAR2);

Refer to the url below :

http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_sessi2.htm#1002316

in this url , search for 'This procedure closes an open database' and read the information given there.

Thanks

0
 
LVL 6

Expert Comment

by:Pradeepgv03
ID: 18244859
Hi will Dead Connection detection would be helpful?

Try setting sqlnet.expire_time ( in sqlnet.ora) and try
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 19322292
i think i have given the correct solution but no response.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question