In today’s article, we will explain what a password file is, how to create it and how to use it.
For non-SYS users, a password file is needed when they want to connect to the database as SYSDBA or SYSOPER. (On the operating system side)
By default it is created as an orapw<ORACLE_SID> file under the $ORACLE_HOME/dbs directory.
If we want, we can also create it with the “orapwd” tool.
1 | -bash-3.2$ orapwd file=orapwONURDB password=oracle |
In order to use the password file, the value of the “REMOTE_LOGIN_PASSWORDFILE” parameter in our spfile or pfile parameter file must be “exclusive”.
We connect to sysdba from the remote desktop as follows.
1 2 3 4 5 6 7 8 9 10 11 12 | C:\Users\193475>sqlplus onuer/onur.123@'172.20.31.232:1521/ONURDB' as sysdba SQL*Plus: Release 11.1.0.6.0 - Production on Sal May 26 13:58:24 2015 Copyright (c) 1982, 2007, Oracle. All rights reserved. Balant²: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> |
Now we can query the view.
1 | SQL> select * from v$pwfile_users; |
If we had not connected as sysdba, a result like the following would be returned.