My boss demands to solve this issue

Associate
Joined
29 Jan 2018
Posts
1
All of my databases on MS SQL Server 2012 work great. One of them has viewed message only today - Database consistency errors reported by DBCC CHECKB. I've no idea what to apply and how to work next.
 
can you run another DBCC CHECKDB against the database

if errors come up, get a backup of database done as the repair may loss some data.

First set database into single user mode,

ALTER DATABASE DigitalSENTRY SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO

now lets repair it

DBCC CheckDB ('<dbname>', REPAIR_ALLOW_DATA_LOSS)
GO

put database back to multe user mode

ALTER DATABASE <databasename> SET MULTI_USER

do another DBCC CheckDB

worth taking another backup

may be worth also doing DBCC Check against a specific table

DBCC CHECKTABLE('<TableName>')

If errors occur, as above set database to single user mode

run a repair on table

DBCC CHECKTABLE('<TableName>',REPAIR_REBUILD)

do another DBCC CHECKTABLE('<TableName>')
 
Last edited:
I think you should reach out to official support channels too for this.

I would also start with this but depending on how critical a database it is I would next be looking at your backups. How often do you back up the database? Do you back up the logs on the database hourly, daily, whats the situation with backups? Is it a system critical database? Can you afford any loss, can you go back and replay the logs?

So many questions... I have around 100 sql databses and they vary greatly in how critical they are to business operation, the most critical databases, so case management database and other databases that are heavily utilised get hourly log backups during core hours which gives much more robust recovery options, not so critical databases say for example an equitrac database for a print queue won't get the same treatment and the logs will be backed up and truncated each night.

For better help much more information is needed. If you blindly follow advice without considering the business requirements and criticality you could find yourself fighting against an issue when little to nothing has changed data wise since your last backup.
 
Back
Top Bottom