Home Forums SQL Server 2008 T-SQL (SS2K8) Get all the domain and SQL users from an instance, per database RE: Get all the domain and SQL users from an instance, per database

  • this should get you what you want per database (without excluding any users)

    select name from sys.database_principals

    where type in ('S','G','U')

    give it a try with sp_msforeachdb and post back if you are still having issues.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]