Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Getting GRANTs for actual user
Hi all,
I'm looking for a possibility to get the GRANTs for a user for a certain SEQUENCE. The first solution is as follows:
SELECT 'GRANT ' || PRIVILEGE || ' ON ' ||
(SELECT DISTINCT user_name
FROM v$open_cursor
WHERE sid in
(SELECT s.sid FROM v$session s WHERE s.audsid = USERENV('SESSIONID') ) ) || '.' || table_name || ' TO ' || grantee || DECODE (grantable, 'YES', ' WITH GRANT OPTION', 'NO', '', '')GRANT_COMMAND
This generates the following lines, f.i.:
GRANT_COMMAND
Greatings,
Ralf.
Received on Tue Sep 09 2003 - 09:48:20 CDT
![]() |
![]() |