Settings for backspace and arrow keys in Sqlplus

Source: Internet
Author: User
Tags readline

In the newly installed Oracle, we use Sqlplus will find very crappy, not only the BACKSPACE key is not good to use, the direction of the key can not recall history, there are several solutions.

1. You can use the Ctrl+backspace key to force output input errors, you can also export Stty erase ^h, of course, this is only a temporary method, want to see the following once and for all.

2. Edit the bash_profile file in the Oracle User directory

[Email protected] ~]$ Vi. bash_profile

Add the following code

Stty Erase ^h

Save exit

Make the changes effective[[email protected] ~]$ source./.bash_profile OK so the problem of the backspace bar is resolved, the following to resolve the key can not bring up the history of the problem, the problem may be installed by the software Rlwrap callback Sqlplus executed in the command to resolve. Installation Steps1.before installing the software, you need to install the ReadLine and libtermcap-devel two dependent packages, so first install the two software, configure the local yum, switch to the root user, directly execute the following command
#yum Install readline* libtermcap-devel*

2. then we install the latest version of Rlwrap,rlwrap is rlwrap-0.37.tar.gz official homepage for http://utopia.knoware.nl/~hlub/ uck/rlwrap/

 1  wget http:// Span style= "Color:rgb (0, 128, 0); >utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.37.tar.gz  2  Tar xzvf rlwrap-0.37  .tar.gz  3  cd Rlwrap-0.37  4 ./configure--prefix=/usr/local/rlwrap  5  make  Span style= "Color:rgb (0, 128, 128); >6  make install 

3. Now we use the /usr/local/rlwrap/bin/rlwrap sqlplus command to enter the Sqlplus, if you do not want to enter such a long command each time, you can under the Oracle user. Bash_ Add an alias to the Profil
Alias sqlplus= '/usr/local/rlwrap/bin/rlwrap sqlplus '
Make the changes effective
[[email protected] ~]$ source./.bash_profile

This allows you to use the function of the callback command whenever you enter the Sqlplus command directly.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.