• Thanks for sharing your stored procedure. I was successful in creating and executing this stored procedure from a user database on SQL Server 2005 and 2008.

    I was surprised that one of my databases was emulating SQL 2000, after I changed it to SQL 2005 it worked as expected. I guess this is not too uncommon (-:

    For SQL Server 2000 instances I use a slightly modified version of Mike A. Barzilli SP_WHO3[/URL] which is created in the master database.

    I prefer not to create DBA stuff in the master database, so USP_WHO5 holds potential as a replacement for this old SP on SQL 2005/2008 instances.

    Thanks

    David Bird