Solved

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

Posted on 2014-12-08
4
237 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:Scott Pletcher
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 47

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

777 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