{"id":1090,"date":"2016-03-01T15:28:55","date_gmt":"2016-03-01T15:28:55","guid":{"rendered":"http:\/\/www.theSQLReport.com\/?p=1090"},"modified":"2016-03-01T15:30:40","modified_gmt":"2016-03-01T15:30:40","slug":"how-to-run-showblocks-with-the-ferret-utility","status":"publish","type":"post","link":"http:\/\/www.theSQLReport.com\/?p=1090","title":{"rendered":"How to run Showblocks with the Ferret Utility"},"content":{"rendered":"<p>Teradata support asked me for information from the &#8220;showblocks&#8221; command for a problem table in the Ferret Utility.\u00a0 Below is an example of how I retrieved the information.\u00a0 In my example here, I am using the Teradata Express for demonstration purposes only.<\/p>\n<p>1. Connected to the Teradata system, in this example I am connecting using the putty tool:<\/p>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/TeradataExpress.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1091 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/TeradataExpress.jpg\" alt=\"Teradata Express\" width=\"522\" height=\"189\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/TeradataExpress.jpg 522w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/TeradataExpress-300x108.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/TeradataExpress-210x76.jpg 210w\" sizes=\"(max-width: 522px) 100vw, 522px\" \/><\/a><\/p>\n<p>2. Open the Database Window Supervisor screen using: <strong>cnsterm 6<\/strong><\/p>\n<p style=\"text-align: left; padding-left: 30px;\">Note: Window 6 is always used as the supervisor window.<\/p>\n<div id=\"attachment_1094\" style=\"width: 371px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/DatabaseWindowSupervisorScreen.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1094\" class=\"wp-image-1094 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/DatabaseWindowSupervisorScreen.jpg\" alt=\"Database Window Supervisor Screen\" width=\"361\" height=\"114\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/DatabaseWindowSupervisorScreen.jpg 361w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/DatabaseWindowSupervisorScreen-300x94.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/DatabaseWindowSupervisorScreen-210x66.jpg 210w\" sizes=\"(max-width: 361px) 100vw, 361px\" \/><\/a><p id=\"caption-attachment-1094\" class=\"wp-caption-text\">cnsterm 6<\/p><\/div>\n<p>3.\u00a0 To start the utility:\u00a0 <strong>start ferret<\/strong><\/p>\n<div id=\"attachment_1098\" style=\"width: 303px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/StartFerret.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1098\" class=\"wp-image-1098 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/StartFerret.jpg\" alt=\"Start Ferret\" width=\"293\" height=\"174\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/StartFerret.jpg 293w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/StartFerret-210x124.jpg 210w\" sizes=\"(max-width: 293px) 100vw, 293px\" \/><\/a><p id=\"caption-attachment-1098\" class=\"wp-caption-text\">start ferret<\/p><\/div>\n<p>Note: watch the window number that the utility is going to start in, that number is needed in step 5.<\/p>\n<p>4. Exit the Database Window Supervisor screen by pressing Control -c: <strong>&lt; ctrl -c &gt;<\/strong><\/p>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/CNRL_CtoExit.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1092 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/CNRL_CtoExit.jpg\" alt=\"CNRL_CtoExit\" width=\"239\" height=\"72\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/CNRL_CtoExit.jpg 239w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/CNRL_CtoExit-210x63.jpg 210w\" sizes=\"(max-width: 239px) 100vw, 239px\" \/><\/a><\/p>\n<p>5. Start the Database Window running with the number listed in Step 3: <strong>cnsterm &lt; window # &gt;<\/strong><\/p>\n<p style=\"padding-left: 30px;\">(eg. If in Step 3, the output states &#8220;Started &#8216;ferret&#8217; in window 2&#8221;, then type: cnsterm 2)<\/p>\n<div id=\"attachment_1096\" style=\"width: 580px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/Partition1.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1096\" class=\"wp-image-1096 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/Partition1.jpg\" alt=\"Window1\" width=\"570\" height=\"354\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/Partition1.jpg 570w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/Partition1-300x186.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/Partition1-210x130.jpg 210w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/a><p id=\"caption-attachment-1096\" class=\"wp-caption-text\">cnsterm 1<\/p><\/div>\n<p>Note: When the Database Window is opened, information about the Ferret Utility will display.<\/p>\n<p>6.\u00a0 Now the internal table id is needed, by running tableid then the database and table in double-quotes: <strong>tableid &#8220;&lt;database name&gt;.&lt;table name&gt;&#8221;<\/strong><\/p>\n<p>7.\u00a0 With the internal three number table id retrieved from the previous command, set the scope for that table: <strong>scope table &lt;table id&gt;<\/strong><\/p>\n<p>8.\u00a0 Type showblocks, and the information for the table that you want will display: <strong>showblocks<\/strong><\/p>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/SHOWBLOCKS.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1097 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/SHOWBLOCKS.jpg\" alt=\"SHOWBLOCKS\" width=\"1360\" height=\"617\" \/><\/a><\/p>\n<p>From Teradata:<\/p>\n<p>The SHOWBLOCKS command displays statistics about data block size and\/or the number of rows per data block for all the tables defined by the SCOPE command. SHOWBLOCKS can display WAL (Write Ahead Logging) log statistics also.<\/p>\n<p>Click to see more information on <a title=\"Teradata SHOWBLOCKS\" href=\"http:\/\/www.info.teradata.com\/htmlpubs\/db_ttu_13_10\/index.html#page\/Utilities\/B035_1102_109A\/Ferret.16.117.html\" target=\"_blank\"><strong>SHOWBLOCKS<\/strong><\/a>.<\/p>\n<p>9. Finally, to correctly close the utility, type &#8220;quit;&#8221;.\u00a0 The ferret utility will not close out of the cnsterm windows unless the &#8220;;&#8221; is after the quit statement: <strong>quit;<\/strong><\/p>\n<p>10. Then control -c to exit the window like the supervisor window shown above: <strong>&lt; ctrl -c &gt;<\/strong><\/p>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/ExitFerret.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1095 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/ExitFerret.jpg\" alt=\"Exit Ferret\" width=\"398\" height=\"163\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/ExitFerret.jpg 398w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/ExitFerret-300x122.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/02\/ExitFerret-210x86.jpg 210w\" sizes=\"(max-width: 398px) 100vw, 398px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Teradata support asked me for information from the &#8220;showblocks&#8221; command for a problem table in the Ferret Utility.\u00a0 Below is an example of how I retrieved the information.\u00a0 In my &hellip; <a class=\"readmore\" href=\"http:\/\/www.theSQLReport.com\/?p=1090\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":1097,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[69,67,71,70,66],"class_list":["post-1090","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-teradata","tag-cnsterm","tag-ferret","tag-showblocks","tag-tableid","tag-teradata"],"_links":{"self":[{"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1090"}],"collection":[{"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1090"}],"version-history":[{"count":12,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1090\/revisions"}],"predecessor-version":[{"id":1136,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1090\/revisions\/1136"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/media\/1097"}],"wp:attachment":[{"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1090"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}