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

Quick implementation of command recording and deletion keys in oracle, and quick configuration using scripts

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Environment: centos6

One: command record

1. Install readline-devel using yum

Yum install readline-devel

two。 Source code compilation and installation of rlwrap

# wget http://utopia.knoware.nl/~hlub/rlwrap/rlwrap-0.37.tar.gz# tar-xf rlwrap-0.37.tar.gz# cd rlwrap-0.37/#. / configure# make & & make install

3. Set the system alias of sqlplus: # vim / home/oracle/.bash_profile add: alias sqlplus='rlwrap sqlplus'alias rman='rlwrap rman' to the header or tail

Two: delete key

Under sqlplus, use Backspace to delete characters, use the stty command to redefine ^ H, you can execute stty erase ^ H before using sqlplus, or you can put this sentence in the oracle user's .bash_profile file.

Three: quick configuration of scripts

# / bin/bash

# description:quick configure the oracle del and history command record

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin

Export PATH

# the centos6 has already installed the readline,so we needn't to install the readline again

# yum install readline

# use the yum to install readline-devel

Yum install readline-devel

# use the tar file to install rlwrap

Cd / usr/local/src

Wget http://utopia.knoware.nl/~hlub/rlwrap/rlwrap-0.37.tar.gztar-xf rlwrap-0.37.tar.gzcd rlwrap-0.37/./configuremake & & make install

# configure the .bash _ profile

Cat > > / home/oracle/.bash_profile

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