Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Failed Transaction Log Restore Expand / Collapse
Author
Message
Posted Wednesday, November 14, 2012 2:55 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, January 23, 2013 7:03 AM
Points: 158, 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
Post #1384493
Posted Wednesday, November 14, 2012 3:02 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:08 AM
Points: 5,952, Visits: 12,830
can you post details of the exact error you receive?

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

"Ya can't make an omelette without breaking just a few eggs"
Post #1384498
Posted Wednesday, November 14, 2012 3:18 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, January 23, 2013 7:03 AM
Points: 158, 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.
Post #1384502
Posted Wednesday, November 14, 2012 3:21 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, August 28, 2013 2:37 AM
Points: 5,075, Visits: 4,834
What does the SQL error log say?



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
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

Post #1384505
Posted Wednesday, November 14, 2012 3:58 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, January 23, 2013 7:03 AM
Points: 158, 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.
Post #1384524
Posted Wednesday, November 14, 2012 5:16 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, August 28, 2013 2:37 AM
Points: 5,075, Visits: 4,834
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
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

Post #1384552
Posted Wednesday, November 14, 2012 5:47 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, January 23, 2013 7:03 AM
Points: 158, 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?

Post #1384571
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse