January 7, 2009 at 8:50 am
Hello.
I have to bring down SQL Server then Bring it back up and run DBCC on EVERY Database and save the output. Some of the servers may have 50+ Databases. Is there a way to issue one command on a server and have the command do the DBCC on every database? (By the way, does anyone know what happened to LazyDBA?)
Thanks!
January 7, 2009 at 8:55 am
There's an ms_foreachDB, which is essentially a cursor that executes a command, you could easily write your own script to do this as well.
Here's a thread with it being used: http://www.sqlservercentral.com/Forums/Topic476475-8-1.aspx
January 7, 2009 at 9:09 am
Yeah, that is basically what I was going to do... just loop through each db per instance. I was hoping for a one shot but this is fine.
Thanks a bunch.
January 7, 2009 at 9:17 am
You're welcome. There really isn't any other way and no "super" DBCC since those are separated out as database level commands.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply