Re: My goal is to link the security's tables with the session's tables,
- From: zoltix <zoltix@xxxxxxxxx>
- Date: Thu, 15 Nov 2007 06:57:18 -0800 (PST)
Excelllent, you are the best
Thank a lot
On 15 nov, 13:33, "Uri Dimant" <u...@xxxxxxxxxxx> wrote:
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/tsql...>
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" <zol...@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...
.
- References:
- Prev by Date: Multi-Tenant Data Architecture: Separate Schema Approach
- Next by Date: Re: How to crack encrypted store procedure in SQL 2005?
- Previous by thread: Re: My goal is to link the security's tables with the session's tables,
- Next by thread: Multi-Tenant Data Architecture: Separate Schema Approach
- Index(es):
Relevant Pages
|
|