Re: Display Permissions



Steven,

EXEC sp_helprotect @UserName = 'SomeUserName'

Also, here is a little script that I run for some additional converage.

-- Database Security
select u.name, p.permission_name, p.class_desc, object_name(p.major_id)
ObjectName, state_desc from sys.database_permissions p join
sys.database_principals u
on p.grantee_principal_id = u.principal_id
order by ObjectName, name, p.permission_name

select u.name DatabaseRole, u2.name Member
from sys.database_role_members m
join sys.database_principals u on m.role_principal_id = u.principal_id
join sys.database_principals u2 on m.member_principal_id = u2.principal_id
order by DatabaseRole

RLF

"Steven" <Steven@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3D54F556-ED93-40A1-BA21-3DED9642F81E@xxxxxxxxxxxxxxxx
Anyone have sample queries that I can execute within Query Analyzer that
will
help me to quickly display the current permissions that each user has,
first
on a database, and then on the tables within that database?


.



Relevant Pages

  • Re: find out a user/account permission...
    ... quotenameAS ObjectName ... else 0 end) as 'CREATE DATABASE' ... Mark Allison, SQL Server MVP ... > my company remove any email attachment from outside automatically. ...
    (microsoft.public.sqlserver.server)
  • Re: find out a user/account permission...
    ... What follows -- thanks to Mark -- is the script he attached.... ... quotenameAS ObjectName ... else 0 end) as 'CREATE DATABASE' ... >> Mark Allison, SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: Why does msaccess.exe persist sometimes?
    ... meant to refer to anytime you do a "Set ObjectName = xxxx" code step in the ... <MS ACCESS MVP> ... Could you give me an example of what you mean by "a reference to ... the database," and the syntax for the associated ...
    (microsoft.public.access.gettingstarted)
  • Monitor Object Access
    ... I would like to remove an index from my database, but I need to verify ... I tried running Profiler, but it doesn't seem to be giving me the ... I put in a filter for ObjectName, ...
    (comp.databases.ms-sqlserver)
  • database security
    ... i'm having a play & turned on database security on a test box, ... have found that accessing the database via ODBC from a linux box ... database has no security so the command has no effect." ...
    (comp.databases.btrieve)