Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2242
  • Last Modified:

Oracle - Db links

Hi,

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?


Thanks
0
expertblr
Asked:
expertblr
1 Solution
 
cdemirCommented:
i think the easiest way : "select * from dual@link_db"
0
 
anand_2000vCommented:
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
0
 
expertblrAuthor Commented:
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".

Thanks..
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
expertblrAuthor Commented:
can anyone suggest an answer to this??? Please.....
0
 
expertblrAuthor Commented:
please help me out!!
0
 
anand_2000vCommented:
in the tnsnames.ora use the machine name not the ipaddress.
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now