Get the App
SLTechnology News&Howtos  ›  Database  › 

Solve the problem that sqlplus keys and Back Space keys cannot be used.

Shulou Source: shulou.com Published: 2022-06-01 18:19:28 10月01日 Update

When using Sqlplus, we will find that when we want to delete the wrong words with Back Space, we will find ^ H garbled. There are two ways to solve this problem:

One:

You can delete it by directly using the key combination of Ctrl+Back Space

Two:

Add: stty erase'^ H' to the. bash_profile file under the root user

Then use cource .bash _ profile to take effect again.

When using Sqlplus, it can be a headache if you want to scroll through the code up and down and the left and right keys are not available.

Here is how to solve the problem that the left and right keys are not available:

One: install readline (available on the readline package installation CD)

[root@db1 ~] # yum-y install readline*

Two: install rlwrap

Download the rlwrap installation package http://rpmfind.net/linux/rpm2html/search.php?query=rlwrap on the official website

Unzip the installation:

[root@db1 rlwrap] # tar-xvf rlwrap-0.42.tar.gz

[root@db1 rlwrap] # cd rlwrap-0.42

[root@db1 rlwrap-0.42] #. / configure

[root@db1 rlwrap-0.42] # make & & make install

Three: easy to use rlwrap

[root@db1 rlwrap-0.42] # vi / home/oracle/.bash_profile add the following two sentences

Alias sqlplus='rlwrap sqlplus'

Alias rman='rlwrap rman'

[root@db1 rlwrap-0.42] # soruce / home/oracle/.bash_profile give him effect

Switch to the oracle user and execute sqlplus to be ready for normal use.

Tags: Up and down time up and down user random code headache code CD method word file method error add switch combination problem Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Docker Huawei OPPO Reno vpn