Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

DBCC CHECK DB ERROR Expand / Collapse
Author
Message
Posted Sunday, September 30, 2012 4:16 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, May 22, 2013 7:26 AM
Points: 81, Visits: 860
When we run DBCC CHECKDB on one of our production Server we get the below error..


Error:--The database could not be exclusively locked to perform the operation.
Check statement aborted. The database could not be checked as a database snapshot could not be created and the database or table could not be locked.

Please required help for this issue..
Post #1366245
Posted Sunday, September 30, 2012 8:46 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:18 PM
Points: 37,744, Visits: 30,025
There should be more errors in the error log than just that. Please find them and post them here.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1366259
Posted Monday, October 01, 2012 2:06 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, May 22, 2013 7:26 AM
Points: 81, Visits: 860
I am unable to find any thing in the error log because the DBCC CHECK DB did'nt complete before completing it gave the above error...
Post #1366375
Posted Monday, October 01, 2012 2:09 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:18 PM
Points: 37,744, Visits: 30,025
I'm not talking about the checkDB completion messages. Is there nothing else before that in the error log, maybe hinting as to why it's trying to lock tables?

Actually... What is the exact checkDB command you're running?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1366378
Posted Monday, October 01, 2012 3:31 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, May 22, 2013 7:26 AM
Points: 81, Visits: 860
There is nothing in the errorlog prior to running checkdb which can help us.

We are running check db through maintanence plan.
Post #1366419
Posted Monday, October 01, 2012 3:39 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:18 PM
Points: 37,744, Visits: 30,025
No error messages about trying to create a snapshot? No error messages about failing to create a snapshot? About CheckDB being unable to run online?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1366431
Posted Monday, October 01, 2012 5:26 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, May 22, 2013 7:26 AM
Points: 81, Visits: 860
No there is no such error.
Do we need to enable any trace flag for that so that its is visible in the errorlog
Post #1366493
Posted Monday, October 01, 2012 6:21 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:18 PM
Points: 37,744, Visits: 30,025
Nope.

Without any errors saying why CheckDB went for tablock (which is not default), not going to be possible to figure this out. Something prevented the creation of the database snapshot, could be any number of things.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1366515
Posted Monday, October 01, 2012 3:44 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, May 12, 2013 5:58 PM
Points: 8, Visits: 90
Hi There,

Please check for any transactions that are currently running against the Database... Check for any open transactions and see if they can be stopped for the time being.

The best thing would be to get the Database into a single user mode and perform the DBCC checks.

Let us know how it went..

Cheers,

Praveen Nakka
Post #1366800
Posted Monday, October 01, 2012 3:50 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:18 PM
Points: 37,744, Visits: 30,025
CheckDB does not require that the DB be in single user mode or that there be no transactions running (that's repair). It normally runs as an online operation. The root problem here is not that it couldn't lock the tables, but that it tried to run with the tablock option for no apparent reason.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1366805
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse