Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Using rlwrap to realize sqlplus arrow keys to flip through the oracle history commands that have been typed.

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Oracle beginners may use SecureCRT to connect to the server under Linux. When using sqlplus, they will re-execute the command they entered before, and they will not be able to realize it.

The same problem must have been encountered by predecessors, so Google it and find the rlwrap tool. Let's take a look at it together:

rlwrap download address: utopia.knoware.nl/~hlub/uck/rlwrap/#rlwrap

I. Install readline package

In the system CD we can easily find packages that match our version

#rpm -qa| grep readline

//check whether the system is installed first

#rpm -Uvh readline-5.1-3.el5.i386.rpm

//prompt to install readline-devel-5.1-3.el5.i386.rpm

#rpm -ivh readline-devel-5.1-3.el5.i386.rpm readline-5.1-3.el5.i386.rpm

II. Installation of rlwrap

After downloading rlwrap from the link above, put the package into your system

# tar -zvxf rlwrap-0.37.tar.gz#cd rlwrap-0.37#./ configure#make#make install#vim /home/oracle/.bash_profile

Save exit by adding the following two aliases:

alias sqlplus='rlwrapsqlplus'alias rman='rlwrap rman'

III. Use

$sqlplus / as sysdbaSQL>

All right, now we can easily invoke the history command using the up and down keys.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report