sqlplus命令行的管理员登陆

 

前段时间写了一个重启数据库的批处理,因为是从我本机测试的,本机的用户名和密码是sys/sys,结果把它移植到服务器后忘记修改登陆用户名和密码了,没想到在执行重启数据库的时候竟然也成功了,从日志上看的很清楚。经过确认,在服务器上执行的批处理里面用户名和密码确实没有修改,于是,我做了以下这些测试,最终的结果是:

    当用Windows的管理员帐户登陆系统后登陆数据库,只要加上 as sysdba,不管用什么用户名和密码登陆,都正确,因为这时系统已经忽略了/ 两边的用户名和密码,默认就是sys用户。

C:\Documents and Settings\Administrator>sqlplus sys/sys as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 6月 7 19:52:43 2007

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> show user
USER 为 "SYS"
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

C:\Documents and Settings\Administrator>sqlplus sys/chj as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 6月 7 19:53:00 2007

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> show user
USER 为 "SYS"
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

C:\Documents and Settings\Administrator>cd\

C:\>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 6月 7 19:53:17 2007

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> show user
USER 为 "SYS"
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

C:\>sqlplus system/sys

SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 6月 7 19:53:38 2007

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> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

C:\>sqlplus system/chj

SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 6月 7 19:53:44 2007

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

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

请输入用户名:  system/sys as sysdba

连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> show user
USER 为 "SYS"
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

C:\>sqlplus system/kkkkkkkkkk as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 6月 7 19:54:30 2007

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> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

C:\>sqlplus cppi/cppi

SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 6月 7 19:54:58 2007

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> show user
USER 为 "CPPI"
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

C:\>sqlplus cppi/zsm as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 6月 7 19:55:16 2007

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> show user
USER 为 "SYS"
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

C:\>sqlplus hello/kkk as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 6月 7 19:56:05 2007

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> show user
USER 为 "SYS"
SQL>

转载于:https://www.cnblogs.com/senzjx/archive/2009/09/14/1566323.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值