SQLPlus is a command line tool which allows you to store and retrieve data in Oracle, a relational database management system. Databases consist of tables that can be manipulated using SQL. SQL is a programming language used for managing databases. SQL queries are sent to the server using this SQLPlus tool. If you are using SQLPlus under Linux then you cannot rollback your command using the UP arrow or backspace button. This will display special characters. You need to use some existing commands such as L to review last command, R to redo last command, etc. You can install rlwrap package for Oracle in Linux when you are working with SQLPlus in a Linux environment to view previous commands.
[Oracle] - using SQLPlus under Linux
You would be surprised to see that you can't rollback your command with the up arrow (last command entered) or the backspace button (actual command correction).Special characters are displayed.
Some existing commands
- Review the last command entered:
- Redo last command entered:
- Correcting last command entered:
to have the command executed.
- However, for those who want to return to a more classic methodology, you can download the rlwrap package:
apt-get install rlwrap sur Debian, etc.
rlwrap sqlplus user/pass@SID
- You can now use your arrow keys and backspace. Commands (R, L and c) mentioned above can be used too.
Automate the use of rlwrap
- To automate the use of rlwrap, add the following line in your .bashrc file:
alias sqlplus='rlwrap sqlplus'
- Run the following command for the changes are taken into account:
- Now you no longer need to specify rlwrap: the "sqlplus" command will automatically be interpreted as "rlwrap sqlplus".
In the same category
Published by jad05
. - Latest update by Virginia Parsons