Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gangelep
Contributor
Contributor

Switch DB Connection in case of one connection failed to connect

I have requirement to switch DB connection if one connection is failed to connect.

Sometimes it happens that after fetching 2-3 tables data, Timeout error  occurred in fetching data from 4th table.

So on that scenario how to handle to switch DB connection immediately and start fetching the data from 4th table onward again 

3 Replies
wilsonwebb
Partner - Contributor III
Partner - Contributor III

Hi Push,

I had this type of problem before and also was usually when I dd extractions using a loop.

My suggestion is you using SLEEP(10000)

this causes a pause between the closing of a connection and opening a connection. it does not have to be 10 seconds, you can make it to be 5 seconds. i.e SLEEP (5000);.

Do this between the load of the tables

gangelep
Contributor
Contributor
Author

Thanks Wilson for your reply but in my case SLEEP is not working, after retry it's getting same Timeout error.

gangelep
Contributor
Contributor
Author

stalwar1hic

Could you please help me out. I want to switch my DB connection if time out error get occur in 3rd table data fetch not immediate DB connection  failure.