Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

SQL 2008 R2 - MASTER.LDF corrupted without backup


Best Answer gauthieradnet , 27 April 2015 - 05:27 AM

Try this one solution... 1. First Shutdown SQL Server 2. Then move the current database file/rename (do not touch the .ldf) 3. After rename/move db, restart SQL Server 4. Create... Go to the full post »


  • Please log in to reply

#1
basheermahdavi

basheermahdavi

    New Member

  • Member
  • Pip
  • 1 posts
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

Advertisements


#2
Spike

Spike

    nOoB

  • Member
  • PipPipPipPip
  • 1,357 posts

Hey there basheer and welcome to GeeksToGo... I have experienced this problem before and used the code you see below:

USE [master]
GO
CREATE DATABASE [NewDatabaseName] ON 
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\OldDatabaseName.mdf' )
FOR ATTACH
GO

This will create a new transaction file and allow access to your database again. As you can see I have just used general place holders (NewDatabaseName and OldDatabaseName) you will have to replace these with the relevant names.

 

Please let me know how thing go and if there anything else you might require.

 

Peace Out :cool:

 

Source: http://www.mssqltips...ction-log-file/

 


  • 0

#3
gauthieradnet

gauthieradnet

    New Member

  • Member
  • Pip
  • 1 posts
✓  Best Answer

Try this one solution...

 

1. First Shutdown SQL Server

 

2. Then move the current database file/rename (do not touch the .ldf)

 

3. After rename/move db, restart SQL Server

 

4. Create a new database with same name and log file and location also same

 

5. Stop SQL Server

 

Make use of some interesting links which might help you....

 

http://www.filerepai...08-is-corrupted- a lot of guides and tips for corrupted sql server databases

https://repairsql.recoverytoolbox.com/Recovery Toolbox for SQL Server - free demo version of this tool, if any variant doesn’t seem effective


  • 1






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP