Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
30 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
47 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
38 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 ...
0
votes
2answers
73 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. ...
1
vote
0answers
57 views

Amazon RDS SQL server and DBCC Checkdb

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
35 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 ...
0
votes
1answer
74 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 ...
4
votes
2answers
122 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
49 views

DatabaseIntegrityCheck fails intermittently

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. ...
1
vote
0answers
50 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 ...
0
votes
1answer
83 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 ...
6
votes
1answer
283 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 ...
1
vote
0answers
395 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, ...
1
vote
2answers
296 views

DBCC CheckDb on Secondary Aynchronous Replica

Can I run Ola Hallengren 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 is ...
11
votes
1answer
392 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
154 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 ...
1
vote
1answer
231 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 ...
0
votes
1answer
189 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!
16
votes
1answer
383 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 ...
0
votes
1answer
370 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.
1
vote
0answers
73 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 ...
15
votes
2answers
243 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 ...
0
votes
1answer
83 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].[...
3
votes
2answers
557 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. ...
0
votes
1answer
502 views

MS SQL DBCC CHECKDB page ID (1:xxx) contains an incorrect page ID

Fistly, yes I'm aware that there are two options 1) is to restore or 2) run DBCC with allow data loss. But I'd like to understand what exactly is corrupted and what possible data loss could be. From ...
0
votes
2answers
241 views

Unable to save and error on DBCC CHECKDB

I try to save my database ≈ 260 Mb I have this error : System.Data.SqlClient.SqlError : failure read function incorrect So I try : DBCC CHECKDB ('myDatabase') PHYSICAL_ONLY I have this error :...
1
vote
0answers
196 views

Why is SQL Server unable to access partitions stored on UNC paths?

I have a database with its primary file and log file stored locally. One table is split into 101 partitions which are stored on a Windows share on another server accessed by a UNC path. Each partition ...
0
votes
1answer
485 views

What can cause DBCC CheckDB to take longer than usual? [closed]

I have a maintenance task, which do a DBCC CHECKDB WITH PHYSICAL_ONLY on the Databases on my server (SQL Server 2016 Standard Edition). This usually takes about 7h30 for about 120 databases and it is ...
4
votes
1answer
192 views

BACKUP WITH CHECKSUM works but DBCC CHECKDB detects problems

A server I administer recently experienced a power outage that caused issues with the SSRS ReportServerTempDB. After the outage, the nightly job that runs Ola's DatabaseIntegriyCheck started reporting ...
1
vote
0answers
123 views

How to verify DBCC CHECKDB

I am logging the DBCC CHECKDB job output to a table. When I look at the job log using the below command, I want to verify that all is well. use msdb EXEC dbo.sp_help_jobsteplog @job_name = N'...
2
votes
3answers
117 views

Dumps after CHECKDB error

I have a little problem with a two-node mirror and customer requirements: There is a maintenance window every night from 01:30 to 03:00, within which I have to run rebuild/reorg and checkdb (...
1
vote
2answers
456 views

CheckDB Operation failing and returning error

We have a database that in the past couple of months has started failing when we run CheckDB on it during the maintenance window. When we re-run it after the failure it will complete fine each time. ...
2
votes
1answer
794 views

DBCC CHECKDB grows tempdb to a huge size - Legacy MS SQL Server 2008 R2 Instance

I have an older Microsoft SQL Server Instance (2008 R2 SU3 GDR - Build: 10.50.6220). When I run DBCC CHECKDB via a Maintenance Plan, the TempDB grows very large. The largest DB on the instance is ...
1
vote
1answer
830 views

DBCC CHECKDB returning space issue error

My database in Production has 28ndf files in different Drives.And on T drive test_audit20.ndf to test_audit23.ndf files only. and file test_audit20 and test_audit21.ndf autogrowth is none. While ...
1
vote
0answers
106 views

Consistency Errors running CHECKDB on a couple of tables in SQL Server 2014 [duplicate]

While running DBCC CHECKDB I am getting consistency errors on a couple of tables in SQL Server 2014. I have tried REPAIR_REBUILD and rebuilding indexes on those tables but these are not helpful to ...
0
votes
1answer
2k 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 ...
7
votes
2answers
4k views

SQL Server detected a logical consistency-based I/O error: incorrect pageid on RESTORE

The restore of our database to new server hardware failed with a page error. Message SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 49:8125916; actual 49:...
4
votes
1answer
848 views

Full backup before and after checkdb

Recently someone told me I should take a full backup before dbcc checkdb and one after checkdb, even in full recovery. Can someone explain me why I should do this? I thought a full backup before ...
0
votes
1answer
48 views

dbcc checktable will write in my dbcc page (x,9,3) for the field dbi_dbccLastKnownGood

If I run DBCC CHECKALLOC,DBCC CHECKCATALOG and DBCC CHECKTABLE in all objects it will update my internal page with the actual date in dbi_dbccLastKnownGood field? The main reason of the question is ...
1
vote
1answer
175 views

Error in table 'sys.sysbinobjs' on master database

We have a SQL server DatabaseIntegrityCheck job to check the SYSTEM_DATABASES, and it shows an error message below in the logs now: Msg 2570, Level 16, State 2, Line 1 Page (1:354), slot 28 in ...
0
votes
1answer
162 views

DBCC CHECKDB error

Occasionally, in my development environment, when I run CHECKDB, I run into this error: The operating system returned error 665(The requested operation could not be completed due to a file ...
1
vote
2answers
16k 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 ...
5
votes
1answer
209 views

Database ID of a non-existent database - time-out waiting for buffer latch on page appearing in error log

Background: I've recently started at a new shop with lots of databases in various states. I arrived this morning (having just been added to the SQL DBA mailing group) to find an email about the ...
0
votes
1answer
414 views

MAIL DBCC CHECKDB RESULTS

I want to regularly run DBCC CHECKDB on my production database. My database is real-time and DBCC CHECKDB is very expensive query, that`s why I want to write a maintenance plan to execute the query on ...
8
votes
2answers
1k views

SQL Server 2016 AlwaysOn DBCC CHECKDB on async replica

We have an AlwaysOn environment, which includes a replica in our DR site that is setup with async commit and readable secondary = No. When we were running on SQL Server 2014 SP2 we were able to run ...
0
votes
1answer
263 views

Date of Last DBCC checkdb run

Using T-SQL, I can get the last known good DBCC Checkdb through DBCC DBINFO(). My question is, can I find, somewhere in SQL, when the Last DBCC Checkdb Ran? (regardless of being successful or not) I ...
1
vote
1answer
2k views

dbcc checkdb gives error “Incorrect PFS free space information for page”

dbcc checkdb query for database gives errors. What is it, is it dangerous and how to resolve? Full log file: download file or view on github (errors begin from string 364) Possible There was disk ...
2
votes
0answers
125 views

How to fix the relationship between MSSQL database and associated FILESTREAM files

TL;DR: How can I fix the relationship between an MSSQL database and the associated FILESTREAM files for a database that was recovered from failed disks? Background A server hosting a FILESTREAM-...
0
votes
2answers
540 views

SQL 2014: CheckDB issue

Scenario: SQL Server 2014 : Simple Recovery with Full backup + Differentials (16TB) I had to move 2 of the 3 data files to their drives with more space. Got the following Checkdb errrors: Msg 8904, ...
4
votes
2answers
205 views

Will a DBCC CHECKDB with repair have to rescan?

I've run a DBCC CHECKDB and it found allocation errors. When I run it with REPAIR_ALLOW_DATA_LOSS - will it need to take the same amount of time to scan for errors, or will it attempt to use the last ...