暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

rlwrap 独立的历史操作记录

原创 Anbob 2012-11-21
735
我是习惯在sqlplus中做一些操作,在linux中安装rlwrap 支持方向键,但如果多个用户在同一台机器上登录,每个人常用的命令不同,方向键查找起来很麻烦,so.那就把我们经常用的操作分类或以用户分类,设立独立的历史操作记录log
关于rlwrap 安装http://www.anbob.com/?p=379
关于rlwrap 日志文件http://www.anbob.com/?p=1510
下面比如我把自己的历史记录独立,只要指定独立的日志文件即可。
如下设置(linux)
[oracle@icme-db ~]$ echo alias orac=\\"rlwrap -H /home/oracle/.anbob_ora.log sqlplus / as sysdba\\" >>~/.bash_profile
[oracle@icme-db ~]$ source ~/.bash_profile
[oracle@icme-db ~]$ orac
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Nov 21 11:40:17 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit

这样orac 进去的sqlplus 历史记录就记录到 /home/oracle/.anbob_ora.log中,而不是默认的文件名如.sqlplus_history
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论