SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Failed Transaction Log Restore


Failed Transaction Log Restore

Author
Message
raotor
raotor
SSC Veteran
SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)

Group: General Forum Members
Points: 286 Visits: 239
Hello,

Being new to SQL and trying to teach myself via the excellent tutorials on SQL Central, I created a test database using the full recovery model and created a single table which I populated on an ongoing basis. The aim of this was to practice the concept of backups and ultimately restores so that I could get to grips with the idea of taking a full DB backup followed by multiple log backups.

I had my test DB running for a few days and started the chain with a full DB backup. At random times during the day as the table within the test DB grew I would take log backups.

A couple of days of log backups (7 in total) and I figured I was ready to practice restoring. I deliberately "broke" the DB by renaming the mdf file after stopping the server. After restart I first did a "tail log" backup using the NORECOVERY and NO_TRUNCATE options.

So far, so good.

I next restored using the full database backup I had first taken to begin the restore chain.

No problem. All the time I am using the NORECOVERY option on the T-SQL RESTORE commands being used.

However, once I try to restore the 4th log backup in the chain an error is reported. The restore apparently completes, but an error message telling me that the DB was not able to initialize was issued. Checking the error log for more details as suggested did not yield any more information.

After scratching my head for a while and thinking back over what I'd done over the period covered by the log chain, I remembered that between log backup 3 and 4 (the one where the restore failed) I had created 3 filegroups with associated .ndf data files for the DB. Subsequent attempted restores of log backups beyond the failed one seem to spit out errors which also mention the new filegroup logical filenames, so I'm wondering if the transaction log chain cannot recreate new filegroups as part of the transaction roll forward.

Can anyone please help or clarify what's going on?

Regards

Steve
Perry Whittle
Perry Whittle
SSC-Insane
SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)

Group: General Forum Members
Points: 20628 Visits: 17244
can you post details of the exact error you receive?

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

"Ya can't make an omelette without breaking just a few eggs" ;-)
raotor
raotor
SSC Veteran
SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)

Group: General Forum Members
Points: 286 Visits: 239
Perry Whittle (11/14/2012)
can you post details of the exact error you receive?
Sure,

here's the entire output from the restore of the 4th log backup:
10 percent processed.
20 percent processed.
30 percent processed.
40 percent processed.
50 percent processed.
60 percent processed.
70 percent processed.
80 percent processed.
90 percent processed.
100 percent processed.
Processed 0 pages for database 'FullDB', file 'FullDB' on file 4.
Processed 0 pages for database 'FullDB', file 'FG1_1' on file 4.
Processed 0 pages for database 'FullDB', file 'FG2_1' on file 4.
Processed 0 pages for database 'FullDB', file 'FG3_1' on file 4.
Processed 45824 pages for database 'FullDB', file 'FullDB_log' on file 4.
Msg 3283, Level 16, State 2, Line 1
The file "FullDB" failed to initialize correctly. Examine the error logs for more details.
Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.

anthony.green
anthony.green
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10318 Visits: 6378
What does the SQL error log say?



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
When a question, really isn't a question - Jeff Smith
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


raotor
raotor
SSC Veteran
SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)

Group: General Forum Members
Points: 286 Visits: 239
anthony.green (11/14/2012)
What does the SQL error log say?


SQL Server Log:
Date      14/11/2012 10:15:28
Log SQL Server (Current - 14/11/2012 10:15:00)

Source spid57

Message
The file "FullDB" failed to initialize correctly. Examine the error logs for more details.

anthony.green
anthony.green
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10318 Visits: 6378
Nothing more? Nothing above or below that line?



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
When a question, really isn't a question - Jeff Smith
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


raotor
raotor
SSC Veteran
SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)

Group: General Forum Members
Points: 286 Visits: 239
anthony.green (11/14/2012)
Nothing more? Nothing above or below that line?
As far as I can tell, no.

There are multiple errors appearing within the SQL Server section of the error log viewer. When I double-click on the one in question, then all I get for the details is what you've seen.

If I restore up to and including the last log backup that works (file 3) then I can see that the DB has one of the three filegroups I had started setting up.

I know that i removed and recreated filegroups and threi files a few times and backed up the log at least once during those sessions, so I wonder if there is a problem in that regard?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search