sql solace
Pages
Home
Dba 101
Dev 101
Indexes
SSIS
SSRS
Resources
Byte Calculator
SSMS
Community Contributions
Free Stuff
Thursday, November 30, 2006
sp_MSforeachdb (Undocumented Stored Procedure)
Loops though all databases, repeating the specified command on each one.
The question mark represents the database name, for example ;
EXEC sp_MSforeachdb @command1='print ''?'' DBCC CHECKDB (''?'') '
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment