问题现象:
在进入连接数据库后,如何写错命令,删除键不好使,总是出现^H^H
[[email?protected] ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Jan 23 17:03:18 2019
Copyright (c) 1982,2014,Oracle.? All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning,OLAP,Advanced Analytics and Real Application Testing options
SQL> select f^H^H^H^H
?
问题解决:
yum -y install? readline readline-devel?
安装rlwrap包,直接下载:rlwrap-0.37.tar.gz
https://linux.linuxidc.com/linuxconf/download.php?file=Li9saW51eGZpbGVzL3B1Yi8yMDExLzA3LzA0L3Jsd3JhcC9ybHdyYXAtMC4zNy50YXIuZ3o=
用root用户进行安装,解压:tar -zxvf rlwrap-0.37.tar.gz
./configure????
make
make install
su – oracle
[[email?protected] ~]$ rlwrap Usage: rlwrap [options] command ...
Options: ? -a[password:]????????????? --always-readline[=password:] ? -A???????????????????????? --ansi-colour-aware ? -b? <chars>??????????????? --break-chars=<chars> ? -c???????????????????????? --complete-filenames ? -C? <name|N>?????????????? --command-name=<name|N> ? -D? <0|1|2>??????????????? --history-no-dupes=<0|1|2> ? -f? <completion list>????? --file=<completion list> ? -g? <regexp>?????????????? --forget-matching=<regexp> ? -h???????????????????????? --help ? -H? <file>???????????????? --history-filename=<file> ? -i???????????????????????? --case-insensitive ? -I???????????????????????? --pass-sigint-as-sigterm ? -l? <file>???????????????? --logfile=<file> ? -n???????????????????????? --no-warnings ? -N???????????????????????? --no-children ? -o???????????????????????? --one-shot ? -O? <regexp>?????????????? --only-cook=<regexp> ? -p[colour]???????????????? --prompt-colour[=colour] ? -P? <input>??????????????? --pre-given=<input> ? -q? <chars>??????????????? --quote-characters=<chars> ? -m[newline substitute]???? --multi-line[=newline substitute] ? -r???????????????????????? --remember ? -R???????????????????????? --renice ? -v???????????????????????? --version ? -s? <N>??????????????????? --histsize=<N> (negative: readonly) ? -S? <prompt>?????????????? --substitute-prompt=<prompt> ? -t? <name>???????????????? --set-term-name=<name> ? -w? <N>??????????????????? --wait-before-prompt=<N> (msec,<0? : patient mode) ? -z? <filter command>?????? --filter=<filter command>
bug reports,suggestions,updates: http://utopia.knoware.nl/~hlub/uck/rlwrap/
命令已经安装上。
编辑.bash_profile
添加上:
alias sqlplus=‘rlwrap sqlplus‘ alias rman=‘rlwrap rman‘
使生效:
source? .bash_profile
验证:
[[email?protected] ~]$ sqlplus / as sysdba
可以写,删除,上翻。
完
(编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|