Displaying group and binding information

To display a list of existing groups, group members, and login and application bindings, use sp_tempdb show. For example, to view the members of the temporary database group “tempdbgroup1” and their owner instances, enter:

sp_tempdb "show", "gr" "tempdbgroup1"

To display a list of active sessions assigned a temporary database, use sp_tempdb who. For example, to displays active session assigned the temporary database “localtempdb1”, enter:

sp_tempdb "who", "localtempdb1"