There are times when you may need to rebuild the password file for a database. The most likely reason is to increase the number of DBAs above the number you allotted when you created the file. Recreating the password file is not a particularly difficult task,
but it does require you to shut down and restart the database. The following steps explain how to rebuild a password file.
- Select a list of current password file entries from the v$pwfile_users view. Save this list for later reference.
- Shut down the database.
- Delete the existing password file.
- Create a new password file with the number of entries you want.
- Restart the database.
- Connect as an
INTERNAL
user.
- Using the list you made earlier as a reference, grant SYSDBA and SYSOPER privileges to the appropriate users.
The key to the rebuild process is the list that you made in Step 1. Deleting and recreating the password file results in a file that has entries
only for the
INTERNAL
and
SYS
users. You need to re-enter all the other DBA users, which you can easily do if you make a list ahead of time.