|
 
- UID
- 75275
- 帖子
- 51
- 精华
- 0
- 积分
- 60
- 人气值
- 34 点
- 努力值
- 472 点
- 推广注册人数
- 0 个人
- 阅读权限
- 50
- 性别
- 男
- 在线时间
- 13 小时
- 注册时间
- 2008-4-5
- 最后登录
- 2008-11-15
|
楼主
发表于 2008-5-28 15:49
| 只看该作者
在Linux中使用SQL*PLUS的时候,并不提供历史回调功能.为了能使用向上向下箭调用历史命令,可以安装rlwrap这个软件。
rlwrap,这个程式本身是个Shell,可以运行任何你提供给它的命令包括参数,并添加命令历史浏览功能。 The rlwrap program is under the GPL license。
1、安装
rlwrap-0.30.tar.gz下载地址:http://utopia.knoware.nl/~hlub/uck/rlwrap/
1):解压缩安装文件
$tar -xzvf rlwrap-0.30.tar.gz
2):切换到root用户,执行下面的命令
# cd /home/oracle/rlwrap-0.30
# ls
#./configure
#make
#make install
2、使用
[oracle@localhost ~]$ rlwrap sqlplus /nolog
SQL> conn / as sysdba
Connected to an idle instance.
然后就可以使用向上、向下键来调用已经执行过的命令了。
还可以修改Oracle用户的.bash_profile文件
[oracle@localhost ~]$ vi .bash_profile
加上:
alias sqlplus="rlwrap sqlplus"
alias rman="rlwrap rman"
之后就跟直接使用SQL*PLUS没什么区别了,唯一的好处就是多历史回调功能.
$ sqlplus /nolog |
|