SQL database only with LDF file

25 pts.
Tags:
LDF
MDF
SQL
SQL Database
Is it possible to restore a SQL database with the latest ldf file because the MDF file is corrupted? I was hoping that data is still there. I actually have a backup of the MDF file of last month. But the MDF file this month is damaged, and the ldf file still normal. Can I use the. MDF file backup and the current ldf file to save the database? Is there any way to solve this problem? Please advise if this is possible and how to restore it. Thank you.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

There might
be other options out there. This is something that worked for me once but there
are no guarantees that it will work at all times.

Stop SQL Server instance -> Copy MDF and LDF files to another location -> Delete original MDF and LDF files -> Start SQL Server instance again -> Create new database with exact same name and file names -> Stop SQL Server -> overwrite newly
created MDF and LDF.

 

After this
your database should be back online. If it is then go ahead and put it into EMERGANCY mode and SINGLE USER mode.

Finally go
ahead and execute DBCC CHECKDB like
this

 

DBCC CHECKDB (databaseName, REPAIR_ALLOW_DATA_LOSS)
WITH NO_INFOMSGS

 

If you can get to this and execute last command
successfully you should be good. If not then your only options are restoring
from backup and/or using ms sql mdf repair tool for repair your .mdf file. I
can advise one it’s MDF Repair Kit. It very helped me once.  
http://www.mdf.repair/

 

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Subhendu Sen
    See here for more discussions, https://itknowledgeexchange.techtarget.com/itanswers/sql-database-is-crashed/
    141,290 pointsBadges:
    report
  • ArturKis
    ok, I'll try.
    25 pointsBadges:
    report
  • ArturKis
    thanks, guys for tips!
    25 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: