Home > Database > Mysql Tutorial > body text

ORA-01994: GRANT 失败: 口令文件缺失或已禁用

WBOY
Release: 2016-06-07 17:05:01
Original
1793 people have browsed it

ORA-01994: GRANT 失败: 口令文件缺失或已禁用

要给某个用户赋权限时发生的错误:

# sqlplus / as sysdba

SQL> grant sysdba to sys_user_admin;

grant sysdba to sys_user_admin
*
ERROR at line 1:
ORA-01994: GRANT 失败: 口令文件缺失或已禁用

SQL> show parameters pass


NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------

remote_login_passwordfile            string      EXCLUSIVE

SQL> !ls -l $Oracle_HOME/dbs
total 52
-rw-rw---- 1 oracle oinstall  1552 Sep 21 15:46 hc_dbsid.dat
-rw-r----- 1 oracle oinstall 12920 May  3  2001 initdw.ora
-rw-r----- 1 oracle oinstall  8385 Sep 11  1998 init.ora
-rw-r----- 1 oracle oinstall    24 Jul 21  2009 lkDBSID
-rw-r----- 1 oracle oinstall  2560 Sep 21 16:26 orapwDBSID
-rw-r----- 1 oracle oinstall 10752 Sep 21 15:11 spfileDBSID.ora


可以看到口令文件时存在的,可是怎么会发生 ORA-01994呢!!

遍寻不见结果,想起来,当初创建口令文件的时候,采用的是:

orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID entries=10 force=y

而 $ORACLE_SID=DBSID

生成的是 orapwDBSID 文件。在Linux系统上,文件区分大小写的!!

SQL> !mv orapwDBSID orapwdbsid

SQL> select * from v$pwfile_users;


USERNAME                       SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS                            TRUE  TRUE  FALSE
SYS_USER_ADMIN                     TRUE  FALSE FALSE

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!