Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to check schema privileges in oracle

-- 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 :: Uncaught Error: Cannot use object of type mysqli_result as array 
Sql :: postgres power 
Sql :: sql if null then 0 
Sql :: pl sql asynchronous procedure calls 
Sql :: add new column not null sql server 
Sql :: oracle add datafile to tablespace 
Sql :: what is mysql_pconnect 
Sql :: sql server convert string to date 
Sql :: sql select divide column by number 
Sql :: oracle add proxy 
Sql :: mysql db size 
Sql :: sql server: select column values as comma separated string 
Sql :: sql update all rows 
Sql :: Incorrect format parameter 
Sql :: sql create table if not exists 
Sql :: create in sql 
Sql :: MySQL shutdown unexpectedly. 
Sql :: Copy Table from SQL to CSV 
Sql :: mysql docker compose 
Sql :: postgres convert number to string 
Sql :: mysql sort descending 
Sql :: mysqldump: Got error: 1045: Access denied for user 
Sql :: delete top N rows in sql 
Sql :: mysql query first character 
Sql :: get value from a table an insert it with other values in another table sql 
Sql :: sql count group by 
Sql :: mysql add text to existing field 
Sql :: MySQL server is running with the –secure-file-priv 
Sql :: generate sequence number in sql server 
Sql :: postgresql casting integer to string 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =