Oracle 12c database password file

one of the new features in 12c is having the passwords in the password file being by default case sensitive. also, you can configure password file for the new system account users (SYSDG—-> for data guard, SYSBACKUP —-> for backup operations and administration)

Example of password file command:

orapwd file=EMO_DB_PASS entries=10 sysbackup=y sysdg=y

*** the  EMO_DB file (password file) will be created in the directory where you are currently in.

password file command

as shown in the above picture passwords are required to be entered for SYS,SYSBACKUP,SYSDG accounts.

the following command will be executed to access the database as SYSDG user for verification:

sqlplus SYSDG/cocoChannel7 as SYSDG

sqlplus example

connecting using ‘SYS’ user from client machine

in order to connect using ‘SYS’ account from your local machine to the Oracle database, you need to follow the following steps:

1. create a password file, using the command:

orapwd file=orapwsid  password=xxxxx entries=Z

**IMPORTANT REMARKS**:

this command should be executed under the directory: $ORACLE_HOME/dbs where your init.ora is located

orapwsid: where you need to append the database SID in the name, which is a standrd conversion naming for the password file that must be used.

Z: represents the number of oracle users that needs to be granted the SYSDBA privilege

just type the following command and it will list for you the parameters in details: orapwd

2. edit the init.ora file under $ORACLE_HOME/dbs

change the parameter “remote_login_passwordfile” to “exclusive”

SQL> show parameter password

NAME TYPE VALUE
—————————– ———– ———-
remote_login_passwordfile string EXCLUSIVE

3. grant ‘sysdba’ privilege to the oracle account you are seeking.

 

for example,

SQL> grant sysdba to db_user;