Log shipping .trn file corrupt

  • We have log shipping setup several months before i joined. If .trn log file gets corrupted, could you please let me know the fix/solution for this.

  • coolchaitu (8/7/2015)


    We have log shipping setup several months before i joined. If .trn log file gets corrupted, could you please let me know the fix/solution for this.

    Use a differential or full backup to span the time of the corrupt backup file. Just ensure that you restore using the NORECOVERY option, or you'll have to start all over again, from the full backup.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Wayne Sir,

    Thanks lot for reply.Actually,I did not understand. As i am junior level dba, could you please explain in simpler way.

  • coolchaitu (8/8/2015)


    Wayne Sir,

    Thanks lot for reply.Actually,I did not understand. As i am junior level dba, could you please explain in simpler way.

    Here is a step by step article to restore a differential and a full and how to use the norecovery option.

    https://msdn.microsoft.com/en-us/library/ms175510.aspx

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • coolchaitu (8/8/2015)


    Wayne Sir,

    Thanks lot for reply.Actually,I did not understand. As i am junior level dba, could you please explain in simpler way.

    In that case, I suggest getting the book in by signature below and reading the chapters on backup and recovery. Learning how backups work in conjunction with log shipping is way too much for a forum post.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Jason Sir,

    So, in log shipping, suppose the .trn file got corrupted today at 7 AM, do i need to take full backup immediately and restore it on secondary with norecovery? Please let me know.

  • A full or differential taken after the point that the log chain was broken.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Madam,

    So,take a full/diff backup after the log chain got broken and ten restore it with norecovery on secondary? Do we need to re-configure log shipping again?

  • coolchaitu (8/8/2015)


    Madam,

    So,take a full/diff backup after the log chain got broken and ten restore it with norecovery on secondary? Do we need to re-configure log shipping again?

    Yes either a full or a differential. And yes you would need to restore with norecovery. And yes to reconfigure log shipping.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Shouldn't need to reconfigure log shipping. The settings are in MSDB, the jobs will still be there

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (8/8/2015)


    Shouldn't need to reconfigure log shipping. The settings are in MSDB, the jobs will still be there

    True. They would need to disable the restore job prior to running the restore with norecovery.

    My concern is the confessed "junior" level and lack of familiarity with doing a restore using a diff and norecovery.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

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

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