oracle 12c R2 new feature 支援執行過的歷史命令

paulyibinyi發表於2015-11-26
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部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-1847329/,如需轉載,請註明出處,否則將追究法律責任。

相關文章