Mir Sayeed Hassan – Oracle Blog

Oracle DBA – Tips & Techniques | Learn with real-time examples

  • Translate

  • It’s Me






  • My Certificates

  • Links

    My Acclaim Certification : Credly Profile
    My Oracle ACE Pro Profile

  • Achievements

    Awarded Top 100 Oracle Blogs from Worldwide - #RANK 39
  • VISITORS COUNT

  • Verified International Academic Qualification from World Education Service (WES)

    Verified International Academic Qualification from World Education Service (WES)

  • Jobs

How to login a database user without knowing a password in Oracle database 11gR2

Posted by Mir Sayeed Hassan on February 5th, 2019

How to login a database user without knowing a password in Oracle database 11gR2

This method also try to login into the MIR1 user without knowing the password, after completion of the task later we can restore the same password for MIR1.

[oracle@testdb ~]$ !sq
sqlplus / as sysdba
sys@TESTDB> sho user
USER is "SYS"
sys@TESTDB> connect mir1/mir222222
Connected.
sys@TESTDB> select name, password, spare4 from sys.user$ where name='MIR1';

NAME                   PASSWORD                                                                                             SPARE4
------------------------------------------------------------------------------------------------------------------------------------------------
MIR1                   51C2405A8B9A8676          S:A3467BC2FB37364D9476ABA5528B43210B8938BF5596FD3BF3B7DFEF319C

Change the password for MIR1 & try to perform some operation

sys@TESTDB> conn sys/sys as sysdba
Connected.
sys@TESTDB> alter user mir1 identified by mir555555;
User altered.
sys@TESTDB> conn mir1/mir555555;
Connected.
mir1@TESTDB> select table_name from user_tables;

TABLE_NAME
------------------------
T1
mir1@TESTDB> create table t2_add(eno number(10));
Table created.
mir1@TESTDB> commit;
Commit complete.
mir1@TESTDB> select table_name from user_tables;

TABLE_NAME
------------------------------
T1
T2_ADD –   Newly added table after password changed

Now revert back to the previous exiting password of MIR1 by using from sys.user$ view as shown above

sys@TESTDB> alter user mir1 identified by values '51C2405A8B9A8676';

User altered.
sys@TESTDB> conn mir1/mir222222;

Connected.

===========Hence tested & verified in our test env============