To SYS users to enter Oracle, SQLgrantsysdbatousername; grantsysdbatousername * ERRORatline1: ORA-01994: GRANTfailed: passwordfilemissingordisabled first, the value of the initialization parameter into EXCLUSIVE if there is still a problem, it may be missing
To SYS users to enter Oracle, 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.
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 = Password = Entries =
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.