In today’s article, I will make important explanations about Password File in Oracle.
The password file is an optional file.
When is the password file used?
If we want non-SYS users to connect as SYSDBA or SYSOPER, we need to use it.
The password file is created as orapw<ORACLE_SID> under the $ORACLE_HOME/dbs directory by default on Linux servers when the database is created.
If we want, we can create a password file with the “orapwd” tool.
Password file creation;
1 2 | # cd $ORACLE_HOME/dbs # orapwd file=orapw<ORACLE_SID> password=<sys password> |
This parameter has three values;
Exclusive: Single instance database can be connected. Users other than SYS can be found in the password file.
Shared: It can use more than one database password file. Only the SYS user can be found in the password file. If a user is requested to be given SYSDBA authority, an error is received. (ORA-019999).
None: Ignores the Oracle password file.
When the “REMOTE_LOGIN_PASSWORDFILE” parameter is “Exclusive”, the SYSDBA authorization can be given to the user as follows;
1 | SQL> grant sysdba to emrah; |
Users with sysdba and sysoper privileges can be listed by querying the “V$PWFILE_USERS” image.
1 | SQL> select * from v$pwfile_users; |