Tuesday, 3 May 2016

Oracle Password File 10gr2 & 11gr2


In order to startup an Oracle database, we need to have an Oracle password file or on Operating system authentication.
If the init.ora parameter remote_login_passwordfile is set to exclusive or shared, Oracle will search for a password file to do the authentication.
The default location for an Oracle password file is the %ORACLE_HOME%/database on Windows and $ORACLE_HOME/dbs on Unix flavours.

On windows, the filename should be: PWD%ORACLE_SID%.ora
On Unix, the filename should be: orapw$ORACLE_SID
You can use the orapwd command to create a new password file.
Usage: orapwd file= password= entries= force=
  where
    file - name of password file (mand),
    password - password for SYS (mand),
    entries - maximum number of distinct DBA,
    force - whether to overwrite existing file (opt),
  There are no spaces around the equal-to (=) character.
UNIX syntax:
orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=the_secret_password
UNIX example:
orapwd file=/u01/app/oracle/product/11.2.0/db_1/dbs/orapwkrengerdb password=the_secret_password
Windows syntax:
orapwd file=%ORACLE_HOME%\database\PWD%ORACLE_SID%.ora password=the_secret_password
Windows example:
orapwd file=D:\oracle\app\product\11.2.0\db_1\database\PWDKRENGERDB.ora password=the_secret_password

No comments:

Post a Comment