Re: Retrieving ALL Object Privs for ALL Users in ALL Databases
From: Uri Dimant (urid_at_iscar.co.il)
Date: 05/15/05
- Previous message: Yoshihiro Kawabata: "Re: SQL2KSP4 sp_addalias and db_accessadmin"
- In reply to: Michelle: "Retrieving ALL Object Privs for ALL Users in ALL Databases"
- Next in thread: Hari Prasad: "Re: Retrieving ALL Object Privs for ALL Users in ALL Databases"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 15 May 2005 12:39:14 +0300
Hi
>From Aaron Bertrand
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)
"Michelle" <smiley2211@yahoo.com> wrote in message
news:OPhCB0$VFHA.2684@TK2MSFTNGP09.phx.gbl...
> Hi All,
>
> Does someone have a procedure that will loop through ALL databases and get
> the object priviledges for ALL users in the database?
>
> Thanks...M
>
>
- Previous message: Yoshihiro Kawabata: "Re: SQL2KSP4 sp_addalias and db_accessadmin"
- In reply to: Michelle: "Retrieving ALL Object Privs for ALL Users in ALL Databases"
- Next in thread: Hari Prasad: "Re: Retrieving ALL Object Privs for ALL Users in ALL Databases"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|