Solved

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

Posted on 2014-12-08
4
239 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 48

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
OSQL to execute sql command 26 26
Shrink multiple databases at once 4 30
How can I get the entire database script? 7 15
Getting invalid Syntax SQL. 3 21
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

820 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