Questions tagged [dbcc]

DBCC stands for Database Console Commands in Transact-SQL.

The Database Console Commands (DBCC) are a series of statements in Transact-SQL programming language to check the physical and logical consistency of a Microsoft SQL Server database. These commands are also used to fix existing issues. They are also used for administration and file management.

DBCC was previously expanded as Database Consistency Checker.

Source: Wikipedia (Database Console Commands)

106 questions
1
vote
1 answer

Error 8921 running DBCC CHECKDB

DBCC CHECKDB shows following error message in my sql server 2008 R2 database Msg 8921, Level 16, State 1, Line 2 Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check…
Jeevan Gharti
  • 451
  • 1
  • 7
  • 15
1
vote
1 answer

Decipher SQL Server page storage

CREATE TABLE tbl ( col1 VARCHAR(1) ) INSERT INTO tbl VALUES (NULL) DBCC traceon(3604) DBCC ind(0, tbl, -1) DBCC page(0, 1, 290, 3) WITH tableresults /*Change page number as required*/ Output PAGE HEADER: Slot 0 Offset 0x60…
Shantanu Gupta
  • 20,688
  • 54
  • 182
  • 286
1
vote
0 answers

SQL Server 2008 r2 TempDB data file is not releasing space back to OS

Temp db data file is not clearing or deallocating space to OS after DBCC CheckDB "myDB" process completed successful. I used SP_WhoIsActive script to diagnose and found out DBCC CheckDB process is causing temp db growth but it is only happening for…
Jared
  • 11
  • 5
1
vote
1 answer

SQL 2008 backups failing

I've an end user who came across this error and was asking for help. Not able to take full backups, below is the error we are getting. I tried running full backups to continue after errors but it still fails. Yes sql services has full access to the…
knahs
  • 65
  • 6
  • 12
1
vote
1 answer

DBCC SHRINKFILE operation increases data usage instead

First of all, I know it's better not shrink database. But in our situation we had to shrink the data file to claim more space back. Environment: SQL Server 2005 x64 SP3 Ent running on Windows Server 2003 Enterprise x64. The database has one single…
1
vote
1 answer

What are the implications of enabling trace flag 1222 - write deadlock information to the log?

DBCC TRACEON (1222) -- writes deadlocks to the errorlog has anyone monitored if having this trace flag enabled would increase any WAIT_TYPE in particular or accrue any performance problem in any situation? For this question, let's consider that…
Marcello Miorelli
  • 3,368
  • 4
  • 44
  • 67
1
vote
1 answer

Can parameterized queries be fully captured using DBCC INPUTBUFFER?

In SQL Server 2008, I am using triggers to capture all changes made to a specific table in my database. My goal is to capture the entire change. That is, to capture what data is being inserted, not just that data is being inserted. In the trigger…
Brian
  • 119
  • 1
  • 4
1
vote
1 answer

What type of sql execution would result in this format of InputBuffer EventInfo?

I am trying to trace an event that a trigger logged back to its source. The triggered is written to capture the dbcc input buffer of the spid, however, I am not very familiar with how that functions works for different sources (stored procedures,…
SamNapkins
  • 11
  • 3
1
vote
1 answer

How can I increment an identity column without inserting a value?

First, I'm aware of this question which didn't get answered because what the OP was really trying to do was'nt incrementing an identity column I've got an identity column with a current seed value of x, and I would like to reseed it to x+1 (ie I…
Brann
  • 31,689
  • 32
  • 113
  • 162
1
vote
1 answer

Execute DBCC CHECKCONSTRAINTS with Smo?

Is there an Smo method that executes TSQLs DBCC CHECKCONSTRAINTS on a database and returns the occuring messages as IEnumerable?
Julius Kunze
  • 1,035
  • 11
  • 20
0
votes
1 answer

DBCC - cc_bulkinvoice - A BulkInvoice's total transaction amount should be equal to the sum of all its items' amounts

Below is the query which gives the error records. SELECT Count (*) FROM (SELECT cc_bulkinvoice.id FROM cc_bulkinvoice WHERE cc_bulkinvoice.status NOT IN ( 17, 23 ) AND (SELECT ( CASE WHEN Sum (bii.amount) IS NOT NULL THEN Sum (bii.amount) ELSE…
0
votes
0 answers

Attempt to fetch logical page (6:948264) in database 7 failed. It belongs to allocation unit 72057596882452480 not to 72057595956822016

When running the update query an error occurred (mentioned in the subject line) in the MSSQL server. After run DBCC CHECKDB ('db_name', REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS, NO_INFOMSGS and DBCC CHECKTABLE('table_name', REPAIR_ALLOW_DATA_LOSS)…
Shah Alam
  • 7
  • 4
0
votes
1 answer

How do I find out the last time DBCC Checkstorage was run on Sybase ASE?

I'm working with my DBAs and asking them to execute a number of steps in sequence. What command do I run to out the last time DBCC Checkstorage was run on Sybase ASE?
hawkeye
  • 34,745
  • 30
  • 150
  • 304
0
votes
1 answer

SSAS corrupt string store data file for one of the table columns error

I'm getting error on SSAS when redeploy the project. The error is; The JSON DDL request failed with the following error: Error happened while loading table data. Possible cause is: corrupt string store data file for one of the table columns.Error…
fd2812
  • 23
  • 6
0
votes
0 answers

DBCC CLONEDATABASE exception 12605 : Failed to create snapshot database

I'm executing the following instruction : DBCC CLONEDATABASE(mydb_prod, mydb_clone) And here is the exception I get : Database cloning for 'mydb_prod' has started with target as 'mydb_clone'. Msg 12605, Level 16, State 1, Line 1 Failed to…