ITPub博客

首页 > 数据库 > Oracle > 解决Linux下sqlplus中退格键和上下回看无法使用的问题

解决Linux下sqlplus中退格键和上下回看无法使用的问题

Oracle 作者:yf0609 时间:2015-08-10 16:14:40 0 删除 编辑
在linux下使用sqlplus,无法使用退格键和上下回看:
连接到: 
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from 1^H^H^H^H^H^H^H^H

解决办法:
安装rlwap包
安装步骤:
安装该包前,需先安装readline, readline-devel,libtermcap-devel 这几个包在linux光盘中都可找到,如果上述包有缺失没有安装,则configure时报错如下,
You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build this program!
    tar -xzf  rlwrap-0.37.tar.gz

    cd  rlwrap-0.37

   ./configure

    make install

安装完成后,添加别名
vi /home/oracle/.bash_profile

alias sqlplus='rlwrap sqlplus'

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30272993/viewspace-1767251/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2015-06-04

  • 博文量
    28
  • 访问量
    71900