Solved

How can I run consistency checks on this DB?

Posted on 2008-10-20
6
447 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
Comment Utility
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
Comment Utility
How exactly do I run those commands?
0
 
LVL 6

Expert Comment

by:tchamtieh
Comment Utility
From SQL Management Studio, open a new query window and type the command.
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 

Author Comment

by:tballin
Comment Utility
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
Comment Utility
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
Comment Utility
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now