Questions tagged [dbcc-checkdb]

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.

Filter by
Sorted by
Tagged with
2
votes
1answer
1k views

dbcc failing with Cannot continue the execution because… alwayson having a change of state event for each db

I got a job DatabaseIntegrityCheck - USER_DATABASES, failing with the following error: Date and time: 2018-10-29 02:34:13 Command: DBCC CHECKDB ([one of my databases]) WITH NO_INFOMSGS, ...
0
votes
2answers
420 views

DatabaseIntegrityCheck Fails on Large Database Every Day

On one of my databases, the integrity check keeps failing with the error: Connection may have been terminated by the server. [SQLSTATE HY000] Msg 596, Sev 21, State 1: Cannot continue the ...
0
votes
1answer
2k views

DBCC CHECKDB WITH PHYSICAL_ONLY option runs slower compared to a Full DBCC CHECKDB?

Is it possible for DBCC CHECKDB WITH PHYSICAL_ONLY to run slower compared to a full DBCC CHECKDB? The platform is SQL Server 2014 SP2.
2
votes
1answer
357 views

MS SQL 2008 Databse in Suspect mode and CHECKDB returns error: Object ID 3 has chain linkage mismatch

We did a disk expansion for VM DB server. However, after this operation the DB became suspect mode and cannot be open. Then we tried somethings like that; https://www.sqlrecoverysoftware.net/blog/...
3
votes
1answer
307 views

Suspect (Torn) Pages regarding tempdb?

I have a virtualised SQL Server 2005 (SP3) that reported the following message: Database_Name, Database_Id, File_Id, Event_Type, Event_Type_Desc, Error_Count, Last_Update_Date tempdb, 2, 1, 3, Torn ...
4
votes
5answers
23k 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: incorrect ...
4
votes
2answers
178 views

Failed to allocate BUFs during DBCC CHECKDB

UPDATE 9/12/19 - See my comment below for a status update. I am writing to see if anyone can help me out with a problem that I just can't seem to figure out. This one is going to be a doosey and I am ...
3
votes
2answers
816 views

Getting error running DBCC Checktable(tablename, repair_allow_data_loss)

I ran DBCC CheckDB and got some consistency errors in the database. In an attempt to recover all the data I have exported out all the data from the database to a new database except for one table. ...
1
vote
1answer
141 views

Filestream directory exists for a partition but the corresponding partition does not exist in the database

I am investigating a high memory usage issue of tempdb on a production SQL Server 2017 Enterprise (64-bit) deployment. This is similar to an issue discussed here. The server has two production DBs ...
0
votes
1answer
51 views

Index / Check DB Script question

I'm using Ola Hallengren's maintenance scripts and I wanted to see if I could create 2 tables so that it logs integrity checks and index optimizations to different tables.
0
votes
2answers
365 views

sp_MSforeachdb Continue on failure when running DBCC CHECKDB

I have the following maintenance script DECLARE @sql NVARCHAR(30) = 'DBCC CHECKDB(?)' EXEC sp_MSforeachdb @sql This checks every database for corruption. I have run this on my test server where I ...
0
votes
0answers
23 views

How does DBCC CHECKDB use tempdb?

I would like to know the working principle of DBCC regarding the tempdb. I want to know why it uses tempdb for what purpose. I didn't find any advanced article about that so maybe someone can shortly ...
3
votes
2answers
666 views

DBCC CheckDb on Secondary Asynchronous Replica

Can I run Ola Hallengren's CheckDB job on a Secondary Asynchronous Replica (DR) that is readable during business hours? Currently the Asynchronous Replica is not readable... First question is if it ...
-1
votes
1answer
268 views

DatabaseIntegrityCheck fails intermittently [closed]

Have been running the Ola Hallengren scripts on our new SQL Server 2016 Enterprise server for about 6 weeks or so now. The database Integrity script only works intermittently on some instances. ...
0
votes
1answer
20 views

Running CheckDB on a clone

My company are looking to bring in Redgate's SQL Clone to deploy live databases into other environments. I wanted to see if running CheckDB on these clones was a viable option instead of restoring a ...
1
vote
1answer
51 views

Integrity checks permissions issue

I am running Hallengren's IntegrityChecks job which fails with the following error: CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the ...
3
votes
1answer
162 views

PFS Page corruption issue and question

We recently encountered PFS page corruption in our production DB.  We are in the process of checking old backups to find which ones are clean, but I was wondering if a different process would work to ...
1
vote
2answers
130 views

how to find out how long the last DBCC checkdb took to complete?

In most of my servers I have dbcc checkdb scheduled to run. I can get the last known good DBCC Checkdb through DBCC DBINFO(). I can read the tracks left on the sql server log and I get something ...
0
votes
2answers
319 views

DBCC CHECKDB - SQL Log Says Completed, SQL Server Agent Says Failed

I run a nightly Integrity Check (set up via Maintenance Plans) on all of my databases. For the last two nights, the final CHECKDBCC has failed... at least according to the SQL Server Agent Job. ...
8
votes
1answer
189 views

Database Cache Memory in Performance Monitor drops down significantly after DBCC CheckDB

We have been monitoring some SQLServer: Memory Manager's metrics, and noticed that after DBCC CheckDB job, metric Database Cache Memory (KB) drops down significantly. If to be exact, it dropped ...
0
votes
3answers
112 views

MSSQL Mirroring + db integrity check

Is it necessary to do a database integrity check (DBCC check) on mirrored databases? https://docs.microsoft.com/en-us/sql/sql-server/failover-clusters/automatic-page-repair-availability-groups-...
2
votes
1answer
110 views

Checkdb issue - Consistency error on two tables at critical database

There was a network activity last night and they were upgrading server switch. Whole network was down and we as a DBA had prepared by disabling all the jobs at DB server for replication and backup ...
0
votes
0answers
32 views

DBCC UPDATEUSAGE versus data inaccuracies [duplicate]

SQL Server 2014 SP2 with Availability groups 3 Node Windows Cluster for AOAG (2 Sync & 1 Async Replicas) NOTE : Databases are with FileStream Enabled Recently we applied Encrypting File System (...
1
vote
1answer
401 views

DBCC CHECKDB fails after restore to SQL Server 2017

I have a DB on SQL Server 2014 and after I restore a backup on SQL Server 2017 I get integrity check errors when running CHECKDB. When I restore it on another machine with SQL Server 2014 it works ...
3
votes
2answers
107 views

Distribution database corrupt - What to do?

The below error message has been received from one of our SQL Server databases: SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x6847f47b; actual: ...
5
votes
3answers
816 views

DBCC checkdb on tempdb

Is it recommended to run DBCC CheckDB on tempdb? If yes, can someone please list out the reasons to do so? This could be on any SQL Server version. The one I have is SQL Server 2017.
4
votes
1answer
180 views

Unexplainable DBCC CHECKDB Command Output

Microsoft SQL Server 2017 (RTM-CU14-GDR) (KB4494352) - 14.0.3103.1 (X64) Mar 22 2019 22:33:11 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2016 Datacenter ...
1
vote
1answer
144 views

Can a full DBCC CHECKDB operation be safely offloaded to a restored backup on a different server?

We are currently moving towards a 24/7/365 operating model - as such I am investigating our maintenance strategy. One item I'm having trouble in figuring out is DBCC CHECKDB. I have seen numerous ...
10
votes
2answers
4k views

Dividing DBCC CHECKDB over multiple days

I'm working on implementing Paul Randal's method of manually spreading DBCC CHECKDB over several days for very large databases, which basically consists of: Dividing the tables in the database ...
6
votes
3answers
26k views

Allocate space for object 'dbo.SORT temporary run storage

DBCC CHECKDB returns: Could not allocate space for object 'dbo.SORT temporary run storage: 140737951236096' in database 'tempdb' because the 'PRIMARY' filegroup is full. Create disk space ...
13
votes
1answer
544 views

Physical only checkdb is failing, but full one is completed successfully

I am executing checkdb with physical_only option and it fails with multiple errors like below: Msg 8965, Level 16, State 1, Line 1 Table error: Object ID 1557580587, index ID 1, partition ID ...
5
votes
4answers
2k views

Composing the “ultimate database maintenance script”

I'm trying to compose T-SQL script that will: A) Shrink database size to the minimum possible size; B) Make integrity checks, and completely "reorganize" and optimize the database so that it is in a "...
0
votes
2answers
87 views

Database not going into single_user mode

I have a corrupt database with wrong checksum error. When I try to put database into single_user mode to repair it gives following error. I am using following sql command from management studio to put ...
-2
votes
1answer
236 views

DBCC CHECKDB last good date

SQL Server 2014 Standard. Using Ola's (blessings be upon him) scripts to perform database integrity checks: Job command: sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d master -Q "EXECUTE [dbo].[...
0
votes
0answers
39 views

CheckDB Failure on most databases in Dev instance

I have a maintenance plan on one of our infrequently used dev boxes which keeps failing on CheckDB on all user databases and most system databases. When trying to run CheckDB manually, I get the ...
1
vote
1answer
273 views

DBCC check on Always On Secondary Replica

What is the best way to schedule DBCC check on all the nodes in Always On availability group. Can we just schedule the same job on all the nodes at the same time including all the secondaries. In my ...
2
votes
0answers
225 views

Errors during CHECKDB

We have a db which reports errors when trying to do a backup: Starting to dig in, the first thing that was suggested was to run DBCC CHECKDB. I've been trying to run that all day now, and googling ...
3
votes
2answers
202 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 ...
1
vote
0answers
289 views

Amazon RDS SQL server and DBCC Checkdb [closed]

New Company and new to Amazon RDS. Several databases have been migrated to the cloud because "everything" is done for us a manager has stated. I have explained standard DBA tasks are still required ...
0
votes
0answers
42 views

CHECKDB run times issue

When using the PHYSICAL_ONLY option and NOINDEX with CHECKDB, my run times are longer! But, on the weekend, it is 1/4 the time without those options. Yes, there are more data changes during the week ...
15
votes
2answers
321 views

Columnstore Index in read_only filegroup prevents CheckDB

It appears setting a filegroup to read_only prevents dbcc checkdb for the entire database if the filegroup contains a columnstore index. When attempting to run checkdb or checkfilegroup (for any ...
4
votes
2answers
303 views

Help with wait type CHECK_TABLES_THREAD_BARRIER

I have a 2016 SQL Server freshly built - 13.0.5149.0 - OS 2016 (Microsoft Windows NT 6.3 (14393)). The environment is VMWare. No SQL Server HA configuration. It has a problem where CheckDB "stops" ...
0
votes
1answer
4k views

How to fix errors reported by DBCC CHECKDB

I am getting a lot of errors from DBCC CHECKDB, including: Msg 8939, Level 16, State 98, Line 1 Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 3667181342891245568 (type ...
1
vote
0answers
55 views

Variable Speeds on CHECKDB

Does anyone know why I should experience variable CHECKDB completion times from day to day? I'm seeing times anywhere from 45 to 90min for the task to complete. I am running CHECKDB on 8 SQL Server ...
6
votes
1answer
403 views

DBCC CHECKDB on Always On databases

Do we really need to run DBCC checkdb on a database configured with Always On synchronous updates? I believe the automatic page repair mechanism should identify the corruption and repair it ...
12
votes
1answer
726 views

Backup detects corruption, but CHECKDB does not

I have a database where when I run the backup command BACKUP DATABASE [MyDatabase] TO DISK = 'G:\Backup\MyDatabase_01_01_2018.bak' WITH NOFORMAT, NOSKIP, COMPRESSION, INIT, BUFFERCOUNT = ...
1
vote
2answers
312 views

Symantec Backup Exec runing DBCC CheckDB and Backup on my SQL server

What is Symantec Backup Exec (TM)? I noticed that it is running in one the database server i am maintaining. I am a newbie in db administration and i am not sure what it is. It is running DBCC CheckDB ...
0
votes
1answer
373 views

Taking Back up on Non readable Secondary Replica Availability group

Is there any way to back up a non readable secondary replica database to restore in a dev environment and then do dbcc checkdb? Will appreciate any help!
3
votes
3answers
626 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 ...
16
votes
1answer
558 views

Why is CHECKDB reading the transaction log file on a database with a memory optimized table?

tl;dr: why is CHECKDB reading the transaction log for a user database with memory optimized tables? It appears that CHECKDB is reading the transaction log file of the user database when it's checking ...