ITPub博客

首页 > 数据库 > Oracle > oracle 12c R2 new feature 支持运行过的历史命令

oracle 12c R2 new feature 支持运行过的历史命令

原创 Oracle 作者:paulyibinyi 时间:2015-11-26 17:23:23 0 删除 编辑
Support for command history
SQL*Plus now supports command history. The command history feature enables
users to run, edit, or delete previously used SQL*Plus, SQL, or PL/SQL commands
from the history list in the current session.

就和操作系统一样,运行过的命令可以从.history文件中查找,可以深入的进一步排查问题和审计

运行语法如下:

SET HIST[ORY] {ON | OFF | n}

HISTORY

举例如下:
SQL>SET HISTORY ON
SQL> show history
History is ON and set to "100"
SQL> show user
USER is "SYSTEM"
SQL> desc dual
Name Null? Type
----------------------------------------- -------- ----------------------------
PROD VARCHAR2(1)
SQL> select * from dual;
D
-
X
SQL> history
1 show history
2 show user
3 desc dual
* 4 select * from dual;


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

请登录后发表评论 登录
全部评论
学习数据库

注册时间:2007-12-11

  • 博文量
    907
  • 访问量
    6894208