就像$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/