Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: What are user's active roles
Perhaps this will work for you. This is a read-only query that finds
responsibilities for users. You can limit what users and what
responsibilities to view, or see 'all' of either or both.
SET serveroutput ON -
feedback OFF -
termout ON -
pagesize 66 -
linesize 86
COLUMN "User Name" FORMAT A8 COLUMN "Responsibility" FORMAT A25 WORD COLUMN "Start" FORMAT A10 COLUMN "Application" FORMAT A40 TRUNC
BREAK ON "User Name" SKIP 1 ON "Start" ON "Application"
COLUMN the_time NEW_VALUE my_time NOPRINT COLUMN the_parm NEW_VALUE my_parm NOPRINT
SELECT ' You will be prompted for a USER NAME or substring (any part
of a name)'
|| CHR(10) ||
' and then for a RESPONSIBILITY or substring (any part of
responsibility).'
|| CHR(10) || CHR(10) ||
' You can also just hit "Enter" at either or both of the prompts, to
accept'
|| CHR(10) ||
' the defaults and view ALL RESPONSIBILITIES and / or ALL NAMES.'
|| CHR(10) || CHR(10)
FROM dual
/
ACCEPT v_name PROMPT "User Name or substring (default is '%') : " ACCEPT v_resp PROMPT "Responsibility or substring (default is '%'): "
--SELECT 'You can use this to see "Who does What" in ' || name ||
SET heading ON -
feedback ON
TTITLE CENTER my_parm SKIP -
CENTER my_time SKIP 2
BTITLE SKIP 2 LEFT 'Page ' FORMAT 999 sql.pno -
RIGHT 'WHAT_RESP.SQL'
SELECT SUBSTR( user1.user_name, 1, 20) "User Name"
, SUBSTR( resp.responsibility_name, 1, 25) "Responsibility"
-- , resp.responsibility_name "Responsibility"
CLEAR COLUMN
TTITLE OFF
BTITLE OFF
--Obtained from Alok & Shalini Chadda's Oracle Applications Page
--http://www.geocities.com/SiliconValley/Network/9828/
--Original author name unknown. Modified by Chris Nelson, Eaton MAD /
--Oracle Implementation Team, Mar 1999
--Use to find various Users and Responsibilities in the system
--Saved as 'What_Resp.SQL'
********************* Don't copy this line.
Juhan Kundla wrote:
> Is there a view for dba to see what roles of a user are currently > active? > > Juhan > -- > ================================================================ > |\ || /\ |__ / /\ || \ || \ /\ |__ | |____|\\ // > | \|| //\\ // //\\ || / || / //\\ || |\ \\ // > ||\ | //__\\ // //__\\ ||\\ || \ //__\\ || |/ \\// > || \|// \\/___|// \\|| \\||__/// \\\___/ |____| \/ > > (c) Juhan Kundla 1998 mailto:juhan_at_ensib.ee tel.: 6726291 > ================================================================Received on Fri Apr 09 1999 - 14:39:24 CDT
![]() |
![]() |