温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

解决oracle中sqlplus工具输错字符乱码,空格乱码的

发布时间:2020-02-20 07:13:06 来源:网络 阅读:4416 作者:落轩易离落 栏目:关系型数据库

这里用到的工具就是rlwrap

可以在此链接进行了解http://utopia.knoware.nl/~hlub/uck/rlwrap/

wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.42.tar.gz

yum install -y readline readline-devel  这是所依赖的

tar xf rlwrap-0.42.tar.gz

cd rlwrap-0.42

当然在编译之前可以查看一下readme和install

./configure && make && make install

然后切换到oracle用户

su - oracle

[oracle@oracle alert]$ rlwrap sqlplus / as sysdba


SQL*Plus: Release 11.2.0.1.0 Production on Tue Oct 18 09:13:15 2016


Copyright (c) 1982, 2009, Oracle.  All rights reserved.



Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL>  show user;

USER is "SYS"

SQL> exit

为了更好的结合使用,去掉rlwrap,直接使用sqlplus / as sysdba

于是在家目录做个别名就行

echo "alias sqlplus='rlwrap sqlplus'" >> /home/oracle/.bash_profile

source /home/oracle/.bash_profile

至此大功告成

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI