ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Oracle中查看sql命令历史,查看rman命令历史

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

原创 Linux操作系统 作者:tengrid 时间:2009-05-21 14:22:05 0 删除 编辑

就像$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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-05-18

  • 博文量
    136
  • 访问量
    378226