We've created huge database in Microsoft SQL Server 2008 R2

July 7, 2018 258 views
Applications

Almost all the week we work in it. But when some hours ago we've tried to open it, SQL demonstrated - Database consistency errors reported by DBCC CHECKB. We tried for recovery mdf via SQL Server Management Studio, but it couldn't handle. Now we have to fix all the troubles and to start work with database again.

1 Answer

Stop the SQL Server and rename back the .mdf file to the old one. Start the SQL Server and try to run the following:

https://msdn.microsoft.com/en-us/library/ms189275(v=sql.120).aspx
https://download.cnet.com/Recuva/3000-2242_4-10753287.html
https://download.cnet.com/Recovery-Toolbox-for-SQL-Server/3000-10254_4-10825629.html

USE master
GO

ALTER DATABASE Dbusers
SET MULTI
USER
GO

ALTER DATABASE Dbusers
SET PAGE
VERIFY CHECKSUM

Have another answer? Share your knowledge.