showsnap.sql
日付範囲を指定してスナップID一覧を表示する
code:SQL
define BEGINDT=&1
define ENDDT=&2
--define ENDDT=&BEGINDT
set pages 500
break on STARTUP skip page on SDATE skip 1
select to_char(STARTUP_TIME,'yyyy/mm/dd hh24:mi:ss') STARTUP,to_char(SNAP_TIME,'yyyy/mm/dd') SDATE,to_char(SNAP_TIME,'hh24:mi:ss') STIME,SNAP_ID from perfstat.stats$snapshot
where trunc(SNAP_TIME) between to_date(&BEGINDT,'yyyymmdd') and to_date(&ENDDT,'yyyymmdd') order by 1,2,3;
clear break
undefine 1 BEGINDT
undefine 2 ENDDT