Solved

DBLINK session can't be automatically closed ?

Posted on 2006-10-30
7
2,778 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now