DBCC is a T-SQL statement provided by SQL Server. This tag is used for questions regarding DBCC and its use.
12
votes
1answer
711 views
What types of corruption can DBCC CheckDB miss?
This question was prompted by this earlier post and my having a database filed away for future investigation that was restored following:
BACKUP 'BrokenDatabase' detected an error on page (1:123456) ...
8
votes
2answers
684 views
Possible to run two DBCC INDEXDEFRAG commands simultaneously, each on a different table?
I am currently running a script which performs a DBCC INDEXDEFRAG on every table in a SQL Server 2005 database, one table at a time. Using DBCC DBREINDEX instead of INDEXDEFRAG is not an option, due ...
7
votes
1answer
364 views
Definitive list of steps for SQL Server baseline testing?
Before running a performance test / baseline for an app that uses SQL Server, I want to be able to set the instance to a "clean" state, without restarting the instance. There are steps I tend to ...
6
votes
2answers
183 views
SQL Server Internal Inconsistency on GROUP BY
I recently recovered a database from a hard-drive failure using DBCC CHECKDB WITH REPAIR ALOW DATA LOSS.
Now I can select records from a table-valued function to retrieve sales records, but using a ...
5
votes
2answers
272 views
SQL Server 2005 database corruption. Advise
I have encounter some database corruptions in the past but I knew which object has hit the road. In this situation I run a DBCC CHECKDB against a problematic SQL Server 2005 database and I get the ...
4
votes
4answers
25k views
SQL Server 2008 R2 (Suspect) mode - how to repair?
I have SQL Server 2008 R2 database in Suspect mode. I tried to fix it running this query:
EXEC sp_resetstatus ‘yourDBname’;
ALTER DATABASE yourDBname SET EMERGENCY
DBCC checkdb(’yourDBname’)
ALTER ...
3
votes
1answer
377 views
What does “slot 80 for LOB data type node does not exist” error in sql server mean?
When I modify a table in SQL Server 2008 I get the following error:
The Database ID 29, Page (1:235225),
slot 80 for LOB data type node does
not exist. This is usually caused by
transactions ...
3
votes
1answer
350 views
DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS
I had to run dbcc checkdb repair_allow_data_loss with all_errormsgs and it's been runing over 27 hours. DB size is over 15gb and the server (windows 2008) has 32gb memory. I did run this on SQL 2005 ...
3
votes
1answer
1k views
To 'DBCC SHRINKDATABASE' or Not To 'DBCC SHRINKDATABASE': That's the question
We're freeing lots of space in a SQL Server 2008 R2 database -a Loooot! enough to care about- (we're dropping lots of unnecessary data). but the database file conserves its file size. we want to ...
3
votes
2answers
769 views
tsql: table data size won't shrink after large row deletion
i have a table with 12 months+ data in it.
I backup the table then delete all rows keeping only rows inserted in the last month.
But the table size won't shrink, nor the underlying physical file.
...
3
votes
1answer
143 views
DBCC TRACEON with the global flag
In the question Need Help Troubleshooting Sql Server 2005 Deadlock Scenario there was a suggestion of using DBCC TRACEON (1204, -1) to trace deadlocks globally.
When reading about this command in BOL ...
3
votes
2answers
195 views
Migrate SQL Server database to multiple files (shrinkfile emptyfile vs log shipping)
I have a SQL Server 2008 database in production that we are moving onto a new server. The current database has a single ~400GB .MDF file. The new server will be running SQL Server 2012, and we are ...
3
votes
0answers
75 views
What utilities can I use to simulate I/O load for a DB restore and DBCC check?
I'm trying to figure out the peak load I can sustain on new hardware I procured for validating backups and performing DBCC checks. I've been using Crystal Diskmark to get throughput stats which helped ...
2
votes
2answers
680 views
How does DBCC SHRINKFILE() affect backups?
I have a pile of SQL 2005 databases that have been around for a very long time and, for varying reasons, experienced transaction log autogrowth. Regular backups now keep the transaction log usage ...
2
votes
1answer
789 views
Error attaching database after deleting NDF file
I have deleted .ndf file by mistake from a SQL Server 2008 database. While trying to attach a previous copy, SSMS raises this error:
Attach database failed for Server 'MDSWIN34'.
...
2
votes
4answers
172 views
Should I be regularly shrinking my DB or at least my log file?
My question is, should I be running one or both of the shrink command regularly,
DBCC SHRINKDATABASE
OR
DBCC SHRINKFILE
=============================
background
Sql Server: Database is 200 ...
2
votes
2answers
187 views
Save Results of DBCC ShrinkFile
When we execute the following command:
DBCC SHRINKFILE('MyDB_log', 1)
We get the following results in SSMS:
DBID | Field | CurrentSize | MinimumSize | UsedPages | Estimated Pages
...
2
votes
2answers
947 views
An inconsistency was detected
Am running asp.net application.Am searching records.if i click the view button i got this error,
an inconsistency was detected during an internal operation in
database(database name) on ...
2
votes
1answer
1k views
Sql Server 2008 R2 DBCC SHRINKFILE Severe Error
I am trying to run the following command in Sql Server 2008 R2:
DBCC SHRINKFILE('filename')
When I try to run this command, I get the following error:
Msg 0, Level 11, State 0, Line 0
A severe ...
2
votes
1answer
535 views
Mysterious disappearing consistency errors in SharePoint DBs
We have a pre-production SharePoint SQL server which threw an 824 error yesterday evening on the Content DB. As part of my investigation today, I ran DBCC CHECKDB on this DB and it came up clean. ...
2
votes
0answers
102 views
Last Known Successful DBCC CHECKDB
I understand that looking at DBCC PAGE is supposed to show me the last known good DBCC CHECKDB but I am not seeing this work correctly.
I have a database that I know is corrupted. If I run DBCC ...
2
votes
1answer
298 views
emergency-mode repair failed, nothing to do?
A production server got I/O disk error's I tried to fix it with dbcc but it got unexpected errors and crashed after a few minutes. so I took the file down and copied it over to a new machine.
I have ...
1
vote
4answers
94 views
Shrinking the log file does not reduce size
I have a database which had mdf size of 350 MB and ldf size 4.9 GB
When i try to shrink the log file it's not shrinking. I know shrinking a database is not good and it should not be done. But still i ...
1
vote
3answers
71 views
DBCC CheckDB Consistency error on a empty table
What could be the reason behind a DBCC CheckDB reporting a consistency error on a empty table in sql server 2008? This DB is restored from sql server 2000. DBCC CheckDB on sql server 2000 doesnot ...
1
vote
1answer
3k views
How do I fix this corrupted page?
My database is in simple recovery mode. One page got corrupted and I only have backups created using simple backup.
When I run this:
DBCC PAGE ('myDB', 1, 952663, 3)
I get:
DBCC PAGE error: ...
1
vote
1answer
76 views
Where can I find guidelines for building a SQL Server machine specifically for DBCC CHECKDB work?
I'm working on defining specs for a new server to run DBCC CHECKDB scans on all databases in our portfolio (85 instances, 1300 DBs, 15 TB allocated). I have a custom application that copies dump files ...
0
votes
2answers
2k views
How to print out the query SQL text of a transaction by querying the “fn_dblog” or DBCC LOG('DataBaseName')?
At some point in the last 24 hours some changes were made to a customer SQL server 2008 (v 9.0 SP4) by one of a couple if possible applications that use the DB.
Its not particular critical, but it ...
0
votes
2answers
1k views
SQL Server 2008 DBCC Problems
We have a database Ms
DBCC CHECKDB (MS)
Or
ALTER DATABASE MS SET SINGLE_USER
DBCC CHECKDB(MS,REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE MS SET MULTI_USER
Error message
Msg 0, Level 11, State 0, ...
0
votes
2answers
293 views
does DBCC ShrinkDatabase do a Reorganize of files?
does DBCC ShrinkDatabase doa Reorganize of files?
Basically does it mimic the same process as if i checked Reorganize in the GUI?
0
votes
1answer
151 views
DBCC CHECKDB WITH DATA_PURITY gives out of range error
I have restore a SQL Server 2000 database onto SQL Server 2005 and then run DBCC CHECKDB WITH DATA_PURITY and I get this error:
Msg 2570, Level 16, State 3, Line 2
Page (1:19558), slot 13 in object ...
0
votes
1answer
120 views
DBCC CHECKDB Data Purity errors but no rows found
Any idea why the value -96.00 is out of range for the normalization_data column (defined as numeric(14,2) )?
DBCC CHECKDB with DATA_PURITY flags this row:
Msg 2570, Level 16, State 3, Line 1
Page ...
0
votes
0answers
352 views
How to analyze 'dbcc memorystatus' result in SQL Server 2008 R2 [closed]
How to analyze 'dbcc memorystatus' result in SQL Server 2008 R2:
your help is much appreciated
DBCC MemoryStatus Output:
Memory Manager KB
VM Reserved ...
