SQL 2012 Log shipping. D.B. record change not applied to secondary

  • Hi all,

    I’m doing a bit of stand in work while our DBA is away and have a scenario I’m not quite sure about.

    We’re using log shipping to the secondary D.B. but a change (record addition to table on primary) is not being reproduced on the secondary.

    Since the change was made, logs have been produced successfully, copied and applied successfully but the additional record doesn’t appear in the secondary’s table.

    Everything seems to have worked with shipping and application of logs, so can anyone suggest what might not be happening / what else I can check?

    Thank you.

  • mattlawsonx - Tuesday, January 23, 2018 3:45 PM

    Hi all,I’m doing a bit of stand in work while our DBA is away and have a scenario I’m not quite sure about.We’re using log shipping to the secondary D.B. but a change (record addition to table on primary) is not being reproduced on the secondary.Since the change was made, logs have been produced successfully, copied and applied successfully but the additional record doesn’t appear in the secondary’s table.Everything seems to have worked with shipping and application of logs, so can anyone suggest what might not be happening / what else I can check?Thank you.

    If you have verified that there have not been any errors, that the log backups were all taken as scheduled and that these logs have all been successfully applied to the secondary then try querying the log_shipping_monitor_history_detail table in msdb.
    I would double check the query you are using that indicates a record is missing. And I would double check the last log applied by querying the log_shipping_monitor_secondary table in msdb and check the latency in that table as well.

    Sue

  • mattlawsonx - Tuesday, January 23, 2018 3:45 PM

    Hi all,I’m doing a bit of stand in work while our DBA is away and have a scenario I’m not quite sure about.We’re using log shipping to the secondary D.B. but a change (record addition to table on primary) is not being reproduced on the secondary.Since the change was made, logs have been produced successfully, copied and applied successfully but the additional record doesn’t appear in the secondary’s table.Everything seems to have worked with shipping and application of logs, so can anyone suggest what might not be happening / what else I can check?Thank you.

    Double check the LS jobs carefully and inspect each steps history to ensure they are successful
    Have you tried creating a new table verifying it is created on the secondary, then remove it

    CREATE TABLE [TEST_Table](
    ID INT NULL,
    Name CHAR(10) NULL,
    AGE INT NULL
    )

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • What you state is not possible if log shipping is working correctly. And I will go so far as to say it won't be a SQL Server bug either because Log Shipping has been around forever and is essentially bullet-proof in my experience.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

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

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