Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql server user permissions and roles

-- 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 :: integer limit sql create table 
Sql :: show table columns 
Sql :: xampp mysql database server is not starting mac m1 
Sql :: first letter capital in mysql query 
Sql :: substr sql last character 
Sql :: oracle apex who is connected 
Sql :: change name of colum in sql table 
Sql :: mysql show all tables 
Sql :: how to install mysql server on centos 7 
Sql :: sqlite create index 
Sql :: ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement 
Sql :: how to count null values in mysql 
Sql :: sql sample tables with data 
Sql :: power query concatenate 
Sql :: set auto increment to 1 mysql 
Sql :: sql fill na with 0 
Sql :: login to mysql 
Sql :: postgres date difference seconds 
Sql :: sysdate in sql 
Sql :: show all public tables sql 
Sql :: postgres power 
Sql :: postgresql change value in column 
Sql :: mysql select last 10 rows 
Sql :: SQl Server Versionen Releases und Build-Nummern 
Sql :: mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password] 
Sql :: docker mysql random root password 
Sql :: mysql - find in comma separated string of values 
Sql :: how to use a database to see tables mysql 
Sql :: sql server week number 
Sql :: ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =