Wednesday, July 6, 2011

ORA-01994: GRANT failed: password file missing or disabled

Environment: Database 11.2.0.2 , OS Solaris 10

Problem:
I hit this error when I was trying to give sysdba privilege to one of the database application user account which need to install BAM. I logged in locally from the host as sys user.

SQL> grant sysdba to abc_admin;

ORA-01994: GRANT failed: password file missing or disabled


Solution:

1. Create a password file from os:

orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=test2sys entries=5 force=y


2. Change the parameter REMOTE_LOGIN_PASSWORDFILE to EXCLUSIVE:

alter system set remote_login_passwordfile=exclusive scope=spfile;

note: need to bounce the DB to make it enabled.

3. Also change the owner and the permission of the password file if it is not under oracle:dba.

chown oracle:dba $ORACLE_HOME/dbs/orapw$ORACLE_SID

chmod 755 $ORACLE_HOME/dbs/orapw$ORACLE_SID