Replication not workiing

  • I was wondering if someone would be able to help me. Please note that my knowledge on replication is very limited, the replication was setup by someone other than myself who has now left the company.

    We have two servers Server A and Server B

    Server A has a number of publications and Server B subscribes.

    The publications were reporting errors in Server A, so I reinitialised the subscription in the Replication Monitor.

    The Replication Monitor then reported that the subscription was running fine. However the users have reported that they are not receiving new data on the subscriber.

    Not sure how I should troubleshoot next.

  • Are you sure the reinitialization is complete? It's not waiting for response from the server? Do we have Undistributed commands ??

    You can start by researching for these and getting back with your findings.

    If users are still seeing old data I doubt the reinitialization started at all.

  • Right click on the subscription and select "View synchronization status"

    Make sure that Log-Reader and Distribution Agent jobs are running.

  • MarvinTheAndriod (1/28/2014)


    The publications were reporting errors in Server A

    What errors were reported?

  • Suresh B. (1/29/2014)


    Right click on the subscription and select "View synchronization status"

    I clicked on the subscriptions and selected "View synchronization status"

    For most of the subscriptions it said:

    No replicated transactions are available.

    One Said:

    3 transaction(s) with 3 command(s) were delivered.

    However for one it said:

    The initial snapshot for publication is not yet available.

    Not sure how to Make sure that Log-Reader and Distribution Agent jobs are running. Are these SQL jobs ? I can't see any by that name.

    Also the undritbuted commands tab does not seem to exist in my replication montior GUI

  • Yes, these are SQL Agent jobs. Job name would be similar to the publication name.

    Log-Reader job runs on the Publisher. Distribution Agent jobs run on the Distributor (on Subscriber if pull subscription)

    There is one Log-Reader job per database. There would be a Distribution Agent job for each Subscriber.

    These jobs should be working fine for the replication to work.

  • Can't you confirm if updated data is flowing by updating a record on Server A and querying for the same record in Server B.

    If the value stands updated that clarifies the replication is working fine. If there aren't too many tables you can check 1 by 1 for all.

    This will clearly identify if any table was missed.

  • Ankit Mathur-481681 (1/29/2014)


    Can't you confirm if updated data is flowing by updating a record on Server A and querying for the same record in Server B.

    If the value stands updated that clarifies the replication is working fine. If there aren't too many tables you can check 1 by 1 for all.

    This will clearly identify if any table was missed.

    Not is not hence the problem.

  • The Publication that say "The initial snapshot for publication is not yet available." is the one that isn't working.

    Should I reintialise again. Is it worth starting the snapshot agent ?

  • MarvinTheAndriod (1/30/2014)


    The Publication that say "The initial snapshot for publication is not yet available." is the one that isn't working.

    Should I reintialise again. Is it worth starting the snapshot agent ?

    Yes! If the snapshot agent is not running then the snapshot will not be created. The subscription may be marked for reinitialisation, but nothing will happen until the snapshot agent runs. Do you have the snapshot agent set to run on a schedule - once per day for example?

    Regards

    Lempster

  • Lempster (1/30/2014)


    MarvinTheAndriod (1/30/2014)


    The Publication that say "The initial snapshot for publication is not yet available." is the one that isn't working.

    Should I reintialise again. Is it worth starting the snapshot agent ?

    Yes! If the snapshot agent is not running then the snapshot will not be created. The subscription may be marked for reinitialisation, but nothing will happen until the snapshot agent runs. Do you have the snapshot agent set to run on a schedule - once per day for example?

    Regards

    Lempster

    I don't beleive so, as the Replication monitor says the Snapshot agent last start time was over a year ago, and according to the view syrchonsation status it is not running now, but my knowledge of replication is very limited. Would there be a job for it if it was scedhuled once a day ?

  • Yes, there would be a SQL Agent job for it. You only need to generate a new snapshot if you need to reinitialise a subscription, e.g. because a new article has been added to a publication, or because of a replication error - they can be difficult to troubleshoot and so sometimes the 'sledgehammer' approach is to generate a new snapshot (via reinitialising a subscription). Of course, if your publication is huge, it's going to take a long time to generate the snapshot and push it to the distributor and the subscriber so you may want to be a little more surgical in that case.

    There's no harm in scheduling a snapshot agent to run every day because it won't do anything other start up and shut down if it determines that no subscriptions need to be reinitialised.

    It might be worth your while grabbing a book on SQL Server replication or at least look it up in BOL or find resources on the web.

    Regards

    Lempster

    EDIT: spelling mistakes

Viewing 12 posts - 1 through 11 (of 11 total)

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