Checks the logical and physical integrity of all the objects in the specified database. Should be used to identify pages marked as suspect so they can be restored from backup or otherwise fixed.

learn more… | top users | synonyms

1
vote
3answers
46 views

DBCC CHECKDB consistency-based I/O error

Running: DBCC CHECKDB(DatabaseName) with NO_INFOMSGS gives me the following error: Msg 824, Level 24, State 2, Line 1 SQL Server detected a logical consistency-based I/O error: ...
0
votes
0answers
48 views

DBCC CheckDB result sent to OSQL poses confusion

Reformulated the Question I have a .BAT script that runs the DBCC CheckDB and repairs the database if needed. The result of the DBCC CheckDB is sent to OSQL through the -b flag and the .BAT ...
1
vote
0answers
31 views

DBCC Inconsistency

I can run DBCC CHECKDB ([vsc]) WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY I get: Msg 8928, Level 16, State 1, Line 5 Object ID 1993058136, index ID 1, partition ID 72057594058964992, alloc ...
5
votes
1answer
84 views

DBCC CHECKDB errors

I am having some issues with my SQL Server database. When I run this: select * from dbo.Entity where Oid='191FAF30-4729-4145-8106-60E34A8E164C' ...it spits out the following error. Msg 823, ...
2
votes
3answers
36 views

voluntarily produce an error with DBCC CheckDb

Would anyone know how I can make DBCC CheckDB produce an error? I'm testing a script and need DBCC Checkdb in the simplest mode to return an error, also while trying to repair and when trying to go ...
2
votes
2answers
82 views

DBCC CHECKDB LastKnownGood

I created the following query to list the DBCC CHECKDB LastKnownGood timestamp for all Databases on a Server. Is there a better way to do this? IF OBJECT_ID(N'tempdb..#Results') IS NOT NULL BEGIN ...
0
votes
1answer
29 views

What is DBCC66 and DBCC63 files

Tried to get some clarity but can't find any thing googling or searching in forums. We got a couple of files in the Data folder of one of our MS SQL servers databasename.ndf_MSSQL_DBCC66 ...
1
vote
1answer
37 views

Can sp_MSforeachDB be used for DBCC CheckDB without errors being masked?

I have a test database with an index I intentionally corrupted to test DBCC CheckDB. When I run: DBCC CHECKDB (Test2) WITH ALL_ERRORMSGS, NO_INFOMSGS, DATA_PURITY I get, as expected: Msg 8928, ...
1
vote
0answers
69 views

Unexpected Memory Pressure - RESOURCE_SEMAPHORE wait

Update I've done some further investigation into this issue and could still do with some help understanding what's going on. After restarting the instance, I monitored memory allocations over time, ...
1
vote
2answers
76 views

DBCC CHECKDB ran out of memory

We have a routine DBCC CHECKDB running at night when the database is still accessible but with very little traffic. Since last month we had several occasions of DBCC CHECKDB crashing to this error: ...
2
votes
1answer
42 views

How to check a database for a specific page

I am working on repairing a database, I have about 80 errors that I need to fix and there seem to be three types of problems that I don't know how to fix other than doing a REPAIR_WITH_DATA_LOSS. I ...
3
votes
2answers
30 views

repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB

Working through a database corruption issue. I am working on a copy in a development environment. Some were corrupt indexes in which case I just dropped and recreated it. These however are data ...
3
votes
1answer
65 views

VLDB - Create SQL DB Snapshot And Run Granular DBCC CHECKDB Commands

I have a 25TB db (SQL2008 Enterprise SP4) that appears to not have had CHECKDB run on it in production. No idea if it was run against a restored backup somewhere at sometime. Right now I don't have ...
5
votes
1answer
89 views

How to Resolve Corruption Detected by BACKUP WITH CHECKSUM, But NOT DBCC CHECKDB?

Recently, I was asked to refresh a couple of databases on a test server from production. Always wanting to follow best practices, I performed the backup using the WITH CHECKSUM option, and eventually ...
4
votes
0answers
90 views

Restored DB has data, DBCC CHECKDB is clean, but SELECT TOP 1 returns zero rows

Having restored a client's SQL 2014 EE DB onto our Developer Edition instance, without issue, then running a DBCC CHECKDB that found zero errors, and a clustered columnstore index alleging over 1Bn ...
1
vote
1answer
68 views

Timeout in SSIS package running DBCC CHECKDB

I have created an SSIS package to run DBCC CHECKDB on all the databases on the server and send error messages by email. But for several of the databases, I get an exception running my script: ...
20
votes
1answer
293 views

Are unfixable spatial index corruptions considered normal?

I have a spatial index for which DBCC CHECKDB reports corruptions: DBCC CHECKDB(MyDB) WITH EXTENDED_LOGICAL_CHECKS, DATA_PURITY, NO_INFOMSGS, ALL_ERRORMSGS, TABLERESULTS The spatial index, XML ...
5
votes
1answer
40 views

Which type of repair level is “DBCC CHECKDB (databasename, repair)”?

The MSDN's article about the command "DBCC CHECKDB" explains three ways to perform a database repair in the syntax section: - REPAIR_ALLOW_DATA_LOSS - REPAIR_FAST - REPAIR_REBUILD But I found the ...
2
votes
2answers
72 views

CheckDB on Partitioned Table - Insufficient Memory in resource Pool default

We are experiencing an issue on one of our servers where CheckDB is blowing the resource pool 'default' ... let me elaborate.. Windows 2012 R2 Standard - 16GB RAM SQL Server 2012 Enterprise ...
0
votes
0answers
76 views

How to fix the error in my database?

I have a database. I can attach it to SQL Server with Management Studio and perform query on the tables. But when I run the following commands: ALTER DATABASE UFDATA_008_2013 SET SINGLE_USER; DBCC ...
1
vote
2answers
715 views

Getting error “Time-out occurred while waiting for buffer latch type 2 for page (1:3564879), database ID 7.” But a database with Id 7 DOES NOT exist

I have a testing environment where I have scheduled jobs running restore tests as well as DBCC checks. These jobs run to: 1) copy database back up from the prod. 2) DROP all existing databases except ...
3
votes
0answers
111 views

DBCC TempDB Space Usage

We are using DBCC CHECKDB on a VLDB 1TB in size. Previously when on our 2008 platform the check ran successfully on a drive that was 150GB in size for TempDB, but since moving to SQL 2012 and ...
3
votes
1answer
87 views

DBCC CHECKDB Consistency Error

I am having a problem with replicating a table, and I finally tracked it down to a consistency error on the source table, but I am stumped as to what is causing the consistency error. I ran DBCC ...
5
votes
0answers
147 views

DBCC CheckDB run into early hardware failure

Our production database server (SQL 2008 R2 Enterprise on Windows Server 2008 R2 DC) run into a strange error during its nightly DBCC CheckDB (Prod_DB) since late June. The same job had been running ...
3
votes
2answers
329 views

Historical dbcc checkdb results

Is there a better way of accessing historical dbcc checkdb result history (if output logging was not used at runtime) than xp_readErrorLog? EXEC xp_readErrorLog {0-20}, 1, N'CHECKDB'; SQL Server ...
5
votes
4answers
244 views

check when last backup was taken

Brent Ozar had an interesing newsletter on 2015-06-22; How do you manage dbas measuring backups, where he thinks that a good DBA should check when the last backup was done it was last restored ...
4
votes
1answer
354 views

Understanding DBCC CHECKDB, Snapshots, and SQL Server Standard Edition

Understanding the circumstances under which SQL Server creates a snapshot when running CHECKDB, I followed a link to this KB that states: Database snapshots are available only in SQL Server ...
2
votes
1answer
143 views

CheckDB error 9003 SQL server 2014

Currently I am restoring SAN snapshots to another server nightly and running weekly checkdbs on that test server. The checkdb is throwing the following errors. The log scan number (105217:402:0) ...
4
votes
1answer
399 views

Alternative of DBCC CHECKDB

I am running DBCC CHECKDB on one of my database but its taking very very long time. I have some questions please help me. Is there any alternative of it that can check my database integrity? Should ...
2
votes
1answer
923 views

Can I backup (Full) the Log-Shipping Secondary Database?

I have a Highly pressured Production Environment with Database name DB1. And I want to run a weekly DBCC CHECKDB process on one of the databases there. (You can understand,I can't do it on my ...
1
vote
1answer
83 views

Possible to restore a damaged database's PRIMARY filegroup only?

I have a database (MyDatabase) with 2 filegroups, [PRIMARY] and [SECONDARY]. The [SECONDARY] filegroup has 2 datafiles, [DataFileA] and [DataFileB]. [DataFileA] is damaged (even after DBCC CHECKDB ...
2
votes
1answer
1k views

The operating system returned error 665(The requested operation could not be completed due to a file system limitation) on SQL Server 2014

Have a SQL Server 2014 instance running on Windows 2012 R2 that was running Ola Hallengren's DB integrity script. This is the error that resulted: The operating system returned error 665(The ...
4
votes
1answer
168 views

Long running DBCC CHECKDB

I am on SQL 2014 Standard doing offline DBCC CHECKDBs (so on a box other than production). For the most part, my process is going pretty quick but for some reason I have this small DB (6gbs) and its ...
3
votes
0answers
235 views

Database corrupt after restore and upgrade on another instance

We have SQL Server 2008 R2 (10.50.2789) and SQL Server 2014 (12.0.2000) instances. There is a process of backup on SQL Server 2008 R2 and restore to SQL Server 2014. Everything was going fine, until ...
2
votes
1answer
2k views

CHECKDB found 2 allocation errors and 0 consistency errors not associated with any single object

Msg 8906, Level 16, State 1, Line 1 Page (1:99122) in database ID 9 is allocated in the SGAM (1:3) and PFS (1:97056), but was not allocated in any IAM. PFS flags 'MIXED_EXT ALLOCATED 0_PCT_FULL'. ...
2
votes
1answer
3k views

SQL Server: Invalid Log Scan Number (…) passed to log scan in database (…) is not valid

We are getting a large number of the below errors on one of our production databases. CheckDB is completely clean. We thought it was related to replication so we shut it down using ...
6
votes
2answers
7k views

How to repair database consistency errors

I have a Microsoft Dynamics AX SQL Server database. I just run DBCC CHECKDB in order to check the integrity. After a few minutes I got at the end of the results the following: CHECKDB found 0 ...
0
votes
1answer
197 views

Orig DB = No Corruption, Backup/restore = Corruption?

We are setting up offline DBCC checkdbs on an offline server so we can still do our checks, but not interfere with production. When we backup the Master DB and restore it (even directly on a local ...
3
votes
1answer
100 views

Suspect (Torn) Pages recorded in TEMPDB? (SQL Server 2005 SP3)

I have a virtualised SQL Server 2005 (SP3) server that reported the following msg: Database_Name, Database_Id, File_Id, Event_Type, Event_Type_Desc, Error_Count, Last_Update_Date tempdb, 2, 1, 3, ...
2
votes
1answer
647 views

TempDB not selectable for DBCC maintenance plan

I'm trying to clean up some of our maintenance plans and noticed that our TempDB is not getting it's weekly dose of DBCC CHECKDB goodness. I've tried to go into the maintenance plan and make sure ...
3
votes
1answer
1k views

“Could not insert a backup or restore history/detail record in the msdb database” While restoring msdb

Today I found msdb database was in suspected mode, so I restored MSDB from my latest backup(As I have daily backup for this database). When I restore the MSDB database using Tsql i got below errors, ...
1
vote
0answers
95 views

Integrity checks on large dbs (700GB)

What's the best strategy for integrity checks on large dbs? DBCC CHECKDB (DB Name) would probably take over 24 hours, the largest table (532GB) would probably take over 17 hours...
2
votes
2answers
1k views

CHECKDB fails on MSDB and Master system databases

I get the following error within my maintenance plans: Executing the query "DBCC CHECKDB(N'master') WITH NO_INFOMSGS " failed with the following error: "The database could not be exclusively ...
2
votes
0answers
1k views

DBCC CHECKDB reports torn page. How do I find what is in the torn page?

Using SQL Server 2005 I get the following error when running DBCC CHECKDB SQL Server detected a logical consistency-based I/O error: torn page (expected signature: 0x55555555; actual ...
3
votes
1answer
5k views

The operating system returned error 665(The requested operation could not be completed due to a file system limitation)

Have a SQL Server 2014 instance running on Windows 2012 R2 that weekly runs Ola Hallengren's DB integrity scripts and the last two weeks started getting this error: DESCRIPTION: The operating ...
1
vote
1answer
3k views

How can I correct SQL Server Error 8928?

I received the following error message in an application running against one of my databases: SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0xfdff74c9; ...
1
vote
0answers
385 views

DBCC TABLE CHECK seems to hang

Our nightly maintenance plan includes a database integrity check which normally takes 45 minutes to complete. Now it appears to hang. When looking at the Activity Monitor, a series of process items ...
1
vote
0answers
2k views

Possible schema corruption. Run DBCC CHECKCATALOG

Good Evening to all. I was working with sql server 2008. Thing i did: Actually i was noticed that the free space available in C drive reaches below 1 GB .So i thought to Club the D drive with C ...
1
vote
0answers
246 views

CHECKDB Allocation Errors Msg 2576, could not repair, object id does not exist

I inherited a database that has no value in LastKnownGood. I ran repair allow data loss, says it was successfully repaired, but no change to the errors when I run checkdb again. In case it was a SQL ...
1
vote
0answers
499 views

SQL command in stored procedure continue on error

To perform Checkdb on all database of server i am using a stored procedure which loops over a view which contains list of databases in server and the stored procedure performs checkdb on all databases ...