DatabaseProcApplicationCreatedLinks
sybsystemprocssp_sysmon_mdcache  14 déc. 14Defects Propagation Dependencies

1     
2     /* This stored procedure produces a report containing a summary of
3     ** SQL Server engine activity.
4     */
5     create or replace procedure sp_sysmon_mdcache
6         @NumElapsedMs int, /* for "per Elapsed second" calculations */
7         @NumXacts int, /* for per transactions calculations */
8         @Reco char(1) /* Flag for recommendations             */
9     as
10    
11        /* --------- declare local variables --------- */
12        declare @tmp_int int /* temp var for integer storage */
13        declare @sum1line char(80) /* string to delimit total lines without 
14        ** percent calc on printout */
15        declare @blankline char(1) /* to print blank line */
16        declare @psign char(3) /* hold a percent sign (%) for print out */
17        declare @na_str char(3) /* holds 'n/a' for 'not applicable' strings */
18        declare @rptline char(80) /* formatted stats line for print statement */
19        declare @spinlock_contention float /* holds the current spinlock contention being
20        ** processed. 
21        */
22        declare @desmgr_contention float /* holds the object manager spinlock contention */
23        declare @des_contention float /* holds the open object spinlock contention */
24        declare @ides_contention float /* holds the open index spinlock contention */
25        declare @hash_contention float /* holds the open index chain spinlock contention */
26        declare @section char(80) /* string to delimit sections on printout */
27        declare @ides_hash_contention int /* holds the open index chain spinlock contention */
28        declare @pdes_contention int /* holds the open partition spinlock contention */
29        declare @pdes_hash_contention int /* holds the open partition chain spinlock contention */
30    
31        /* ------------- Variables for Tuning Recommendations ------------*/
32        declare @recotxt char(80)
33        declare @recoline char(80)
34        declare @reco_hdr_prn bit
35        declare @tmp_int1 int
36        declare @tmp_int2 int
37        declare @ret_status int
38        declare @tmp_db_reuse_requests int
39        declare @tmp_obj_reuse_failed int
40        declare @tmp_ind_reuse_failed int
41        declare @tmp_ptn_reuse_failed int
42        declare @tmp_db_reuse_failed int
43        declare @tmp_int_open_object int
44        declare @tmp_int_open_index int
45        declare @tmp_int_open_ptn int
46        declare @tmp_int_dbtables int
47        /* --------- Setup Environment --------- */
48        set nocount on /* disable row counts being sent to client */
49    
50        select @sum1line = "  -------------------------  ------------  ------------  ----------  ----------"
51        select @blankline = " "
52        select @psign = " %%" /* extra % symbol because '%' is escape char in print statement */
53        select @na_str = "n/a"
54        select @section = "==============================================================================="
55    
56        /* Create a temp table to store the result from sp_monitorconfig. */
57        create table #tmp_res_monitor(Name varchar(35),
58            Config_val int, System_val int,
59            Total_val int, Num_free int,
60            Num_active int, Pct_act char(6),
61            Max_Used int, Reuse_cnt int,
62            Date varchar(30), Instance_Name varchar(30) NULL)
63    
64        /* Get information of "number of open objects". */
65        execute @ret_status = sp_monitorconfig "number of open objects", "#tmp_res_monitor"
66    
67        if (@ret_status != 0)
68        begin
69            print @blankline
70            return 0
71        end
72    
73        print @section
74        print @blankline
75    
76        print "Metadata Cache Management"
77        print "-------------------------"
78        print @blankline
79    
80    
81        print "  Metadata Cache Summary         per sec      per xact       count  %% of total"
82        print @sum1line
83        print @blankline
84    
85    
86        /* ----------------- number of open objects ------------ */
87        select @rptline = "  Open Object Usage"
88        print @rptline
89    
90        if (@@clustermode = "shared disk cluster")
91        begin
92            select @tmp_int2 = Num_active, @tmp_int = Max_Used,
93                @tmp_int_open_object = Num_free
94            from #tmp_res_monitor
95            where Name = 'number of open objects' and
96                Instance_Name = @@instancename
97        end
98        else
99        begin
100           select @tmp_int2 = Num_active, @tmp_int = Max_Used,
101               @tmp_int_open_object = Num_free
102           from #tmp_res_monitor
103           where Name = 'number of open objects'
104       end
105       select @rptline = "    Active" + space(28) +
106           @na_str + space(11) +
107           @na_str + space(2) +
108           str(@tmp_int2, 10) + space(7) +
109           @na_str
110       print @rptline
111   
112       select @rptline = "    Max Ever Used Since Boot" + space(10) +
113           @na_str + space(11) +
114           @na_str + space(2) +
115           str(@tmp_int, 10) + space(7) +
116           @na_str
117       print @rptline
118   
119       select @rptline = "    Free" + space(30) +
120           @na_str + space(11) +
121           @na_str + space(2) +
122           str(@tmp_int_open_object, 10) + space(7) +
123           @na_str
124       print @rptline
125   
126       select @rptline = "    Reuse Requests"
127       print @rptline
128   
129       /*
130       ** The information for reuse/reuse fail is still stored in monitor
131       ** counters in resource_stats group. 
132       */
133       select @tmp_int1 = value
134       from #tempmonitors
135       where group_name like 'resource_stats%' and
136           field_name = "open_object_reuse_requests"
137   
138       select @rptline = "      Succeeded" + space(23) +
139           @na_str + space(11) +
140           @na_str + space(2) +
141           str(@tmp_int1, 10) + space(7) +
142           @na_str
143       print @rptline
144   
145       select @tmp_obj_reuse_failed = value
146       from #tempmonitors
147       where group_name like 'resource_stats%' and
148           field_name = "open_object_reuse_fail"
149   
150       select @rptline = "      Failed" + space(26) +
151           @na_str + space(11) +
152           @na_str + space(2) +
153           str(@tmp_obj_reuse_failed, 10) + space(7) +
154           + @na_str
155       print @rptline
156       print @blankline
157   
158   
159       /* ----------------- number of open indexes ------------ */
160       execute @ret_status = sp_monitorconfig "number of open indexes", "#tmp_res_monitor"
161   
162       if (@ret_status != 0)
163       begin
164           print @blankline
165           return 0
166       end
167   
168       select @rptline = "  Open Index Usage"
169       print @rptline
170   
171       if (@@clustermode = "shared disk cluster")
172       begin
173           select @tmp_int2 = Num_active, @tmp_int = Max_Used,
174               @tmp_int_open_index = Num_free
175           from #tmp_res_monitor
176           where Name = 'number of open indexes' and
177               Instance_Name = @@instancename
178       end
179       else
180       begin
181           select @tmp_int2 = Num_active, @tmp_int = Max_Used,
182               @tmp_int_open_index = Num_free
183           from #tmp_res_monitor
184           where Name = 'number of open indexes'
185       end
186       select @rptline = "    Active" + space(28) +
187           @na_str + space(11) +
188           @na_str + space(2) +
189           str(@tmp_int2, 10) + space(7) +
190           @na_str
191       print @rptline
192   
193       select @rptline = "    Max Ever Used Since Boot" + space(10) +
194           @na_str + space(11) +
195           @na_str + space(2) +
196           str(@tmp_int, 10) + space(7) +
197           @na_str
198       print @rptline
199   
200       select @rptline = "    Free" + space(30) +
201           @na_str + space(11) +
202           @na_str + space(2) +
203           str(@tmp_int_open_index, 10) + space(7) +
204           @na_str
205       print @rptline
206   
207       select @rptline = "    Reuse Requests"
208       print @rptline
209   
210       /*
211       ** The information for reuse/reuse fail is still stored in monitor
212       ** counters in resource_stats group. 
213       */
214       select @tmp_int1 = value
215       from #tempmonitors
216       where group_name like 'resource_stats%' and
217           field_name = "open_index_reuse_requests"
218   
219       select @rptline = "      Succeeded" + space(23) +
220           @na_str + space(11) +
221           @na_str + space(2) +
222           str(@tmp_int1, 10) + space(7) +
223           @na_str
224       print @rptline
225   
226       select @tmp_ind_reuse_failed = value
227       from #tempmonitors
228       where group_name like 'resource_stats%' and
229           field_name = "open_index_reuse_fail"
230   
231       select @rptline = "      Failed" + space(26) +
232           @na_str + space(11) +
233           @na_str + space(2) +
234           str(@tmp_ind_reuse_failed, 10) + space(7) +
235           @na_str
236       print @rptline
237       print @blankline
238   
239       /* ----------------- number of open partitions ------------ */
240       execute @ret_status = sp_monitorconfig "number of open partitions", "#tmp_res_monitor"
241   
242       if (@ret_status != 0)
243       begin
244           return 0
245       end
246   
247       select @rptline = "  Open Partition Usage"
248       print @rptline
249   
250       if (@@clustermode = "shared disk cluster")
251       begin
252           select @tmp_int2 = Num_active, @tmp_int = Max_Used,
253               @tmp_int_open_ptn = Num_free
254           from #tmp_res_monitor
255           where Name = 'number of open partitions' and
256               Instance_Name = @@instancename
257       end
258       else
259       begin
260           select @tmp_int2 = Num_active, @tmp_int = Max_Used,
261               @tmp_int_open_ptn = Num_free
262           from #tmp_res_monitor
263           where Name = 'number of open partitions'
264       end
265       select @rptline = "    Active" + space(28) +
266           @na_str + space(11) +
267           @na_str + space(2) +
268           str(@tmp_int2, 10) + space(7) +
269           @na_str
270       print @rptline
271   
272       select @rptline = "    Max Ever Used Since Boot" + space(10) +
273           @na_str + space(11) +
274           @na_str + space(2) +
275           str(@tmp_int, 10) + space(7) +
276           @na_str
277       print @rptline
278   
279       select @rptline = "    Free" + space(30) +
280           @na_str + space(11) +
281           @na_str + space(2) +
282           str(@tmp_int_open_ptn, 10) + space(7) +
283           @na_str
284       print @rptline
285   
286       select @rptline = "    Reuse Requests"
287       print @rptline
288   
289       /*
290       ** The information for reuse/reuse fail is still stored in monitor
291       ** counters in resource_stats group. 
292       */
293       select @tmp_int1 = value
294       from #tempmonitors
295       where group_name like 'resource_stats%' and
296           field_name = "open_partition_reuse_requests"
297   
298       select @rptline = "      Succeeded" + space(23) +
299           @na_str + space(11) +
300           @na_str + space(2) +
301           str(@tmp_int1, 10) + space(7) +
302           @na_str
303       print @rptline
304   
305       select @tmp_ptn_reuse_failed = value
306       from #tempmonitors
307       where group_name like 'resource_stats%' and
308           field_name = "open_partition_reuse_fail"
309   
310       select @rptline = "      Failed" + space(26) +
311           @na_str + space(11) +
312           @na_str + space(2) +
313           str(@tmp_ptn_reuse_failed, 10) + space(7) +
314           @na_str
315       print @rptline
316       print @blankline
317   
318       /* ----------------- number of open databases ------------ */
319       execute @ret_status = sp_monitorconfig "number of open databases", "#tmp_res_monitor"
320   
321       if (@ret_status != 0)
322       begin
323           return 0
324       end
325       select @rptline = "  Open Database Usage"
326       print @rptline
327   
328       if (@@clustermode = "shared disk cluster")
329       begin
330           select @tmp_int2 = Num_active
331           from #tmp_res_monitor
332           where Name = 'number of open databases' and
333               Instance_Name = @@instancename
334       end
335       else
336       begin
337           select @tmp_int2 = Num_active
338           from #tmp_res_monitor
339           where Name = 'number of open databases'
340       end
341       select @rptline = "    Active" + space(28) +
342           @na_str + space(11) +
343           @na_str + space(2) +
344           str(@tmp_int2, 10) + space(7) +
345           @na_str
346       print @rptline
347   
348       if (@@clustermode = "shared disk cluster")
349       begin
350           select @tmp_int = Max_Used
351           from #tmp_res_monitor
352           where Name = 'number of open databases' and
353               Instance_Name = @@instancename
354       end
355       else
356       begin
357           select @tmp_int = Max_Used
358           from #tmp_res_monitor
359           where Name = 'number of open databases'
360       end
361       select @rptline = "    Max Ever Used Since Boot" + space(10) +
362           @na_str + space(11) +
363           @na_str + space(2) +
364           str(@tmp_int, 10) + space(7) +
365           @na_str
366       print @rptline
367   
368       if (@@clustermode = "shared disk cluster")
369       begin
370           select @tmp_int_dbtables = Num_free
371           from #tmp_res_monitor
372           where Name = 'number of open databases' and
373               Instance_Name = @@instancename
374       end
375       else
376       begin
377           select @tmp_int_dbtables = Num_free
378           from #tmp_res_monitor
379           where Name = 'number of open databases'
380       end
381       select @rptline = "    Free" + space(30) +
382           @na_str + space(11) +
383           @na_str + space(2) +
384           str(@tmp_int_dbtables, 10) + space(7) +
385           @na_str
386       print @rptline
387   
388       select @rptline = "    Reuse Requests"
389       print @rptline
390   
391       /*
392       ** The information for reuse/reuse fail is still stored in monitor
393       ** counters in resource_stats group. 
394       */
395       select @tmp_db_reuse_requests = value
396       from #tempmonitors
397       where group_name like 'resource_stats%' and
398           field_name = "open_database_reuse_requests"
399   
400       select @rptline = "      Succeeded" + space(23) +
401           @na_str + space(11) +
402           @na_str + space(2) +
403           str(@tmp_db_reuse_requests, 10) + space(7) +
404           @na_str
405       print @rptline
406   
407   
408       select @tmp_db_reuse_failed = value
409       from #tempmonitors
410       where group_name like 'resource_stats%' and
411           field_name = "open_database_reuse_fail"
412   
413       select @rptline = "      Failed" + space(26) +
414           @na_str + space(11) +
415           @na_str + space(2) +
416           str(@tmp_db_reuse_failed, 10) + space(7) +
417           @na_str
418   
419       print @rptline
420       print @blankline
421   
422       /*
423       ** The information for reuse of unimportant des'es that were
424       ** marked for immediate discard is stored  in resource_stats group. 
425       */
426       select @tmp_int1 = value
427       from #tempmonitors
428       where group_name like 'resource_stats%' and
429           field_name = "open_object_reuse_unimpdes"
430   
431       select @rptline = "  Descriptors immediately discarded" + space(3) +
432           @na_str + space(11) +
433           @na_str + space(2) +
434           str(@tmp_int1, 10) + space(7) +
435           @na_str
436       print @rptline
437   
438       /* ----------------- Object Manager Spinlock Contention ------------ */
439       select @spinlock_contention = isnull(100.0 * (sum(convert(float, w.value)) / sum(convert(float, g.value))), 0)
440       from #tempmonitors g, #tempmonitors w
441       where w.group_name like 'spinlock_w%'
442           and w.field_name = "Resource->rdesmgr_spin"
443           and g.field_name = "Resource->rdesmgr_spin"
444           and g.group_name like 'spinlock_p%'
445           and g.field_id = w.field_id
446           and g.value > 0
447   
448       select @rptline = "  Object Manager Spinlock Contention" + space(2) +
449           @na_str + space(11) +
450           @na_str + space(9) +
451           @na_str + space(5) +
452           str(@spinlock_contention, 5, 1) + @psign,
453           @desmgr_contention = @spinlock_contention
454       print @rptline
455       print @blankline
456   
457       /* ----------------- Object Spinlock Contention ------------ */
458       select @spinlock_contention = isnull(100.0 * (sum(convert(float, w.value)) / sum(convert(float, g.value))), 0)
459       from #tempmonitors g, #tempmonitors w
460       where w.group_name like 'spinlock_w%'
461           and w.field_name = "Des Upd Spinlocks"
462           and g.field_name = "Des Upd Spinlocks"
463           and g.group_name like 'spinlock_p%'
464           and g.field_id = w.field_id
465           and g.value > 0
466   
467       select @rptline = "  Object Spinlock Contention" + space(10) +
468           @na_str + space(11) +
469           @na_str + space(9) +
470           @na_str + space(5) +
471           str(@spinlock_contention, 5, 1) + @psign,
472           @des_contention = @spinlock_contention
473       print @rptline
474       print @blankline
475   
476       /* ----------------- Index Spinlock Contention ------------ */
477       select @spinlock_contention = isnull(100.0 * (sum(convert(float, w.value)) / sum(convert(float, g.value))), 0)
478       from #tempmonitors g, #tempmonitors w
479       where w.group_name like 'spinlock_w%'
480           and w.field_name = "Ides Spinlocks"
481           and g.field_name = "Ides Spinlocks"
482           and g.group_name like 'spinlock_p%'
483           and g.field_id = w.field_id
484           and g.value > 0
485   
486       select @rptline = "  Index Spinlock Contention" + space(11) +
487           @na_str + space(11) +
488           @na_str + space(9) +
489           @na_str + space(5) +
490           str(@spinlock_contention, 5, 1) + @psign,
491           @ides_contention = @spinlock_contention
492       print @rptline
493       print @blankline
494   
495       /* ----------------- Index Hash Spinlock Contention ------------ */
496       select @spinlock_contention = isnull(100.0 * (sum(convert(float, w.value)) / sum(convert(float, g.value))), 0)
497       from #tempmonitors g, #tempmonitors w
498       where w.group_name like 'spinlock_w%'
499           and w.field_name = "Ides Chain Spinlocks"
500           and g.field_name = "Ides Chain Spinlocks"
501           and g.group_name like 'spinlock_p%'
502           and g.field_id = w.field_id
503           and g.value > 0
504   
505       select @rptline = "  Index Hash Spinlock Contention" + space(6) +
506           @na_str + space(11) +
507           @na_str + space(9) +
508           @na_str + space(5) +
509           str(@spinlock_contention, 5, 1) + @psign,
510           @ides_hash_contention = @spinlock_contention
511       print @rptline
512       print @blankline
513   
514       /* ----------------- Partition Spinlock Contention ------------ */
515       select @spinlock_contention = convert(int, isnull(100.0 * (sum(convert(float, w.value)) / sum(convert(float, g.value))), 0))
516       from #tempmonitors g, #tempmonitors w
517       where w.group_name like 'spinlock_w%'
518           and w.field_name = "Pdes Spinlocks"
519           and g.field_name = "Pdes Spinlocks"
520           and g.group_name like 'spinlock_p%'
521           and g.field_id = w.field_id
522           and g.value > 0
523   
524       select @rptline = "  Partition Spinlock Contention" + space(7) +
525           @na_str + space(11) +
526           @na_str + space(9) +
527           @na_str + space(5) +
528           str(@spinlock_contention, 5, 1) + @psign,
529           @pdes_contention = @spinlock_contention
530       print @rptline
531       print @blankline
532   
533       /* ----------------- Partition Hash Spinlock Contention ------------ */
534       select @spinlock_contention = convert(int, isnull(100.0 * (sum(convert(float, w.value)) / sum(convert(float, g.value))), 0))
535       from #tempmonitors g, #tempmonitors w
536       where w.group_name like 'spinlock_w%'
537           and w.field_name = "Pdes Chain Spinlocks"
538           and g.field_name = "Pdes Chain Spinlocks"
539           and g.group_name like 'spinlock_p%'
540           and g.field_id = w.field_id
541           and g.value > 0
542   
543       select @rptline = "  Partition Hash Spinlock Contention" + space(2) +
544           @na_str + space(11) +
545           @na_str + space(9) +
546           @na_str + space(5) +
547           str(@spinlock_contention, 5, 1) + @psign,
548           @pdes_hash_contention = @spinlock_contention
549       print @rptline
550       print @blankline
551   
552       if @Reco = 'Y'
553       begin
554           select @recotxt = "  Tuning Recommendations for Metadata Cache Management"
555           select @recoline = "  ----------------------------------------------------"
556           select @reco_hdr_prn = 0
557   
558           /*
559           ** If the number of open objects configured is equal to  
560           ** the high water mark for open objects used and if the
561           ** number of times a reuse of an open object failed
562           ** consider increasing the 'number of open objects'
563           */
564           if (@tmp_int_open_object = 0 or @tmp_obj_reuse_failed > 0)
565           begin
566               if (@reco_hdr_prn = 0)
567               begin
568                   print @recotxt
569                   print @recoline
570                   select @reco_hdr_prn = 1
571               end
572               print "  - Consider increasing the 'number of open objects'"
573               print "    configuration parameter."
574               print @blankline
575           end
576   
577           /*
578           ** If the number of open indexes configured is equal to  
579           ** the high water mark for open indexes used and if the
580           ** number of times a reuse of an open indexes failed
581           ** consider increasing the 'number of open indexes'
582           */
583           if (@tmp_int_open_index = 0 or @tmp_ind_reuse_failed > 0)
584           begin
585               if (@reco_hdr_prn = 0)
586               begin
587                   print @recotxt
588                   print @recoline
589                   select @reco_hdr_prn = 1
590               end
591               print "  - Consider increasing the 'number of open indexes'"
592               print "    configuration parameter."
593               print @blankline
594           end
595   
596           /*
597           ** If the number of open partitions configured is equal to  
598           ** the high water mark for open partitions used and if the
599           ** number of times a reuse of an open partitions failed
600           ** consider increasing the 'number of open partitions'
601           */
602           if (@tmp_int_open_ptn = 0 or @tmp_ptn_reuse_failed > 0)
603           begin
604               if (@reco_hdr_prn = 0)
605               begin
606                   print @recotxt
607                   print @recoline
608                   select @reco_hdr_prn = 1
609               end
610               print "  - Consider increasing the 'number of open partitions'"
611               print "    configuration parameter."
612               print @blankline
613           end
614   
615           /*
616           ** If the number of open databases configured is equal to  
617           ** the high water mark for open databases used and if the
618           ** number of times a reuse of an open databases failed
619           ** consider increasing the 'number of open databases'
620           */
621           if (@tmp_int_dbtables = 0 or @tmp_db_reuse_requests > 0 or @tmp_db_reuse_failed > 0)
622           begin
623               if (@reco_hdr_prn = 0)
624               begin
625                   print @recotxt
626                   print @recoline
627                   select @reco_hdr_prn = 1
628               end
629               print "  - Consider increasing the 'number of open databases'"
630               print "    configuration parameter."
631               print @blankline
632           end
633   
634           /*
635           ** If the contention on the object manager spinlock is > 10%
636           ** consider using dbcc tune(des_bind, dbid, objname) on the hot objects
637           */
638           if (@desmgr_contention > 10)
639           begin
640               if (@reco_hdr_prn = 0)
641               begin
642                   print @recotxt
643                   print @recoline
644                   select @reco_hdr_prn = 1
645               end
646               print "  - Consider identifying the hot objects using sp_object_stats"
647               print "    and using dbcc tune(des_bind, <dbid>, <objname>) on the"
648               print "    hottest set of objects."
649               print @blankline
650           end
651   
652           /*
653           ** If the contention on the object spinlock is > 3%
654           ** consider decreasing the 'open object spinlock ratio'
655           */
656           if (@des_contention > 3)
657           begin
658               if (@reco_hdr_prn = 0)
659               begin
660                   print @recotxt
661                   print @recoline
662                   select @reco_hdr_prn = 1
663               end
664               print "  - Consider decreasing the 'open object spinlock ratio'"
665               print "    configuration parameter."
666               print @blankline
667           end
668   
669           /*
670           ** If the contention on the index spinlock is > 3%
671           ** consider decreasing the 'open index spinlock ratio'
672           */
673           if (@ides_contention > 3)
674           begin
675               if (@reco_hdr_prn = 0)
676               begin
677                   print @recotxt
678                   print @recoline
679                   select @reco_hdr_prn = 1
680               end
681               print "  - Consider decreasing the 'open index spinlock ratio'"
682               print "    configuration parameter."
683               print @blankline
684           end
685   
686           /*
687           ** If the contention on the ides chain spinlock is > 3%
688           ** consider decreasing the 'open index hash spinlock ratio'
689           */
690           if (@ides_hash_contention > 3)
691           begin
692               if (@reco_hdr_prn = 0)
693               begin
694                   print @recotxt
695                   print @recoline
696                   select @reco_hdr_prn = 1
697               end
698               print "  - Consider decreasing the 'open index hash spinlock ratio'"
699               print "    configuration parameter."
700               print @blankline
701           end
702   
703           /*
704           ** If the contention on the partition spinlock or
705           ** pdes chain spinlock is > 3%
706           ** consider decreasing the 'partition spinlock ratio'
707           */
708           if (@pdes_contention > 3 or @pdes_hash_contention > 3)
709           begin
710               if (@reco_hdr_prn = 0)
711               begin
712                   print @recotxt
713                   print @recoline
714                   select @reco_hdr_prn = 1
715               end
716               print "  - Consider decreasing the 'partition spinlock ratio'"
717               print "    configuration parameter."
718               print @blankline
719           end
720       end
721       return 0
722   

DEFECTS
 MTYP 4 Assignment type mismatch @ides_hash_contention: int = float 510
 MTYP 4 Assignment type mismatch @pdes_contention: int = float 529
 MTYP 4 Assignment type mismatch @pdes_hash_contention: int = float 548
 QTYP 4 Comparison type mismatch Comparison type mismatch: varchar(30) vs int 96
 QTYP 4 Comparison type mismatch Comparison type mismatch: varchar(30) vs int 177
 QTYP 4 Comparison type mismatch Comparison type mismatch: varchar(30) vs int 256
 QTYP 4 Comparison type mismatch Comparison type mismatch: varchar(30) vs int 333
 QTYP 4 Comparison type mismatch Comparison type mismatch: varchar(30) vs int 353
 QTYP 4 Comparison type mismatch Comparison type mismatch: varchar(30) vs int 373
 MLCH 3 Char type with length>30 char(80) 13
 MLCH 3 Char type with length>30 char(80) 18
 MLCH 3 Char type with length>30 char(80) 26
 MLCH 3 Char type with length>30 char(80) 32
 MLCH 3 Char type with length>30 char(80) 33
 MUCO 3 Useless Code Useless Brackets 67
 MUCO 3 Useless Code Useless Brackets 90
 MUCO 3 Useless Code Useless Brackets 162
 MUCO 3 Useless Code Useless Brackets 171
 MUCO 3 Useless Code Useless Brackets 242
 MUCO 3 Useless Code Useless Brackets 250
 MUCO 3 Useless Code Useless Brackets 321
 MUCO 3 Useless Code Useless Brackets 328
 MUCO 3 Useless Code Useless Brackets 348
 MUCO 3 Useless Code Useless Brackets 368
 MUCO 3 Useless Code Useless Brackets 564
 MUCO 3 Useless Code Useless Brackets 566
 MUCO 3 Useless Code Useless Brackets 583
 MUCO 3 Useless Code Useless Brackets 585
 MUCO 3 Useless Code Useless Brackets 602
 MUCO 3 Useless Code Useless Brackets 604
 MUCO 3 Useless Code Useless Brackets 621
 MUCO 3 Useless Code Useless Brackets 623
 MUCO 3 Useless Code Useless Brackets 638
 MUCO 3 Useless Code Useless Brackets 640
 MUCO 3 Useless Code Useless Brackets 656
 MUCO 3 Useless Code Useless Brackets 658
 MUCO 3 Useless Code Useless Brackets 673
 MUCO 3 Useless Code Useless Brackets 675
 MUCO 3 Useless Code Useless Brackets 690
 MUCO 3 Useless Code Useless Brackets 692
 MUCO 3 Useless Code Useless Brackets 708
 MUCO 3 Useless Code Useless Brackets 710
 MUIN 3 Column created using implicit nullability 57
 QAFM 3 Var Assignment from potentially many rows 92
 QAFM 3 Var Assignment from potentially many rows 100
 QAFM 3 Var Assignment from potentially many rows 133
 QAFM 3 Var Assignment from potentially many rows 145
 QAFM 3 Var Assignment from potentially many rows 173
 QAFM 3 Var Assignment from potentially many rows 181
 QAFM 3 Var Assignment from potentially many rows 214
 QAFM 3 Var Assignment from potentially many rows 226
 QAFM 3 Var Assignment from potentially many rows 252
 QAFM 3 Var Assignment from potentially many rows 260
 QAFM 3 Var Assignment from potentially many rows 293
 QAFM 3 Var Assignment from potentially many rows 305
 QAFM 3 Var Assignment from potentially many rows 330
 QAFM 3 Var Assignment from potentially many rows 337
 QAFM 3 Var Assignment from potentially many rows 350
 QAFM 3 Var Assignment from potentially many rows 357
 QAFM 3 Var Assignment from potentially many rows 370
 QAFM 3 Var Assignment from potentially many rows 377
 QAFM 3 Var Assignment from potentially many rows 395
 QAFM 3 Var Assignment from potentially many rows 408
 QAFM 3 Var Assignment from potentially many rows 426
 QJWT 3 Join or Sarg Without Index on temp table 445
 QJWT 3 Join or Sarg Without Index on temp table 464
 QJWT 3 Join or Sarg Without Index on temp table 483
 QJWT 3 Join or Sarg Without Index on temp table 502
 QJWT 3 Join or Sarg Without Index on temp table 521
 QJWT 3 Join or Sarg Without Index on temp table 540
 QNAJ 3 Not using ANSI Inner Join 440
 QNAJ 3 Not using ANSI Inner Join 459
 QNAJ 3 Not using ANSI Inner Join 478
 QNAJ 3 Not using ANSI Inner Join 497
 QNAJ 3 Not using ANSI Inner Join 516
 QNAJ 3 Not using ANSI Inner Join 535
 VNRD 3 Variable is not read @reco_hdr_prn 714
 VUNU 3 Variable is not used @hash_contention 25
 MTR1 2 Metrics: Comments Ratio Comments: 19% 5
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 78 = 81dec - 5exi + 2 5
 MTR3 2 Metrics: Query Complexity Complexity: 392 5

DEPENDENCIES
PROCS AND TABLES USED
calls proc sybsystemprocs..sp_monitorconfig  
   reads table master..syscurconfigs (1)  
   calls proc sybsystemprocs..sp_exec_SQL  
      writes table sybsystemprocs..sp_exec_SQL_rset_001 
   read_writes table tempdb..#resource_monitor_tbl (1) 
   writes table sybsystemprocs..sp_monitorconfig_rset_001 
   reads table master..sysconfigures (1)  
   calls proc sybsystemprocs..sp_validateconfigname  
      calls proc sybsystemprocs..sp_getmessage  
         reads table master..syslanguages (1)  
         calls proc sybsystemprocs..sp_validlang  
            reads table master..syslanguages (1)  
         reads table sybsystemprocs..sysusermessages  
         reads table master..sysmessages (1)  
      reads table master..syscurconfigs (1)  
      writes table sybsystemprocs..sp_validateconfigname_rset_001 
      reads table master..sysconfigures (1)  
   writes table sybsystemprocs..sp_monitorconfig_rset_002 
   calls proc sybsystemprocs..sp_aux_checkroleperm  
      reads table master..syscurconfigs (1)  
      reads table master..sysconfigures (1)  
   read_writes table tempdb..#resource_result_tbl (1) 
   calls proc sybsystemprocs..sp_getmessage  
read_writes table tempdb..#tmp_res_monitor (1) 
reads table tempdb..#tempmonitors (1) 

CALLERS
called by proc sybsystemprocs..sp_sysmon_analyze  
   called by proc sybsystemprocs..sp_sysmon