Linux下使用rlwrap回調sqlplus中執行過的命令
從官方下最新
rlwrap-0.37.tar.gz http://utopia.knoware.nl/~hlub/uck/rlwrap/
安裝
[root@sunsyk src]# tar xvfz rlwrap-0.37.tar.gz
[root@sunsyk src]# cd rlwrap-0.37
[root@sunsyk rlwrap-0.37]# ./configure --prefix=/usr/local/rlwrap
[root@sunsyk rlwrap-0.37]# make && make install
使用
[root@sunsyk rlwrap-0.37]#vim /home/Oracle/.bash_profile
添加
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
PATH=/Oracle/10g/bin/:/usr/local/rlwrap/bin/:$PATH
export PATH
[root@sunsyk rlwrap-0.37]# su - Oracle
[Oracle@sunsyk ~]$ /usr/local/rlwrap/bin/rlwrap sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 27 21:29:05 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> show user
USER is "SYS"
SQL>