History of SQL * Plus on Linux

How to make sqlplus on Linux to maintain my query history? So that I can use the up / down arrows to get my previous request.

+5
source share
2 answers
Package required

rlwrap . Used as follows:

$ rlwrap sqlplus user/password@sid

It's nice to put an alias in .bashrc:

alias sqlplus="rlwrap sqlplus"

Found the answer here:

http://sysdba.wordpress.com/2006/10/08/how-to-use-rlwrap-to-get-a-command-history-in-sqlplus/

+5
source

Starting with the release of "Oracle 12c release 2" (SQL * Plus Release 12.2.0.1.0), they have now implemented the history command.

/ , , rlwrap.

history:

https://docs.oracle.com/database/122/SQPUG/HISTORY.htm#SQPUG-GUID-CCF9B047-3122-4644-BA06-5FA4B5812E9F

0

All Articles