Solved

SQL 2008 R2 - MASTER.LDF corrupted without backup - Can I start SQL without MASTER LOG ?

Posted on 2014-12-08
4
234 Views
Last Modified: 2014-12-14
Hello,

I have a SQL server that has a corrupt MASTER.LDF file, which prevents SQL services from starting at all.

Is there any way to start SQL services with just MASTER.MDF?  So far I have tried renaming MASTER.LDF to MASTER.LDF.OLD and SQL reports that the file is missing and still does not start (although I do not get a corrupt message).

If I cannot start MASTER.MDF without the log file, is there a way to rebuild the log file?

Help is appreciated.  Thanks!
0
Comment
Question by:jkeegan123
  • 2
4 Comments
 
LVL 69

Expert Comment

by:ScottPletcher
ID: 40487403
Keep an original copy of the existing master.mdf before any attempts were made to restart.  Keep that as a base master to go back to as you try to recover.

Right now, what I can think to try is:
1) Recreate a brand new master db from scratch, as if the instance were just installed.  
2) Shut down SQL.
3) Copy the original master.mdf over the recreated .mdf (but naturally don't touch the log file).
4) See if SQL can start up with the old master and the new, fresh .ldf.
0
 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 40488390
Don't you have a backup of the master database?
0
 
LVL 5

Accepted Solution

by:
jkeegan123 earned 0 total points
ID: 40490212
@Vitor Montalvao:  Nope, my customer did not have a backup of ANY database.  
@ ScottPletcher:  I tried that, and the service still did not start.

What we ended up doing to resolve was:  

1.  File copy backup all databases.
2.  Using the SETUP DVD of SQL 2008 R2 Standard to rebuild all of the system databases (master, model, temp, etc...).  After this was done, the service started again, but all of the permissions were gone from MASTER.  
3.  Using the corrupted version of MASTER, I was able to mount the file without an LDF and look at the members in the file.  I exported these, re-created them in the new MASTER, and re-assigned the permissions down to the database levels by ....restarting the service.  

No more orphans!
0
 
LVL 5

Author Closing Comment

by:jkeegan123
ID: 40498703
No other solution resolved the issue.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how the fundamental information of how to create a table.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now