Log on to Oracle as a sys user,
SQL> grant sysdba to username;
Grant sysdba to username
*
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled
First, change the value of the initialization parameter REMOTE_LOGIN_PASSWORDFILE to EXCLUSIVE.
If the password file is still missing, use orapwd to create the password file.
$ Orapwd-h
Usage: orapwd file = <fname> password = <password> entries = <users>
Where
File-name of password file (mand ),
Password-password for SYS (mand ),
Entries-maximum number of distinct DBA and OPERs (opt ),
There are no spaces around the equal-to (=) character.
This command is very simple. The password file is usually stored in the $ ORACLE_HOME/dbs directory and the naming rule is orapd + SID,
Orapwd FILE = '/db/oracle/product/10.2.0/db_1/dbs/orapw + SID' PASSWORD = oracle ENTRIES = 5 FORCE = y
Then execute
SQL> grant sysdba to username;
Grant succeeded.
Check
SQL> select * from v $ pwfile_users;
USERNAME SYSDB SYSOP
----------------------------------------
SYS TRUE
* ***** TRUE FALSE
The column of SYSDB is TRUE.
Then you can connect as sysdba.