listing User names from SQL Server

  • Is there a way to list all users (SQL and NT) that have been set up in Security.  I know I can get this infomation from each database by (select * from sysusers).  That task becomes very cumbersome when you have 20 databases x several servers.  Any suggested tools, scripts or Stored proc would help.

  • This will give you the database and users for each database on a server.

    exec sp_msforeachdb 'use ?;select db_name() AS DatabaseName, * from sysusers where issqlrole = 0'



    Shamless self promotion - read my blog http://sirsql.net

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply