How to run Showblocks with the Ferret Utility

Teradata support asked me for information from the “showblocks” command for a problem table in the Ferret Utility.  Below is an example of how I retrieved the information.  In my example here, I am using the Teradata Express for demonstration purposes only.

1. Connected to the Teradata system, in this example I am connecting using the putty tool:

Teradata Express

2. Open the Database Window Supervisor screen using: cnsterm 6

Note: Window 6 is always used as the supervisor window.

Database Window Supervisor Screen

cnsterm 6

3.  To start the utility:  start ferret

Start Ferret

start ferret

Note: watch the window number that the utility is going to start in, that number is needed in step 5.

4. Exit the Database Window Supervisor screen by pressing Control -c: < ctrl -c >

CNRL_CtoExit

5. Start the Database Window running with the number listed in Step 3: cnsterm < window # >

(eg. If in Step 3, the output states “Started ‘ferret’ in window 2”, then type: cnsterm 2)

Window1

cnsterm 1

Note: When the Database Window is opened, information about the Ferret Utility will display.

6.  Now the internal table id is needed, by running tableid then the database and table in double-quotes: tableid “<database name>.<table name>”

7.  With the internal three number table id retrieved from the previous command, set the scope for that table: scope table <table id>

8.  Type showblocks, and the information for the table that you want will display: showblocks

SHOWBLOCKS

From Teradata:

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.

Click to see more information on SHOWBLOCKS.

9. Finally, to correctly close the utility, type “quit;”.  The ferret utility will not close out of the cnsterm windows unless the “;” is after the quit statement: quit;

10. Then control -c to exit the window like the supervisor window shown above: < ctrl -c >

Exit Ferret

 

 

 

 

Leave a Reply