案例:
1,发现此时操作系统认证不成功:
C:\Users\Administrator.WIN-20100719IOX>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on星期五12月31 14:25:52 2010
Copyright (c) 1982, 2005, Oracle.All rights reserved.
ERROR:
ORA-01031: insufficient privileges
请输入用户名:
ERROR:
ORA-01017:用户名/口令无效;登录被拒绝
请输入用户名:
ERROR:
ORA-01017:用户名/口令无效;登录被拒绝
SP2-0157:在3次尝试之后无法连接到ORACLE,退出SQL*Plus
2,查看sqlnet.ora文件内容:
# sqlnet.ora Network Configuration File: C:\app\Administrator\product
\11.2.0\dbhome_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
3,检查compmgmt.msc,在命令行下敲入进入计算机管理,选择本地用户和组—>组,发现一个组的名字叫做ORA_DBA,未把administrator用户加入该组
4,把administrator用户添加到该组后,此时可用操作系统认证登录Oracle数据库:
C:\Users\Administrator.WIN-20100719IOX>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on星期五12月31 14:30:50 2010
Copyright (c) 1982, 2005, Oracle.All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>