摘要: ###without sesesion_id , have sql_id with ash as (select /*+ materialize*/* from DBA_HIST_ACTIVE_SESS_HISTORY where sample_time between timestamp '201 阅读全文
posted @ 2016-12-06 17:17 feiyun8616 阅读(807) 评论(0) 推荐(0)
摘要: startdate=$1enddate=$2#reporttype=$3#reportformat='text'oraclehome=`echo $ORACLE_HOME` dbid=`sqlplus -s "/ as sysdba" <<EOFset head offset echo offset 阅读全文
posted @ 2016-12-06 16:17 feiyun8616 阅读(154) 评论(0) 推荐(0)
摘要: 使用SQL从AWR收集数据库性能变化趋势 为了对数据库一段时间的性能情况有个全面了解,显然AWR是一个非常有用的工具, 但很多人只会在数据库有性能问题时才会生成问题时段的awr报告去分析。虽然AWR 中给出的统计数据是一段时间的,对于峰值情况把握不准,但是如果把一段时间的 下列度量值做成统计趋势图, 阅读全文
posted @ 2016-12-06 14:57 feiyun8616 阅读(430) 评论(0) 推荐(0)
摘要: #!/usr/bin/ksh ##############paramter######################startdate=$1' 00:00:01'enddate=$2' 23:59:59'reporttype=$3reportformat='text'############### 阅读全文
posted @ 2016-12-06 13:38 feiyun8616 阅读(395) 评论(0) 推荐(0)
摘要: 家都是文明人,尤其是做运维的,那叫一个斯文啊。怎么能耍流氓呢?赶紧看看,编写 SHELL 脚本如何能够不耍流氓。 下面的案例,我们以 MySQL 数据库备份 SHELL 脚本的案例来进行阐述。 不记录日志的 SHELL 脚本就是耍流氓! 我们经常在工作中会遇到一个苦恼的事情,一个 SHELL 脚本到 阅读全文
posted @ 2016-12-06 13:22 feiyun8616 阅读(264) 评论(0) 推荐(0)