12cR2 feature # 5 – HISTORY in sqlplus prompt
Posted by Pavan DBA on December 17, 2016
12cR2 has introduced new option HISTORY in sqlplus to view or edit or delete the sql, pl/sql commands we have executed in SQL prompt. This works just like “history” command in Unix prompt.
SQL> set history on –> enables the history
SQL> set history off –> disables the history
SQL> show history –> to check if history is ON or OFF
example:
SQL> set history ON
SQL> select count(*) from emp;
SQL> desc dept
SQL> select name from v$database;
SQL> history
1 select count(*) from emp;
2 desc dept
* 3 select name from v$database; (* represents last used command)
oracle057 said
Thanks for posting awesome information and very good points were stated in the blog
http://erptree.com/course/oracle-fusion-hcm-online-training/
Bhanu said
If we enable history ,how will be performance ?
Pavan DBA said
it will just store commands, so won’t effect any performance