Oracle中查看sql命令历史,查看rman命令历史

就像$HOME下的.bash_history 会存储当前用户的shell命令执行历史一样
如果在oracle server上安装了uniread以解决SQL提示符下命令记录问题,那么,同样可以获得sql或rman命令的执行历史.
当我们需要查找曾经执行过哪些命令时,直接从uniread历史文件中查找比从SQL>或RMAN>下通过上下方向键查找要方便得多.

oracle@C2C34_122_sles10:~/.uniread$ uniread --help
Usage: /usr/bin/uniread [options] command args...
Options:
--history history_file  Loads and saves history from this file. Default is to
                        use the file ~/.uniread/

--inputrc inputrc       Use readline configuration from given file. Default is
                        ~/.inputrc or the INPUTRC environment variable.
--force-readline        Force to always get input in readline mode, even if
                        it appears the program does not want a line of text.
--eat-echo              Eat the command that is echoed back by some programs
                        that try to do the readline themselves.
--quiet                 Do not display any messages from uniread itself
--verbose               Display verbose messages from uniread itself
--version               Display version info
--help                  Displays this usage message

Report bugs to <guyro@users.sourceforge.net>
oracle@C2C34_122_sles10:~/.uniread$ pwd 
/home/oracle/.uniread
oracle@C2C34_122_sles10:~/.uniread$ more sqlplus
host pwd
@create_db.sql
startup nomount pfile=/opt/oracle/admin/orcl/pfile/initorcl.ora;
exit
startup nomount pfile=/opt/oracle/admin/orcl/pfile/initorcl.ora;
exit
startup nomount pfile=/opt/oracle/admin/orcl/pfile/initorcl.ora;
exit
startup nomount pfile=/opt/oracle/admin/orcl/pfile/initorcl.ora;
shutdown
exit

oracle@C2C34_122_sles10:~/.uniread$ grep "shutdown immediate" sqlplus |wc -l
42

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/94384/viewspace-600667/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/94384/viewspace-600667/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值