sqlplus无法使用命令退格删除和历史记录的解决方法(使用rlwrap)

1. 系统:RedHat Enterprise Linux 5.11

rlwrap 下载地址::https://pan.baidu.com/s/1WafT5-gwXbEtrM4LLOJK6w  密码:ga4z

2.上传文件到 Linux服务器/tmp 目录下

3、  解压缩安装

[root@localhosttmp]# tar -xvf rlwrap-0.37.tar

[root@localhosttmp]# cd rlwrap-0.37

[[email protected]]# ls

[[email protected]]# ./configure

[[email protected]]#make

[[email protected]]#make install

4、  验证安装结果

[root@localhost rlwrap-0.37]#su – oracle

[oracle@localhost ~]$ rlwrap

Usage: rlwrap [options] command ...

Options:

-a[password:]              --always-readline[=password:]

-A                         --ansi-colour-aware

[oracle@localhost ~]$ rlwrap sqlplus / as sysdba;

SQL*Plus: Release 10.1.0.3.0 -Production on ??Υ 9? 3 12:49:42 2010

Copyright (c) 1982, 2004, Oracle.  All rights reserved.

Connected to:

Oracle Database 10g EnterpriseEdition Release 10.1.0.3.0 - Production

With the Partitioning, OLAP and DataMining options

SQL> select status fromv$instance;

STATUS

------------

OPEN

5、安装报错

rlwrap: error while loadingshared libraries: libreadline.so.5: cannot open shared object file: No suchfile or directory

解决办法:

在oracle下的.bash_profile中$PATH路径中增加/usr/local/bin路径

PATH=/usr/local/bin:$PATH;export PATH

6、 编辑oracle用户下的.bash_profile

增加

alias sqlplus=’rlwrap sqlplus’

alias rman=’rlwrap rman’


 

猜你喜欢

转载自blog.csdn.net/weixin_37879830/article/details/82856236
今日推荐