All my week of work in database

Posted June 29, 2018 1.4k views

I’ve been working with database on SQL Server 2016 during all this week. But I couple of hours ago when I opened .mdf file SQL Server viewed: “Database consistency errors reported by DBCC CHECKB”. I tried to find any microsoft sql server database repair tool, but all what I found didn’t work out. Now, I’ve lack of ideas what to do.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers


Try going through these steps:

it’d be much easier if you had a backup even server snapshot backup.

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.
Another way might ms sql database repair tool or manuals in the following
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
If you can get to this and execute last command successfully you should be good.