Pavan DBA's Blog

The DBA Knowledge Store

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


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)

3 Responses to “12cR2 feature # 5 – HISTORY in sqlplus prompt”

  1. oracle057 said

    Thanks for posting awesome information and very good points were stated in the blog

  2. Bhanu said

    If we enable history ,how will be performance ?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: