解决SQLPLUS登陆的ORA-01031问题

        同样也是协同我一个好学且上进的同事解决SQLPLUS登陆的问题。
        当他习惯的用SQLPLUS登陆时有这样的错误:
        
[root@DB_SERVER root]# su - oracle
[oracle@DB_SERVER oracle]$ sqlplus " / as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on ÐÇÆÚ¶þ 12ÔÂ 9 17:28:35 2008

Copyright (c) 1982, 2002, Oracle Corporation.    All rights reserved.

ERROR:
ORA-01031: insufficient privileges


Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied

         首先想到的是环境变量是否修改了,造成SID错误。但是核对无误。这时就要考虑当前数据库的登陆认证方式了,检查SQLNET.ORA文件。
        
[oracle@DB_SERVER admin]$ more sqlnet.ora
# SQLNET.ORA Network Configuration File: /home/oracle/product/9.2.0.4.0/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.

#NAMES.DEFAULT_DOMAIN = localdomain

#NAMES.DIRECTORY_PATH= (TNSNAMES)
SQLNET.AUTHENTICATION_SERVICES= (NONE,NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES,ONAMES,HOSTNAME)

      注意参数 NTS 是Windows NT native authentication,将该行屏蔽。
       尝试重新登陆。
       
[oracle@DB_SERVER admin]$ sqlplus " / as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on ÐÇÆÚ¶þ 12ÔÂ 9 17:31:15 2008

Copyright (c) 1982, 2002, Oracle Corporation.    All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

SQL>

         问题得以解决。-:)
       

你可能感兴趣的:(解决SQLPLUS登陆的ORA-01031问题)