-
Notifications
You must be signed in to change notification settings - Fork 0
/
chk_cal.sql
67 lines (49 loc) · 1.2 KB
/
chk_cal.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
spool chk_cal_06May
@info02
@info06
@info04
spool off
-- some additional stuff, get separate sqlfile..
-- counv mview logs.
spool calp_mview_logs_06May
@chk_cal_mlogs
spool off
-- need monitoring for size:
-- tms.documents - blob
-- esb.inboundactivities - blob
-- need monitoring for full-scans:
-- esb.filetracker
-- c_huisman.Requestline
-- c_huisman.requestheader
-- tms.goods
-- tms.documents
-- tms.party
-- stdcom.address
-- ... more to follow
-- documents
select trunc ( last_update_date) day, count (*) nr_docs from xxyss_tms.document
group by trunc ( last_update_date)
order by 1 desc
;
-- esb
select trunc ( documentdate) day, count (*) nr_docs from xxyss_esb.INBOUNDACTIVITYFILES
group by trunc ( documentdate)
order by 1 desc
;
select trunc ( createdatetime) day, count (*) nr_docs from xxyss_esb.filetracker
group by trunc ( createdatetime)
order by 1 desc
;
-- cost of full-scans, these tables need limiting..
select object_owner, object_name, sum ( cost)
from v$sql_plan
where 1=1
and object_name is not null
and object_owner <> 'SYS'
and options = 'FULL'
--and operation = 'TABLE ACCESS'
and cost is not null
group by object_owner, object_name
order by 3 desc
;
spool off