SQL Anywhere data replication info - has a row's data been replicated

Hi,

Is there any way of finding out if the data contained in a row of data
in a table on a remote database has been replicated to the
consolidated database. I'm trying to come up with some way of letting
a user edit data which has NOT been replicated \ consolidated yet, and
preventing editing data which has already been sent back to the
consolidated. Is this information available anywhere in the system
tables for instance.

Thanks in advance,

Regds.,

Ois�n � Murch�

oisino@iol.ie
--------------------
0
oisino
11/7/1997 9:22:45 AM
sybase.sqlanywhere.general 32637 articles. 22 followers. Follow

3 Replies
657 Views

Similar Articles

[PageSpeed] 19

>Is there any way of finding out if the data contained in a row of data
>in a table on a remote database has been replicated to the
>consolidated database. I'm trying to come up with some way of letting
>a user edit data which has NOT been replicated \ consolidated yet, and
>preventing editing data which has already been sent back to the
>consolidated. Is this information available anywhere in the system
>tables for instance.

If the data meets the critieria for replication, you have to assume
that it has been replicated.  It's only a matter of whether someone
has yet run DBREMOTE.  

If you want to know whether it meets the criteria, you can apply the
same rule that is stated in the publication for the table. 

Hope this helps,



Leo Tohill - Team Powersoft
-- Please post in newsgroup - I don't respond to email requests <
0
leotohill
11/8/1997 3:15:33 AM
Hi,

In case when your remote database has just one remote user - consolidated
database user ,
You can setup the "was sent /was not sent" check as follows:

1. Add to the table(s) which needs to be checked the  field with the type
timestamp with the default value timestamp like

REP_TIME TIMESTAMP DEFAULT TIMESTAMP

2. Use  time_sent field from sys.sysremoteusers table to return Y/N (was
send /was not send yet)
as follows:
COALESCE(if REP_TIME<(select time_sent from sys.sysremoteusers) then 'Y'
else 'N' endif,'N')  ;

In other words , if record was created before the last DBREMOTE processing
and match the publication criteria , we can GUESS that it was sent.

To maintain this checking You should be carefull with the system time/date
on the remote computer .

As the side effect it will increase the data volume being send to/from the
server.

Regards ,

Vladimir Godin

Epam Systems Ltd

Vladimir_Godin@epam.com

oisino@iol.ie wrote in article <3462ddd1.1010712@forums.powersoft.com>...
> Hi,
> 
> Is there any way of finding out if the data contained in a row of data
> in a table on a remote database has been replicated to the
> consolidated database. I'm trying to come up with some way of letting
> a user edit data which has NOT been replicated \ consolidated yet, and
> preventing editing data which has already been sent back to the
> consolidated. Is this information available anywhere in the system
> tables for instance.
> 
> Thanks in advance,
> 
> Regds.,
> 
> Ois�n � Murch�
> 
> oisino@iol.ie
> --------------------
> 
0
Vladimir
11/21/1997 9:17:35 AM
Vladimir's suggestion is a good one.  Be aware that it is not absolutely
certain, however.  A record which was inserted just prior to the start of
DBREMOTE, but which was not committed, will give a false positive.  There
are other timing-critical situations to consider, especially if you use
"DBREMOTE -u".  So be careful.

-- Chris


Vladimir Godin <Vladimir_Godin@epam.com> wrote in article
<01bcf667$3332c180$6e7ae2c2@epmw10>...
> Hi,
> 
> In case when your remote database has just one remote user - consolidated
> database user ,
> You can setup the "was sent /was not sent" check as follows:
> 
> 1. Add to the table(s) which needs to be checked the  field with the type
> timestamp with the default value timestamp like
> 
> REP_TIME TIMESTAMP DEFAULT TIMESTAMP
> 
> 2. Use  time_sent field from sys.sysremoteusers table to return Y/N (was
> send /was not send yet)
> as follows:
> COALESCE(if REP_TIME<(select time_sent from sys.sysremoteusers) then 'Y'
> else 'N' endif,'N')  ;
> 
> In other words , if record was created before the last DBREMOTE
processing
> and match the publication criteria , we can GUESS that it was sent.
> 
> To maintain this checking You should be carefull with the system
time/date
> on the remote computer .
> 
> As the side effect it will increase the data volume being send to/from
the
> server.
> 
> Regards ,
> 
> Vladimir Godin
> 
> Epam Systems Ltd
> 
> Vladimir_Godin@epam.com
> 
> oisino@iol.ie wrote in article <3462ddd1.1010712@forums.powersoft.com>...
> > Hi,
> > 
> > Is there any way of finding out if the data contained in a row of data
> > in a table on a remote database has been replicated to the
> > consolidated database. I'm trying to come up with some way of letting
> > a user edit data which has NOT been replicated \ consolidated yet, and
> > preventing editing data which has already been sent back to the
> > consolidated. Is this information available anywhere in the system
> > tables for instance.
> > 
> > Thanks in advance,
> > 
> > Regds.,
> > 
> > Ois�n � Murch�
> > 
> > oisino@iol.ie
> > --------------------
> > 
> 
0
Chris
11/21/1997 8:44:51 PM
Reply: