Password file in the Oracle database is must to login remotely for sysdba privileges. Oracle creates password file automatically while creating database using DBCA by asking us what password to set for sys and system users.

Here we will see how we can recover from the situation when we lost our password file. It can be lost if the file is deleted physically.

Here I tried to connect sqlplus using tns entry of database

We can see above , it is giving an error that username or password is invalid . Now , let us check in the directory if the password file physically exists. Generally it resides in $ORACLE_HOME/dbs directory.

Here we can see no password file for orcl1 database exists ,there are two password files available which belongs to jdb and jdb1 database respectively.

Now to recover from this situation we need to create new password file using orapwd utility.

You can check all supported parameters of orapwd utility by just giving orapwd command :

Now , I added password file using FILE and ENTRIES parameter and hit enter. It will ask you to enter password for sys.

We can see that first time it failed and gave error that given password was not complex. So again I tried and gave complex password and it succeeded .

After adding password file try same sys connection again.

We are able to connect now. To check more about it lets check v$pwfile_users

We can see authentication type is PASSWORD for sys. So create password file easily if your existing password is deleted.

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel:

Skant Gupta’s LinkedIn:

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.