| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 | -- Licensed Materials - Property of IBM---- BI and PM: CM---- (C) Copyright IBM Corp. 2008, 2014---- US Government Users Restricted Rights - Use, duplication or disclosure-- restricted by GSA ADP Schedule Contract with IBM Corp.-- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.-- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).select count(*) as "total number of objects" from CMOBJECTS;select  c.NAME as "class name", count(*) as "number of objects"from CMOBJECTS o, CMCLASSES c  group by o.CLASSID, c.CLASSID, C.NAMEhaving c.CLASSID=o.CLASSIDorder by c.NAME;select  c.NAME as "class name", count(*) as "number of secured objects"from CMOBJECTS o, CMCLASSES c, CMPOLICIES p where  o.CMID=p.CMID and p.POLICIES is not nullgroup by o.CLASSID, c.CLASSID, C.NAMEhaving c.CLASSID=o.CLASSIDorder by c.NAME;select count(*) as "Total number of outputs",SUM(cast(coalesce(DATALENGTH(DATAPROP),0) as bigint)) as "Total size of outputs" from CMDATAwhere DATAPROP is not NULL;select count(*) as "Outputs under 10KB" from CMDATAwhere DATAPROP is not NULL and DATALENGTH(DATAPROP) < 10240;select count(*) as "Outputs 10KB - 100KB" from CMDATAwhere DATALENGTH(DATAPROP) >= 10240 and DATALENGTH(DATAPROP) < 102400;select count(*) as "Outputs 100KB - 1MB" from CMDATAwhere DATALENGTH(DATAPROP) >= 102400 and DATALENGTH(DATAPROP) < 1048576;select count(*) as "Outputs 1MB - 10MB" from CMDATAwhere DATALENGTH(DATAPROP) >= 1048576 and DATALENGTH(DATAPROP) < 10485760;select count(*) as "Outputs 10MB-100MB" from CMDATAwhere DATALENGTH(DATAPROP) >= 10485760 and DATALENGTH(DATAPROP) < 104857600;select count(*) as "Outputs 100MB-1GB" from CMDATAwhere DATALENGTH(DATAPROP) >= 104857600 and DATALENGTH(DATAPROP) < 1073741824;select count(*) as "Outputs > 1GB" from CMDATAwhere DATALENGTH(DATAPROP) >= 1073741824;select c.NAME as "class name", count(*) as "Total number of specifications", SUM(cast(coalesce(DATALENGTH(p.SPEC),0) as bigint)) as "Total size of specifications" from CMOBJECTS o, CMCLASSES c, CMOBJPROPS7 pwhere  o.CMID=p.CMID and p.SPEC is not NULLgroup by o.CLASSID, c.CLASSID, C.NAMEhaving c.CLASSID=o.CLASSIDorder by c.NAME;select count(*) as "Specifications < 10KB" from CMOBJPROPS7where SPEC is not NULL and DATALENGTH(SPEC) < 10240;select count(*) as "Specifications 10KB - 100KB" from CMOBJPROPS7where DATALENGTH(SPEC) >= 10240 and  DATALENGTH(SPEC) < 102400;select count(*) as "Specifications 100KB - 1MB" from CMOBJPROPS7where DATALENGTH(SPEC) >= 102400 and  DATALENGTH(SPEC) < 1048576;select count(*) as "Specifications > 1MB" from CMOBJPROPS7where DATALENGTH(SPEC) >= 1048576;select c.NAME as "class name", count(*) as "Total number of specifications", SUM(cast(coalesce(DATALENGTH(p.SPEC),0) as bigint)) as "Total size of specifications" from CMOBJECTS o, CMCLASSES c, CMOBJPROPS34 pwhere  o.CMID=p.CMID and p.SPEC is not NULLgroup by o.CLASSID, c.CLASSID, C.NAMEhaving c.CLASSID=o.CLASSIDorder by c.NAME;select c.NAME as "class name", count(*) as "Total number of specifications", SUM(cast(coalesce(DATALENGTH(p.SPEC),0) as bigint)) as "Total size of specifications" from CMOBJECTS o, CMCLASSES c, CMOBJPROPS43 pwhere  o.CMID=p.CMID and p.SPEC is not NULLgroup by o.CLASSID, c.CLASSID, C.NAMEhaving c.CLASSID=o.CLASSIDorder by c.NAME;select c.NAME as "class name", count(*) as "Total number of specifications", SUM(cast(coalesce(DATALENGTH(p.SPEC),0) as bigint)) as "Total size of specifications" from CMOBJECTS o, CMCLASSES c, CMOBJPROPS66 pwhere  o.CMID=p.CMID and p.SPEC is not NULLgroup by o.CLASSID, c.CLASSID, C.NAMEhaving c.CLASSID=o.CLASSIDorder by c.NAME;select c.NAME as "class name", count(*) as "Total number of specifications", SUM(cast(coalesce(DATALENGTH(p.RELATED),0) as bigint)) as "Total size of specifications" from CMOBJECTS o, CMCLASSES c, CMOBJPROPS14 pwhere  o.CMID=p.CMID and p.RELATED is not NULLgroup by o.CLASSID, c.CLASSID, C.NAMEhaving c.CLASSID=o.CLASSIDorder by c.NAME;select c.NAME as "class name", count(*) as "Total number of specifications", SUM(cast(coalesce(DATALENGTH(p.SPEC),0) as bigint)) as "Total size of specifications" from CMOBJECTS o, CMCLASSES c, CMOBJPROPS63 pwhere  o.CMID=p.CMID and p.SPEC is not NULLgroup by o.CLASSID, c.CLASSID, C.NAMEhaving c.CLASSID=o.CLASSIDorder by c.NAME;select c.NAME as "class name", count(*) as "Total number of specifications", SUM(cast(coalesce(DATALENGTH(p.SPEC),0) as bigint)) as "Total size of specifications" from CMOBJECTS o, CMCLASSES c, CMOBJPROPS42 pwhere  o.CMID=p.CMID and p.SPEC is not NULLgroup by o.CLASSID, c.CLASSID, C.NAMEhaving c.CLASSID=o.CLASSIDorder by c.NAME;select c.NAME as "class name", count(*) as "Total number of specifications", SUM(cast(coalesce(DATALENGTH(p.SPEC),0) as bigint)) as "Total size of specifications" from CMOBJECTS o, CMCLASSES c, CMOBJPROPS68 pwhere  o.CMID=p.CMID and p.SPEC is not NULLgroup by o.CLASSID, c.CLASSID, C.NAMEhaving c.CLASSID=o.CLASSIDorder by c.NAME;select c.NAME as "class name", count(*) as "Total number of specifications", SUM(cast(coalesce(DATALENGTH(p.SPEC),0) as bigint)) as "Total size of specifications" from CMOBJECTS o, CMCLASSES c, CMOBJPROPS56 pwhere  o.CMID=p.CMID and p.SPEC is not NULLgroup by o.CLASSID, c.CLASSID, C.NAMEhaving c.CLASSID=o.CLASSIDorder by c.NAME;select c.NAME as "class name", count(*) as "Total number of specifications", SUM(cast(coalesce(DATALENGTH(p.SPEC),0) as bigint)) as "Total size of specifications" from CMOBJECTS o, CMCLASSES c, CMOBJPROPS57 pwhere  o.CMID=p.CMID and p.SPEC is not NULLgroup by o.CLASSID, c.CLASSID, C.NAMEhaving c.CLASSID=o.CLASSIDorder by c.NAME;select count(*) as "Total number of models" from CMOBJPROPS7where CMODEL is not NULL;select count(*) as "Models < 10KB" from CMOBJPROPS7where DATALENGTH(CMODEL) < 10240;select count(*) as "Models 10KB - 100KB" from CMOBJPROPS7where DATALENGTH(CMODEL) > 10240 and  DATALENGTH(CMODEL) < 102400;select count(*) as "Models 100KB - 1MB" from CMOBJPROPS7where DATALENGTH(CMODEL) > 102400 and  DATALENGTH(CMODEL) < 1048576;select count(*) as "Models > 1MB" from CMOBJPROPS7where DATALENGTH(CMODEL) > 1048576;create table #CMPROFILE (CMID int, CLASSID int, NOBJECTS bigint)insert into #CMPROFILE (CMID, CLASSID, NOBJECTS)  SELECT o.PCMID, p.CLASSID, count(*) from CMOBJECTS o left outer join CMOBJECTS p on o.PCMID=p.CMIDwhere p.CLASSID = 1 or p.CLASSID=17 or p.CLASSID=12 or p.CLASSID=9group by o.PCMID, p.CLASSIDselect c.NAME as "object class", pr.NOBJECTS as "number of children", count(*) as "number of objects"from #CMPROFILE pr left outer join CMCLASSES c on pr.CLASSID=c.CLASSIDgroup by c.NAME,  pr.NOBJECTSorder by c.NAME, pr.NOBJECTS;select TYPE as "schedule type", count(*) "number of schedules"from CMOBJPROPS2 where ACTIVE=1 and TYPE is not NULL group by TYPE;insert into #CMPROFILE (CMID, CLASSID, NOBJECTS) SELECT o.PCMID, p.CLASSID, count(*) from CMOBJECTS o left outer join CMOBJECTS p on o.PCMID=p.CMIDwhere p.CLASSID = 55 and o.CLASSID = 57 or o.CLASSID=17group by o.PCMID, p.CLASSIDselect c.NAME as "object class", pr.NOBJECTS as "number of children", count(*) as "number of objects"from #CMPROFILE pr left outer join CMCLASSES c on pr.CLASSID=c.CLASSIDgroup by c.NAME,  pr.NOBJECTSorder by c.NAME, pr.NOBJECTS;select count(*) as "Number of empty policies" from CMPOLICIESwhere DATALENGTH(POLICIES) = 0;select count(*) as "Policies 1-127 bytes" from CMPOLICIESwhere DATALENGTH(POLICIES) >= 1 and DATALENGTH(POLICIES) <= 127;select count(*) as "Policies 128-255 bytes" from CMPOLICIESwhere DATALENGTH(POLICIES) >= 128 and DATALENGTH(POLICIES) <= 255;select count(*) as "Policies 256-511 bytes" from CMPOLICIESwhere DATALENGTH(POLICIES) >= 256 and DATALENGTH(POLICIES) <= 511;select count(*) as "Policies 512-1023 bytes" from CMPOLICIESwhere DATALENGTH(POLICIES) >= 512 and DATALENGTH(POLICIES) <= 1023;select count(*) as "Policies 1K-2K" from CMPOLICIESwhere DATALENGTH(POLICIES) >= 1023 and DATALENGTH(POLICIES) <= 2047;select count(*) as "Policies 2K-4K" from CMPOLICIESwhere DATALENGTH(POLICIES) >= 2048 and DATALENGTH(POLICIES) <= 4095;select count(*) as "Policies 4K-6K" from CMPOLICIESwhere DATALENGTH(POLICIES) >= 4096 and DATALENGTH(POLICIES) <= 6143;select count(*) as "Policies 6K-8K" from CMPOLICIESwhere DATALENGTH(POLICIES) >= 6144 and DATALENGTH(POLICIES) <= 8191;select count(*) as "Policies > 8K" from CMPOLICIESwhere DATALENGTH(POLICIES) > 8192;select count(*) as "Archive queue size" from CMARCHIVEQUEUE;select count(*) as "Delete queue size" from CMDELETEQUEUE;drop table #CMPROFILE
 |