In Oracle 12.2, SQL*Plus can keep the history of the commands executed. You can enable or disable the HISTORY command in the current SQL*Plus session by using the SET HISTORY command.
The history feature is not enabled by default, so after you start SQL*Plus, you need to enable history by running “set hist[ory] on”

You can run “show hist” to be sure that the history is enabled:

You can delete all history by running “hist clear”:

The following example shows you how to enable or disable command history, and how to check the command history status:

— To keep history of 1000 sql command.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.