ORA-01031: insufficient privileges 错误解决

文章来源于:

    http://www.cnblogs.com/kelantas/archive/2011/02/18/1958173.html



复制代码
[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
>
复制代码

问题解决了。


之后我这边又出现了ora-01017:用户名 口令无效 登陆被拒绝:

dos命令登陆sqlplus执行下面命令即可。

SQL>alter user 用户名 identified by 密码;


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值