Friday, 14 May 2010

How to set up the Oracle password file

1. Log on as the Oracle owner
2. Shutdown the database
3. Linux:
cd $ORACLE_HOME\database

4. Issue the following command.
$ orapwd file= password= entries= force= nosysdba=
file - name of password file (mand),
password - password for SYS (mand),
entries - maximum number of distinct DBA,
force - whether to overwrite existing file (opt),
nosysdba - whether to shut out the SYSDBA logon (opt for Database Vault only).
There are no spaces around the equal-to (=) character.

On Unix/Linux the passwordfile convention is : $ORACLE_HOME/dbs/orapw$ORACLE_SID
On MS Windows the passwordfile convention is : %ORACLE_HOME%\database\PWD%ORACLE_SID%.ORA

5. Add, in the init.ora file, the following:
6. Restart the database for this to take affect.

Now you can try to connect using the new passwordfile, note that for local connections you can likely use OS authentication, so for a true test, make a remote connection

1. Under Linux, the file name MUST be orapw for the database in which the password file is being created has to be used.

Under Windows, the file name MUST be orapwd.ORA

2. The password MUST be the password for sys.
3. The number of entries is the maximum number of users that will be able to start and stop the database. It is important to remember that if this number is too low and additional users needs to be added, passwordfile has to recreated completely.

Related Posts by Categories

No comments: