linux sqlplus Backspace 乱码 与上下翻看功能设置

一、 配置 Linux 中Sqlplus 的 Backspace 删除
在linux环境下使用sqlplus,在回删(backspace)时往往会出现 一串的乱码 。若想正常删除,需要一定的配置。

根据shell版本的不同,配置方式略有差异。
1.显示shell版本
[oracle@oradb01 ~]$ echo $0
-bash
2. 编辑.bash_profile 设定环境变量
[oracle@oradb01 ~]$ vi /home/oracle/.bash_profile
bash下:添加 stty erase ^? 到.bash_profile中。
csh下: 添加 stty erase ^H  到.cshrc中

 

二上下翻看查询历史记录
下载 :http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.37.tar.gz
1.上传rlwrap-0.37.tar.gz
2.解压rlwrap-0.37.tar.gz
[oracle@oradb01 ~]$ tar zxvf rlwrap-0.37.tar.gz
3.进入到rlwrap-0.37的解压目录
[oracle@oradb01 ~]$ cd rlwrap-0.37
4.执行configure命令
[oracle@oradb01 ~]$./configure
5.执行make命令
[oracle@oradb01 ~]$make
6.切换到root用户
[oracle@oradb01 ~]$ su  - root
7.执行make install命令
[root@oradb01 rlwrap-0.37]# make install
8.切换到oracle用户
[root@oradb01 rlwrap-0.37]# su - oracle
9.进入到/home/oralce编辑.bash_profile
 vi /home/oracle/.bash_profiel
添加如下内容:
alias sqlplus='rlwrap sqlplus'      # oracle sqlpls
alias rman='rlwrap rman'           # oracle rman
alias ggsci='rlwrap ggsci'           # oracle goldengate
11. 保存退出重新登录 或运行 source .bash_profile使修改生效

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值