Create & manage password file (orapwd) in Oracle

Create & manage password file (orapwd) in Oracle

Password file is used to store the password of the Oracle that allows user to remotely authenticate the user from network.

Note:
1. Use password file, the value of REMOTE_LOGIN_PASSWORDFILE should be EXCLUSIVE or SHARED.
2. Default location for Password file is diffenetn in windows and unix operating systems.
Windows : %ORACLE_HOME%\database\PWDORCL.ora
UNIX: $ORACLE_HOME\dbs\PWDORCL.ora

Check the user list present in Password file

SQL> select username,sysdba from v$pwfile_users;

USERNAME SYSDB
------------------------------ -----
SYS TRUE

Check the ORAPWD syntax of 11g and 12c version

-- For 11g Oracle
C:\Users\oracle>orapwd
Usage: orapwd file= entries= force= ignorecase= nosysdba=
where
file - name of password file (required),
password - password for SYS will be prompted if not specified at command line,
entries - maximum number of distinct DBA (optional),
force - whether to overwrite existing file (optional),
ignorecase - passwords are case-insensitive (optional),
nosysdba - whether to shut out the SYSDBA logon (optional Database Vault only).
There must be no spaces around the equal-to (=) character.

--- For 12c Oracle
orapwd file= entries= force= asm= dbuniquename= format= sysbackup= sysdg= syskm= delete= input_file=
orapwd describe file=
where
file - name of password file (required),
password - password for SYS will be prompted if not specified at command line.
entries - maximum number of distinct DBA (optional),
force - whether to overwrite existing file (optional),
asm - indicates that the password to be stored in Automatic Storage Management (ASM) disk group is an ASM password. (optional).
dbuniquename - unique database name used to identify database password files residing in ASM diskgroup only.
format - use format=12 for new 12c features like SYSBACKUP, SYSDG and SYSKM support, longer identifiers, etc. If not specified, format=12 is default (optional),
delete - drops a password file. Must specify 'asm','dbuniquename' or 'file'. If 'file' is specified, the file must be located on an ASM diskgroup (optional),
sysbackup - create SYSBACKUP entry (optional and requires the 12 format).
sysdg - create SYSDG entry (optional and requires the 12 format),
syskm - create SYSKM entry (optional and requires the 12 format),
input_file - name of input password file, from where old user entries will be migrated (optional),
describe - describes the properties of specified password file.
There must be no spaces around the equal-to (=) character.

Create a password file having SYS USER

orapwd file=E:\oracle\product\12.1.0\dbhome_1\database\PWD.ora password="Nopassword1!" entries=3

Drop the password file

orapwd delete=y file=E:\oracle\product\12.1.0\dbhome_1\database\PWD.ora

Find the format of Password file

orapwd describe file=c:\app\oracle\product\12.1.0\dbhome_1\database\PWD.ora

Create a password file in ASM diskgroup

orapwd file='+DATA/orapwORCL' ENTRIES=10 DBUNIQUENAME='ORCL'

Create password file from asmcmd

ASMCMD> pwcreate --dbuniquename ORCL +DATA/PWDFILE/pwdORCL oracle

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.