ITPub博客

首页 > 数据库 > Oracle > 数据库用户被lock,不影响当前已连接的session

数据库用户被lock,不影响当前已连接的session

原创 Oracle 作者:xiaoqiang917 时间:2011-02-18 20:05:59 0 删除 编辑

给自己提了个问题,顺手验证了一把

[@more@]

1、以scott账户登录

SQL> conn scott/tiger
Connected.
SQL>
SQL>
SQL>
SQL> show user;
USER is "SCOTT"
SQL>
SQL> select * from dual;

D
-
X


2、另起一个sqlplus窗口
SQL> conn / as sysdba
SQL> alter user scott account lock;

SQL> alter user scott account lock;

User altered.

SQL> conn scott/tiger
ERROR:
ORA-28000: the account is locked


Warning: You are no longer connected to ORACLE.

3、返回原先的sqlplus窗口

SQL> select * from dual;

D
-
X

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25274175/viewspace-1046173/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: rman学习笔记
请登录后发表评论 登录
全部评论

注册时间:2011-02-18

  • 博文量
    11
  • 访问量
    10422