Tuesday, February 14, 2012

Date/time when put on distributor

We are using merge replication w/ one distributor and 3 subscribers. We
have one table where I would like the date/time that it is put on the
distributor to be recorded. Meaning it might be put on the subscriber at
11:00am, but (due to replication or internet issues), it might not get
replicated onto the distributor until 1pm. I want the 1pm to be added to
that particular row in that table.
Is that possible?
Darin
*** Sent via Developersdex http://www.codecomments.com ***
You should perhaps use the businesslogic resolver for this. The problem is
that if you make an update on the row when it arrives, merge replication
will think - hey, there has been a change to that row, I need to replicate
it again.
You might want to use an audit table for this.
http://www.zetainteractive.com - Shift Happens!
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
"Darin" <darin_nospam@.nospamever> wrote in message
news:%23ht9CAeWIHA.4868@.TK2MSFTNGP03.phx.gbl...
> We are using merge replication w/ one distributor and 3 subscribers. We
> have one table where I would like the date/time that it is put on the
> distributor to be recorded. Meaning it might be put on the subscriber at
> 11:00am, but (due to replication or internet issues), it might not get
> replicated onto the distributor until 1pm. I want the 1pm to be added to
> that particular row in that table.
> Is that possible?
> Darin
> *** Sent via Developersdex http://www.codecomments.com ***
|||This actually is an audit log that is recording changes to all tables
(except this one) and there are only inserts to the row, no updates. In
the table I have the date/time that the row was inserted on the server
(by having the column setup for DEFAULT(GETDATE())) but I just want
another column for a GETDATE() of when the record gets on the
distributor. This way I can see exactly how long it took to get over
there, for tracking purposes.
THanks.
Darin
*** Sent via Developersdex http://www.codecomments.com ***
|||By distributor I take it you mean the publisher. If so, can't you add a
dtstamp datetime default getdate() column to your audit table?
Won't this accomplish what you are looking for?
http://www.zetainteractive.com - Shift Happens!
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
"Darin" <darin_nospam@.nospamever> wrote in message
news:ecUfM$eWIHA.5164@.TK2MSFTNGP03.phx.gbl...
> This actually is an audit log that is recording changes to all tables
> (except this one) and there are only inserts to the row, no updates. In
> the table I have the date/time that the row was inserted on the server
> (by having the column setup for DEFAULT(GETDATE())) but I just want
> another column for a GETDATE() of when the record gets on the
> distributor. This way I can see exactly how long it took to get over
> there, for tracking purposes.
> THanks.
> Darin
> *** Sent via Developersdex http://www.codecomments.com ***
|||Yes, and we have that on the table now, so when ever a record gets added
to it it puts the current date/time stamp in that column. But when that
record is added on the subscriber, the date/time is the date/time on the
subscriber. I want to add an additional field which is the date/time the
record gets put on the distributor (yes publisher).
Darin
*** Sent via Developersdex http://www.codecomments.com ***

No comments:

Post a Comment