ORA-01031: insufficient privileges 的一种可能的原因
时间:2011-02-18 来源:疯狂的毛豆
直接telnet到主机上检查,发现也无法以sysdba的身份登入。
[oracle@guohuias3 dbs]$ sqlplus sys/kelantas@orcl as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 18 20:40:24 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
以internal的方式登入
[oracle@guohuias3 oracle]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 18 20:13:41 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect /as sysdba
Connected.
SQL> show parameter password;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string EXCLUSIVE
SQL> grant sysdba to sys;
grant sysdba to sys
*
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled
SQL> select * from v$pwfile_users;
no rows selected
发现没有password文件;
检查password文件是否正确
[oracle@guohuias3 dbs]$ cd $ORACLE_HOME/dbs
[oracle@guohuias3 dbs]$ ls -l orapw*
-rw-r----- 1 oracle oinstall 5120 Jul 9 2010 orapwAUXY.pwd
-rw-r----- 1 oracle oinstall 2560 Feb 18 20:26 orapworcl
检查当前 $ORACLE_SID=ORCL
发现password文件的orcl是小写的,把它改正过来
[oracle@guohuias3 dbs]$ mv orapworcl orapwORCL
并再次查询相关视图:
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
可以看到有对应的password文件了。
现在再次登入
[oracle@guohuias3 dbs]$ sqlplus sys/kelantas@orcl as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 18 20:51:05 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>
问题解决了。
相关阅读 更多 +