techxplore blog

How to Check the Available Database Links in Oracle

It is another surprise at work when strange thing happen on a web based financial software application which fetches data from Oracle ERP system. The web application that was created with Oracle PL/SQL has a feature to search easily data from ERP system without using the Oracle ERP Java Application.

The web application was running on a separate Oracle database and connects to the Oracle ERP Application database through a database link. Sometimes the database link connectivity between the servers have some issue which causes the financial application to fail.

The fresh data sometimes are not fetched and shows old data so checking the database link is important. There are several instance of database link in the financial application server. Thus, it’s important to identify which database links are available.

Check available database links in Oracle as follows using a SQL client application:
select * from user_db_links;

Database Link SQL Select Statement
Database Link SQL Select Statement

The command will show the database link (db_link), username, password, host and when it was created. If you have multiple instance of Oracle database running with different database links connecting to them from an application, it’s good for monitoring database links available.

The above SQL command has been very handy in trouble shooting applications which relies on database connectivity.

Leave a Reply