DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Wednesday, July 18, 2018

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.

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)

alter system set open_links=50 scope=spfile;

shutdown immediate;

startup

SYS@ORCL> show parameter open_links
NAME                                       TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
open_links                                   integer                           50 
open_links_per_instance              integer                           20

No comments: