To do that, you would have to search all servers for databases, then test whether anyone has them open. This is irrelevant to the question of which database the user running an SQL is using.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|