Re: Table permissions

From: Uri Dimant (urid_at_iscar.co.il)
Date: 02/02/05


Date: Wed, 2 Feb 2005 18:12:00 +0200

Eric
This script was written by 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)

"Eric D." <Eric D.@discussions.microsoft.com> wrote in message
news:A09ABB02-184C-4C0A-B920-00F4531D0B84@microsoft.com...
> Hi,
>
> I'm trying to display permissions to a specific table for a particular
> individual. How would I go about doing so. I'm pretty sure it has to do
with
> information_schema, but that's as far as I can go.
>
> TIA



Relevant Pages

  • Re: Find Database Users
    ... been explicitly given access to the procs using GRANT. ... SELECT @username = '???' ... FROM sysobjects o LEFT OUTER JOIN syspermissions p ...
    (microsoft.public.sqlserver.security)
  • Re: Adding users
    ... Not only does AUTHORIZE not show it, new processes did not get the right ... When I grant the id I get the GRANTMSG returned, but SHOW USERNAME does ... A second grant gives me a GRANTERR ...
    (comp.os.vms)
  • Re: Group policy software install & directory access rights
    ... Grant "Authenticated Users" read/execute access. ... > the install files if it does not have a username and password? ... > So I log into the local workstation as the local admin which is not a ... > So I'm thinking that the reason my GPO install is failing is because the ...
    (microsoft.public.windows.server.active_directory)
  • Re: Logon failed for user ". but only for membership tables in same database that other request wor
    ... OK to login SQL Server on Computer B. ... I would like you to do a test that on ComputerB, log on using the Username ... You may use the GRANT statement to grant the EXECUTE permission for a user: ... GRANT System Object Permissions (Transact-SQL) ...
    (microsoft.public.sqlserver.security)
  • Re: editing /etc/sudoers
    ... Otherwise, to grant your ... limited root privileges to username, ... Bob Holtzman ...
    (Ubuntu)