Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem dropping a database link (it's in use)

979263Dec 13 2012 — edited Jan 8 2013
Hi,

I know that this error has been reported in older threads, but I was not able to find the explanation/solution in my context. When I try to drop a database link that I have created (with "DROP DATABASE LINK..."), I get the error "Error SQL: ORA-02018: database link of same name has an open connection". Trying to close the connection with "exec DBMS_SESSION.CLOSE_DATABASE_LINK('database-link-name')" reports the error "ORA-02080: database link is in use", so it doesn't really solve the problem.

The strange thing is that if I execute "SELECT * FROM V$DBLINK" and then I try to drop it again, then dropping the database link works (??). As far as I know, no cursor should be in use for the database link...

Of course, the error with drop only occurs if have used the link (e.g., with a "SELECT * from table-name@database-link-name"), not if for example I create it and then drop it immediately.

Thanks for any idea.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 5 2013
Added on Dec 13 2012
6 comments
6,355 views