Oracle - Db links

Posted on 2006-11-23
Last Modified: 2008-01-09

I have many dblinks to various databases. Each hour one db job is running which
    uses these dblinks. But sometimes happens that some changes are made (e.g. IP
    address change) and then the dblink is unusable. But the job is hanging with
    "SQL*Net message from dblink" wait event for a very long time.
    Is there some possibility to set some "dblink timeout" or to simply check the
    dblink status before?

Question by:expertblr

Expert Comment

ID: 18006167
i think the easiest way : "select * from dual@link_db"
LVL 13

Expert Comment

ID: 18008060
select * from dba_db_links:

you can view the no of db links in the database,
Incase any changes in the ip address,you have to change the tns entry to refer the new ipaddress.

Once you change the ip address and you din change the tns entry then the db link will get invalid and the job will be hanging

Author Comment

ID: 18043193
Thanks for reply. Its perfectly clear to me that when some IP address of any
    server is changed then the dblink is unusable until the IP in tnsnames is
    changed as well. I've just wanted to ask you if is there any possibility to
    somehow handle this problem directly in plsql code. Now we are facing the
    problem, that something has chaged (IP....) but we don't know it immediatelly.
    We can only see after some time, that the session is hanging with wait for
    dblink and it's going to hang probably forever. So I would need only either to
    perform some quick functionality check of particular dblink in the beginning of
    the code or to set some "dblink timeout".

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.


Author Comment

ID: 18051488
can anyone suggest an answer to this??? Please.....

Author Comment

ID: 18106751
please help me out!!
LVL 13

Accepted Solution

anand_2000v earned 250 total points
ID: 18120345
in the tnsnames.ora use the machine name not the ipaddress.

Expert Comment

ID: 20296243
Forced accept.

EE Admin

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post first appeared at Oracleinaction  ( Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now