Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql server list user permissions

-- SQL Server: list of users and roles
SELECT dp.NAME      AS principal_name,
       dp.TYPE_DESC AS principal_type_desc,
       o.NAME       AS object_name,
       p.PERMISSION_NAME,
       p.STATE_DESC AS permission_state_desc
FROM sys.database_permissions p
         LEFT OUTER JOIN sys.all_objects o
                         ON p.MAJOR_ID = o.OBJECT_ID
         INNER JOIN sys.database_principals dp
                    ON p.GRANTEE_PRINCIPAL_ID = dp.PRINCIPAL_ID;
Comment

SQL server how to see user permissions on objects

SELECT dp.NAME      AS principal_name,
       dp.TYPE_DESC AS principal_type_desc,
       o.NAME       AS object_name,
       p.PERMISSION_NAME,
       p.STATE_DESC AS permission_state_desc
FROM sys.database_permissions p
         LEFT OUTER JOIN sys.all_objects o
                         ON p.MAJOR_ID = o.OBJECT_ID
         INNER JOIN sys.database_principals dp
                    ON p.GRANTEE_PRINCIPAL_ID = dp.PRINCIPAL_ID
					where dp.name = 'TMM209411'
Comment

PREVIOUS NEXT
Code Example
Sql :: how to insert string variable into sqlite database 
Sql :: mqtt Error: Address not available 
Sql :: reutrn string after character sql 
Sql :: oracle view ddl 
Sql :: mysql show data from table 
Sql :: set all the vluses in calumn in sql to false 
Sql :: change table to innodb mysql 
Sql :: change month to name in sql server 
Sql :: create table mysql example auto_increment 
Sql :: return sql query laravel 
Sql :: how to change owner in postgres 
Sql :: how to get weekday from old date in sql 
Sql :: oracle stop 
Sql :: drop all foreign key constraints mysql 
Sql :: asp.net core with postgresql deploy on ubuntu 
Sql :: postgresql get year 
Sql :: get first n letter of department name in sql 
Sql :: mariadb number format 
Sql :: oracle sql timestamp 
Sql :: show tables sql 
Sql :: using distinct count in sqlite3 
Sql :: alter tablespace add datafile autoextend 
Sql :: best sql course 
Sql :: mysql previous year 
Sql :: DB::transaction 
Sql :: mysql remote connection command line 
Sql :: oracle undo usage by session 
Sql :: sql add column int nullable 
Sql :: how to know the username of postgresql 
Sql :: mysql sort descending 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =