Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!drn.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news-lei1.dfn.de!news1.uni-leipzig.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Andy Hassall <andy@andyh.co.uk>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Impersonate a Oracle User
Date: Sat, 10 Sep 2005 00:02:27 +0100
Organization: Last minute panic
Lines: 26
Message-ID: <3q44i1d4vbfsb6fq7kckeib6mu5g32g4vi@4ax.com>
References: <oFUTe.15892$nT3.14594@tornado.fastwebnet.it>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: individual.net Ot3u+HoKXDOHH/wHG5c86QNdiD9sqhxZxd2rRaWVbxI88zF1qJ
X-Newsreader: Forte Agent 2.0/32.652
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.misc:121763

On Thu, 8 Sep 2005 12:44:27 +0200, "Martin" <martino.pavone@cezannesw.com>
wrote:

>Suppose that you are connected to an Oracle database with the user SYS or
>SYSTEM.
>
>I know that there is a way to impersonate another Oracle user account, but I
>don't remember the command.

 There's no documented way of doing this that I'm aware of, if you're looking
at this from the point of view of an Oracle equivalent to the Unix 'su [user]'
command when run as root.

 I recall reading that the 'imp' tool uses an internal, undocumented call to
switch user when doing a full import, but this is not a publically available
function.

 What's the business need? There's probably another way to do it; e.g. definer
rights PL/SQL runs with the privileges of its owner when run by another user -
it's not impersonation, but maybe that's an approach to look at depending on
what your actual problem is. (But if you're already logged in as SYS then
privilege levels aren't likely to be the issue in the first place...)

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
