Disclaimer

Friday, 1 October 2021

How to reset password with knowing user password in Oracle Database

SQL> select username,account_status from dba_users where username='SAMIK';
USERNAME        ACCOUNT_STATUS
------------   -----------
SAMIK          EXPIRED

SQL> select 'alter user "'||d.username||'" identified by values '''||u.password||''';' c from dba_users d, sys.user$ u where d.username = upper('&&username') and u.user# = d.user_id;
Enter value for username: SAMIK
old 1: select 'alter user "'||d.username||'" identified by values '''||u.password||''';' c from dba_users d, sys.user$ u where d.username = upper('&&username') and u.user# = d.user_id
new 1: select 'alter user "'||d.username||'" identified by values '''||u.password||''';' c from dba_users d, sys.user$ u where d.username = upper('SAMIK') and u.user# = d.user_id
C
-------------------------------------------------------------------------------------
alter user "SAMIK" identified by values 'D1335553276FBC0B';
SQL>
SQL>
SQL> alter user "SAMIK" identified by values 'D1335553276FBC0B';

User altered.


SQL> select username,account_status from dba_users where username='SAMIK';
USERNAME        ACCOUNT_STATUS
------------   -----------
SAMIK          OPEN

User altered.



No comments:

Post a Comment

How to recovery PDB when PDB database is dropped in Oracle

  How to recovery PDB when PDB database is dropped :) [oracle@rac01 ~]$ sqlplus '/as sysdba' SQL*Plus: Release 21.0.0.0.0 - Product...