sqlplus / as sysdba 報ORA-01031: insufficient privileges

來源:互聯網
上載者:User

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認證。

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.