oracle方向键,让ORACLE sqlplus 支持方向键

本文介绍了如何在Linux环境下为Oracle SQLPlus安装rlwrap工具,以实现命令历史的上下查询功能。首先,需要下载并解压rlwrap安装包,然后通过配置和编译进行安装。如果在编译过程中遇到缺少readline库的问题,需要安装readline-devel及其依赖libtermcap-devel。完成安装后,在用户的.bash_profile文件中设置别名,将sqlplus和rman命令与rlwrap关联起来,从而使得Linux下的SQLPlus能够拥有类似Windows的命令历史浏览体验。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

linux中的ORACLE

sqlplus默认不支持向系统或WINDOWS那要向上、向下查询命令记录

不果可以安装一个程序来支持

它就是 rlwrap

从网上找个安装包,解压

一:安装rlwrap

[root@oracle11g ~]# tar -zxvf rlwrap-0.30.tar.gz [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

如果在make 时提示

checking for tgetent in -lncurses… no

checking for tgetent in -ltermcap… no

configure: WARNING: No termcap nor curses library found

checking for readline in -lreadline… no

configure: error:

You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build

this program!

那你就要安装readline-devel-5.1-1.1.i386包

但安装它还要有个前提是已安装

libtermcap-devel-2.0.8-46.1.i386包

系统中如果安装就查看是否安装devel版如

readline-5.1-1.1

readline-devel-5.1-1.1

二:配置环境变量

[root@oracle11g rlwrap-0.30]# vi /home/oracle/.bash_profile 添加 alias sqlplus=’rlwrap sqlplus’ alias rman=’rlwrap rman’

Linux下的SQL Plus 终于可以像Windows下的那样使用了。

linux中的ORACLE sqlplus默认不支持向系统或WINDOWS那要向上、向下查询命令记录 不果可以安装一个程序来支持 它就是 rlwrap从网上找个安装包,解压 一:安装rlwrap[root@oracle11g ~]# tar -zxvf rlwrap-0.30.tar.gz [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如果在make 时提示

checking for tgetent in -lncurses… nochecking for tgetent in -ltermcap… noconfigure: WARNING: No termcap nor curses library foundchecking for readline in -lreadline… noconfigure: error:

You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to buildthis program! 那你就要安装readline-devel-5.1-1.1.i386包 但安装它还要有个前提是已安装libtermcap-devel-2.0.8-46.1.i386包 系统中如果安装就查看是否安装devel版如readline-5.1-1.1readline-devel-5.1-1.1 二:配置环境变量[root@oracle11g rlwrap-0.30]# vi /home/oracle/.bash_profile 添加 alias sqlplus=’rlwrap sqlplus’ alias rman=’rlwrap rman’Linux下的SQL Plus 终于可以像Windows下的那样使用了。

打赏

8732971891f4ba05583674ca6b8145ac.png微信扫一扫,打赏作者吧~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值