Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle list privileges

-- List privileges, including roles, for my_user
SELECT GRANTEE, PRIVILEGE AS PRIVILEGE_ROLE,
       NULL AS OWNER, NULL AS TABLE_NAME, NULL AS COLUMN_NAME,
       ADMIN_OPTION AS PRIVILEGE, 
       NULL AS GRANTABLE
FROM DBA_SYS_PRIVS WHERE GRANTEE = 'my_user'
UNION ALL
SELECT r.GRANTEE, r.GRANTED_ROLE AS PRIVILEGE_ROLE, p.OWNER, p.TABLE_NAME, 
	p.COLUMN_NAME, PRIVILEGE, p.GRANTABLE
FROM DBA_ROLE_PRIVS r LEFT JOIN ROLE_TAB_PRIVS p ON p.ROLE = r.GRANTED_ROLE
WHERE r.GRANTEE = 'my_user';
Comment

oracle list privileges

-- List privileges, including roles, for my_user
SELECT GRANTEE, PRIVILEGE AS PRIVILEGE_ROLE,
       NULL AS OWNER, NULL AS TABLE_NAME, NULL AS COLUMN_NAME,
       ADMIN_OPTION AS PRIVILEGE, 
       NULL AS GRANTABLE
FROM DBA_SYS_PRIVS WHERE GRANTEE = 'my_user'
UNION ALL
SELECT r.GRANTEE, r.GRANTED_ROLE AS PRIVILEGE_ROLE, p.OWNER, p.TABLE_NAME, 
	p.COLUMN_NAME, PRIVILEGE, p.GRANTABLE
FROM DBA_ROLE_PRIVS r LEFT JOIN ROLE_TAB_PRIVS p ON p.ROLE = r.GRANTED_ROLE
WHERE r.GRANTEE = 'my_user';
Comment

PREVIOUS NEXT
Code Example
Sql :: how to check schema privileges in oracle 
Sql :: mysql update auto 
Sql :: grant all priviledges to mysql user 
Sql :: get monday of current week sql 
Sql :: access mysql command mac xampp 
Sql :: oracle alter tablespace add datafile autoextend max size 
Sql :: turn off safe mode mysql 
Sql :: select columns table mysql 
Sql :: show processlist mysql full query 
Sql :: oracle sql group by date year 
Sql :: get all db sizes in mysql server 
Sql :: mysql to lowercase 
Sql :: How to Add a Default Value to a Column in MS SQL Server 
Sql :: get last week data in mysql 
Sql :: mysql remote connection command line 
Sql :: get last three characters in mysql column 
Sql :: grant access on table in oracle 
Sql :: get day in sql 
Sql :: find tables with column name in sql 
Sql :: sql server obtener fecha en formato dd/mm/yyyy 
Sql :: list all the tables in sql 
Sql :: table or view does not exist 
Sql :: how to use lower case in mysql 
Sql :: how to sort names in alphabetical order in sql 
Sql :: oracle difference between two dates in seconds 
Sql :: spring datasource properties mysql 
Sql :: connectionstring mysql c# 
Sql :: SQL Count UNIQUE Rows 
Sql :: mysql add column with default value 
Sql :: how to find database collation in postgres 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =