Login  Register

RE: Check DB connection availability

Posted by Mamdouh Kaadan-2 on Aug 28, 2006; 7:58am
URL: http://ofbiz.116.s1.nabble.com/Check-DB-connection-availability-tp141538p141539.html

I'm using oracle DB.
For stored procedures, I can create 2 db links to the 2 db (life and backup) on my schema, and inside the stored procedure I can do the following:
Retrieve the data from the life one,
If no data found then retrieve the data from the backup one

==================================
Mamdouh Kaadan
 


-----Original Message-----
From: David E Jones [mailto:[hidden email]]
Sent: Sunday, August 27, 2006 8:39 PM
To: [hidden email]
Subject: Re: Check DB connection availability


Which database are you using? Some database drivers are a bit inane  
by default and don't reconnect to the database automatically. For  
these there is usually a JDBC uri parameter to turn on this option.

Use stored procedures to get the data? I have no idea how this would  
help with a lost connection problem... but it certainly does follow  
the what has been the database design and DBA agenda for the first  
few decades of the life of databases... ;)

-David


On Aug 27, 2006, at 10:37 AM, Mamdouh Kaadan wrote:

> Dear all
>
>
>
> I'm facing a problem with my DB connections, I have 2 DBs, one life  
> and
> the other is Backup.
>
> Sometimes, the life one due to unexpected error shut down suddenly,  
> and
> all the pages in OFBiz related to this DB give an error.
>
>
>
> How can I check if the connection is still available or not, and in  
> case
> of unavailability, how can I connect to the backup DB in a transparent
> way??
>
> The DBA advised me to retrieve the data through stored procedures, but
> as I know, the stored procedure is not supported by OFBiz.
>
>
>
> Please advice
>
>
>
> Kind regards
>
>
>
> ==================================
>
> Mamdouh Kaadan
>
>
>
>
>