{"id":446,"date":"2022-02-05T22:15:32","date_gmt":"2022-02-05T22:15:32","guid":{"rendered":"https:\/\/maboc.nl\/?p=446"},"modified":"2022-02-05T22:24:25","modified_gmt":"2022-02-05T22:24:25","slug":"db2-explain-plan-doesnt-exists","status":"publish","type":"post","link":"https:\/\/maboc.nl\/?p=446","title":{"rendered":"DB2 Explain plan doesn&#8217;t exists"},"content":{"rendered":"<p>Just a quick reminder:<\/p>\n<p>If you start a new database where you want to genrate some execution-plans you might run into the following :<\/p>\n<pre>db2 => explain plan for select * from t1,t3 where t1.n1=t3.n1;\r\nDB21034E  The command was processed as an SQL statement because it was not a \r\nvalid Command Line Processor command.  During SQL processing it returned:\r\nSQL0219N  The required Explain table \"DB2INST1.EXPLAIN_INSTANCE\" does not \r\nexist.  SQLSTATE=42704\r\ndb2 =><\/pre>\n<p>Do not panic. This can easily be overcome by running sqllib\/misc\/EXPLAIN.DDL<\/p>\n<pre>\r\n[db2inst1@broccoli misc]$ db2 -tf EXPLAIN.DDL \r\n\r\n******* IMPORTANT ********** \r\n\r\nUSAGE: db2 -tf EXPLAIN.DDL   \r\n\r\n******* IMPORTANT ********** \r\n\r\n\r\nDB20000I  The UPDATE COMMAND OPTIONS command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\nDB20000I  The SQL command completed successfully.\r\n\r\n[db2inst1@broccoli misc]$ \r\n<\/pre>\n<p>And then you need to bind the package:<\/p>\n<pre>\r\n[db2inst1@broccoli misc]$ db2 bind db2exfmt.bnd blocking all grant public\r\n\r\nLINE    MESSAGES FOR db2exfmt.bnd\r\n------  --------------------------------------------------------------------\r\n        SQL0061W  The binder is in progress.\r\n        SQL0091N  Binding was ended with \"0\" errors and \"0\" warnings.\r\n[db2inst1@broccoli misc]$\r\n<\/pre>\n<p>And you can march on.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just a quick reminder: If you start a new database where you want to genrate some execution-plans you might run into the following : db2 => explain plan for select * from t1,t3 where t1.n1=t3.n1; DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64,79],"tags":[65,80],"class_list":["post-446","post","type-post","status-publish","format-standard","hentry","category-db2","category-explain","tag-db2","tag-explain"],"_links":{"self":[{"href":"https:\/\/maboc.nl\/index.php?rest_route=\/wp\/v2\/posts\/446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/maboc.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/maboc.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/maboc.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/maboc.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=446"}],"version-history":[{"count":4,"href":"https:\/\/maboc.nl\/index.php?rest_route=\/wp\/v2\/posts\/446\/revisions"}],"predecessor-version":[{"id":450,"href":"https:\/\/maboc.nl\/index.php?rest_route=\/wp\/v2\/posts\/446\/revisions\/450"}],"wp:attachment":[{"href":"https:\/\/maboc.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/maboc.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/maboc.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}