Re: Find Database Users
From: Uri Dimant (urid_at_iscar.co.il)
Date: 01/09/05
- Previous message: Uri Dimant: "Re: Basic Server Roles (security) question"
- In reply to: Ann: "Find Database Users"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 9 Jan 2005 10:00:00 +0200
Ann
Aaron Bertrand wrote
This will only cover those who have
been explicitly given access to the procs using GRANT.
DECLARE @username VARCHAR(32)
SELECT @username = '???'
SELECT o.name, CanExec = CASE WHEN p.id = o.id THEN 'Yes' ELSE 'No' END
FROM sysobjects o LEFT OUTER JOIN syspermissions p
ON o.id = p.id
AND p.grantee = USER_ID(@username)
"Ann" <ao_949@hotmail.com> wrote in message
news:127901c4f519$8e655690$a401280a@phx.gbl...
> I'm wondering if there is a way I can query against a
> system table to find out all the users on a server and
> what permissions they all have? If anyone has any ideas I
> would really appreciate it! Thanks!
>
- Previous message: Uri Dimant: "Re: Basic Server Roles (security) question"
- In reply to: Ann: "Find Database Users"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|