Sunday, November 18, 2012

Create Oracle password file

In Oracle there is two ways to authenticate database administrators. OS authentication or with Oracle password file. If you have set 'shared or 'exclusive' in remote_login_passwordfile init parameter then Oracle password file is used. 'exclusive' is the default value.
And the default place for password file is on unix:
$ORACLE_HOME/dbs/orapw$ORACLE_SID
and on windows:
%ORACLE_HOME%\database\PWD%ORACLE_SID%.ora


You can create oracle password file with orapwd utility (as oracle user and $ORACLE_SID and $ORACLE_HOME env parameters set):
orapwd file=orapwtestdb password=xxxxx

you can also use 'entries' option when you create paasword file. this options tells how many user can be added into the file:
orapwd file=orapwtestdb password=xxxxx entries=5


If you give user SYSDBA or SYSOPER privilege that user will be added into the password file automatically.

You can check password file users from sqlplus  v$pwfile_users  view:
select * from  v$pwfile_users;

No comments:

Post a Comment