Oracle sqlplus中方向键、退格键的使用

Oracle下的sqlplus中不能使用方向、退格键

还好广大开源 人民的智慧台强大了,给搞了个可以在sqlplus里面使用上下、左右的小程序。

start:

下载去吧

http://utopia.knoware.nl/~hlub/uck/rlwrap/

or

http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.37.tar.gz

无非就是解压安装的步骤而已,如果你还说不会 ,那谷歌吧

[root@localhost rlwrap-0.37]# ./configure –prefix=/usr/local/rlwrap && make && make install

checking build system type… x86_64-unknown-linux-gnu

checking host system type… x86_64-unknown-linux-gnu

checking for a BSD-compatible install… /usr/bin/install -c

checking whether build environment is sane… yes

checking for a thread-safe mkdir -p… /bin/mkdir -p

make  install-data-hook

make[3]: Entering directory `/data/soft/rlwrap-0.37′

chmod a+x /usr/local/rlwrap/share/rlwrap/filters/* 

make[3]: Leaving directory `/data/soft/rlwrap-0.37′

make[2]: Leaving directory `/data/soft/rlwrap-0.37′

make[1]: Leaving directory `/data/soft/rlwrap-0.37′

[root@localhost rlwrap-0.37]# 

-rwxr-xr-x 1 root root 206331 2011-03-31 15:29:51.000000000 +0800 rlwrap

[root@localhost bin]# pwd

/usr/local/rlwrap/bin

[oracle@localhost ~]$ vim .bash_profile

增加如下:

export PATH=$ORACLE_HOME/bin:/usr/local/rlwrap/bin:$PATH

alias sqlplus=’rlwrap sqlplus’

alias rman=’rlwrap rman’

退出source .bash_profile(为什么?自己查找)

使用:

[oracle@localhost ~]$ rlwrap sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 – Production on 星期四 3月 31 15:41:15 2011

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL>

此条目发表在Oracle分类目录。将固定链接加入收藏夹。