Monday, March 12, 2012

Row filtering

Hi to all
Having an issue with replication which I hope someone can help with.
Here is a summary of the processes involved.
VB application updates, deletes and inserts into a database (DB1) on our LAN
every minute.
DB1 is replicated to our website (lets call this Website1) on a
transactional basis.
We have recently built a new website (lets call this Website2) which runs on
a database structure (DB2) identical to Website1, however the data needed to
be held in Website2 is only a small subset of the data compared to Website1.
We decided to replicate to Website2, using row filtering. We created a new
publication from DB1, set up row filtering to only replicate data which was
less than a week old according to a field which determines the records age,
on a transactional basis. We created the snapshot and applied it to DB2 with
no issues however, shortly after this, an error is returned which indicates
the subscriber is trying to remove a record which does not exist in DB2 "row
not found at subscriber" The last command the agent is trying to run looks
like this
CALL sp_MSdel_Adverts ({64DFEE13-BFFA-4383-90DC-C1AF5A906F95})
This unique identifier does not exist as a record at the subscriber but does
exist as a record at the publisher.
There are no processes which are updating/removing records from DB2, it is
purely designed for reads only.
Any assistance would be greatly appreciated.
Regards
Andy Hayes
something looks a little odd here. First off is this a single column
table you are replicating? It looks like it. Secondly it looks like you
are using guids as pks - this is seldom a good idea.
Thirdly how did you synchronize your two databases? through a snapshot?
Is so, sql server guarantees synchronization. Can you run a validation
to determine is your databases are in sync.
Andy Hayes wrote:
> Hi to all
> Having an issue with replication which I hope someone can help with.
> Here is a summary of the processes involved.
> VB application updates, deletes and inserts into a database (DB1) on
our LAN
> every minute.
> DB1 is replicated to our website (lets call this Website1) on a
> transactional basis.
> We have recently built a new website (lets call this Website2) which
runs on
> a database structure (DB2) identical to Website1, however the data
needed to
> be held in Website2 is only a small subset of the data compared to
Website1.
> We decided to replicate to Website2, using row filtering. We created
a new
> publication from DB1, set up row filtering to only replicate data
which was
> less than a week old according to a field which determines the
records age,
> on a transactional basis. We created the snapshot and applied it to
DB2 with
> no issues however, shortly after this, an error is returned which
indicates
> the subscriber is trying to remove a record which does not exist in
DB2 "row
> not found at subscriber" The last command the agent is trying to run
looks
> like this
> CALL sp_MSdel_Adverts ({64DFEE13-BFFA-4383-90DC-C1AF5A906F95})
> This unique identifier does not exist as a record at the subscriber
but does
> exist as a record at the publisher.
> There are no processes which are updating/removing records from DB2,
it is
> purely designed for reads only.
> Any assistance would be greatly appreciated.
> Regards
> Andy Hayes
|||Hi Hilary
Thanks for your response.
The table is not single column it has multiple columns. You are correct that
the guid is a primary key.
The databases are syncronised via the snapshot. If I query the subscriber
based on the row filter query, I am returned the same number of records that
exist which meet that criteria at the publisher. The two are in sync as soon
as the snapshot has been applied.
Andy
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:1113990675.177808.271030@.o13g2000cwo.googlegr oups.com...
> something looks a little odd here. First off is this a single column
> table you are replicating? It looks like it. Secondly it looks like you
> are using guids as pks - this is seldom a good idea.
> Thirdly how did you synchronize your two databases? through a snapshot?
> Is so, sql server guarantees synchronization. Can you run a validation
> to determine is your databases are in sync.
>
> Andy Hayes wrote:
> our LAN
> runs on
> needed to
> Website1.
> a new
> which was
> records age,
> DB2 with
> indicates
> DB2 "row
> looks
> but does
> it is
>
|||Its unlikely that a replication process has caused this. There are
situations where if you are using the continue on data consistency profile
where you might get this lack of synchronization.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Andy Hayes" <andyh@.friday-ad.co.uk> wrote in message
news:%23jka$HZRFHA.996@.TK2MSFTNGP09.phx.gbl...
> Hi Hilary
> Thanks for your response.
> The table is not single column it has multiple columns. You are correct
> that the guid is a primary key.
> The databases are syncronised via the snapshot. If I query the subscriber
> based on the row filter query, I am returned the same number of records
> that exist which meet that criteria at the publisher. The two are in sync
> as soon as the snapshot has been applied.
> Andy
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:1113990675.177808.271030@.o13g2000cwo.googlegr oups.com...
>

No comments:

Post a Comment