jingt hang
SET PAGES 1000SELECT to_char(DB_SESSION.SNAP_TIME,'yyyymmdd') SOCRT02,to_char(DB_SESSION.SNAP_TIME,'hh24:mi') SOCRT02, DB_SESSION.TOTAL, DB_SESSION.ACTIVE FROM CCMON.DB_SESSION DB_SESSION WHERE (DB_SESSION.DB_NM='SOCRT02') AND (to_char(SNAP_TIME,'yyyymmdd')=to_char((sysdate-1),'yyyymmdd')) order by DB_SESSION.SNAP_TIME;
SELECT to_char(DB1.SNAP_TIME,'yyyymmdd') DATE,to_char(DB1.SNAP_TIME,'hh24:mi') TIME, DB1.TOTAL "DB1 TOTAL", DB1.ACTIVE "DB1 ACTIVE", DB2.TOTAL "DB2 TOTAL", DB2.ACTIVE "DB2 ACTIVE" FROM CCMON.DB_SESSION DB1,CCMON.DB_SESSION DB2WHERE DB1.DB_NM = 'ECSDB1' and DB2.DB_NM = 'ECSDB2' and DB1.SNAP_TIME=DB2.SNAP_TIMEand (to_char(DB1.SNAP_TIME,'yyyymmdd')=to_char((sysdate-1),'yyyymmdd')) order by DB1.SNAP_TIME;
网友评论