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

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)

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

  1. 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:

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

 
%d bloggers like this: