While granting SYSDBA role to a database user, got below error.

SQL> grant sysdba to DEV_DB;
grant sysdba to DEV_DB
*
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled

SOLUTION:

This error says, that the password file is not present for the database, which is used for authenticating SYSDBA users remotely.

SQL>  select * from v$pwfile_users;

no rows selected

We can see no entries are present in v$pwfile_users table.

To fix this, create the password file

orapwd file=orapwORCL password=oracle force=y


SQL> select username,sysdba from v$pwfile_users;

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

Now grant sysdba to the user:

SQL> grant sysdba to DEV_DB;

Grant succeeded.


SQL> select username,sysdba from v$pwfile_users;

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

Now working fine as expected.:)

 

SEE ALSO – orapwd tool for password file in oracle