Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: to connect to a user that password is unknow?-> just script modification
Very nice script, Mr. Kyte
For conveniant usage some minor modifications:
--bof
whenever sqlerror exit
REM accept simplifies usage
accept 1 prompt 'Username? : '
accept SID prompt 'SID? : '
REM for unnecessary output
set termout off
column password new_value pw
declare
l_passwd varchar2(45);
begin
select password into l_passwd
from sys.dba_users where username = upper('&1');
select password
from sys.dba_users
where username = upper( '&1' );
/
alter user &1 identified by Hello;
REM SID needed because of "ORA-12203: TNS:unable to connect to destination"-error
and subsequent exit.
connect &1/hello@&SID
alter user &1 identified by values '&pw';
set termout on
show user
whenever sqlerror continue
--eof
grt Received on Sat Jan 30 1999 - 19:59:59 CST