Solved

How can I run consistency checks on this DB?

Posted on 2008-10-20
6
457 Views
Last Modified: 2012-05-05
My backup software is reporting consistency check errors on this DB, and I'd like to confirm this myself by running the consistency checks directly.  Is there any way I can do this?
0
Comment
Question by:tballin
  • 3
  • 3
6 Comments
 
LVL 6

Expert Comment

by:tchamtieh
ID: 22762565
DBCC CHECKCATALOG - Check for catalog consistency

Syntax
     DBCC CHECKCATALOG
        [('database_name' | database_id | 0 )]
           [WITH NO_INFOMSGS]

 Key:
   WITH NO_INFOMSGS - Suppresses all informational messages.
0
 

Author Comment

by:tballin
ID: 22772460
How exactly do I run those commands?
0
 
LVL 6

Expert Comment

by:tchamtieh
ID: 22793936
From SQL Management Studio, open a new query window and type the command.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:tballin
ID: 22821371
I ran this:

DBCC CHECKCATALOG - Check for catalog consistency

Syntax
     DBCC CHECKCATALOG
        [('STS_Config_11939' | database_id | 0 )]
           [WITH NO_INFOMSGS]

 Key:
   WITH NO_INFOMSGS - Suppresses all informational messages

and I get this:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '-'.
Msg 319, Level 15, State 1, Line 9
Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.
0
 
LVL 6

Accepted Solution

by:
tchamtieh earned 500 total points
ID: 22826610
It should be like this, the second line I put for you for informational purposes only:

DBCC CHECKCATALOG (STS_Config_11939)
GO
0
 

Author Comment

by:tballin
ID: 22832455
That command worked, but now I'm getting another message.  

However, since you answered my first question I'll give you full credit on that.

Thanks!


Msg 1837, Level 16, State 1, Line 1
The file name "C:\Program Files\Microsoft SQL Server\MSSQL$SHAREPOINT\Data\STS_Config_11939.mdf                                                                                                                                                                          " is too long to create an alternate stream name.
Msg 7928, Level 16, State 1, Line 1
The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not support sparse files or alternate streams. Attempting to get exclusive access to run checks offline.
Msg 5030, Level 16, State 12, Line 1
The database could not be exclusively locked to perform the operation.
Msg 7926, Level 16, State 1, Line 1
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. See Books Online for details of when this behavior is expected and what workarounds exist. Also see previous errors for more details.

Open in new window

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question