How to Resolve ORA-02020: too many database links

Oracle Software

We have prepared a script to learn the fra status of database instances Oracle cloud control. It caused the ORA-02020 error because the open_links parameter was insufficient.

SQL> select * from dual@dbllink;

ORA-02020: too many database links in use

This is because both the OPEN_LINKS and the OPEN_LINKS_PER_INSTANCE server parameter are too small.

SQL> show parameter open_links

NAME                                 TYPE       VALUE
———————————— ———- ——————————
open_links                           integer    5
open_links_per_instance              integer    5

The first solution did not work for us.

SQL> exec dbms_session.close_database_link (‘dbllink’);

PL/SQL procedure successfully completed.

Or

exec dbms_session.close_database_link (‘dbllink’);

Unfortunately, we are left with no other choice but the second solution.

SQL> alter system set open_links=50 scope=spfile sid=’*’;

SQL> alter system set open_links_per_instance=50 scope=spfile sid=’*’;

SQL>shu immediate;
SQL> startup;

Comments