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:
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:
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)
[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认证。