Think Foward Logo Tested on Oracle 7 Tested on Oracle 8.0 Tested on Oracle 8i Tested on Oracle 9i Tested on Oracle 10g

SQL Script

Connect as another user

Updated: 01-Jun-1998
Version: 1.0

Description

This script allows you to change to connect to another schema from any DBA database user without you knowing the password. 

It resets the password back to the original so nobody knows you've connected, (unless the database is being audited or course!)

Parameters

user - Schema to connect as

SQL Source

REM Copyright (C) Think Forward.com 1998- 2005. All rights reserved. 
CLEAR SET HEAD ON SET VERIFY OFF PROMPT ACCEPT user PROMPT ' Goto which user : ' set pages 0 set feed off set verify off set echo off set term off spool temp.sql select 'alter user &user identified by values '||chr(39)||password||chr(39)||';' from dba_users where username = UPPER('&user') / spool off PROMPT PROMPT Changing password of &user to TEMP ... PROMPT alter user &user identified by temp; PROMPT PROMPT Connect as &user ... PROMPT connect &user/temp PROMPT PROMPT Resetting Password to original ... PROMPT START temp.sql

Return to Index of SQL Scripts


Site Map

General Information : Home | Company Profile | Contact Us | Legal
Database Support : Proactive Support | Pay Per Incident Support
Expert Services : High Availability | Creative Solutions | Training
Build Services : Oracle Installations | Revive your Oracle Setup | Low Cost Development
Free Oracle Resources: DBA Scripts | Oracle Links