{"id":320,"date":"2009-05-09T09:56:48","date_gmt":"2009-05-09T03:56:48","guid":{"rendered":"http:\/\/techsatwork.com\/blog\/?p=320"},"modified":"2016-01-07T11:31:12","modified_gmt":"2016-01-07T05:31:12","slug":"sql805n-on-nullidsys-package-part-2","status":"publish","type":"post","link":"https:\/\/techsatwork.com\/?p=320","title":{"rendered":"SQL805N on NULLID.SYS* package &#8211; Part 2"},"content":{"rendered":"<p>Earlier I had written about getting SQL805 on NULLID.SYS* package and how you can resolve it by adding more SYS* packages :<\/p>\n<p><span style=\"color: #0000ff;\">db2 \u00e2\u20ac\u0153bind @db2cli.lst blocking all sqlerror continue grant public CLIPKG 12&#8243;<\/span><\/p>\n<p>But how do you know that you are nearing the condition ? \u00c2\u00a0Won&#8217;t an early warning system be good ? \u00c2\u00a0Yes&#8230;it would be, so you can avoid an outage. \u00c2\u00a0I wrote a simple script that \u00c2\u00a0can alert you when it crosses a threshold. Here is it :<\/p>\n<p>I called it count_cursors.sh :<\/p>\n<p><span style=\"color: #0000ff;\">dbas=&#8221;dba@techsatwork.com&#8221;<br \/>\nif [ -f \/home\/db2inst1\/sqllib\/db2profile ]; then<br \/>\n\u00c2\u00a0\u00c2\u00a0 \u00c2\u00a0. \/home\/db2inst1\/sqllib\/db2profile<br \/>\nfi<br \/>\ndate &gt;&gt; \/home\/db2inst1\/scripts\/cursor_count.out<br \/>\ndb2pd -db RAJUDB -static | grep SYSL | wc -l &gt;&gt; \/home\/db2inst1\/scripts\/cursor_count.out<br \/>\ncount=`db2pd -db RAJUDB -static | grep SYSL | wc -l`<br \/>\nif [ $count -gt 900 ]<br \/>\nthen<br \/>\n\u00c2\u00a0mailoutput=`print &#8220;The statement handle count in RAJUDB is: &#8220;$count`<br \/>\n\u00c2\u00a0echo $mailoutput &gt; \/home\/db2inst1\/scripts\/mail.msg<br \/>\n\u00c2\u00a0mailx -s &#8220;Important message from `uname -n`&#8221; $dbas &lt; \/home\/db2inst1\/scripts\/mail.msg<br \/>\n\u00c2\u00a0echo &#8216;The max cursor count for RAJUDB has exceed the threshold. Its now &gt; &#8216; $count<br \/>\nelse<br \/>\n\u00c2\u00a0echo &#8216;no issues&#8230;.&#8217; $count<br \/>\n\u00c2\u00a0echo &#8216;No issues&#8230;.so no mail&#8217; &gt; \/home\/db2inst1\/scripts\/mail.msg<br \/>\nfi<\/span><\/p>\n<p>Use it and let me know if it actually helped you !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Earlier I had written about getting SQL805 on NULLID.SYS* package and how you can resolve it by adding more SYS* packages : db2 \u00e2\u20ac\u0153bind @db2cli.lst blocking all sqlerror continue grant public CLIPKG 12&#8243; But how do you know that you are nearing the condition ? \u00c2\u00a0Won&#8217;t an early warning system be good ? \u00c2\u00a0Yes&#8230;it would [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[3],"tags":[191,9,189,943,190,186,11,185,13,187,184,188],"class_list":["post-320","post","type-post","status-publish","format-standard","hentry","category-db2","tag-clipkg","tag-cursor","tag-cursor-count","tag-db2","tag-db2cli","tag-db2pd","tag-nullid","tag-nullidsyslh20","tag-sql805n","tag-static","tag-sys-packages","tag-sysl"],"_links":{"self":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=320"}],"version-history":[{"count":2,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/320\/revisions"}],"predecessor-version":[{"id":322,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/320\/revisions\/322"}],"wp:attachment":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}