Locking problem while initializing the replication

  • Hello,

    I have a question for the replication experts here:

    This morning replication has stopped because of a reboot of the Subscription server.

    * I did remove the publication and subscriptions.

    * I made a new publication

    * I made a new subscription, and let it initialize directly.

    * All seems fine, replication started, and all data was transferred correctly.

    After a while, we did have some production problems, some SQL-Server time-outs from client applications exactly in the period that the replication was initializing / copying data from our production (the publication server). It seems that there where some locking problems.

    Can someone please inform me, how I can make sure that when I start replication, we will not have locking issues? Is this possible? Or will I always have locks on the publication server while bulk copying data / initializing the replication?

    I thank you for your reply!

    Grt. Mischa

  • Why did you rebuild the publication and subscriptions after a simple subscriber reboot? The transactions would of just built up on the publication DB and then synched up once the subscriber came back online. regardless to answer your question...

    Syncing up the subscriber database uses Snapshots which will create locking on the publication DB as you noticed. The best thing to do is not set to Immediate initialization and either do it manually during off hours or simply set a schedule to do it during non-peak hours.

  • You can initialize from backup. That is the best way to do replication for bigger databases because it eliminates all bcp generation hence locking/ blocking.

  • Thanks for your replies.

    I've seen that the locking issue while starting a replication is normal, so we have to do this outside production hours.

    Thanks again for your help!

    Greetings,

    Mischa

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply