How to change user's password in Oracle 11g and change back it to original

How to change user's password in Oracle 11g and change back it to original

Imp points
(1) Note down current password found in data dictionary.
(2) Modify password
(3) Do required tasks
(4) Reset the password


Get current password :-
SQL> SET LONG 100000
SQL> SELECT dbms_metadata.get_ddl('USER','TEST') FROM dual;

   CREATE USER "TEST" IDENTIFIED BY VALUES 'S:659106CEC6E63EE94597855D276029184257176283D5456B83C1A711ABD8;42CE85A96B6A78FA';
      DEFAULT TABLESPACE "USERS"
      TEMPORARY TABLESPACE "TEMP"


Password is in encrypted format.

Now change password temporarily:-
SQL> alter user TEST identified by 1234;

Login to the user with new password:-
SQL> conn test/1234
Connected.

Once the job is done we can change password back to the original :-

SQL> alter user TEST identified by values 'S:659106CEC6E63EE94597855D276029184257176283D5456B83C1A711ABD8;42CE85A96B6A78FA';


DONE

No comments:

Post a Comment