SQL SERVER – 2005 – Restore Database Using Corrupt Datafiles (.mdf and .ldf) – Part 2

Blog reader Donald Crowther has posted following comment. I have not tested this solution and when I tried to test it, it did not work for me. However, I have received email from two of my Jr. DBA who have done experiment about this and they are suggesting it works.

If you have tried everything and you have given up to find solution. Try following suggestion. Make sure you have taken backup of your physical file and also this exercise you do at your own risk.
ALTER DATABASE test
SET emergency
GO
ALTER DATABASE test
SET single_user
GO
DBCC checkdb (test, repair_allow_data_loss)
ALTER DATABASE test
SET multi_user
GO

Reference : Pinal Dave (https://blog.sqlauthority.com)

SQL Backup and Restore, SQL Data Storage, SQL Function, SQL Scripts
Previous Post
SQL SERVER – 2005 – Connection Strings For .NET
Next Post
SQL SERVER – 2005 – Find Database Collation Using T-SQL and SSMS – Part 2

Related Posts

Leave a Reply