Transaction Log Restore Fails

  • I'm trying to restore a 2005 db from to a 2008 R2 instance but I'm hitting a snag.  The .bak restores from the network share with no problems but I can't restore the first log.  When I run 
    RESTORE
    LOG [MyDB]
    FROM DISK = N'\\xx.xx.x.xxx\mssql\backup\MYSERVER\MyDB\log\backup_201803160530.trn'
    WITH FILE = 1, NORECOVERY, NOUNLOAD, STATS = 10
    GO

    when it reaches 70% I get this message
     

    Msg 3241, Level 16, State 40, Line 1
    The media family on device '\\xx.xx.x.xxx\mssql\backup\MYSERVER\MyDB\log\backup_201803160530.trn' is incorrectly formed. SQL Server cannot process this media family.
    Msg 3013, Level 16, State 1, Line 1
    RESTORE LOG is terminating abnormally.

    I've run RESTORE VERIFYONLY and I get the same error and running RESTORE HEADERONLY suggests everything is ok although I'm not sure what the results mean.

    Most of what I've seen suggests the error usually happens when attempting to restore downwards.  It also appears that it's something mainly happens when restoring a .bak file.  I've also not seen anything that suggests the file either restores or it doesn't; it doesn't get so far then fail, it just fails.  

    I'm also pretty sure this has been done before, albeit by somebody else who's currently not around to ask.


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • Neil Burton - Friday, March 16, 2018 7:41 AM

    I'm trying to restore a 2005 db from to a 2008 R2 instance but I'm hitting a snag.  The .bak restores from the network share with no problems but I can't restore the first log.  When I run 
    RESTORE
    LOG [MyDB]
    FROM DISK = N'\\xx.xx.x.xxx\mssql\backup\MYSERVER\MyDB\log\backup_201803160530.trn'
    WITH FILE = 1, NORECOVERY, NOUNLOAD, STATS = 10
    GO

    when it reaches 70% I get this message
     

    Msg 3241, Level 16, State 40, Line 1
    The media family on device '\\xx.xx.x.xxx\mssql\backup\MYSERVER\MyDB\log\backup_201803160530.trn' is incorrectly formed. SQL Server cannot process this media family.
    Msg 3013, Level 16, State 1, Line 1
    RESTORE LOG is terminating abnormally.

    I've run RESTORE VERIFYONLY and I get the same error and running RESTORE HEADERONLY suggests everything is ok although I'm not sure what the results mean.

    Most of what I've seen suggests the error usually happens when attempting to restore downwards.  It also appears that it's something mainly happens when restoring a .bak file.  I've also not seen anything that suggests the file either restores or it doesn't; it doesn't get so far then fail, it just fails.  

    I'm also pretty sure this has been done before, albeit by somebody else who's currently not around to ask.

    Any third party backup software involved? You can check the SoftwareVendorID when doing a restore headeronly. SQL Server is 4608.

    Sue

  • Sue_H - Friday, March 16, 2018 8:23 AM

    Neil Burton - Friday, March 16, 2018 7:41 AM

    I'm trying to restore a 2005 db from to a 2008 R2 instance but I'm hitting a snag.  The .bak restores from the network share with no problems but I can't restore the first log.  When I run 
    RESTORE
    LOG [MyDB]
    FROM DISK = N'\\xx.xx.x.xxx\mssql\backup\MYSERVER\MyDB\log\backup_201803160530.trn'
    WITH FILE = 1, NORECOVERY, NOUNLOAD, STATS = 10
    GO

    when it reaches 70% I get this message
     

    Msg 3241, Level 16, State 40, Line 1
    The media family on device '\\xx.xx.x.xxx\mssql\backup\MYSERVER\MyDB\log\backup_201803160530.trn' is incorrectly formed. SQL Server cannot process this media family.
    Msg 3013, Level 16, State 1, Line 1
    RESTORE LOG is terminating abnormally.

    I've run RESTORE VERIFYONLY and I get the same error and running RESTORE HEADERONLY suggests everything is ok although I'm not sure what the results mean.

    Most of what I've seen suggests the error usually happens when attempting to restore downwards.  It also appears that it's something mainly happens when restoring a .bak file.  I've also not seen anything that suggests the file either restores or it doesn't; it doesn't get so far then fail, it just fails.  

    I'm also pretty sure this has been done before, albeit by somebody else who's currently not around to ask.

    Any third party backup software involved? You can check the SoftwareVendorID when doing a restore headeronly. SQL Server is 4608.

    Sue

    No third parties involved.  It's all being done by scripts.


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • Neil Burton - Friday, March 16, 2018 8:27 AM

    Sue_H - Friday, March 16, 2018 8:23 AM

    Any third party backup software involved? You can check the SoftwareVendorID when doing a restore headeronly. SQL Server is 4608.

    Sue

    No third parties involved.  It's all being done by scripts.

    If that's a recent backup and you still have access to the server, I'd check suspect_pages in msdb on the original server.
    You could turn on the trace flags for verbose logging of the restore - it should indicate in some way where the error is happening. Prior to trying to restore the log, execute:
    DBCC TRACEON(3004, 3605, -1)

    Sue

  • This was removed by the editor as SPAM

  • I've just tried the process using today's backups and it's worked swimmingly.  I'm therefore no closer to establishing what was going on but I've got to the state in which I needed to be.  Very annoying :crazy:


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

Viewing 6 posts - 1 through 5 (of 5 total)

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