sqlplus / as sysdba 报ORA-01031: insufficient privileges

1、oracle不在dba组中。

[root@localhost ~]# gpasswd -d oracle dba
Removing user oracle from group dba
[root@localhost ~]# su - oracle
-bash: /etc/profile: line 61: syntax error: unexpected end of file
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on ÐÇÆÚÎå 8Ô 9 23:57:19 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

ERROR:
ORA-01031: insufficient privileges


Enter user-name:

 

2、检查sqlnet.(ORACLE_HOME%NETWORK/ADMIN目录)是否包含这句。

SQLNET.AUTHENTICATION_SERVICES=(NTS)有的话注释掉。

[oracle@localhost admin]$ more sqlnet.ora | grep NTS
SQLNET.AUTHENTICATION_SERVICES=(NTS)
[oracle@localhost admin]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on ÐÇÆÚÁù 8Ô 10 00:00:40 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

ERROR:
ORA-01031: insufficient privileges


Enter user-name:
[oracle@localhost admin]$ more sqlnet.ora | grep NTS
#SQLNET.AUTHENTICATION_SERVICES=(NTS)
[oracle@localhost admin]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on ÐÇÆÚÁù 8Ô 10 00:01:19 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL>

 

如果使用了SQLNET.AUTHENTICATION_SERVICES=(NTS)
则说明可以使用OS认证就,只要conn / as sysdba 就可以登陆
但如果注释掉或SQLNET.AUTHENTICATION_SERVICES=(none)
必须要使用conn sys/password@oracle as sysdba才能登陆

1、在windows下,SQLNET.AUTHENTICATION_SERVICES必须设置为NTS或者ALL才能使用OS认证;不设置或者设置为其他任何值都不能使用OS认证。
2、在linux下,在SQLNET.AUTHENTICATION_SERVICES的值设置为ALL,或者不设置的情况下,OS验证才能成功;设置为 其他任何值都不能使用OS认证。

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值