Sei sulla pagina 1di 5

USING INFORMATICA WITH TERADATA UTILITIES IV

(Error handling & Restartability)


All the three loaders (TPUMP, MLOAD and FLOAD) make use of
Error tables for Error handling.
Function of t! ERROR Ta"#!$:
(a) Identify errors during the load
(b) Provide details about the errors
(c) Stores the error rows for debugging
(d) he !A"# and I$%&"E 'arameters (listed in the .(!)
)A*E) section of the scri't) define which ty'e of errors with
!A"# are stored with their details and the ones with I$%&"E are
neglected. hese o'tions are limited only for multiload and
P+!P.(%ot used in case of ,astload since the only (!)
o'eration 'erformed is I%SE").(efault is !A"#.-hen using an
u'sert default does not a''ly.
In ca$! of TPUMP:
Pum' uses only ONE Error able 'er target table.Since P+!P
su''orts multi table loads the error table names would be different in
each case. In case there are two or more instances of P+!P loading
into the same target table the session 'ro'erties has to be modified to
use as different error table name. he error table name is s'ecified in
the scri't.Pum' will create it automatically. If an error table name is
not s'ecified the Integration Service uses
E./actual.target.table.name0/'artition.number0 (Error Table).
Entries are made to these tables whenever errors occur during the
load 'rocess.
(1) It stores information about errors that occur while
ac2uiring data (such as in data formats3 data du'licates4 etc)
(5) Errors during data movement(data transition 'roblems3
loader writer errors 6 issues can ha''en while writing the data if
the combination of 'rimary inde7es is not 'ro'er)
(8) (ifficulties com'iling valid Primary Inde7es (such as
encountering a %+)) in 'rimary key columns).
(9) Errors can also occur if the control files are not 'ro'erly re:
generated after a change has been made to the table structures
(,or e7. If any of the column data ty'e or length or name or the
%& %+)) constraint has been changed in the e7isting table
structure but the control file has not been re:generated then the
loader fails. he log file generated (.ldrlog file) 'rovides more
details for such kinds of errors and is useful for debugging such
errors.
RESTARTING TPUMP%
Pum' scri't is fully restartable as long as the log table and error
tables are not dro''ed.
If P+!P is run in staged mode then the the error and log tables are
not dro''ed and are used to determine the last check'oint to restart
the ;ob. -hereas in case of no staged ('i'ed) mode the error and the
log tables are dro''ed 'rior to re:running the ;ob.
TPUMP $tati$tic$:
**** 22:11:05 UTY1803 Import processing statistics
. IMPORT 1 Total t!s "ar
. ######### ##############
$an%i%ate recor%s consi%ere%:........ 5....... 5
&ppl' con%itions satis"ie%:.......... 5....... 5
Recor%s loga(le to error ta(le:...... 0....... 0
$an%i%ate recor%s re)ecte%:.......... 0....... 0
In ca$! of MLOAD:
!)&A( uses t&o !''o' ta"#!$ 'er target table. )ike P+!P the error
tables can be s'ecified in the scri't. If uns'ecified the default used are
E./target.table.name0 and +<./target.table.name0(Uni2ueness
Violation table). he following ty'es of errors are recorded in these
two error tables:
(1) he E.E"" table stores the information of errors during
the 'rocessing 'hase such as data formats3 data ty'e
mismatch.. etc. hence this table is also called the Ac2uisition
error table of !)&A(.
(5) he +<.E"" table is s'ecially for tracking du'licates. It
lists +ni2ue Primary inde7es violations3 constraint errors (such
as check or not null constraints) and field overflow errors. his is
called as A''lication error table.
(8) *y s'ecifying the !A"# (+P)I=AE I%SE" "&-S and
!A"# (+P)I=AE +P(AE "&-S in the scri't entries are logged
into the +<.E"" table for both I%SE" and +P(AE rows.
(9) Similarly the E.E"" table can be configured to note the
missing u'date3 insert and delete rows using the !A"# o'tion.
RESTARTING MLOAD%
Sta(!d )od!:
*1+ If the ;ob fails 'rior to writing into the target table then it can be
either restarted or abandoned. If restarted it begins from the
last check'oint (It 'icks u' the =>E=#P&I% value from the
"ESA" logtable of the !)&A(). o abandon "E)EASE !)&A(
command is used and the error and log tables are dro''ed. his
command releases the lock on the table (since !)&A( does a
table level lock) and rollbacks the ;ob.>owever if the volume of
data loaded is huge rollback takes longer time .In such situations
a restart is 'referred.
*2+ If the ;ob fails after few records have been written into the table
it must be resubmitted to run.If the resubmit is also
unsuccessful then data backu' is taken3 the target table is
dro''ed 3 recreated and data is restored from the backu'.
Pi*!d )od!:
*a+ If the ;ob fails before it writes to the target table then it can?t be
restarted. Since there isn?t any in'ut file and there could be a
data corru'tion if the ;ob is restarted. In such cases the ;ob has
to be resubmitted after dro''ing the error and log tables.
(b) If however the ;ob fails while loading into the table it can
be restarted or dro''ed and recreated like the staged mode.
Mu#tiLoad Stati$tic$%
In ca$! of FLOAD%
,astload makes use of t&o !''o' ta"#!$. *y default the Integration
Service uses E./target.table.name and
+<./target.table.name.hese tables are created automatically by the
,astload utility if named in the scri't. he names are arbitrary but to
maintain uni2ueness within the database target table names are used
to differentiate between multi'le ,ast)oad ;obs occurring in the same
database.
(a) he first error table E.error table stores translation or
constraint errors such as issues in data ty'e3 length etc..
(b) he second table +<.error table tracks +PI violations like
that of !)&A(3
(c),ast)oad will load ;ust one occurrence for every +PI. >owever if
a com'lete du'licate row is encountered then a count of that is
taken but the row is not stored. In such cases the table data has
to be analy@ed to resolve the error.
RESTARTING FLOAD:
he same 'rocedures a''ly as that of !)&A(. he sim'lest and
fastest way is to dro'3 recreate the table and re:run the ;ob. After a
load 'rocess scri't runs successfully3 if we are not able to run a select
count(A)B command on the target table then the table has to be
dro''ed and re:created to remove the lock. Statistics also needs to be
recreated in such cases.
Fa$t#oad $tati$tic$%
CHEC+ING ERRORS IN TERADATA :
A sim'le SE)E= A ,"&! E""&" A*)E %A!EC (can be obtained from
the control file) command dis'lays the errors.
A much granular level detail of the error can be obtained from the
column called the E''o'Cod! of the error table (a''licable for E
tables of the 8 loaders) which contains the eradata code for every
error may it be a constraint or translation error. he second column3
named E''o'Fi!#d, s'ecifies which column in the table contained the
error (Incase of !)&A( n ,)&A() whereas in case of P+!P the
nu)"!' of t! co#u)n in t! ta'(!t ta"#! where error ha''ened is
dis'layed.
A SE)E= (ISI%= E""&"=&(E3 E""&",IE)( ,"&! E""&" A*)EC
will list out the various errors.
he affected column is dis'layed in the Ho$tData column of the error
table (for !)&A( and P+!P). he column name is DataPa'c!# for
,)&A(.
In case of ,)&A( the column names for the +< table and E table are
same e7ce't that +< stores the du'licate row entries.
,or !)&A( the +< table column names are a little different. he
E""&" =&(E column becomes D,CE''o'Cod! and E""&",IE)(
becomes D,CE''o'Fi!#d. here is a third column called the
Uni-u!n!$$ column which contains a value that disallows du'licate
row errors in this table.
R!f!'!nc!$%
www.teradata.com
eradata +tilities 6 *reaking the *arriers by om =offing
Cont'i"ut!d ,.%
"a;alakshmi
SE
*est *uy
!(=

Potrebbero piacerti anche