openroad-users Contingency plan in OpenROAD

openroad-users Contingency plan in OpenROAD

Post by Armand Pir » Wed, 04 Nov 1998 04:00:00



HI Malcolm,

I will use it as I will have time. Thank you very much for help.

Armand Pirvu - CA-Ingres Senior DBA
Tel:    +40-(0)1-302-1790
GSM:    +40-(0)92-294-656

> ----------

> Sent:      Friday, October 23, 1998 1:00 AM
> To:        Armand Pirvu


> Subject:   Re: openroad-users Contingency plan in OpenROAD


> > Hi chaps,
> > I am facing a situation where I am my back on the wall.
> > I have two servers, server1 and server2.
> > >From server1 I am replicating to server2.
> > I also have an application written in OpenROAD on Win95.
> > First I connect to server1 and I work there.
> > Suppose that server1 goes down.
> > I will have all data on server2.
> > Now, the question is: Is there any way so that my application switches
> > automatically to server2? Or, can do this replicator?
> > If it is in the application, how should I implement it and which should
> be
> > the code that I will write?

> > Any ideeas are welcome.

> > Thank you very much
> > Armand Pirvu - CA-Ingres Senior DBA
> > Tel:    +40-(0)1-302-1790
> > GSM:    +40-(0)92-294-656

> Take a look at CurFrame.DBSession. You can inquire on its
> state to detect if the session is no longer connected and then
> connect to another server...

> IF  CurFrame.DBSession.State = DS_DISCONNECTED THEN
>       /** connect to backup server **/
>       g_status = session_2.Connect(Database = 'dbname', Flags = 'your
> connect
> flags');
>       IF  g_status != ER_OK THEN
>            MESSAGE 'Unable to establish a session with dbname';
>            EXIT;
>       ENDIF;
>       CurFrame.DBSession = session_2;
> ENDIF;

> You could put this code into a user event in a ghost frame
> which could either be raised on a periodic basis or when opening
> a new frame, or just prior to making a call to the server (i.e. issuing
> some SQL statement). Note however that you need to manage
> your DB sessions from a ghost frame which is at the top of the
> calling tree because any frames subsequently opened will inherit
> that calling frames DBSession.

> Hope this helps.

> --

> -------------------------------------------------------------
> Malcolm Thatcher
> Managing Director, Thentec Group  (http://www.thentec.com.au)

> Thentec Group of Companies
> Mezzanine Level, 185 Moggill Road,
> Taringa Qld 4068, AUSTRALIA
> Phone: +61 7 3371 6611     Fax: +61 7 3371 6633

> Thentec - "Partnering with our clients to enhance the way they do
> business"

 
 
 

openroad-users Contingency plan in OpenROAD

Post by Armand Pir » Wed, 04 Nov 1998 04:00:00


HI Jeff,

I will use it as I will have time. Thank you very much for help.

Armand Pirvu - CA-Ingres Senior DBA
Tel:    +40-(0)1-302-1790
GSM:    +40-(0)92-294-656

> ----------


> Sent:      Thursday, October 22, 1998 4:30 PM


> Subject:   RE: openroad-users Contingency plan in OpenROAD

> Hi Armand:-)

>    One possibility is to create 'win95' command file that checks to see
> which
> server is available.
> Then depending on the available server the 'win95' command file connects
> to
> the available server....

>    REM
>    REM Check available Server
>    REM
>    SERVERCHECKLOGIC...
>    if (server1 = TRUE) then
>            w4glrun IMAGE -uxx -dxx -Tyes
>    else
>            w4glrun IMAGE -uxx -dxx -Tyes
>    endif;

> Your Icon 'properties' section points to the command file.

> The ServerCHECKLogic could be an ASCII file with the 'true/false' notation
> for each
> available server. The ASCII file could be manually or programmatically
> updated.
> On the automated update,  write a socket app that attempts to connect to
> server1 & 2. Depending on availability
> the ascii file is updated.

> Hope this helps

> JeffM

> > -----Original Message-----


> > Pirvu
> > Sent: Thursday, October 22, 1998 5:27 AM



> > Subject: openroad-users Contingency plan in OpenROAD

> > Hi chaps,
> > I am facing a situation where I am my back on the wall.
> > I have two servers, server1 and server2.
> > >From server1 I am replicating to server2.
> > I also have an application written in OpenROAD on Win95.
> > First I connect to server1 and I work there.
> > Suppose that server1 goes down.
> > I will have all data on server2.
> > Now, the question is: Is there any way so that my application switches
> > automatically to server2? Or, can do this replicator?
> > If it is in the application, how should I implement it and which should
> be
> > the code that I will write?

> > Any ideeas are welcome.

> > Thank you very much
> > Armand Pirvu - CA-Ingres Senior DBA
> > Tel:  +40-(0)1-302-1790
> > GSM:  +40-(0)92-294-656



 
 
 

1. openroad-users Contingency plan in OpenROAD

Take a look at CurFrame.DBSession. You can inquire on its
state to detect if the session is no longer connected and then
connect to another server...

IF  CurFrame.DBSession.State = DS_DISCONNECTED THEN
      /** connect to backup server **/
      g_status = session_2.Connect(Database = 'dbname', Flags = 'your connect
flags');
      IF  g_status != ER_OK THEN
           MESSAGE 'Unable to establish a session with dbname';
           EXIT;
      ENDIF;
      CurFrame.DBSession = session_2;
ENDIF;

You could put this code into a user event in a ghost frame
which could either be raised on a periodic basis or when opening
a new frame, or just prior to making a call to the server (i.e. issuing
some SQL statement). Note however that you need to manage
your DB sessions from a ghost frame which is at the top of the
calling tree because any frames subsequently opened will inherit
that calling frames DBSession.

Hope this helps.

--

-------------------------------------------------------------
Malcolm Thatcher
Managing Director, Thentec Group  (http://www.thentec.com.au)

Thentec Group of Companies
Mezzanine Level, 185 Moggill Road,
Taringa Qld 4068, AUSTRALIA
Phone: +61 7 3371 6611     Fax: +61 7 3371 6633

Thentec - "Partnering with our clients to enhance the way they do business"

2. can someone recommend some embedded realtime Database?(empty)

3. openroad-users FW: OpenROAD Problem

4. Performance NT vs: UNIX

5. openroad-users openingres and openroad patches for solaris 2.6

6. Unable to connect to SQL7 from Enterprise Manager

7. openroad-users OpenROAD 4.0 & Connection Profile

8. Strange DE/Datagrid Errors

9. German Ingres/OpenROAD user conference

10. OpenROAD Users listserv changes (archiving now enabled)

11. openroad-users LicenseIT (yet again)

12. openroad-users News on LicenceIT

13. Sending user events to OpenRoad from 3gl