Oracle 禁止操作系统认证登录

2014-11-24 18:58:42 · 作者: · 浏览: 5

1.以操作系统认证方式登录数据库的方法


1)最基本的方法就是使用“sqlplus / as sysdba”登录数据库


sqlplus / as sysdba


斜杠“/”左面是用户名,右面是密码,这里表示不给出用户名和密码一样可以登录到数据库系统中



2)使用正确的用户名和密码登陆数据库


sqlplus sys/password as sysdba


显然,登录完全没有问题。



3)使用错误的用户名和密码登陆数据库


sqlplus wind/wind as sysdba


这种操作系统认证方式登录数据库,即使使用的是错误的用户名和密码依然可以顺利的登录到数据库中.


2.禁用操作系统认证方式登录数据库


SQLNET.AUTHENTICATION_SERVICES=(NONE)



3.验证是否生效


1)必须使用正确的用户名和密码才能登陆到系统中



C:\>sqlplus sys/password as sysdba


SQL*Plus: Release 11.2.0.2.0 Production on 星期三 2月 16 13:41:14 2011


Copyright (c) 1982, 2010, Oracle. All rights reserved.



连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL>



2)使用正确的用户名和错误的密码进行登录测试



C:\Users\Administrator>sqlplus sys/wind as sysdba


SQL*Plus: Release 11.2.0.2.0 Production on 星期三 2月 16 13:40:35 2011


Copyright (c) 1982, 2010, Oracle. All rights reserved.


ERROR:
ORA-01031: insufficient privileges



请输入用户名:



3)使用“sqlplus / as sysdba”登录方式进行验证


C:\>sqlplus / as sysdba


SQL*Plus: Release 11.2.0.2.0 Production on 星期三 2月 16 13:42:29 2011


Copyright (c) 1982, 2010, Oracle. All rights reserved.


ERROR:
ORA-01031: insufficient privileges


请输入用户名: