sqlplus / as sysdba 详解

在命令窗口输入“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;”查看,可看到如下结果:

C:\>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期二 4月 17 10:11:11 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>

很明显我们刚刚是以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方式登录时,采用的是操作系统验证的方式,所以用户名/密码输与不输入是一样的。

  • 4
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值