Monday , December 23 2024

SQL Plus History

With a feature that introduced with 12c R2, we can see the history of Sqlplus and run the commands we have run without rewriting.

By default, history is turned off. We need to turn on before use.

Check History is Turned On

Turn On History

Increase the number of commands to be retained in History

In the following example, we ensure that the last 500 commands in the past are retained.

Show retained commands in History

Run a command retained in the History again

After detecting the number of the corresponding command as above, we can run the command again as follows.

Delete a command from the History

Clear all commands from the History

Loading

About dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *