Search notes:

$ORACLE_HOME/bin/orapwd

$ORACLE_HOME/bin/orapwd is a command line tool to create and maintain password files.
There are two usages: either the file=… or the describe=… parameter is specified.
If neither parameter is specified, orapwd prints a usage.
Note that there must be no spaces on either side of the equal sign.

Usage 1

orapwd
  file=<fname>
  force={y|n}
  asm={y|n}
  dbuniquename=<dbname>
  format={12|12.2}
  delete={y|n}
  input_file=<input-fname>
 'sys      ={y | password | external(<sys-external-name>)       | global(<sys-directory-DN>)}'
 'sysbackup={y | password | external(<sysbackup-external-name>) | global(<sysbackup-directory-DN>)}'
 'sysdg    ={y | password | external(<sysdg-external-name>)     | global(<sysdg-directory-DN>)}'
 'syskm    ={y | password | external(<syskm-external-name>)     | global(<syskm-directory-DN>)}'

Usage 2

orapwd describe file=<fname>
For example:
$ orapwd describe file=$ORACLE_HOME/dbs/orapw$ORACLE_SID
Password file Description : format=12

Examples

In PowerShell:
orapwd file=$env:ORACLE_HOME/database/PWD$env:ORACLE_SID.ora password=pwFilePw/42
The Oracle documentation lists the following examples
Create a password file that is located in an ASM Disk Group…
orapwd FILE='+DATA/orcl/orapworcl' DBUNIQUENAME='orcl' FORMAT=12.2
… or in the file system:
orapwd FILE='/u01/oracle/dbs/orapworcl' FORMAT=12.2
Reset the password for SYS
orapwd FILE='/u01/oracle/dbs/orapworcl' SYS=Y INPUT_FILE='/u01/oracle/dbs/orapworcl' FORCE=y
Describing a password file
orapwd DESCRIBE FILE='orapworcl'
Add a SYSBACKUP entry:
orapwd FILE='+DATA/orcl/orapworcl' DBUNIQUENAME='orcl' SYSBACKUP=password FORMAT=12.2
… with external authentication for SYS and SYSKM
orapwd FILE='+DATA/orcl/orapworcl' DBUNIQUENAME='orcl' FORMAT=12.2 sys=external('KerberosUserSYS@example.com') syskm=external('KerberosUserSYSKM@example.com')
Migrate a legacy database password File to 12c format:
orapwd FILE='/u01/oracle/dbs/orapworcl' FORMAT=12.2 INPUT_FILE='/u01/oracle/dbs/orapworcl' FORCE

See also

select * from v$pwfile_users;
The init parameter remote_login_passwordfile

Index