Friday, March 22, 2013

exec sp_helpdb

...is a pretty impressive blob of SQL to run at a server. It gives you a list of all databases for which the user running the command has access to and gives you "dbid" ids for each database which will allow you to filter against "DatabaseID" instead of "DatabaseName" here. When adding DatabaseIDs in the profiler, press the semicolon key to add a second (or third) line item.

No comments:

Post a Comment