SQL Consistency check

I know how I can schedule a consistency check from Enterprose Admin,  but how can I ran one on an ad-hoc basis?

LVL 30
Duncan MeyersAsked:
Who is Participating?
 
Scott PletcherConnect With a Mentor Senior DBACommented:
You can issue this command:

DBCC CHECKDB ('dbName')

at anytime to check the consistency of a database.  Or, for example, create and schedule a job that has a T-SQL step with that command(s) (you could, of course, check more than one db in a step if desired:
DBCC CHECKDB('db1') DBCC CHECKDB('db2')
etc.).
0
 
Duncan MeyersAuthor Commented:
Bewdy!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.