在命令窗口输入“sqlplus / as sysdba”后回车,即可连接到Oracle
C:\>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 4月 17 10:05:34 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
那么到底此命令到底执行了什么操作,登录后输入“select user from dual;”查看:
SQL> select user from dual;
USER
------------------------------
SYS
SQL>
很明显我们刚刚是以SYS用户登录的
这就说明此处省略了用户名及密码
我们再以“sqlplus sys/****(sys用户的密码) / as sysdba”的方式登录,此时不论用户名或密码是否在系统中存在都可正常登录,登录的用户还是“SYS”,命令操作如下:
C:\>sqlplus sss/sss as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 4月 17 10:21:12 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select user from dual;
USER
------------------------------
SYS
SQL>
命令详解:以sqlplus / as sysdba方式登录时,采用的是操作系统验证的方式,所以用户名/密码输与不输入是一样的。