Showing posts with label ORA-02020. Show all posts
Showing posts with label ORA-02020. Show all posts

Tuesday 2 August 2016

ORA-02020: too many database links in use

Problem:

*********************************************************************
Link  : "BEXI_LINK.REGRESS.RDBMS.DEV.US.ORACLE.COM"
Error : ORA-02020: too many database links in use
*********************************************************************

Solution:

SQL> show parameter open_links

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
open_links                           integer     4
open_links_per_instance              integer     4
SQL>


SQL> alter system set open_links_per_instance=10 scope=spfile;
SQL> alter system set open_links=10 scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  293601280 bytes
Fixed Size                  1248600 bytes
Variable Size              92275368 bytes
Database Buffers          192937984 bytes
Redo Buffers                7139328 bytes
Database mounted.
Database opened.
SQL>

SQL> show parameter open_links

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
open_links                           integer     10
open_links_per_instance              integer     10
SQL>


Note:
> The default value is set to 4.
> If it is set to 0, distributed transactions are not allowed.
> If you are expecting your transactions to have a maximum of 3 database links open concurrently, set this parameter to 3 or higher.
> Do not set it too high, it is better for the application to close database links when no longer in use than to change the parameter to a high number.