Groups | Blog | Home
all groups > sql server replication > april 2006 >

sql server replication : Creating Replication (Transaction Rep)


sqldba
4/12/2006 2:02:37 PM
I need your help & suggestion to correct my approach/Option.
couple of days back i ran in to Replication Error. So i dropped & re-created
my Subscription with no-sync. after running Application Reports, reports
were not accurate. so keep customer happy i decided this 2 options. i need
your help, whether i should do this or take another option to resolve the
issue. when i did re-snapshot i ran into " Violation of primary key" Error.
so i dropped & recreated my Subscription with no-sync and it is working fine
from last 24 hours with no errors. so what i am trying to achieve is to fix
this discrepancy problem that i see in my App reports. as i know this
problem is due to pending Transaction that didn't relicated to Subscriber.
OPTION 1:-
1> Stop Agents
2> Drop the scription
3> Drop the Subcriber Database
4> Re-Create the Subscription with new Database
5> Start the Agents
6> Stop & start the SQL AGENTS SERVICE

OPTION 2:-
1> Stop the Agents
2> Backup the Database from Server A & restore to
Subcriber Server.
3> Start the Agents (Log Reader & Distribution)

please advise me the which options is good or my option are totaly wrong &
let me know the best practice & approach.

Hilary Cotter
4/12/2006 3:30:54 PM
Option 3, right click on your agent and select agent profiles. Select the
continue on data consistency errors and restart your agent. Now it will
skip these errors, but there is a good chance your publisher and subscriber
will be out of sync by an undetermined amount of rows. Run a validation to
determine how big the problem is and try to fix it manually if its small.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

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



[quoted text, click to view]

Paul Ibison
4/12/2006 8:36:14 PM
Here is the procedure for sql server 2000:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;320499
And here is the one for sql server 2005:
http://msdn2.microsoft.com/en-US/library/ms147834(SQL.90).aspx
Notice that in 2205 it is not necessary to prevent changes to the production
database.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

sqldba
4/13/2006 6:41:28 PM
Thank you very much for your reply & the link that you gave, it is very
helpful. I am little confuse with (SP)Store Procedure
sp_scriptpublicationcustomprocs.
Can you please give me some more info about why we need this SP & what the
reason & how this can be run on Subscriber. i understand this sound stupid
but your help is appreciable & response to this will be appreciated.
sqldba
4/13/2006 6:43:25 PM
Paul Ibison
4/14/2006 12:00:00 AM
Normally during synchronization these stored procs are created on the
subscriber, but as a nosync initialization bypasses that process, they need
to be created manually. These procedures are needed because an
insert/update/delete on the publisher is transformed into a stored procedure
call by default.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

AddThis Social Bookmark Button