Answers for "oracle see grants"

SQL
3

oracle grants

-- 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';
Posted by: Guest on January-20-2021
2

oracle list grants on package

SELECT grantee, privilege
  FROM dba_tab_privs
 WHERE owner = 'owner'
   AND table_name = 'object_name'		-- Package, procedure...
   AND privilege = 'EXECUTE'
Posted by: Guest on July-06-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language