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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

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".

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now


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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

733 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