oracle无法回车,sqlplus中打错sql命令时不能回撤,不能修改,只能回车重新写

sqlplus中打错sql命令时不能回撤,不能修改,只能回车重新写

出错如下:  ^H^H^[[D^[[D^[[C^[[C^[[A^[[A

使用rlwrap+SQLPLUS方法

1.安装rlwrap软件

安装rlwrap之前需要readline。

readline可以直接在安装光盘中找到 ,也可以自己上传RMP包到光盘进行安装。

yum -y install readline-devel-5.1-3.el5.i386.rpm

然后安装rlwrap,需要自己上传安装包到 服务器,进行安装。

[root@catch ~]# ls

rlwrap-0.37.tar.gz

[root@catch ~]# tar -zxvf rlwrap-0.37.tar.gz

[root@catch rlwrap-0.37]# pwd

/root/rlwrap-0.37

[root@catch rlwrap-0.37]# ./configure

[root@catch rlwrap-0.37]# make

[root@catch rlwrap-0.37]# make install

2.配置打开SQLPLUS/RMAN等时使用rlwrap

在操作ORACEL的用户的.bash_profile文件中增加如下两句:

[root@catch oracle]# pwd

/home/oracle

[root@catch oracle]#export alias sqlpls='rlwrap sqlplus'

[root@catch oracle]#export alias rman='rlwrap rman'

[root@catch oracle]# cat .bash_profile

……………………

alias sqlplus='rlwrap sqlplus'

alias rman='rlwrap rman'

配置环境变量参数后使用ORACLE用户验证下

[oracle@catch ~]$ source .bash_profile

[oracle@catch ~]$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Mon Jul 7 23:13:50 2014

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

Enter user-name: scott

Enter password:

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@catch ~]$ rman

Recovery Manager: Release 11.2.0.1.0 - Production on Mon Jul 7 23:22:57 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

RMAN>

好了,命令使用正常,在sqlplus中输入错命令能用删除键删除错误了!

以上已经过测试,方法可行!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值