Oracle下的sqlplus中不能使用方向退格键从网上查下有小工具可以实现就弄个玩玩了毕竟方便
linux下使用rlwrap回调sqlplus中执行过的命令
从官方下最新
rlwraptargz ~hlub/uck/rlwrap/
安装
[root@sunsyk src]# tar xvfz rlwraptargz
[root@sunsyk src]# cd rlwrap
[root@sunsyk rlwrap]# /configure prefix=/usr/local/rlwrap
[root@sunsyk rlwrap]# make && make install
使用
[root@sunsyk rlwrap]#vim /home/oracle/bash_profile
添加
alias sqlplus=rlwrap sqlplus
alias rman=rlwrap rman
PATH=/oracle/g/bin/:/usr/local/rlwrap/bin/:$PATH
export PATH
[root@sunsyk rlwrap]# su oracle
[oracle@sunsyk ~]$ /usr/local/rlwrap/bin/rlwrap sqlplus / as sysdba
SQL*Plus: Release Production on Mon Jul ::
Copyright (c) Oracle All rights reserved
Connected to:
Oracle Database g Enterprise Edition Release Production
With the Partitioning OLAP and Data Mining options
SQL> show user
USER is SYS
SQL>