In Linux, how does one use rlwrap in Oracle to solve garbled characters in the upper and lower keys?

Source: Internet
Author: User
In Linux, how does one use rlwrap in Oracle to solve garbled characters in the upper and lower keys?

In Linux, how does one use rlwrap in Oracle to solve garbled characters in the upper and lower keys?

I saw the rlwrap tool on the Forum. It feels good. I will make a summary. (Rlwrap download)

In Windows, when running SQL * Plus in the doscommand window, you can use the up and down keys to skip the previously executed SQL statements. you can modify them as needed and press Enter to submit them again. however, when running SQL * Plus in Linux Shell, it does not provide browsing history command lines. to achieve the same purpose in Linux, you can install rlwrap. This program is a Shell and can run any commands you provide to it, including parameters, and add the command history browsing function. the rlwrap program is under the GPL license.

1. Install readline


The OS installation CD provides the readline package.

[Root @ Oracle11g ~] # Rpm-Uvh readline *

Error: Failed dependencies: libtermcap-devel is needed by readline-devel-5.1-1.1.i386.rpm

[Root @ oracle11g ~] # Rpm-Uvh libtermcap-devel-2.0.8-46.1.i386.rpm

[Root @ oracle11g ~] # Rpm-Uvh readline *

Package readline-5.1-1.1 is already installed

[Root @ oracle11g ~] # Rpm-Uvh readline-devel-5.1-1.1.i386.rpm

Ii. Install rlwrap

[Root @ oracle11g ~] # Tar-zxvf rlwrap-0.30.tar.gz.zip

[Root @ oracle11g ~] # Cd rlwrap-0.30

[Root @ oracle11g rlwrap-0.30] #./configure

[Root @ oracle11g rlwrap-0.30] # make

[Root @ oracle11g rlwrap-0.30] # make install

Iii. convenient use of rlwrap

[Root @ oracle11g rlwrap-0.30] # vi/u01/oracle/. bash_profile

Add

Alias sqlplus = 'maid sqlplus'

Alias rman = 'rlwrap rman'

In Linux, SQL Plus can finally be used as in Windows.

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.