Monday, July 25, 2016

What is checktable in teradata

"Checktable" is diagnostic tool provided by Teradata to identify inconsistencies and corruption in internal data structure of database objects in the system, it checks inconsistencies at table header, row identifier, secondary index and fallback table validity.

check table has 3 levels of checking

level 1: compares row count of subtable of primary data with subtable of fall back table for each cluster and reports the difference and also does row count comparison for base table and secondary index subtable.

level 2:  compares row identifier in various sub tables and report any inconsistency, It checks fallback & secondary index subtables for duplicate row id's , out of order rowids and incorrectly distributed rows,

level 3: compares the actual rows bytes by byte at secondary index, table header, rowid and fallback level. it is most resource consuming level and should be run in idle time.


check table can be run from superviser window in primary not of system using cnsterm 6 console.

command: start checktable will start the utility.

example check table command:
check all tables at level one with no error limit;

What is Crashdump database in Teradata



Crashdump database is used to store the memory/swap dump of Teradata system when Teradata Database crashes (database restarts) or there is critical/Fatal error has occurred in Teradata which it cannot recover from.

This is Teradata support consultant team use crash dump to analyze the reason of database crash or any fatal error.

Crash dump types:
there are two type of dumps that is generated from Teradata TPA namely 1. Crash dump 2. snapshot dump.



Enabling System level resource logging in Teradata



This can be done from cnsterm terminal, follow the steps below.

CVS_1-8:~ # cnsterm 6
Attempting to connect to CNS...Completed.
Hello

Input Supervisor Command:
start qrysessn

Started 'qrysessn' in window 1
 at Sat May 11 06:53:04 2013


Input Supervisor Command:
start qrysessn

Started 'qrysessn' in window 2
 at Sat May 11 06:53:04 2013


Input Supervisor Command:
start showlocks

Started 'showlocks' in window 1
 at Sat May 11 06:53:08 2013

Input Supervisor Command:
> get logtable all
get logtable all

spma table's logging is disabled
ipma table's logging is enabled
svpr table's logging is enabled
ivpr table's logging is disabled
scpu table's logging is enabled
sldv table's logging is enabled
spdsk table's logging is enabled
svdsk table's logging is enabled
sawt table's logging is enabled
sps table's logging is enabled
shst table's logging is enabled

Input Supervisor Command:
> set logtable spma on
set logtable spma on


Input Supervisor Command:
> get logtable all
get logtable all

spma table's logging is enabled
ipma table's logging is enabled
svpr table's logging is enabled
ivpr table's logging is disabled
scpu table's logging is enabled
sldv table's logging is enabled
spdsk table's logging is enabled
svdsk table's logging is enabled
sawt table's logging is enabled
sps table's logging is enabled
shst table's logging is enabled

Input Supervisor Command:
> set logtable ivpr on
set logtable ivpr on


Input Supervisor Command:
> get logtable all
get logtable all

spma table's logging is enabled
ipma table's logging is enabled
svpr table's logging is enabled
ivpr table's logging is enabled
scpu table's logging is enabled
sldv table's logging is enabled
spdsk table's logging is enabled
svdsk table's logging is enabled
sawt table's logging is enabled
sps table's logging is enabled
shst table's logging is enabled

Input Supervisor Command:


What is impact CPU in teradata?

Impact cpu in Teradata is the cpu consumed on hottest AMP multiplied by number of AMP in the system. so, in other word we can say it as actual "impact" on system cpu during skewed processing.

formula to calculate impact cpu:
MaxAMPCPUTime * (HASHAMP()+1) AS impactCPU