How to Resolve OPW-00010: Could not create the password file. This resource has a Password File.

  • by

OPW-00010

Tried to create a password file by orapwd, an Oracle utility for a RAC database and got OPW-00010: Could not create the password file. This resource has a Password File.

[oracle@primary01 ~]$ orapwd dbuniquename=ORCLCDB file='+DATA/ORCLCDB/pwfile' entries=10

Enter password for SYS:

OPW-00010: Could not create the password file. This resource has a Password File.

It seems that the database has already have a password file. Let's see the configuration.

[oracle@primary01 ~]$ srvctl config database -d orclcdb
...
Password file: +DATA/ORCLCDB/pwfile
...

Yes, we have configured the location of password file, but in fact the file does not exist so far. That's why I create a password file for it.

OPW-00010 means that it found a password file in the configuration of the RAC database and its name conflicts with the file you provided. For protecting the configured password file, Oracle cannot let you create a new one to overwrite it.

Solution

To solve OPW-00010, we should reset the location of password file to pretend we have no password file presently.

[oracle@primary01 ~]$ srvctl modify database -d orclcdb -pwfile

Please note that, we don't provide any location of password file in the above command, just leave it empty. This can null out the configured location.

[oracle@primary01 ~]$ srvctl config database -d orclcdb
...
Password file:
...

Let's try again.

[oracle@primary01 ~]$ orapwd dbuniquename=ORCLCDB file='+DATA/ORCLCDB/pwfile' entries=10

Enter password for SYS:

This time we have no problem to create the password file. Let's see the actual file that we created.

ASMCMD> ls -l +DATA/ORCLCDB/pwfile
Type      Redund  Striped  Time             Sys  Name
PASSWORD  UNPROT  COARSE   NOV 01 19:00:00  N    pwfile => +DATA/ORCLCDB/PASSWORD/pwdorclcdb.256.1058700217

Moreover, orapwd add the password file to the database for us. We don't have to configure it to the database manually.

[oracle@primary01 ~]$ srvctl config database -d orclcdb
...
Password file: +DATA/ORCLCDB/pwfile
...

Oh, how sweet it is!

Further reading: How to Create an Empty RAC Database without Using DBCA.

Leave a Reply

Your email address will not be published. Required fields are marked *