The error that occurs when you want to assign permissions to a user:
The code is as follows |
Copy Code |
Sys@orcl>grant SYSDBA to Sys; Grant SYSDBA to Sys
|
*
ERROR at line 1:
ora-01994:grant failed: Password file is missing or disabled
The code is as follows |
Copy Code |
Sys@orcl>show Parameters Pass NAME TYPE VALUE ------------------------------------ --------------------------------- ------------------------------ Remote_login_passwordfile string EXCLUSIVE sys@orcl>sql>!ls-l $ORACLE _home/dbs Total 52 -rw-rw--1 Oracle Oinstall 1552 SEP 15:46 Hc_dbsid.dat -rw-r-–1 Oracle Oinstall 12920 May 3 2001 Initdw.ora -rw-r-–1 Oracle Oinstall 8385 SEP 1998 Init.ora -rw-r-–1 Oracle Oinstall 2009 LKDBSID -rw-r-–1 Oracle Oinstall 2560 Sep 16:26 orapwdbsid -rw-r-–1 Oracle Oinstall 10752 SEP 15:11 Spfiledbsid.ora |
Can see the password file exists, but how can happen ORA-01994 it!!
Find the results, think of it, when the original password file was created, using:
The code is as follows |
Copy Code |
Orapwd file= $ORACLE _home/dbs/orapw$oracle_sid entries=10 force=y and $ORACLE _sid=dbsid |
The Orapwdbsid file is generated. On Linux systems, files are case-sensitive!!
code is as follows |
copy code |
sql>!MV Orapwdbsid orapwdbsid Sys@orcl>r 1* select * from v$pwfile_users username sysdba sysoper sysasm --------------------------------------------------------- sys true true FALSE |