|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, June 01, 2009 2:16 PM
Points: 1,
Visits: 4
|
|
| As an audit requirement, we're trying to get a list of all SQL users (across all databases) to our IT audit team. We can do this simply enough logging in as a user with sysadmin role, but we'd prefer not to give that role to our automated report writer user. So, we're trying to select from sql_logins and all we get is sa and the report writer user (instead of the 91 users we should get). We've tried everything we know -- granting permission to sql_logins directly to the user, setting up a new group with permissions to the view & adding the user to it, etc. All to no avail. Any suggestions? Is this no longer possible? Thanks in advance.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 12:21 PM
Points: 1,389,
Visits: 417
|
|
use master go GRANT VIEW ANY DEFINITION TO ReportUser; go
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Saturday, November 10, 2012 8:18 AM
Points: 3,461,
Visits: 346
|
|
Try this query given below. use mastergo select * from sys.server_principals where type in ('U','G','S')
Cheers, Sugeshkumar Rajendran SQL Server MVP http://sugeshkr.blogspot.com
|
|
|
|