Re: Q: Become user

From: Chris Selwyn <chris_at_perihelion.co.uk>
Date: 1995/05/28
Message-ID: <3q9qgi$7gb_at_bell.ukonline.co.uk>#1/1


stowe_at_mcs.net wrote:
: > chris_at_perihelion.co.uk (Chris Selwyn) writes:
: >
: > Does anyone know of a method for a user with DBA privileges to "Become"
: > another user temporarily?
: >>>>
 

: Yep. Not that it's easy -- use this script:
 

: REM - become another user
: REM
: set pagesize 0 feedback off verify off echo off termout off
: spool chg2usr.sql
: SELECT 'alter user &&1 identified by values '||''''||password||''''||';'
: FROM dba_users WHERE username = upper ('&&1');
: REM the line below is platform-specific
: prompt 'host rm -f chg2usr.sql'
: prompt 'exit'
: spool off
: exit

Two problems with this method :-
1) The user is left with a different password than their original one. Does anyone know how to restore the original password?

2) Even if it is possible to restore the original password - the user has a different password temporarily which (as someone else has noted) messes up links from remote databases.

Any suggestions?

Chris Selwyn
Senior Consultant
Perihelion Software
email: chris_at_perihelion.co.uk tel: +44 1749 344203 Received on Sun May 28 1995 - 00:00:00 CEST

Original text of this message