0
show_bind_value
emcs
39次下载
250次浏览
2019-07-24
4.5

脚本内容

--yong.zhao
--from gv$
col name for a20
col bind_value for a30
select * from 
(select sql_id,
        name,
        datatype_string,
        case datatype
          when 180 then --TIMESTAMP
           to_char(ANYDATA.accesstimestamp(t.value_anydata),
                   'YYYY/MM/DD HH24:MI:SS')
          else
           t.value_string
        end as bind_value,
        last_captured
   from gv$sql_bind_capture t
  where sql_id = '&sql_id'
  order by last_captured desc,name)
  where rownum<=100
  order by last_captured,name;

--from awr
col name for a20
col bind_value for a30
select *
from (select sql_id,
        name,
        datatype_string,
        case datatype
          when 180 then --TIMESTAMP
           to_char(ANYDATA.accesstimestamp(t.value_anydata),
                   'YYYY/MM/DD HH24:MI:SS')
          else
           t.value_string
        end as bind_value,
        last_captured
   from dba_hist_sqlbind t
  where sql_id = '&sql_id'
  order by last_captured desc,name)
  where rownum<=100
  order by last_captured,name;

评论

热门资源
热门脚本
近期活动
全部
暂无活动,敬请期待...
相关课程
全部
暂无课程,敬请期待...