June 25, 2007 at 4:14 pm
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.
June 25, 2007 at 7:20 pm
use master
go
GRANT VIEW ANY DEFINITION TO ReportUser;
go
June 25, 2007 at 10:58 pm
Try this query given below.
use
master
go
select
* from sys.server_principals where type in ('U','G','S')
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply