Home » RDBMS Server » Server Administration » DB Links
DB Links [message #54552] Thu, 21 November 2002 07:38 Go to next message
G Raghunath
Messages: 8
Registered: November 2002
Junior Member
When a Remote Database is queried through a DB Link, a session is created in the Remote Database. After the query results are retrieved what happens to the session in the Remote Databbase. WIll it be cleaned by the Oracle. Otherwise there will be many idle processes that will be sitting on Remote Databases. This might cause resource contention.

Could you please help me in this. Thanks in advance.
Re: DB Links [message #54553 is a reply to message #54552] Thu, 21 November 2002 07:48 Go to previous messageGo to next message
Sanjay
Messages: 236
Registered: July 2000
Senior Member
When the job is done, the remote connection is broken. At this point the remote DB will clean the process. It does not stay around.

It's like you have a SQLPLus windows. You are doing something. If suddenly, you close the window (hit the x), DB will close the session as the connectivity is lost (in fact in this case will rollback whatever was being done, if not commited yet).

Hope this answers your question.
Re: DB Links [message #54562 is a reply to message #54552] Thu, 21 November 2002 12:19 Go to previous message
Trifon Anguelov
Messages: 514
Registered: June 2002
Senior Member
No need for cleanup if the transaction completes (commit or rollback). The session is terminated as soon as this occured.

If for some reason the connection was terminated then the RECO background process will clean up the hanging session.

If for some reason that is not happening, then you can query DBA_2PC_PENDING view and finish the failed RECO job with:

SQL> commit force '<local_transaction_id>';
SQL> rollback force '<local_transaction_id>';

Hope that helps,

clio_usa
OCP - DBA

Visit our Web site

Previous Topic: ? % of memory to SGA?
Next Topic: drop user cascade yielding ORA-00052: maximum number of enqueue resources (1036) exceeded
Goto Forum:
  


Current Time: Thu Sep 19 18:11:15 CDT 2024