Questions tagged [dbcc]

10 questions
12
votes
4 answers

Why is "DbccFilesCompact" status is "Suspended"?

I am running SHRINK file on a 600G data file. Currently, status is reported as "suspended" and sys.dm_exec_requests.percent_complete for DbccFilesCompact command reports that it is running (but very slowly) Is there a way to check why it's being…
dance2die
  • 1,961
  • 7
  • 31
  • 40
8
votes
2 answers

Repairing inconsistent pages in database

We have a SQL 2000 DB. The server crashed due to Raid array failure. Now when we run DBCC CHECKDB, we get an error that there are 27 consistency errors in 9 pages. When we run DBCC PAGE on these pages, we get this: Msg 8939, Level 16, State 106,…
Raj
6
votes
4 answers

Should I run DBCC checkdb before full backups? Or after?

We have a mix of SQL 2000, 2005, and 2008 servers, and we've always run a DBCC CHECKDB nightly just before the full backups, under the theory that you want to make sure the DB is in good shape before you back it up. (Obviously, full verification of…
BradC
  • 2,200
  • 4
  • 25
  • 35
3
votes
1 answer

What rights do I need to run DBCC commands?

Do I need to be sysadmin to run DBCC commands on SQL Server? Or is db_owner rights enough?
atricapilla
  • 605
  • 6
  • 12
  • 15
3
votes
1 answer

DBCC CHECKDB fails and quits job, ambiguous error message

I received a notice that one of our servers (SQL Server 2008 Cluster on Win Enterprise 2008 Cluster) DBCC CHECKDB for all databases has been failing the past four times it has been run. We don't have any data prior to that, but it doesn't look like…
Ddono25
  • 165
  • 2
  • 13
1
vote
1 answer

How to run DBCC CHECKDB when you cannot connect to database?

It appears that I have some file system issue that is preventing me from connecting to MS SQL Express 2008 R2 on my local machine. I receive this message when trying to connect: Looking over the DBCC CHECKDB reference, it does not appear that I can…
Dave Lowther
1
vote
5 answers

DBCC: The database could not be exclusively locked to perform the operation

I run DBCC CHECKDB ([MyDb]) WITH NO_INFOMSGS, ALL_ERRORMSGS, PHYSICAL_ONLY And after 20 seconds it fails with an error: Msg 5030, Sev 16, State 12, Line 1 : The database could not be exclusively locked to perform the operation. [SQLSTATE…
user46529
  • 137
  • 1
  • 6
0
votes
0 answers

Next step when DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS failes

I'm in a situation where a few Tables of a Database (MSSQL2016 - 13.0.5081.1) are corrupted (selecting data failes at some point) There is no valid backup available (the error seems to be present in the DB for a long time) However, i finally end up…
Cadburry
  • 111
  • 4
0
votes
2 answers

Dividing DBCC CHECKDB over several days

I'm working on implementing Paul Randal's method of manually spreading DBCC CHECKDB over several days from his excellent article CHECKDB From Every Angle: Consistency Checking Options for a VLDB. In short, the strategy consists of: Divide the…
BradC
  • 2,200
  • 4
  • 25
  • 35
0
votes
2 answers

If DBCC CheckDB says my database is OK, is it OK?

I'm thinking my way through some disaster recovery scenarios. How does this one sound? A server running SQL Server 2008 or 2005 suddenly loses power (e.g. the plug gets pulled) When turned back on, the Operating system recovers OK and there are no…
codeulike
  • 998
  • 5
  • 16
  • 29