Database Administration (MOSC)

MOSC Banner

ORA-02080: database link is in use - Trying to close db-link in session

edited Mar 27, 2019 1:54PM in Database Administration (MOSC) 4 commentsAnswered ✓
I want to be able to close the public db-link that I'am using in my session and I can't.  I need this. Any help would be appreciated.

Enter password: ********************
Connected.
SQL> select count(*) from dba_tables@<my-db-link>;

  COUNT(*)
----------
      6713

SQL> execute dbms_session.close_database_link('<my-db-link'>');
BEGIN dbms_session.close_database_link('my-db-link'); END;

*
ERROR at line 1:
ORA-02080: database link is in use
ORA-06512: at "SYS.DBMS_SESSION", line 111
ORA-06512: at line 1


SQL> ALTER SESSION CLOSE DATABASE LINK my-db-link;
ERROR:
ORA-02080: database link is in use

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center