Re: [Info-Ingres] Problem when Ingres server is rebooted

This is a discussion on Re: [Info-Ingres] Problem when Ingres server is rebooted within the Ingres Database forums in Other Databases category; Something like this? INQUIRE_SQL (Li_RtnStatus = errorno, Lv_Msg = errortext); IF Li_RtnStatus = 37000 THEN Lv_Msg = 'Database connection lost. Disconnecting...'; Lv_Database = CurFrame.DbSession.Database; Li_RtnStatus = CurFrame.DbSession.Disconnect(); /* Attempt Re-Connect (3 tries) */ FOR Li_CurRow = 1 to 3 DO Lv_Msg = 'Scheduler: Attempting reconnection in 10 secs...'; SLEEP 10; Li_RtnStatus = CurFrame.DbSession.Connect(database = :Lv_Database); IF Li_RtnStatus = ER_OK THEN -----Original Message----- From: info-ingres-bounces-at-kettleriverconsulting.com [mailto:info-ingres-bounces-at-kettleriverconsulting.com]On Behalf Of simonl-at-unwired.com.au Sent: Thursday, 24 May 2007 6:42 PM To: info-ingres-at-kettleriverconsulting.com Subject: Re: [Info-Ingres] Problem when Ingres server is rebooted My ...

Go Back   Database Forum > Other Databases > Ingres Database

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 05-24-2007, 06:03 AM
Default Re: [Info-Ingres] Problem when Ingres server is rebooted

Something like this?

INQUIRE_SQL (Li_RtnStatus = errorno, Lv_Msg = errortext);
IF Li_RtnStatus = 37000 THEN
Lv_Msg = 'Database connection lost. Disconnecting...';
Lv_Database = CurFrame.DbSession.Database;
Li_RtnStatus = CurFrame.DbSession.Disconnect();
/* Attempt Re-Connect (3 tries) */
FOR Li_CurRow = 1 to 3 DO
Lv_Msg = 'Scheduler: Attempting reconnection in 10 secs...';
SLEEP 10;
Li_RtnStatus = CurFrame.DbSession.Connect(database =
:Lv_Database);
IF Li_RtnStatus = ER_OK THEN


-----Original Message-----
From: info-ingres-bounces-at-kettleriverconsulting.com
[mailto:info-ingres-bounces-at-kettleriverconsulting.com]On Behalf Of
simonl-at-unwired.com.au
Sent: Thursday, 24 May 2007 6:42 PM
To: info-ingres-at-kettleriverconsulting.com
Subject: Re: [Info-Ingres] Problem when Ingres server is rebooted


My personal favourite way of doing it is to raise a database event
before shutting down the server. Your application must listen for the
event & then disconnect. Only other problem with this (besides
requiring a code change) is you must remember to use some special
shutdown command which sends the event to all databases in the
installation.

If reconnecting is really required, perhaps wait a specified time and
then attempt to reconnect. This must be coded for.

Cecil Westerhof wrote:
> We have a program that uses a remote Ingres database server. When the

remote
> server reboots the database connection handle is offcourse not valid
> anymore. Is there a way to see that the remote server has rebooted? If so
> what is the best way to handle this? I suppose a close is not possible
> anymore. How do I clear the old handle? And when this is done, can I
> reconnect to the rebooted Ingres server?


_______________________________________________
Info-Ingres mailing list
Info-Ingres-at-kettleriverconsulting.com
http://www.kettleriverconsulting.com...fo/info-ingres

Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 08:48 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Integrated by bbpixel2009 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.