• SQLplus命令中删除键和翻页键不能用的问题


    问题现象:

    在进入连接数据库后,如何写错命令,删除键不好使,总是出现^H^H

    [oracle@master2 ~]$ 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

    [oracle@master2 ~]$ 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

    验证:

    [oracle@master2 ~]$ sqlplus / as sysdba

    可以写,删除,上翻。

  • 相关阅读:
    静态变量一定要先声明后赋值
    建议3 三元操作的类型必一致
    IDEA 创建 Maven web项目注意事项
    js不同类型作比较
    exception中return方法
    exception 打印出异常栈踪迹
    spring controller使用了@ResponseBody却返回xml
    springboot中的406(Not Acceptable)错误
    把本地建好的项目提交到git上
    java基础---------方法和方法重载
  • 原文地址:https://www.cnblogs.com/hello-wei/p/10310218.html
Copyright © 2020-2023  润新知