Thomas Rushton shows how to filter any stored procedure’s result set and uses sp_who
as an example:
sp_who
– useful – up to a point. Particularly when the server is busy, and you’re looking for something specific (eg to see if certain processes are out of a database before running an update)If the server is busy – don’t you wish there was a way to run something like
sp_who WHERE
dbname = 'foo'
Yeah. Unfortunately, it doesn’t work like that.
That doesn’t work, but Thomas shows you what does.