Change oracle password temporarily

Want to connect as a particular user but don’t know their password? You can temporarily change it and then reset it back, if you have DBA/alter any user privilege:

SQL> select password from dba_users where username = 'MYUSER';


SQL> alter user MYUSER identified by mypassword ;

User altered.

SQL> conn MYUSER/mypassword
SQL> alter user MYUSER identified by values '086FAA387C794B46';

User altered.

SQL> sho user

The above works for versions up to 10g. For 11g, instead use:

SQL> set long 9999
SQL> select dbms_metadata.get_ddl ('USER', 'MYUSER') from dual ;

Source: Laurent Schneider.

Posted in Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>