ORA-01031: insufficient privileges 错误解决

今天用em的方式远程登入Linux AS3 上的Oracle 10G,始终无法用sys以sysdba,system以sysoper的身份登入,只能以normal的身份登入。

直接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
>

问题解决了。

posted @ 2011-02-18 20:55  疯狂的毛豆  阅读(43165)  评论(1编辑  收藏  举报