Re: My goal is to link the security's tables with the session's tables,



Some info
IF PERMISSIONS()&2=2
CREATE TABLE test_table (col1 INT)
ELSE
PRINT 'ERROR: The current user cannot create a table.'
--------
This example determines whether the current user can
grant the INSERT permission on the authors table to another user.

IF PERMISSIONS(OBJECT_ID('authors'))&0x80000=0x80000
PRINT 'INSERT on authors is grantable.'
ELSE
PRINT 'You may not GRANT INSERT permissions on authors.'

------http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_pa-pz_6f78.asp>
How can I retrieve a list of objects and permissions for a specified role?
------------------------------------------------------------------------------
In SQL Server 2005, you can use the Has_Perms_By_Name() function
(http://msdn2.microsoft.com/en-us/library/ms189802.aspx).

For example, I would like to list all stored procedures which a role has
execute permission for.

This is an example of usage:

SELECT o.SchemaAndName,
has_perms_by_name(o.SchemaAndName, 'OBJECT', 'EXECUTE')
FROM (SELECT name, SCHEMA_NAME(schema_id) AS [schema],
SCHEMA_NAME(schema_id)+'.'+name AS SchemaAndName
FROM sys.objects
WHERE type = 'P') AS o




"zoltix" <zoltix@xxxxxxxxx> wrote in message
news:c176d559-6622-4073-9fde-11167b4ea9c1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I would like to do a link between system table. My goal is to link the
security's tables with the session's tables, To see the security for
the current user. For example I would to do a request select * from
sys. sys.dm_exec_connections inner join....sys.database_permissions to
see if this user has the privilège for doing a "select"
Therefore how can I do a link between sys.dm_exec_connections (Current
session @@spid) and sys.database_permissions(define all permissions on
db) or perhaps other to see what I want.
Thank a lot for your response...


.



Relevant Pages

  • Re: USERS group has the ability to change security permissions???
    ... Please use the Advance view in the NTFS permissions dialog to ... When there is a generic grant and a special grant to the same entity ... the RESULT: user level access can change NTFS ...
    (microsoft.public.win2000.security)
  • Re: DCOM Event ID 10015
    ... Grant the user permissions to start the COM component ... Run the MPSRPT_DirSvc.exe on the server box. ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Re: NTFS woes
    ... "In some cases with a grant of Full is reduced ... NTFS permissions dialog. ... check Allow Delete Subfolders and Files ... Explicit Deny Delete on file does not work (user can still delete ...
    (microsoft.public.windows.server.security)
  • Re: NTFS woes
    ... "In some cases with a grant of Full is reduced ... NTFS permissions dialog. ... check Allow Delete Subfolders and Files ... Explicit Deny Delete on file does not work (user can still delete ...
    (microsoft.public.windows.server.security)
  • RE: HowTo manage IIS via MMC SnapIn without admin-rights...
    ... called Metabase Explorer. ... modifies permissions on certain metabase keys. ... The following steps will grant a specific user permissions to administer ... -- Grant the specific user FULL CONTROL ...
    (microsoft.public.inetserver.iis.security)