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