You are on page 1of 5

1.What is log table? What is the use of log table?

Ans: The Error Table contains information concerning: - Data conversion errors, Constraint violations and other error conditions: Contains ro!s !hich failed to be manu"ulated due to constraint violations Translation error ,#t Ca"tures ro!s that contains du"licate $alues for %&#s. #t logs errors ' e(ce"tions that occurs during the a""l) "hase. #t logs errors that are occurs during the ac*uisition "hase. +,..After creating tables d)namicall) in the Teradata, !here is the -.A/T table o"tion usuall) done ? When tables are ne!l) created, !hat is the default role and !hat the default "rivileges !hich get assigned ? Ans: The -.A/T o"tion for an) "articular table de"ends on the "rivileges of the user. #f it is an admin user )ou can grant "rivileges at an) "oint of time.The default roles associated !ith the ne!l) created tables de"end on he schema in !hich the) are created. 0,.1o! teradata ma2es sure that there are no du"licate ro!s being inserted !hen its a 3ET table? Ans:: :::::::Teradata !ill redirect the ne! inserted ro! as "er its &# to the target A4& 5on the basis of its ro! hash value6, and if it find same ro! hash value in that A4& 5hash s)non)ms6 then it start com"aring the !hole ro!, and find out if du"licate.#f its a du"licate it silentl) s2i"s it !ithout thro!ing an) error 7,..Does 3D8C changes !hen )ou use Teradata instead of 9racle? Ans: if !e use teradata utilities there !ill be a change in 3D8C. Teradata utilities are :164loads +6:ast E("ort 06;TE< 76T&um" =6:ast load

=-----Can !e have an unconnected l2" to loo2u" a D;+ record against a Teradata record? Ans--->es !e can ..but some times !e need to chec2 the value !hich loo2u" is returning li2e it ha""ens in teradata if !e are having loo2u" on varchar column and record is coming from source s)stem it never !or2s because !hen informatica creates cache from there it adds s"ace to the values. so !e al!a)s have to use ltrim5rtrim66 function in loo2u" *uer). ?-----1o! man) codd@s rules are satisfied b) teradata database? Ans--1+ coddAs rules. B-----!hat is basic teradata *uer) language? Ans ---;TE<5;asic teradata *uer)6#t allo!s us to !rite 3<8 statements along !ith ;TE< commands. We can use ;TE< for im"orting,e("orting and re"orting "ur"oses. The commands start !ith a 5.6 dot and can be terminated b) using 5C6, it is not mandator) to use 5C6. 3<8 statements doesnt start !ith a dot , but 5C6 is com"ulsar) to terminate the 3<8 statement.;TE< !ill assume an) thing !ritten !ith out a dot as a s*l statement and re*uires a 5C6 to terminate it. 1ere ,;TE< is mainl) suitable for 3mall tables and !e can "erform an) arithmetic o"erations in a *uer) li2e com"utations using :unctions and #/3E.T W#T1 3E8ECT combinations all !e can do that. D---- What is the difference bet!een -lobal tem"orar) tables and $olatile tem"orar) tables?Ans---lobal Tem"orar) tables 5-TT6 E 1. When the) are created, its definition goes into Data Dictionar).+. When materialiFed data goes in

tem" s"ace.0. thats !h), data is active u"to the session ends, and definition !ill remain there u"to its not dro""ed using Dro" table statement.#f dro""ed from some other session then its should be Dro" table allC7. )ou can collect stats on -TT.$olatile Tem"orar) tables 5$TT6 - 1. Table Definition is stored in 3)stem cache+. Data is stored in s"ool s"ace.0. thats !h), data and table definition both are active onl) u"to session ends.7. /o collect stats for $TT.#f )ou are using volatile table, )ou can not "ut the default values on column level 5 !hile creating table 6 1G---What is the difference bet!een start schema and :sldm? Ans---:38D4 --H :inancial 3ervices 8ogical Data 4odel 5Teradata :3-8D4 B.G6 its develo"ed b) Teradata for the financial sectors 53"ecificall) for ;an26. it can be customised based on the user re*uirement. 3tar3chma --H #ts a relational database schema for re"resenting multidimensional data. The data is stored in a central fact table, !ith one or more tables holding information on each dimension. 11----What is the difference bet!een 4ultiload ' :astload interms of &erformance? Ans--#f )ou !ant to load, em"t) table then )ou use the fastload , so it !ill ver) useful than the multiload.. because fastload "erforms the loading of the data in +"hase..and it no need a !or2 table for loading the data.., so it is faster as !ell as it follo!s the belo! ste"s to load the data in the table&hase1-#t moves all the records to all the A4& first !ithout an) hashing &hase+-After giving end loading command, Am" !ill hashes the record and send it to the a""ro"riate A4&3 .4ultiload:#t does the loading in the = "hases&hase1:#t !ill get the im"ort file and chec2s the scri"t&hase+:#t reads the record from the base table and store in the !or2 table&hase0:#n this A""lication "hase it loc2s the table header &hase7:#n the D48 o"reation !ill done in the tables&hase =: #n this table loc2s !ill be released and !or2 tables !ill be dro""ed. As the name suggests :astload is faster than multiload, and !henever re*uired to load an em"t) table fastload should be "referred.1o!ever, :astload has some limitations.To "erform :astload:1. Target table must be em"t)+. :astload "erforms inserts onl) 5no u"dates60. 9nl) one target table at a time7. 4ust dro" secondar) inde(es before loading and recreate them after!ard4ultiload allo!s non uni*ue secondar) inde(es - automaticall) rebuilds them after loading 1+--- :load, 4load and error tables?1o! man) error tables are there in fastload and !hat are their significanceIuse?Can !e see the data of error tables?1o! man) error tables are their in multiload and !hat is there use?When multiload Job fails, can !e access multiload tables? #f )es then ho!? Ans--:load uses + error tablesError table 1: !here format of data is not correct.Error table +: violations of %&#4load also uses + error tables 5ET and %$6, 1 !or2 table and 1 log table1. ET TA;8E - Data error4ulti8oad uses the ET table, also called the Ac*uisition &hase error table, to store data errors found during the ac*uisition "hase of a 4ulti8oad im"ort tas2.+. %$ TA;8E - %&# violations4ulti8oad uses the %$ table, also called the A""lication &hase error table, to store data errors found during the a""lication "hase of a 4ulti8oad im"ort or delete tas20. W9.K TA;8E - WT 4load loads the selected records in the !or2 table7. 89- TA;8EA log table maintains record of all chec2"oints related to the load Job, it is essentialImandator) to s"ecif) a log table in mload Job. This table !ill be useful in case )ou have a Job abort or restart due to an) reason.AnsL1L:ast load 5:load6 re*uires t!o error tables that )ou s"ecif) in the ;egin 8oading Command.E..9. TA;8E 1 - Contains one ro! for each ro! !hich failed to be loaded due to constraint violations or Transalation error.E..9. TA;8E + - Ca"tures ro!s that contains du"licate $alues for %&#s.4ulti 8oad 54load6 have t!o error tables, that are created for each target table.ETMTablename - #t logs errors that are occurs during the ac*uisition "hase.%$MTablename#t logs errors ' e(ce"tions that occurs during the a""l) "hase 10---- Noin 3tratagiesThere are + tables, table A !ith 1G million records, table ; has 1GG million

records, no! !e are Joining both tables, !hen !e seen E("lain &lan the "lan sho!ing TD !ill too2 the table A and it !ill redistributes it/o! the <uestion is: ;) that "lan is the o"timiFer is correct Job or not ? Nustif) Ans+. :rom the same above e(am"le no! the o"timiFer is ta2ing Table ; 51GG million records6 and it is distributing it, /o! is the o"timiFer is doing best? and 1o! )ou avoid this situation Ans--Teradata is smart enough to decide !hen to redistribute and !hen to co")....#t com"ares the tables. Are the) com"arable? or one is big as com"ared to the other?;ased on sim"le logic it decides !hether to distribute the smaller table on all the A4&s or to co")....!hat # mean is the small table is co"ied into all the A4&s in the 3&998 s"ace....emember all al!a)s the N9#/s has to ta2e "lace on the A4&s 3&998 3"ace...;) redistributing it is ma2ing sure that the 1GG million ro!s table gets the feeling that it is ma2ing A4& local N9#/... .emember the basic thing !hat ever Teradata does...it does 2ee"ing in consideration for 3"ace and &erformance and not to forget the Effiicienc)...4) sim"le formula: #f the table is small redistribute them to all the A4&s to have the A4& local Noin. Al!a)s N9#/s are made A4& local if it cannot then )ou have the high chance of running out of 3&998 s"ace. 17---What are set tables and multiset tables in Teradata?E("lain !ith an a""ro"riate e(am"le?Ans--16 3et tables cannot acce"t du"licate at ro! level not #nde( or 2e) level.E(ma"le of ro!s for set table: .1 c+ c0 c7 .. cn1 + 0 7 ... D Acce"ted 1 + 0 7 ... D Du"licate is .eJected + 1 + 7 ... D 0 + 7 7 ... D 7 0 7 7 ... D +6 4ulti set Tables can acce"t du"licate at ro! level not #nde( or 2e) level.E(ma"le of ro!s for multi set table: .1 c+ c0 c7 .. cn 1 + 0 7 ... D 1 + 0 7 ... D Du"licate is Acce"ted + 1 + 7 ... D 0 + 7 7 ... D 0 + 7 7 ... D Du"licate is Acce"ted 1= --Diff bI! v+r= and v+r? ?Ans--$+.? included the feature of re"lica in it. in !hich co") of data base are available on another s)stem. $+.? "rovide the additional data "rotection as com"arison to $+.= !hile if data from one s)stem has been vanishes. 1?--What is :#88E. command in Teradata? Ans--!hile using the mload of fastload if )ou donCt !ant to load a "articular filed in the datafile to the target then use this filler command to achieve this 1B---1o! a .eferential integrit) is handled in Teradata? Ans--T&%4& 1O--E("lain about 32e! :actor? Ans--The data distribution of table among A4&s is called 32e! :actor-enerall) :or /on-%ni*ue &# !e get du"licate values so themore du"licate vales !e get more the data have same ro! hash so all the same data !ill come to same am", it ma2es data distribution ine*ualit),9ne am" !ill store more data and other am" stores less amount of data, !hen !e are accessing full table, The am" !hich is having more data !ill ta2e longer time and ma2es other am"s !aiting !hich leads "rocessing !astage #n this situation 5une*ual distribution of data6!e get 32e! :actor 1igh:or this t)"e of tables !e should avoid full table scanse(:A4&G A4&11GGGG51GP6 DGGGGGG5DGP6in this situation s2e! factor is ver) high DGP 1D--- Wh) A4& ' &E are called $"rocs? Ans---$"rocs:$irtual "rocess :rom &E to A4& 5This is the net!or2 root via 43&5message "assing la)er6,The "rocessing data !ill store in Dis2s5These are &h)sical dis2s6,Each Am" have too man) &.dis2s,to migrate these &.dis2s The ;)net /et!or2 maintains $irtual dis2s.Thses $.dis2s !ill res"onsible for data migration.That ) !e called this "rocess is $irtual &rocess5$&.9C36.

+G---Wh) :load doesnAt su""ort multiset table? Ans-:ast 8oad !ill load the Data :astl),4ean Concurrentl),;ul2 #nsert #nternall) TeraData server !ill Create ;ul2 insert D48 statament 58i2e: insert into Table1 as sel Q from Table+ !ith data6 :or :ast &erformence it !ill not su""ort the du"licate values,.efential #ntigrit),,,, +1---What is use of com"ress in terdata?E("lain? Ans-Com"ression is used to 4inimiFe the table siFe, for e(am"le !hen the table siFe is increasing anon)mousl) We can use Com"ression to reduce the siFe of the table Conditions:1.Com"ression can be declared at the time of table creation+.We can com"ress u" to +=? column values5not columns6 0.We can@t com"ress variable length fields 5varte(t,varchar..6E("lanation for + condition:create table tab15::9rderMt)"e char5+=6 com"ress 5@air@,@sea@,@road@6:6in the above e(am"le order t)"e have 0 fields, one should be selected b) the user, so one of the field !ill re"eat for ever) order, li2e these column values !e can use com"ress statement because these are re"eating for entire table, li2e these column values TD su""orts +=? colgenerall) /C. "eo"le !ill "rovides read) made scri"ts for these t)"e of com"ressions 1o!ever, !e can store onl) one value "er column and not 05air, sea, road6. The com"ressed value is stored in column header and is to be used as default of that column unless a value is "resent.e.g. De"t of Ta(es in Washington has a database that trac2s all "eo"le !or2ing in Washington. Around DD.DP of the ta( "a)ers !ould have Washington as their state code on their address. #nstead of storing RWashingtonS in millions of records thecom"ress !ill store the value RWashingtonS in the table header. /o!, a value can be assumed in a ro! as a default unless another value e(ists inside the column ++--- What is the "rocess to restart the multiload if it fails? AnsL 4%8T#89AD !ill creates + error tables, 1 !or2 table When 4%8T#89AD fails We have to unloc2 the 4ain Table, here error tables and !or2 tables are not loc2ed li2e :89ADTo %nloc2 the 4ain Table in 4load .E8EA3E 489AD TTA;8E /A4EHC The above ans is onl) !hen the 489AD failed in ac*uisation "hase To release loc2 in a""lication "hase failure in 489AD.E8EA3E 489AD TTable /ameH .#/ A&&8>C +0--Can !e load a 4ulti set table using 489AD? AnsL We can 8oad 3ET, 4%8T#3ET tables using 4load, ;ut here !hen loading into 4%8T#3ET table using 489AD du"licate ro!s !ill not be reJected, !e have to ta2e care of them before loading.;ut incase of :load !hen !e are loading into 4%8T#3ET du"licate ro!s are automaticall) reJected, :89AD !ill not load du"licate ro!s !eather table is 3ET or 4%8T#3ET +7--can # use Rdro"S statement in the utilit) RfloadS? Ans->E3,;ut )ou have to declare it out of the :89AD ;loc2 it means it should not come bet!een .begin loading,.end loading:89AD also su""orts DE8ETE,C.EATE,D.9& statements !hich !e have to declare out of :89AD bloc2in the :89AD ;loc2 !e can give onl) #/3E.T +7---#3 #T &933#;8E T1AT T1E.E . TW9 &.#4A.> KE> W#88 ;E #/ A 3A4E TA;8E? AnsL &rimar) 2e)UUUUUUUUUUUU1. A table should have onl) one "rimar) 2e)+. 4ore than one column can consist of a "rimar) 2e) E u"to ?7 columns0. Can not be /%88 values 5missing values67. 3hould be uni*ue values 5no du"licate value6:oreign 2e)UUUUUUUUUUUU1. A table ma) have Fero or more than that u"to 0+ 2e)s+. 4ore than one column can consist a "rimar) 2e) E u"to ?7 columns 0. Can have /%88 values7. Can have du"licate values=. There should be a corres"onding "rimar) 2e) in the "arent table to enforce referential integrit) for a foreign 2e)+=--#/ A TA;8E CA/ WE %3E &.#4A.> KE> #/ 9/E C98%4/ A/D #/ A/9T1E. C98%4/ ;9T1 %/#<%E A/D /9T /%88

C9/3T.A#/3.#: >E3 19W?Ans--->es, )ou can have a column for &rimar) 2e) and have another column !hich !ill have no du"licates or null.e.g.A 3alar) Table !ill have em"lo)ee #D as "rimar) 2e). The table also contains TAV-#D !hich can not be null or du"licate +=---What are the t)"es of tables in Teradata AnsL 1-- 3ET TA;8E+-- 4%8T#3ET TA;8E0-- &E.4A/A/T TA;8E7-- -89;A8 TE4&9.A.> TA;8E5TE4&9.A.> TA;8E6=-- $98AT#8E TA;8E?-- DE.#$ED TA;8EB--#/TE.#4 TA;8E3 +?---can !e have an unconnected l2" to loo2u" a D;+ record against a Teradata record? Ans-->es,We can use li2e 8i2e,5Diff Databases6 +B---What is the diffrence bet!een 4ultiload ' :astload interms of &erformance? Ans-4ultiload can at ma( = tables !ith non uni*ue secondar) inde(es on them. !here as in fastload u cannot have secondar) inde(es on the table.#n multiload )ou can insert,u"date or delete data in alread) "o"ulated tables !hereas in fastload the target table should be em"t).4ultiload !or2s in = "hases !hereas fastload !or2s in t!o "hases #f !e !ant to load data into an em"t) table then fastload is best o"tion as com"ared to multiload. +O---1o! does inde(ing im"rove *uer) "erformance? AnsL Teradata automaticall) Creates the &rimar) inde( , if not s"ecified b) the DDl for Table .3ome of the 9ther T)"es of inde(es are 3econdar) #nde( &artitioned &rimar) #nde( Noin #nde( &rimar) #nde( :the &# is the !a) , Teradata Distributes the Data , Accesses the Data toIfrom Am"s. ;) %sing the &rimar) #nde( !ith $alue or .ange of $alues in the Where Clause of the <uer) , the o"eration ;ecomes a 3ingle A4&I :e! am" o"eration instead of all am" o"eration . the Access "ath is .o!hash of the &i is 2no!n --H Am" of the Column along !ith ro!id of the Column . 51 Am" 9"s6 .esults 1. 1ighl) 9"timised <uer) .etrival +. less Cost "er .etrival3econdar) #nde( I Noin #nde(es :- Creates a 3econdar) #nde( I Noininde( I 1ashinde( 3ubtable , !hich ma"s the ColumnIs of the 3# and the &# 1ash INoin5:re*uentl) used Columns in t!o tables in this Case 6 , The o"erations , if using these #nde(es are basicall) + or more am" o"eration ..esults 1. <uic2er <uer) .etrival time than a full table scan .+. costs less on the .esources than a :T3 0. the &erformance is im"roved if the N# is used b) the 9"timiFer cons -- 1. Additional 3"ace .e*. for the 3ubtables +. need to be dro"ed and recreated for 8oads to ha""en 54ulti 8oad , :ast8oad6ect , !hich is a real &A#/ WWW 0.still be a + am" o"eration !hen com"ared to &# .etrival for a 3#. &&# :- &artitioned &rimar) #nde(es are Created so as to divide the table onto "artitions based on .ange or $alues as .e*uired . the data is first 1ashed into Am"s , then 3tored in am"s based on the &artitions WWW !hich !hen .etrived for a single "artition I multi"le &artitions , !ill be a all am"s 3can, but not a :ull Table 3can WWWW . this is effective for 8arger Tables "artitioned on the Date 3"eciall) WWW there is no e(tra 9verhead on the 3)stem 5no 3"l Tables Created ect 6

You might also like