yujianghiyujiang.blog.chinaunix.net
yu_jiang163
全部博文(34)
shell(5)
perl(2)
2012年(1)
2011年(15)
2010年(18)
zjt_pond
ukyomud
zxplinux
chengxuy
jyzlb
shouyu92
preamble
evabobo1
hani97
分类: Oracle
2010-10-21 14:07:06
undo_segment.sh:
#!/bin/sh# Oracle specific environment settingsexport ORACLE_BASE=/ora01export ORACLE_HOME=$ORACLE_BASE/9iexport ORACLE_SID=srm
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:.
datadate=`date +%D`datatime=`date +%R`datapath=/backup/scrīpt/tunning/undo_segmentdata=undo_segment.data-`date +%Y-%m`sqlplus '/as sysdba' @$datapath/undo_segment.sql >$datapath/undo_segment.log#/bin/cat $datapath/undo_segment.log |egrep -v "SQL|Oracle|JServer|With|Disconnect|Connect|Total|-|rows"|sed '/^$/d' >>$datapath/$data/bin/cat $datapath/undo_segment.log |egrep -v "SQL|Oracle|JServer|onnect|Total"|sed '/^$/d' >>$datapath/$data#echo $datadate $datatime $values >> $datapath/$data
undo_segment.sql:
set heading off;set feedback off;alter session set nls_date_format='DD-MON-yyyy HH24:MI:SS';col name for a20;select current_date,name, waits, gets, waits/gets "Ratio" from v$rollstat a, v$rollname b where a.usn = b.usn;exit;
上一篇:linux下密码不能超出8位
下一篇:oracle sharepool的命中率
登录 注册