Script For Finding Logins/Users belonging To Databse Role?

  • Hi,

    re: MSSQL 7/2000

    I preparing an audit report on database fixed roles. I'm trying to find a script/method to list/find the accounts mapped to a database role (ie: db_owner) for all the databases on a given database server. I've used sp_helprolemember, (and have used it with sp_MSforeachdb), but the result set doesn't list the database name. Hope someone can help me out.

    Many thanks. Jeff

  • You should probably use a cursor to iterate through a list of the databases inserting the data into a temp table, then into a main table along with the dbname.



    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