473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to query for records that have not been replicated

Hi,

I am using Merge Replication for synchronizing a bunch of laptops
running MSDE with a central SQL Server 2000 production server.

This database is used by an application that needs to know which
records have not yet been replicated, at any givem time.

Here's a simple scenario:

User A in laptop X starts his copy of the application. He syncs his
MSDE database through the application, to match the current central
servers' data. He then proceeds to add new records through the
application and, after he is done, he synchronizes his database with
the central server, through the application.

At any given time, the user might kill the application. He might add
some records today, a few more tomorrow or in a week and should be able
to change and delete records that have not yet been merged into the
production server.

The problem is that SQL Server does not have an easy way to tell which
records in the subscription tables have been inserted but not yet
replicated. I have been using the following query:

SELECT rowguid
FROM [MyTable]
INNER JOIN (
SELECT rowguid AS rep_id
FROM msmerge_contents
WHERE generation = joinchangegen AND generation = (
SELECT MAX(generation)
FROM msmerge_genhistory )
) dtable
ON rowguid_rep = dtable.rep_id

This query works for most cases but fails to identify the first record
created immediatly after a synchronization event.

What I would like to know is if there is a correct way of identifying
records which are "not-yet-replicated" on a given table that is part of
a merge replication process like the one described above.
Thanks in advance.

Jul 23 '05 #1
1 1853

<mi*********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Hi,

I am using Merge Replication for synchronizing a bunch of laptops
running MSDE with a central SQL Server 2000 production server.
<snip>
What I would like to know is if there is a correct way of identifying
records which are "not-yet-replicated" on a given table that is part of
a merge replication process like the one described above.
Thanks in advance.


I have no idea myself, but you might get a better response in
microsoft.public.sqlserver.replication.

Simon
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dave C. | last post by:
Hi there, We have some code that empties a table. Originally, the code used "delete from", but I am told that this method was either too slow, or held a lock for too long (this was a long time...
8
by: mgm | last post by:
hello, I have a query that is supposed to return only 1 record, however I recently found that because of an error in the database it can return more than 1. So what I need to do is capture if it...
3
by: Steve | last post by:
Form FrmRestock's recordsource is QryFrmRestock. The TransactionDate field's criteria is set ats: Forms!FrmRestock!LastXDays. LastXDays on the form is a combobox where the selections are 30, 60...
3
by: Tom Mitchell | last post by:
All: I'm stumped on a query. How do I find duplicates in a table where one of the duplicates has values is a certain field and the other doesn't. For example, I have the following table: ...
5
by: Daniel Tan | last post by:
Are there anyway to copy rows of records from one query to another query and then hide the records in source query ? Pls advise. Thanks. Regards, Daniel
6
by: Martin Lacoste | last post by:
Ok, before I headbutt the computer... don't know why when I add criteria in a query, I get an 'invalid procedure call'. I also don't know why after searching the help in access, the various access...
6
by: Sven Pran | last post by:
Probably the answer is there just in front of me only awaiting me to discover it, but: 1: I want to build a query that returns all records in one table for which there is no successful "join"...
2
by: joan.edington | last post by:
Hi, I've not done a lot of MS Access work and have been tasked with creating a database to record and report on stages of complaints cases. Each set of records for a case has a header, any...
3
by: Query Builder | last post by:
Hi All, I have a table with a column DeletedDate which stores a logical delete of a record. I need to set up transactional replication for reporting purposes that this deleted records should...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.