Home » SQL & PL/SQL » SQL & PL/SQL » db2 link from oracle (oracle 9i)
db2 link from oracle [message #350749] Fri, 26 September 2008 02:21 Go to next message
rohitupgzp
Messages: 11
Registered: August 2008
Junior Member
Hi,

There is a select query that I am running from pl/sql developer

select * from db2table;


Now since the link to db2 is down this query keeps on running for as much as 20-25 mins and then throws error.

Can I put something in the query so that it returns as soon as it finds the link down .

I do not want to change any oracle settings , I only want it to be query specific.
Re: db2 link from oracle [message #350751 is a reply to message #350749] Fri, 26 September 2008 02:28 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No you can't.

Regards
Michel
Re: db2 link from oracle [message #350753 is a reply to message #350751] Fri, 26 September 2008 02:38 Go to previous messageGo to next message
rohitupgzp
Messages: 11
Registered: August 2008
Junior Member
Thanks for the reply,

Can Anyone suggest what should be the best approach to handle it.

Regards
Rohit
Re: db2 link from oracle [message #350756 is a reply to message #350753] Fri, 26 September 2008 03:08 Go to previous message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It depends of your actual need.
If you want a synchroneous and immediate answer, there is no way.
Otherwise you can spawn a job that makes the select into a local table when your current session wait a while and see if the data are there in the local table, if not raise an error otherwise select from the local table.

Regards
Michel
Previous Topic: String to a table
Next Topic: Unique record in Datablock
Goto Forum:
  


Current Time: Mon Dec 05 23:49:41 CST 2016

Total time taken to generate the page: 0.11589 seconds