Recover the lost password of SYS user with ORAPWD
1. Backup the old password file in Windows : ORACLE_HOME\database or Linux: ORACLE_HOME/dbs
Keep copy as a backup of Password file:
PWDXE.ora --> PWDXE_BKP.ora
2. Run the ORAPWD command to make a new file with new password.
C:\Users\ORACLE>orapwd file=C:\Oracle\dbhomeXE\database\PWDXE.ora password=Pass_123 entries=3
3. Test the new password:
C:\Users\ORACLE>sqlplus sys/Pass_123 as sysdba
SQL*Plus: Release 18.0.0.0.0 – Production on Tue Jul 14 14:45:23 2020
Version 18.4.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Last Successful login time: Tue Jul 14 2020 14:45:00 +05:30
Connected to:
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0
SQL>