Consultor Eletrônico



Kbase P81469: How to check if the Fathom replication is running via 4GL?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Unverified

GOAL:

How to check if the Fathom replication is running via 4GL?

FACT(s) (Environment):

UNIX
Windows
Progress 9.1D
Fathom High Availability Replication 2.0A

FIX:

This 4GL code will display the database has replication activated and in case
it is the source or target:


/* Go around the Zero Date issue */
DEFINE VARIABLE zd AS LOGICAL.
FIND FIRST _Repl-AgentControl WHERE _ReplAgtCtl-ConnectTime =
'Thu Jan 1 01:00:00 1970' NO-LOCK NO-ERROR.
IF AVAILABLE _Repl-AgentControl THEN ASSIGN zd = TRUE.

FIND FIRST _Repl-Server NO-LOCK NO-ERROR.
FIND FIRST _Repl-Agent NO-LOCK NO-ERROR.

/* Display status if source replication is enabled */
IF AVAILABLE _Repl-Server AND NOT AVAILABLE _Repl-Agent AND NOT zd THEN DO:
MESSAGE "Server Replication Enabled since " + _ReplSrv-StartTime + ".".
IF _ReplSrv-AgentCount > 0 THEN DO:
MESSAGE SKIP "There are " + STRING(_ReplSrv-AgentCount) +
" agent(s) connected:".
FOR EACH _Repl-AgentControl NO-LOCK:
MESSAGE "Agent " + STRING(_ReplAgtCtl-AgentID) +
" has been connected since " + _ReplAgtCtl-ConnectTime + ".".
END.
END.
END.

/* Display status if target replication is enabled */
IF NOT AVAILABLE _Repl-Server AND AVAILABLE _Repl-Agent AND NOT zd THEN
MESSAGE "Target Replication Enabled since " + _ReplAgt-ConnectTime + ".".

/* Display status if replication is disabled */
IF NOT AVAILABLE _Repl-Server AND NOT AVAILABLE _Repl-Agent OR zd THEN
MESSAGE "Replication Disabled!".