Oracle database tips logo
Article categories | Blog and News Page | SQL | SQL*Plus | DBA Scripts | Standby dbs | Database Links | Techno webcasts | Oracle Magazine | Free IT Magazines | Oracle Database Hosting Companies | Site Search |
RSS
XML RSS
What is this?
AddThis Feed Button

Social Bookmarking

Limit Oracle Database Links


Always test these 'limit oracle database links' commands on a test server
before implementing them on a production server.


Determine the maximum allowable number of database links
per session in your database

Each session in your database has a limited number of database links that can be opened at the same time.

This number is determined by a database-wide initialization parameter: OPEN_LINKS.

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.

(Read up here for the syntax of the close database link command. )

OPEN_LINKS cannot be modified in real-time, so you will have to change it in the spfile or pfile and bounce the database.

SQL> alter system set open_links=10 scope=both;
alter system set open_links=0 scope=both
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter 
cannot be modified


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

System altered.


If you are not sure how many database links are opened up concurrently by your session's database application, you can query v$dblink.

SQL> select in_transaction, count(*) from v$dblink 
     group by in_transaction;

IN_   COUNT(*)
--- ----------
YES          1

Next: How to manage database link usage in your database

Click here to read about troubleshooting database link errors.

Recommended reading:

  • Oracle Online Documentation : Administrator's Guide, Creating Database Links
  • Oracle Online Documentation : SQL Reference, Create Datatabase Link syntax



  • Return from 'limit oracle database links' back to 'oracle database link tutorials'