ORA-02020: Too Many Database Links In Use
PROBLEM:
While querying against a database link, got below error.
select sysdate from dual@DBLINK*
ERROR at line 1:
ORA-02020: too many database links in use
CAUSE & SOLUTION:
open_links parameter control, the number of database links each session can use without closing it.
If you access a database link in a session, then the link remains open until you close the session.
If you access a database link in a session, then the link remains open until you close the session.
SYS@ORCL> show parameter open_links
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
open_links integer 20
open_links_per_instance integer 20
Here open_links is set to 20, i.e a session can access only 20 open database links in that session.When the open db_link connection reaches the limit(open_links), it throws ORA-02020: too many database links in use.
Solution:
1. Increase the open_links parameter (bounce required)
shutdown immediate;
startup
SYS@ORCL> show parameter open_links
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
open_links integer 50
open_links_per_instance integer 20