Solved

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

Posted on 2014-12-08
4
244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 50

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

734 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