Return-Path: <root@fatcity.cts.com>
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by naude.co.za (8.11.2/8.11.2) with SMTP id g7V0b3314946
 for <oracle-l@naude.co.za>; Fri, 30 Aug 2002 20:37:03 -0400
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id PAA84108;
 Fri, 30 Aug 2002 15:35:48 -0700 (PDT)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 004C4A2A; Fri, 30 Aug 2002 14:28:19 -0800
Message-ID: <F001.004C4A2A.20020830142819@fatcity.com>
Date: Fri, 30 Aug 2002 14:28:19 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Khedr, Waleed" <Waleed.Khedr@FMR.COM>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Khedr, Waleed" <Waleed.Khedr@FMR.COM>
Subject: RE: accessing user_users via a procedure in SYS
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain;	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by naude.co.za id g7V0b3314946

What is wrong in: select user from dual;

Waleed

-----Original Message-----
Sent: Friday, August 30, 2002 3:09 PM
To: Multiple recipients of list ORACLE-L


Hi,

I am trying to put together a package that uses the AUTHID current_user
directive to decide whether to let people kill a session or not, and I ran
into a problem.

One procedure will run as SYS, but I need to double-check the requester's
username to ensure he/she isn't trying to kill their neighbour's session.

To do that I build a function that runs with the AUTHID current_user
directive and tries to select username from user_users.  Hopefully it will
be able to pass back the username to the parent proc.

When I try to run a procedure that does a select against user_users using
that directive, I get an error:
PLS-00357: Table,View Or Sequence reference 'USER_USERS' not allowed in this
context

I found tech note 162489.1, according to that, shouldn't user_users work as
well?

Regards,
Patrice Boivin
Systems Analyst (Oracle Certified DBA)

Systems Admin & Operations | Admin. et Exploit. des systèmes
Technology Services        | Services technologiques
Informatics Branch         | Direction de l'informatique 
Maritimes Region, DFO      | Région des Maritimes, MPO

E-Mail: boivinp@mar.dfo-mpo.gc.ca
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Boivin, Patrice J
  INET: BoivinP@mar.dfo-mpo.gc.ca

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Khedr, Waleed
  INET: Waleed.Khedr@FMR.COM

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

