Find User/Role Permission on an Object  

Posted by ReelTym

declare
    @SchemaName sysname = 'COMPANY_STRUCTURE',
    @TableName  sysname = 'SUPP_SUPPLIER',
    @UserOrRole sysname = 'ECT_Role'

declare @perms table
(
    table_qualifier sysname,
    table_owner sysname,
    table_name sysname,
    grantor sysname,
    grantee sysname,
    privilege sysname,
    is_grantable sysname
)
insert into @perms
    exec sp_table_privileges
        @table_owner    = @SchemaName,
        @table_name     = @TableName
select *
    from @perms
    where grantee   = @UserOrRole
    order by grantee

How to Make a Healthier Salad  

Posted by ReelTym

How to Make a Healthier Salad