Вы находитесь на странице: 1из 20

1.Definition of Teradata? Tell me important components of Teradata?

Definition:
It is an RDBMS that drives company's Datawarehouse,Datamart,OLT,OL!,DSS !pp"iances#
a#!n $Open system which e%ecutes on &'I( MR)R!S*Discontinued in teradata +,-,.I'/0, Suse
Linu% 1T2 3 !4ove OS#
4#2ompati4"e with !'SI standards
c#Runs on Sin5"e or Mu"ti nodes#
d#Bui"t in ara""e"ism
e#!cts Li6e a Server#
'ew 7eatues *Teradata +,-:
Desi5ned with the 4e"ow app"iances#
a#1%treme Data warehouse +889#
d#!ctive 1nterprise Datawarehouse 8889 :,8888 2;:
c#Internet and 1)4usiness
d#2ustomer Re"ationship Mana5ement#
e#Datamart !pp"iance /899,/889,/888
Important 2omponents:
a#1*arsin5 1n5ine -
4#Bynet
c#!mp *!ccess Modu"e rocessor-
d#<SS*<irtua" Stora5e System- *from Teradata+,-
e#<dis6*<irtua" Dis6-
2.How to run the Teradata jobs in unix environment ?
!t uni% prompt,"ease e%ecute in the 4e"ow way#
=Sh>BT1?@AScript athB>ALo5fi"e athB
or
=Sh>BT1?@AScript athB T11 ALo5fi"e athB
'ot on"y these ways ,there are many ways#
Simi"ar"y to other uti"ities#
3.There is a load to the Table every one hour and 2!".#ornin$ trafic is hi$h% afternoon trafiic is
less% &i$ht trafiic is hi$h.'ccordin$ to this situation which (tility you use and how do you
load%which utility used?
Tpump is su55esta4"e here
By &sin5 pac6et siCe increasin5 or decreasin5 we can hand"e traffic#
.)ast *oad +cript is failed and error tables are available then how do you restart?
There are / ways
+#Incase of O"d fi"e to Run
Dont drop error ta4"es simp"y rectify the error in the script or fi"e and Run a5ain#so that it runs from "ast
confi5uration#
/#Incase of new fi"e to Run
Drop 1rror ta4"es
Try to run the script with on"y 4e5in and end "oadin5 statements# ,so that it re"eases the "oc6 on tar5et
ta4"e If possi4"e remove the record from fast"o5 ta4"e#
Run the script with new fi"e fresh"y#
,.-hat are the advanta$es of other .T* tools/0nformatica%Data+ta$e%++0+ etc...1 than Teradata
(tilities or vice versa?
TD &ti"ities run faster than other 1TL too"s incase of 7i"e to Ta4"e*Import- or Ta4"e to 7i"e *1%port-
Operations# Inmod and Outmod a"so he"p us to do 4etter pro5ramin5 whi"e Importin5 and 1%portin5#
MaDor advanta5es of Other 1TL too"s than TD &ti"ities:
+#:etero5eneous Sources and Destinations we can Operate# *Orac"e,SE"server,1%ce",7"at 7i"es etc####-
/#!s they are providin5 fu"" F&I support,de5u55in5 is so easier#
,#Reusa4i"ity of components*Informatica:mapp"ets,wor6"ets etc###- avai"a4"e in 1TL too"s so if we
chan5e in main "ocation automatica""y other app"ications*mappin5s- which are usin5 these components
can update instant"y# G#ivotin5*'orma"iCation-,&npivot*Denorma"iCation- we can imp"ement very
easi"y in 1TL too"s#
8#2achin5 is one more advanta5e when we wor6 with a source *:etero5enous- which is not chan5in5
freEuent"y#Some times cache can 4e shared across app"ications etc####
2.'borted in 3hase 2 data ac4uisition completed in fastload?
Simp"y ta6e Be5in and 1nd "oadin5 in scripts and Run a5ain#so that it runs from !mp to ta4"e#
".How do you 5enerate se4uence at the time of Display?
By &sin5 2S&M
H#:ow do you Fenerate SeEuence in TeradataI
By &sin5 Identity 2o"umn
+)for storin5 purpose usin5 identity#
/)for disp"ay purpose usin5 csum#
6.How do you load #ultiple files to a table by usin$ fast load scripts?
Remove 1nd Loadin5 statement in the script and Rep"ace the fi"e one 4y one in the script ti"" "ast fi"e
and su4mit every time so that data appended in !mp Leve"#7or the "ast fi"e specify 1nd Loadin5
statement in the script and Run#so that it runs from !mp to ta4"e#
17.-hy #ultiload and )astload does not supports +0%80%90 and T9055.9+?
!4ove a"" concepts reEuire communication 4etween Mu"tip"e !mps# !s per 7ast"oad and Mu"ti"oad
doesnot provide any communication 4;w mu"tip"e !mps and they Operate Independent"y#!s concept is
vio"atin5 as we"" as it ta6es time to imp"ement the a4ove operation they are not a""owin5 them#
11.-hy #ultiload does not supports (+0 and supports &(+0?
Inde% su4ta4"e row is on the same !mp as the data row in '&SI#so it operates each !mp independent"y
and in para""e"#
12.-hile .xecutin$ #*:'D ;lient +ystem 9estarted?
.e need to Manua"y Su4mit the script,so that it "oads data from "ast chec6point#
13.-hile .xecutin$ #*:'D Teradata +erver 9estarted?
!"on5 with the server ML!OD script wi"" a"so restarted and Runs from "ast chec6 point#
1.There is file it contains 177 records%need to load 27 records by s<ippin$ first 27 records and
last 27 records.
use BT1? &ti"ity to do this tas6 4y S6ip J /9 and Repeat K9 in script#
1,.How to see current teradata version?
#S:O. <1RSIO'
12.what is &ode?
! 'ode is nothin5 4ut 2o""ection of :ardware and Software components#Typica""y a Server is ca""ed as
node#
1".-hat is 3D.?
ara""e" Data 1%tension
! software interface "ayer on top of the operatin5 system that ena4"es the data4ase to operate in a
para""e" environment# It was created 4y '2R to support the para""e" environment#
1=.-hat is Trusted parallel database /T3D1?
! data4ase is ca""ed TD if it runs under D1#
Teradata is a data4ase which runs under D1#so we ca"" Teradata as pure ara""e" data4ase or Trusted
para""e" data4ase#
16.-hat is channel driver?
! Software that communicates 4etween the 1s and app"ications runnin5 on channe")attached c"ients#
27.-hat is Teradata 5ateway?
Terdata Fateway software 5ives communication 4etween the app"ication and the 1s assi5ned to
networ6)attached c"ients# There is one Fateway per node#
21.-hat is >irtual dis<?
! co""ection of 2y"inders*physica" dis6s- arran5ed in an !rray fashion is ca""ed <dis6 or <irtua"
dis6#Traditiona""y this is ca""ed as dis6 !rray or !rray of dis6#
22.what is 'mp?
!ccess Modu"e rocessorIt is a <irtua" processor responsi4"e for mana5in5 one portion of the
data4ase*co""ection of virtua"
dis6s-#This portion is not shara4"e 4y any other !M#so we"" ca"" this !rchitecture as shared nothin5
!rchitecture#
!mp contains Data4ase Mana5er su4system and it performs the 4e"ow operations
a#erformin5 DDL
4#erformin5 DML
c#Imp"ementin5 Loins,!55re5ations#
d#!pp"yin5 and Re"easin5 Loc6s etc#
23.-hat is 3arsin$ .n$ine?
1 is type of <proc it ta6es S?L reEuest and de"ivers S?L response#
It has software components to 4rea6 S?L into steps, and send the steps to the !Ms#
Session 2ontro"
! session is nothin5 4ut "o5ica" connection 4etween &ser and !pp"ication#:ere it contro"s
!uthoriCation if its a <a"id it does "o5 on otherwise "o5 off#
arser
chec6s syntactica" errors
chec6s semantica" errors
chec6s e%istence of o4Dects#
Dispatcher
It ta6es set of reEuest and 6eep in a Eueue ,de"ivers set of responses 4y 6eepin5 the same Eueue that
means it does reEuest response f"ow contro"#
2.How many #'? session 3. handles at a time?
1 hand"es M!( +/9 sessions#
2,.-hat is @A&.T?
It acts "i6e a $Messa5e 2ommunication$ happens 4etween 2omponents#It is responsi4"e for
+# Sendin5 messa5es
/# Mer5in5 data
,#Sortin5 data
22.what is ;li4ue?
It prevents from 'ode 7ai"ure#
a#! 2"iEue is a co""ection of 'odes wi"" Share 2ommon Dis6 drives#
4#whenever any node went down automatica""y <procs a"" mi5rate from fai" node to other node to
retrieve data from common dis6 drives#
2".*ist different types of *:;B+ in teradata?
Teradata can app"y four types of LO20S
a#!ccess Loc6
4#Read "oc6
c#.rite Loc6
d#1%c"usive Loc6
2=.'t what level teradata can apply a *:;B?
+#Data4ase "eve" "oc6 ))) !"" o4Dects inside data4ase wi"" 4e "oc6ed#
/#Ta4"e "eve" )) !"" rows inside a ta4"e wi"" 4e "oc6ed#
,,Row hash "eve" "oc6)) On"y 2orrespondin5 row wi"" 4e "oc6ed#
26.How many '#3s involved in case of 3rimary 0ndex?
Its a"ways one !M#
37.what about (3+.9T command in teradata?
&S1RT means update e"se insert#
In Teradata we have this option#
31.-hat is 'dvanta$e of 330?
Main"y we use for Ran5e 4ased data storin5 or cate5ory 4ased Data storin5#
Ran5e Eueries don't have to uti"iCe a 7u"" Ta4"e Scan#Its direct"y 5oes to the correspondin5 partition
and s6ips other partitions#
7ast"oad and Mu"ti"oad wor6 with I ta4"es, 4ut not with a"" Secondary Inde%es#
32.what is the siCe of @AT.0&T%+#'**0&T%0&T.5.9?
BMT1I'T ) + Bytes ) H 4its )) > )+/H to +/N
SM!LLI'T ) / 4ytes ) +K 4ites: )))> ),/NKH to ,/NKN
I'T1F1R ) G BMT1S ) ,/ BITS )))> )/,+GN,GH,,KGH to /,+GN,GH,,KGN
33.Difference between user and database in teradata?
Data4ase &ser
! data4ase is assive Repository &ser is a !ctive#
It stores a"" data4ase o4Dects It stores any o4Dect such as ta4"e,macro,view etc#
It does not contain assword# It contains password
3..Difference between primary <ey and 3rimary 0ndex?
rimary Inde% rimary 0ey
It is mandatory It is optiona"
Limit of KG co"umns;ta4"e 'o "imit
!""ows 'u""s 3 Dup"icates Doesnt a""ows
It is physica" mechanism Lo5ica" mechanism
1ffects Data Distri4ution Does not effect Data Distri4ution
3,.-hat is the use of +pool +pace?
Teradata spoo" space is unused erm space that is used for runnin5 Eueries#Teradata recommend /9 O
of the avai"a4"e perm space is a""ocated for spoo" space#
This is used to ho"d intermittent resu"ts of the Eueries and vo"ati"e ta4"es#
32.-hat is the need of 3erformance tunin$?
To identify 4ott"enec6s and to reso"ve it we 5o for erformance tunin5#
Bott"e nec6 is not an error 4ut it causes system de"ay in erformance#
e%amp"e: There is a Euery it is suppose to run in / mins 4ut e%ecuted for ha"f an hour and fina""y
succeeded#
In this situation we need to identify 4ott"enec6s and reso"ve it#
To Identify 4ott"enec6s we 5o for
a#1%p"ain ReEuest Modifier
4#Teradata <isua" 1%p"ain
c#erformance monitor
d#Teradata Mana5er
3".Define .xplain plan?
1%p"ain p"an disp"ays the e%ecution p"an of S?L statement that is 5oin5 to 4e e%ecuted 4y the
data4ase#This p"an
wi"" 4e specified 4y the component ca""ed optimiser#Fenera"y it disp"ays 4e"ow information
a#'um4er of !mps
4#!mount of spoo" memory it is occupyin5#
c#'um4er of Rows its affectin5#
d#Type of Loin strate5y it is ta6in5#
e#Time it ta6es to e%ecute#
f#Loc6s it is &sin5 etc#
Synta% : 1(L!I'
1%amp"e : 1(L!I' S1L P 7ROM !RTMQ
3=.-hat is ;ollect statistics?
2o""ect stats Dust derives the data demo5raphics of the ta4"e#
2o""ect stats is an important concept in teradata, 2o""ect stats 5ives 1 to come up with a p"an with
"east cost p"an for an reEuested Euery#
2o""ect stats defines the confidence "eve" of 1 in estimatin5
$how many rows it is 5oin5 to access I
how many uniEue va"ues does a ta4"e have , nu"" va"ues etc and a"" this info is stored in data dictionary#
Once you su4mit a 1%p"ain p"an Euery in TD the parsin5 en5ine chec6s if the stats are avai"a4"e for the
reEuested ta4"e #
If co""ected stats avai"a4"e a"ready 1 5enerates a p"an with $hi5h confidence$ #
If 2o""ect stats unavai"a4"e 5ives $"ow confidence$ #
Synta% : 2OLL12T ST!TISTI2S O' I'D1(;2OL&M' '!M1
36.-hat is *east ;ost 3lan?
It e%ecutes in shortest path with "ess time#
7.-hat is Hi$hest ;ost 3lan?
It e%ecutes in Lon5est path with more time#
G+#:ow many 2onfidence Leve" presentI
a#Low
4#'o
c#:i5h
d#Loin
2. 0f collect stats is not done on the table what will happen?
Teradata uses a cost 4ased optimiCer and cost estimates are done 4ased on statistics#
So if you donot have statistics co""ected then optimiCer wi"" use a Dynamic !M Samp"in5 method to
5et the stats# If your ta4"e is 4i5 and data was uneven"y distri4uted then dynamic samp"in5 may not 5et
ri5ht information and yourperformance wi"" suffer#
3.-hat are the , phases in a #ulti*oad (tility?
P re"iminary hase R Basic Setup P
P DML hase R Fet DML steps down on !MsP
P Data !cEuisition hase R Send the input data to the !Ms and sort itP
P !pp"ication hase R !pp"y the input data to the appropriate Tar5et Ta4"esP
P 1nd hase R Basic 2"eanupP
.-hat are the #ulti*oad (tility limitations?
Mu"tiLoad is a very powerfu" uti"ityQ it has fo""owin5 "imitations:
P Mu"tiLoad &ti"ity doesnSt support S1L12T statement#
P 2oncatenation of mu"tip"e input data fi"es is not a""owed#
P Mu"tiLoad doesnSt support !rithmatic 7unctions i#e# !BS, LOF etc# in M"oad Script#
P Mu"tiLoad doesnSt support 1%ponentiation and !55re5ator Operators i#e# !<F, S&M etc# in M"oad
Script#
P Mu"tiLoad doesnSt support &SIs *&niEue Secondary Inde%es-, Refrentia" Inte5rity, Loin Inde%es,
:ash Inde%es and Tri55ers#
P Import tas6 reEuire use of I *rimary Inde%-#
,.-hat are T3(#3 (tility *imitations?
7o""owin5 are the "imitations of Teradata T&M &ti"ity:
P &se of S1L12T statement is not a""owed#
P 2oncatenation of Data 7i"es is not supported#
P 1%ponentia" 3 !55re5ate Operators are not a""owed#
P !rithmatic functions are not supported#
2..xplain Teradata ;ompetetive 'dvanta$es detail?
+#!utomatic,1ven Data Distri4ution
In Teradata 1ven uniform or ara""e" or Random distru4ution is !utomatic#
/#:i5h Sca"a4i"ity
If you Increase the num4er of 'odes or users or wor6 teradata does not sacrifice any performance and
it sca"es Linear"y#we are ca""in5 this sca"a4i"ty as "inear sca"a4i"ity#
,#Mature OptimiCer
!s we are havin5 powerfu" optimiser in teradata it supports KG Doins;Euery, KG su4Euery;Euery,
formatin5 commands and a55re5ate commands#
G#Mode"s the 4usiness
Teradata supports any 4usiness mode"s for star,snowf"a6e schema,:y4rid schema,'orma"isation etc
8#Low 2ost Tco*Tota" cost of Ownership-
Its easy to Insta"",Mana5e,wor6#
7u"" Support Fui and 2heaper in price#
".How do you set the session mode parameters in @T.D?
#set session transaction !'SI)))))> this is to set !'SI mode
#set session transaction BT1T)))))> this is to set Teradata transaction mode#
These commands have to 4e entered 4efore "o55in5 to the session#
=.How Teradata ma<es sure that there are no duplicate rows bein$ inserted when its a +.T
table?
Teradata wi"" redirect the new inserted row as per its I to the tar5et !M *on the 4asis of its row hash
va"ue-, and if it find same row hash va"ue in that !M *hash synonyms- then it start comparin5 the
who"e row, and find out if dup"icate#
If itSs a dup"icate it si"ent"y s6ips it without throwin5 any error#
6.*ist types of H'+H functions used in teradata?
There are :!S:RO., :!S:B&201T, :!S:!M and :!S:B!0!M#
The S?L hash functions are:
:!S:RO. *co"umn*s--
:!S:B&201T *hashrow-
:!S:!M *hash4uc6et-
:!S:B!0!M *hash4uc6et-
,7.what is derived table?
a#It stores intermediate resu"ts and ca"cu"ations#
4#Mou can specify derived ta4"e in an S?L statement*referra4"y Se"ect-#
c#This ta4"e created and dropped as a part of the Euery#
d#Its stored under spoo" memory#
e#Once the Euery finishes e%ecution ta4"e is not avai"a4"e#
f#This types of ta4"es are ca""ed as In"ine ?uery ta4"es#
:i Students
In this / nd modu"e I covered Important Euestions from Lourna"s, Inde%es,&ti"ities#
Teradata Typica" ?uestions /
1.-hat is 8ournalin$? why teradata re4uires journalin$?
Lourn"in5 is a data protection mechanism in teradata#It prevents from Ima5e fai"ure#
Lourna"s are 5enerated to maintain pre)ima5es and post ima5es of a DML transaction startin5;endin5,
at;from a chec6point#
.hen a DML transaction fai"s,the ta4"e is restored 4ac6 to the "ast avai"a4"e chec6point usin5 the
Dourna" Ima5es#
There are , types of Lourna"s
ermanent
Transient
Recovery Lourna"
2.How many types of 0ma$e supports 8ournalin$?
7our types of Ima5es are supported 4y Lourna"in5 they are
a# Sin5"e Ima5e))))>one copy of data wi"" 4e ta6en#
4#Dua" Ima5e)))))>Two copies of data wi"" 4e ta6en#
c#Before Ima5e)))))>Before chan5es occur on the row data wi"" 4e ta6en#
d#!fter Ima5e))))>!fter chan5es happen on the row ta6in5 copy of data#
3.-hat is Transient 8ournal?
Transient Lourna" ) an area of space in the DB2 data4ase which is used primari"y for storin5 of ro"")
4ac6 information durin5 inserts;de"etes;updates of ta4"es#
Detai" 1%p"anation:
The Transient Lourna" maintains a copy of a"" 4efore ima5es of a"" rows affected
4y the transaction#
If the event of transaction fai"ure, the 4efore ima5es are reapp"ied to the affected ta4"es, the ima5es are
de"eted from the Dourna" and a ro""4ac6 operation is comp"eted#
In the event of transaction success, at the point of transaction commit,
the 4efore ima5es for the transaction are discarded from the Dourna"#
In Summary, if a Transaction fai"s *for whatever reason-, the
4efore ima5es in the transient Dourna" are used to return the data *in the
ta4"es invo"ved in the transaction- to its ori5ina" state#
.-hat is 3ermanent 8ournal?
The purpose of the ermanent Lourna" is to provide se"ective or fu"" data4ase recovery to a specified
point in time#It permits recovery from une%pected hardware or software disasters#
The ermanent Lourna" a"so has the effect of reducin5 the need for fu"" ta4"e 4ac6ups which can 4e
cost"y 4oth in time and resource#
,.-hat are the different ima$e options for 3ermanent 8ournal?
There are four ima5e options for the ermanent Lourna":
T Before Lourna"
T !fter Lourna"
T Dua" Before Lourna"
T Dua" !fter Lourna"
2.3ermanent 8ournals are automatically pur$ed in teradata. True ! )alse?
7a"se#
The ermanent Lourna" must 4e manua""y pur5ed from time to time#
".-here does TD store transient journal?
In perm space )> d4c#transient Dourna"
But that specia" ta4"e can 5row over d4c's perm "imit, unti" the who"e system runs out of perm space#
=.-hat are the different return codes/severity errors1 in Teradata utilities?
There are , 4asic return codes *severity errors- in teradata uti"ities#
G ) .arnin5
H ) &ser error
+/ ) System error
6.How will you connect a database server to other server?
.e can connect from one server to another server in &'I( usin5 the command
ssh or 7T or S&
ssh ) ssh userUidVserverUname
17.-hat is the meanin$ of s<ewness in Teradata?
Data or !mp s6ew occurs in teradata due to uneven distri4ution of data across a"" the amps# Often this
"eads to spoo" space error too# To avoid s6ewness try to se"ect a rimary Inde% which has as many
uniEue va"ues as possi4"e#
I co"umns "i6e month day etc# wi"" have very few uniEue va"ues# So durin5 data distri4ution on"y a
few amps wi"" ho"d a"" the data resu"tin5 in s6ew# If a co"umn *or a com4ination of co"umns- is chosen
a I which enforces uniEueness on the ta4"e then the data distri4ution wi"" 4e even and the data wi"" not
4e s6ewed#
11.Does 3rimary 0ndex column choosin$ is important?
The Success of teradata warehouse starts with choosin5 of correct co"umn
to creation of rimary inde%#
Try to 2hoose a co"umn which has uniEue va"ues# so that data can 4e distri4uted even"y amon5 a""
!Ms#
Otherwise S6ewness wi"" come into picture#
rimary inde% is usefu" to 5et a strai5ht path to retrieve data#
12.-hat are the basic rules that define how 30 is defined in Teradata?
These are the fo""owin5 ru"es how rimary Inde% defined in Teradata
a# On"y one rimary Inde% per ta4"e#
4#Its a physica" mechanism which assi5ns Row to !M#
c#! rimary Inde% va"ue can 4e uniEue or non)uniEue#
d#! rimary Inde% can 4e composite ti"" KG co"umns#
e#The rimary Inde% of a popu"ated ta4"e cannot 4e modified#
13.-hat are the basic criteria to select 3rimary 0ndex column for a $iven table?
!nswer:
! thum4 ru"e of !D< demo5raphics is fo""owed#
!ccess Demo5raphics
Identify inde% candidates that ma%imiCe one)!M operations#
2o"umns most freEuent"y used for access *<a"ue and Loin-#
Distri4ution Demo5raphics
Identify inde% candidates that optimiCe para""e" processin5#
2o"umns that provide 5ood distri4ution#
<o"ati"ity Demo5raphics
Identify inde% candidates with "ow maintenance I;O#
1.can you explain and 3. and '#3s communicate?
.hen user connects to teradata data4ase he opened a session with parsin5 1n5ine*1-
there after when user su4mits a Euery,
+# 7irst 1 ta6es Euery, chec6s synta%, verifies his access ri5thts
/# If every thin5 "oo6s o6ay, 1 prepare an action p"an for !M#
.hich !M to respond , what is row ID to read ###etc
,# Then 1 sends action p"an to !M via BM'1T si5na"s#
G# Then correspondin5 !M ta6es action p"an and reads data and send 4ac6 to 1
Then 1 sends data to &S1R
1,.Does 3ermanent 8ournals and +econdary indexes re4uire 3erm +pace?
!ns: Mes
12.which objects re4uire 3erm space in teradata?
Ta4"es and Stored rocedures o4Dects reEuire erm Space
<iews, Macros , Tri55ers doesn't reEuire erm space#
1".-hat is *:5 T'@*.?
! "o5 ta4"e maintains record of a"" chec6points re"ated to the "oad Do4, it is essentia";mandatory to
specify a "o5 ta4"e in a Do4# This ta4"e wi"" 4e usefu" in case you have a Do4 a4ort or restart due to any
reason#
1=.what is the use of 3artition?
If you create I on ta4"e, then data at !Ms is ordered usin5 artition co"umn#
1%amp"e
If we have artition on deptno then a"" dept +9 records at one p"ace at !M and dept /9 records at one
p"ace#
16.0s it possible to alter &: 9'&5. and (n<nown partition on a table?
Mes if ta4"e is empty,we can a"ter 'O R!'F1 and &n6nown artition of a ta4"e#
27.can you apply a read loc< on table where write loc< is already applied?
'o
21.How many partition in $iven +D *?
!ssume S? L,
artition 4y 2!S1U'
* partycode J +9,
partycode J /9,
partycode J ,9,
partycode J G9 ,
'O 2!S1 OR &'0'O.'-
-
!nswer )) 8 partitions
22.How many partions in $iven +D*?'ssume +D*%
artition 4y 2!S1U'
* partycode J +9,
partycode J /9,
partycode J ,9,
partycode J G9 ,
'O 2!S1, &'0'O.'-
-
!nswer ))) K partitions
:ere it creates K artitions
If a va"ue partycode entered is not '&LL and first G cases are not satisfied then data 5oes
to $'O 2!S1$ partition#
'&LL va"ues 5oes to &'0'O.' partition#
23.How teradata ma<es sure that there are no duplicate rows bein$ inserted when its a +.T
table?
Teradata wi"" redirect the new inserted row as per its I to the tar5et !M *on the 4asis of its row hash
va"ue-, and if it find same row hash va"ue in that !M *hash synonyms- then it start comparin5 the
who"e row, and find out if dup"icate#
If its a dup"icate it si"ent"y s6ips it without throwin5 any error#
2. .xplain -hat are *ow and Hi$h ;onfidentiality in .xplain command?
The e%p"ain 5enera""y disp"ays the p"an which wou"d 4e prepared 4y OptimiCer#
2onfidence "eve"s indicate how we"" the optimiCer is aware a4out the demo5raphic data for a particu"ar
step#
:i5h confidence: Means the optimiCer 6now a4out the no of rows that wou"d 4e returned as a resu"t of
that step# 1%amp"es wou"d 4e when I statistics e%ist when the co"umn or ran5e stats e%ist or no Doin
invo"ved#
Low confidence: Some stats avai"a4"e# Loin and stats avai"a4"e on 4oth sides of the Doin#
'o confidence: 'o stats avai"a4"e# Loin invo"ved#
2,.-hy )astload (tility does not support multiset table and duplication?
Mu"ti set ta4"e supports dup"icate rows#
7ast"oad uti"ity does not support dup"icate rows#
Restart "o5ic is one of the reason# 7ast"oad is one of the uti"ity which "oads data in 4"oc6s*KG0-# Durin5
restart 7ast"oad sends some of the rows for the second time which occur after a chec6point# Due to this
7ast"oad reDects dup"icates#
e%amp"e
consider /9 rows to 4e "oaded in a ta4"e# 7L uti"ity is used to "oad the ta4"e and c6pt is 8 rows# If restart
occurs after Nth row 7L may send K and Nth to !Ms durin5 the restart# This records wou"d 4e
considered as dup"icates and reDected#
22.;an you 9ecover the password of a (ser in Teradata?
'o , you cant recover the password of a &ser in Teradata# asswords are stored in Data Dictionary
ta4"e *DB2#DB!S1-#&sin5 a one way encryption method#
Mou can view the encrypted passwords usin5 the fo""owin5 Euery#
S1L P 7ROM DB2#DB!S1Q
2".what is the differnce between +ub Duery and ;orelated +ub Duery?
Su4 ?uery
If ?ueries written in a nested manner then its termed as a su4 Euery#
Inner Euery e%ecuted 7irst and e%ecuted On"y one time#
2ore"ated Su4 ?uery
2o)Re"ated Su4 Euery 5et e%ecuted once for each row of the parent Euery#
Inner ?uery e%ecuted many 4ased on Outer Euery#
2=.what is )0**.9 command in Teradata?
whi"e runnin5 7ast"oad or Mu"ti"oad if you dont want to "oad a particu"ar fie"d from the datafi"e to the
tar5et ta4"e then use the 7ILL1R command to achieve#
/W#Difference 4etween !ccess Lo55in5 and ?uery Lo55in5 in TeradataI
+#!ccess Lo55in5 is concerned with security * who is doin5 what-
In access "o55in5 you as6 the data4ase to "o5 who is doin5 what on a 5iven o4Dect#
The information stored is 4ased on the o4Dect not the S?L fired or the user who fired it#
/#?uery Lo55in5 *DB?L- is used for de4u55in5 *what is happenin5 around-
Incase of DB?L data4ase 6eep on trac6in5 various parameters "i6e S?Ls, Resource, Spoo" &sa5e and
other thin5s which he"p you to understand whats 5oin5 on, the information is fruitfu" to de4u5 a
pro4"em#
37.-hat is basic Teradata Duery lan$ua$e?
+#It a""ows us to write S?L statements a"on5 with BT1? commands#
we can use BT1? for Importin5,1%portin5 and Reportin5 urposes#
/#The commands start with a *#- dot can 4e terminated 4y usin5 *Q- it is not mandatory to use*Q-
,#BT1? wi"" assume any thin5 written with out dot as a S?L statement and reEueries a *Q-
to terminate it#
31.How can you trac< *o$in parameters of users in teradata?
Mou can view a"" these parameters in this Data Dictionary Ta4"e DB2#LOFO'O77
;;S1L12T LOFD!T1,LOFTIM1,&S1R'!M1,1<1'T 7ROM DB2#LOFO'O77Q;;
32.How can you use H'+H )(&;T0:&+ to >iew Data Distribution across all '#3s in
Teradata?
:ash 7unctions can 4e used to view the data distri4ution of rows for a chosen rimary Inde%#
S1L12T :!S:!M*:!S:B&201T*:!S:RO.*--- !S $!MX$,2O&'T*P-
7ROM FRO& BM + ORD1R BM / D1S2Q
:!S:RO. ))) returns the row hash va"ue for a 5iven va"ue#
:!S:B&201T ))) the 5roupin5 of a specific :ash va"ue#
:!S:!M)))))the !M that is associated with the :ash Buc6et#
This is rea"y 5ood, 4y "oo6in5 into the resu"t set of a4ove written Euery you can easi"y
find out the Data distri4ution across a"" !Ms in your system and further you can easi"y identify un)
even data distri4ution#
33.How do you transfer lar$e 'mount of Data in Teradata?
Transferin5 of "ar5e !mount of data can 4e done usin5 various !pp"ications "i6e Teradata &ti"ities#
BT1?,7astLoad,Mu"tiLoad,Tpump and 7ast1%port#
BT1? *Basic Teradata ?uery- supports a"" G DML s : S1L12T, I'S1RT,&D!T1 and D1L1T1#
BT1? a"so support IMORT;1(ORT protoco"s#
7ast"oad ,Mu"ti"oad and Tpump transfer the data from :ost to Teradata#
7ast1%port is used to e%port data from Teradata to the :ost#
3.How can you determine 0!: and ;3( usa$e at a user level in Teradata?
Mou can find out I;O and 2& &sa5e from this data Dictionary Ta4"e
DB2#!M&S!F1Q
S1L12T !22O&'T'!M1,&S1R'!M1,S&M*2&TIM1- !S 2&,S&M *DIS0IO-
!S DIS0IO 7ROM DB2#!M&S!F1 FRO& BM +,/ ORD1R BM , D1S2Q
3,.what is &ormaliCation?
'orma"iCation is the process of reducin5 a comp"e% data structure into a simp"e, sta4"e one#
Fenera""y this process invo"ves removin5 redundant attri4utes, 6eys, and re"ationships from the
conceptua" data mode"#
32. How many types of 0ndexes are present in teradata?
There are 8 different inde%es present in Teradata
+# rimary Inde%
a#&niEue primary inde%
4# 'on &niEue primary inde%
/# Secondary Inde%
a# &niEue Secondary inde%
4# non &niEue Secondary inde%
,# artitioned rimary Inde%
a# 2ase partition
4# Ran5e partition
G# Loin inde%
a# Sin5"e ta4"e Doin inde%
4# mu"tip"e ta4"e Doin inde%
c# Sparse Loin inde% * constraint app"ied on Doin inde% in where c"ause-
8# :ash inde%
3".what teradata supports 2'Es means?
!ctive Load
!ctive !ccess
!ctive 1vents
!ctive .or6"oad Mana5ement
!ctive 1nterprise Inte5ration
!ctive !vai"a4i"ity#
3=.-hich is )aster F #ulti*oad Delete or &ormal Delete command?
Mu"tiLoad de"ete is faster then norma" De"ete command, since the de"etion happens in data 4"oc6s of
KG04ytes, where as de"ete command de"etes data row 4y row#
Transient Dourna" maintains entries on"y for De"ete command since Teradata uti"ities doesnSt support
Transient Dourna" "oadin5#
36.what tools can be used for 'ctive *oad in teradata?
1TL Too"s can use Eueue ta4"es and tri55ers, and use 7astLoad, Mu"tiLoad and Tump uti"ities #
7.How to +<ip or 5et first and *ast 9ecord from )lat )ile throu$h #ulti*oad?
In #IMORT command in M"oad we have a option to 5ive record no# from which processin5 shou"d
4e5in#
i#e# Y7ROM mS YmS is a "o5ica" record num4er, as an inte5er, of the record in the identified data source
where processin5 is to 4e5in#
Mou can mention SmS as / and processin5 wi"" start from second record#
T:R& 6 and 7OR n are two options in the same M"oad command, functions same towards the end of
the processin5#
!ddin5 to the a4ove, if from n$start record$ and for n $stop record$ are not mentioned, m"oad considers
records from start ti"" the end of the fi"e#
2.what is the use of T.#3 space?
T1MOR!RM *T1M- space :
! data4ase may or may not have T1M space, however, it is reEuired if F"o4a" Temporary Ta4"es are
used#
3. -hat is the default join strate$y in Teradata???
!nswer
X +
The Teradata 2ost 4ased optimiCer wi"" decide the Doin strate5y 4ased on the optimum path# The
common strate5ies fo""owed are from Mer5e, :ash 3 'ested Loin
!nswer
X /
Three strate5ies fo""owed 4y optimiCer are:
+# Dup"ication of rows of one ta4"e to every amp
))> This one is opted 4y optimiCer when the non)I co"umn is on a sma"" ta4"e#
/# Redistri4ution of the non I rows of the ta4"e to the amp containin5 the matchin5 I row amp#
))> This one is opted when the ta4"es are "ar5e# The non I co"umn is in one ta4"e is redistri4uted to the
amp containin5 the matchin5 I#
,# Redistri4ute 4oth the rows of the ta4"e 4y hash va"ues#
))> This is chosen when the Doin is on a co"umn that is not the I in either ta4"e# This wi"" reEuire the
most spoo" space#
. what is common practice in creatin$ views and tables in teradata?
It is a common practice in Teradata to have some data4ases with 1RM space that contain on"y ta4"es#
Then, other data4ases contain on"y views# These view data4ases reEuire no 1RM space and are the
on"y data4ases that users have privi"e5es to access#
The views in these data4ases contro" a"" access to the rea" ta4"es in other data4ases# They insu"ate the
actua" ta4"es from user access #
,.3.9# space is a pre allocated space? True! )alse?
7a"se# 1RM space is not pre a""ocated space# its a ma%imum a""owed space
to user or a data4ase#
2.How to handle nulls in Teradata?
:ow many co"umns can 4e there in a ta4"eI
:ow to find avera5e sa" with out usin5 av5 functionI
!nswer
+# &se Ceroifnu"", nu""ifCero in se"ect and '&LL in insert direct"y#
/# /8K co"umns ma% per ta4"e#
,# .ithout usin5 $av5$ we can find the av5 sa"ary 4y usin5 sum *sa"-;count *sa"-Q
se" sum*sa"-;count*sa"- as av5sa" from ta4"ename#
".what is )'**@';B in teradata?
7!LLB!20 is a ta4"e protection feature used in case an !M fai"s# Mou can use 7!LLB!20 on a""
ta4"es#
7!LLB!20 ta4"es use twice as much dis6 space as 'O')7!LLB!20 rows #
=. How many types of +<ew exist?
If you uti"iCed uneEua""y TD resources *2&,!M,IO,Dis6 and etc- this is ca""ed s6ew e%ists# MaDor
are , types of s6ews *2& s6ew, !M;Data s6ew, IO S6ew-#
)Data s6ewI
.hen data is not distri4uted eEua""y on a"" the !Ms#
)2pu s6ewI
.ho is ta6in5;consumin5 more 2& ca""ed cpu s6ew#
)IO s6ewI
.ho perform more IO OperationI Resu"tin5 in IO S6ew#
6.-hat are Differences between Teradata and '&+0 +ession modes in Teradata?
T1R!D!T! MOD1
)))))))))))))
+# 2omparison is not 2ase sensitive
/# 2reate ta4"e are defau"t to S1T ta4"es
,# 1ach transaction is committed imp"icit"y
G# Supports a"" Teradata commands
8# It fo""ows BT1T *Be5in and 1nd Transaction- Mode
!'SI MOD1
)))))))))))))
+# 2omparison is 2!S1 sensitive
/# 2reate ta4"e are defau"t to M&LTIS1T ta4"es
,# 1ach transaction has to 4e committed e%p"icit"y
G# Does not support a"" Teradata commands #
8# It does not fo""ow BT1T Mode#
,7.How to s<ip 1st record while usin$ @te4 0#3:9T?
By usin5 S0IJ+ Q , we can s6ip first record#
#import infi"eJ, s6ipJ+Q
Teradata Typica" ?uestions ,
:i !"",
1.-hich statement about spool space is true?
!#- Spoo" space must 4e specified durin5 creation of the user
B#- Spoo" space is used to ho"d the intermediate resu"t set#
2#- Spoo" space is permanent space#
D#- Spoo" space is "imited to the siCe of the ta4"e#
!nswer))) B
2. -hich (tility used to copy a table and restore it to another database?
!#- BT1?
B#- !rchive Recovery
2#- 7ast"oad
D#- Ta4"e re4ui"d
!nswer )))B
3.The 5iven below% which tool should you use to collect and analyCe database performance?
!#- BT1?
B#- TD?M
2#- Teradata S?L !ssistant
D#- Teradata Mana5er
!nswer ))) D
. 0n -hich way is data distributed with a partitioned primary index?
!#- 4ased on the secondary uniEue inde%
B#- 4ased on the rimary 6ey of the ta4"e
2#- Based on the rimary Inde% of the ta4"e
D#- 4ased on the partitionin5 co"umn #
!nswer ))) c
,. @atch process bloc< level loadin$ are performed a$ainst populated tables by which utility?
!#- Mu"ti"oad
B#- 4u"6"oad
2#- Tpump
D#- 7ast"oad
!nswer)) !
2. . Teradata 0ndex wiCard used for to
!#- compare performance of mu"tip"e wor6"oads
B#- recommend secondary inde%es for a ta4"e
2#- recommend primay inde%es for a ta4"e
D#- compare primay and secondary inde%es for a ta4"e
!nswer ))B
". -hich statement is true if usin$ &(30s to accomplish data distribution?
!#- The increase of hash 4uc6ets has resu"ted in more hash co""isions#
B#- Dup"icate '&I va"ues wi"" produce the same row hash#
2#- &niform row distri4ution is accomp"ished usin5 &Is#
D#- The "ow)order +K 4its of the row hash are input to the hash map#
!ns )) B
=. -hich is the component limits 4ueries based on set thresholds
!#- TD?M
B#- Teradata Mana5er
2#- BT1?
D#- ?uery Man
!nswer ))) !
6.How many @A&.Ts in a teradata system?
.e"", BM'1T is 4oth a hard ware and software BM'1T#
:ard ware BM'1T connects every 1 and !M in the sytem # It can 4e sca"a4"e at any time#
1very teradata system has two BM'1TS # one for 4ac6up in case of one fai"ed
:owever 4oth BM'1TS can 4e used at same time 4y !M or 1S #
17. -hat is T.&';0TA? -hat is its default value?
T1'!2ITM specifies the amount of time in hours, to retry to o4tain a "oader s"ot or to esta4"ish a""
reEuested sessions to "o5on#
The defau"t for 7ast Load is Zno tenacity[, meanin5 that it wi"" not retry at a""#
If severa" 7astLoad Do4s are e%ecuted at the same time, we recommend settin5 the T1'!2ITM to G,
meanin5 that the system wi"" continue tryin5 to "o5on for the num4er of sessions reEuested for up to
four hours#
11. How do you create materialiCed view in Teradata?
There is no such thin5 as a $materia"iCed view$ in Teradata#
The eEuiva"ent in Teradata wou"d 4e a Doin inde% *or a55re5ate inde%- with a correspondin5 view put
on top of it# The command to create one is $2R1!T1 LOI' I'D1(###*"ots of options-$#
Loin inde%es are maintained when the data is maintained# They cannot 4e accessed direct"y, 4ut are
invo6ed when the optimiCer determines it is 4eneficia"#
1ven thou5h you cannot invo6e a Doin inde% direct"y, you create a view that "oo6s "i6e the Doin inde%
and in that way, it wou"d 4e simi"ar to havin5 direct access#
:owever, this approach does not 5uarantee that the Doin inde% wi"" 4e used#
12.who will read and write data in teradata?
!M wor6s "i6e a hard wor6er# !M read and write data to their own assi5ned
dis6s#
13. )ailure "," Tar$et row updated by multiple source rows.
)updatin5 the same tar5et row 4y mu"tip"e source rows
)Remove the dup"icate data#
1.How do you execute the $iven +D* statement repeatedly in @T.D?
Se"ect top +P from data4ase#ta4"e+Q
Jn
:ere $Jn[ is to run the previous sE" statement, $n$ num4er of times#
1,. )ailure 222 &o more spool space
2hec6 se"ect Euery we"" tuned#
2o""ectin5 stats on the ta4"e may fi% this pro4"em#
12. How do you declare a variable inside a Teradata macro and Teradata stored procedure?
'o faci"ity to dec"are varia4"es inside a Teradata macro, however you can pass va"ues into the macro
4y means of input parameters# These va"ues wi"" then 4e em4edded in the S?L statements that the
macro contains#
Teradata stored procedure supports I', O&T and I'O&T parameters, as we"" as the a4i"ity to dec"are
varia4"es within the procedure itse"f# Such varia4"es cou"d 4e usefu" as counters when you have "oopin5
"o5ic#
1". -hat does +*..3 function does in )ast load?
The SL11 command specifies the amount minutes to wait 4efore retryin5 to "o5on and esta4"ish a""
sessions#
S"eep command can 4e used with a"" "oad uti"ities not on"y fast"oad#
This situation can occur if a"" of the "oader s"ots are used or if the num4er of reEuested sessions is not
avai"a4"e# The defau"t va"ue is K minutes# If tenacity was set to / hours and s"eep +9 minutes, S"eep
command wi"" try to "o5on for every +9 minutes up to / hours duration#
1=. 5iven below% -hat is the maximum level of data protection?
!#- R!ID + and 7a""4ac6
B#- R!ID 8 and 7a""4ac6
2#- R!ID 8 and 'o 7a""4ac6
D#- R!ID + and 'o 7a""4ac6
!'swer ) !
16. -hen utiliCin$ a uni4ue secondary index% how many '#3/s1 are most probably accessed?
!#- + !M
B#- Mu"tiU!M
2#- / !M
D#- !"")!M
!nswer ))) c
27. Difference between count/G1 and count/11 ?
2ount is one of very important functions used in any data4ase #
But what many dont 6now that is the resu"t count we 5et from 2O&'T function mi5ht 4e different
4ased on how it is used#
Let us consider the e%amp"e of count*P- and 2ount*+- and understand how there is some difference the
usa5e#
Say for a 5iven ta4"e with data
( y
))))))))))))
/+ ,+
'u"" ,/
'u"" ,,
G+ ,G
'u"" 'u""
!nd this Euery:
se"ect count*P-, count*%-, count*+- from ta4"eQ
Resu"ts: 8, /, G
P 2ount*P- counts a"" occurrences inc"udin5 nu""s# This is a row count for a 5iven ta4"e#
P 2ount*%- counts a"" non nu"" occurrences of va"ues in co"umn %# If % has nu"" va"ues, count*%- wi"" 4e
"ess than count*P-#
P 2ount*+- is simi"ar to count*%- #It counts a"" nu"" va"ues in a $pseudo co"umn$ created 4y the constant#
Since the constant + wi"" never 4e nu"", this wou"d, 4e "i6e count*P- i#e row count #
21.-hat is use of compress in teradata?.xplain?
2ompression is used to MinimiCe the ta4"e siCe, for e%amp"e when the ta4"e siCe is increasin5
anonymous"y .e can use 2ompression to reduce the siCe of the ta4"e#
2onditions:
+#2ompression can 4e dec"ared at the time of ta4"e creation
/#.e can compress up to /8K co"umn va"ues*not co"umns-
,#.e can't compress varia4"e "en5th fie"ds *varte%t,varchar##-
22. -hat is the difference between start schema and )sldm?
7SLDM ))> 7inancia" Services Lo5ica" Data Mode" *Teradata 7S)LDM N#9- its deve"oped 4y Teradata
for the financia" sectors *Specifica""y for Ban6-# it can 4e customised 4ased on the user reEuirement#
StarSchema ))> Its a re"ationa" data4ase schema for representin5 mu"tidimensiona" data# The data is
stored in a centra" fact ta4"e, with one or more ta4"es ho"din5 information on each dimension#
23. Teradata performance tunin$ and optimiCation steps?
+# co""ectin5 statistics
/# 1%p"ain Statements
,# !void roduct Loins when possi4"e
G# se"ect appropriate primary inde% to avoid s6ewness in stora5e
8# !void Redistri4ution when possi4"e
K# &se su4)se"ects instead of 4i5 $I'$ "ists
N# &se derived ta4"es
H# &se FRO& BM instead of DISTI'2T * FRO& BM sorts the data "oca""y on the <RO2#
DISTI'2T sorts the data after it is redistri4uted-
W# &se 2ompression on "ar5e ta4"es#
2. .xplain command displays the execution plan of the 4uery chosen by the Teradata :ptimiCer
a- 7a"se 4- True
!nswer: 4
2,. +uccess!)ailure!.rror responses from Teradata are received by
a- ReEuest arce" 4- Data parce" c- Response arce"
!nswer: c
/K# Teradata Data4ase faci"ities for software fau"t to"erance on
a- <proc Mi5ration 3 7a""4ac6 ta4"es 4- !M 2"usters 3 Lourna"in5
c- Bac6up;!rchive;Restore d- Ta4"e Re4ui"d &ti"ity e- !"" of the a4ove
f- 'one of the a4ove
!nswer: e
2".Total &umber of nodes suppport by @A&.T are
a-8+9 SM 'odes a- 8+/ SM 'odes 4- 8+, SM 'odes c- 8+G SM 'odes
!nswer: 4
2=.+#3 +tands for
a- Symmetric Mu"ti)processor 4- Symmetric Massive)rocessor
c- System Mu"ti)processor d- Symmetric Mu"ti)rocessor
!nswer: a
26.Terabytes represent
a- +9 power +8 4- +9 power +/ c- +9 power +H d- +9 power /G
!nswer: 4
37.5lobal Temporary Tables are stored in the TD are
a- erm Space 4- Spoo" Space c- Temp Space
!nswer : c
31.-hat are the followin$ object re4uired for Teradata DatabaseH3rem space?.
a- Ta4"es 3 Stored rocedure 4- Ta4"es 3 <iews
c- Macros 3 Tri55ers d- <iews 3 Stored rocedures
!nswer: a#
32. H'+H9:- funtions is
a# Returns the hash 4uc6et num4er that corresponds to a specified row hash va"ue#
4# Returns the he%adecima" row hash va"ue for an e%pression
c# Returns the !M num4er of the primary !M correspondin5 to the specified hash 4uc6et num4er#
d# Returns the identification num4er of the fa""4ac6 !M correspondin5 to the specified hash 4uc6et#
!nswer: 4
33.TeradataI' @rief History ?
+WNW \ Teradata 2orp founded in Los !n5e"es, 2a"ifornia#
Deve"opment 4e5ins on a massive"y para""e" data4ase computer#
+WH/ \ BM'1T techno"o5y is patented#
+WHG \ Teradata se""s first DB2;+9+/ to .e""s 7ar5o Ban6 of 2a"ifornia# Tota" revenue for year R =,
mi""ion#
+WHK \ roduct of the Mear]
+WHW \ Teradata and '2R partner on ne%t 5eneration of DB2#
+WW9 \ 7irst Tera4yte system insta""ed and in production#
+WW+ \ '2R is acEuired 4y !T3T# Teradata revenue =/H9M#
+WW/ \ Teradata is mer5ed into '2R#
+WW8 \ Teradata <ersion / for &'I( operatin5 systems re"eased#
+WWK \ '2R on"y vendor to run mu"ti)user T2)D Benchmar6s#
+WWK \ !T3T spins off '2R 2orporation with Teradata product#
+WWN \ Teradata data4ase 4ecomes industry "eader in sca"a4"e data warehousin5#
+WWN \ +99 Fi5a4yte T2)D Benchmar6 "eader#
+WWH \ /G Tera4yte system in production#
+WWW \ + TB T2)D winner
/999 \ 89^ TB system in production] Teradata Division created#
<':7 A+#W#HU+++GB
3.-hat are the functions of a Tera data D@'?
7o""owin5 are the different functions which a DB! can perform:
+# &ser Mana5ement R 2reation and mana5in5 &sers, Data4ases, Ro"es, rofi"es and !ccounts#
/# Space !""ocation R !ssi5nin5 ermanent Space, Spoo" Space and Temporary Space#
,# !ccess of Data4ase O4Dects R Frantin5 and Revo6in5 !ccess Ri5hts on different data4ase o4Dects#
G# Security 2ontro" R :and"in5 "o5on and "o5off ru"es for &sers#
8# System Maintenance R Specification of system defau"ts, restart etc#
K# System erformance R &se of erformance Monitor*MO'-, riority Schedu"er and Lo4 Schedu"in5#
N# Resource Monitorin5 R Data4ase ?uery Lo5*DB?L- and !ccess Lo55in5#
H# Data !rchives, Restores and Recovery R !R2 &ti"ity and ermanent Lourna"s#
3,. what is )ull table scan /)T+1 ?
.hat are the scenarios in which 7u"" Ta4"e Scans occursI
! 7u"" Ta4"e Scan *7TS- is a Euery that reads every row of a ta4"e#
Scenarios 7u"" ta4"e scan occurs
+# .here c"ause in S1L12T statement does not use either primary inde% or secondary inde%#
/# S?L Statement which uses a partia" va"ue *"i6e or not "i6e-, in the .:1R1 statement#
,# S?L Statement which does not contain where c"ause#
G#S?L statement usin5 ran5e in where c"ause# 1%# *co"+ > G9 or co"+ @ J+9999-
32. How to identify 330 columns?
Se"ect data4asename , ta4"ename , co"umnposition ,co"umnname from d4c#inde%es
where inde%type J'?'
order 4y + ,/,, Q
3".;an you create a table with no 3rimary 0ndex in teradata?
'O# Its not possi4"e#### if you dont mention e%terna" primary inde%, teradata creates one for you#
Teradata uses this rimary inde% to distri4ute data amon5 !Ms#
3=.0n case of &(+0% does '#3 has local subtable?
Mes# In case of '&SI, !M is 5oin5 to have a su4ta4"e
which has on"y information for the rows in the same !M#
But in case of &SI, 1ach row in !M is hashed and decide !M num4er
to store its information in Secondary inde% Su4 ta4"e#
36. How lon$ 9:- 0D is?
KG Bits###
!M receives ,/ 4it hash va"ue and row data from 1# !M then append a ,/ 4it uniEue va"ue to row
:!S: to ma6e KG 4it RO. ID#
RO. ID is used to sort rows in !M
7irst !M chec6s is there any row with same :!S: va"ueI If yes, then it append,/ 4it + to *9999
9999 9999 9999 9999 9999 9999 999+- to row hash and ma6e it KG 4it RO. ID### If one more row
comes with same hash va"ue then it appends /* 9999 9999 9999 9999 9999 9999 9999 99+9- to Row
:!S:#
7.;an a user creates any object who assi$ned no perm space?
! user with 'o permspace can't create any ta4"es in his user space#
But :e can create Macro, <iews and tri55ers#
Because these o4Dects wi"" 4e stored in F"o4a" Space #
1. -hen a user 4uery fails because of spool space?
?uery may fai"s 4ecause of spoo" space in two cases
.hen there is no empty perm space# i#e comp"ete system is fu""#
&ser Euery reEuires more spoo" space than user spoo" space "imit #
2.Does '#3 will do row by row search once it has Hash value to retrieve a row?
!M receives a hash va"ue from 1 for which data is reEuired#
!M app"ies a Binary Search to find that row#### Its never do "inear search#
3.' Table has (30 on .#3 no. 0 wrote a 4uery in which i used deptno in emp table?
:ow many amps 5ets this dataI
1ven thou5h ta4"e has rimary Inde% ,
my S?L Euery written on
dept num4er on which there is not inde%#### So its a 7u"" ta4"e scan#
.-hile #ultiload is runnin$ client system restarted?
.e need to manua""y resu4mit the script so that it runs from Last confi5uration chec6 point#
,.-hile .xecutin$ #ultiload script teradata server restarted?
!"on5 with server mu"ti"oad script restarted and Runs from "ast chec6point#
2.;an we concatenate #ultiple files with same structure and load in multiple tables?
'O ,on"y in fast"oad its possi4"e#
".How do you load data from a file to multiple tables #*:'D?
In this app"y c"ass we use where conditions whi"e "oadin5 data into mu"tip"e ta4"es#
!pp"y InsUta4"e where Recind J YT+S
!pp"y InsUta4"e where Recind J YT/S
=.0f #ultiload is fail in 'c4uistion or 'pplication phase how do you restart?
a#Incase of o"d fi"e to Run
Dont drop 1T,&<,.T and "o5 ta4"es
Dont Re"ease "oc6s on tar5et ta4"es
Rectify errors in the 7i"e or script and Run a5ain#
4#Incase of new fi"e to Run
Drop 1T,&<,.T and "o5 ta4"e#
Re"ease "oc6s on tar5et ta4"es 4y usin5 Re"ease MLO!D command#
R1L1!S1 MLO!D Ta4"e+, ###Ta4"e 8
R1L1!S1 MLO!D Ta4"e+, ###Ta4"e 8 I' !LM
6.Terdata Data Dictonary Directory explain?
The DD;D * Data Dictionary Directory-
is an inte5rated set of system ta4"es
contains definitions of and information a4out a"" o4Dects in the system
is entire"y maintained 4y the RDBMS
is Zdata a4out the data[ or Zmetadata[
is distri4uted across a"" !Ms "i6e a"" ta4"es
may 4e Eueried 4y administrators or support staff
is accessed via Teradata supp"ied views
1%amp"es of DD;D views:
DB2#Ta4"es \> information a4out a"" ta4"es
DB2#&sers \> information a4out a"" users
DB2#!""Ri5hts \> information a4out access ri5hts
DB2#!""Space \> information a4out space uti"iCation#
,7.;an 0 use drop statement in )load utility?
M1S,
But you have to dec"are it out of the 7LO!D B"oc6 it means
it shou"d not come 4etween #4e5in "oadin5,#end "oadin5
7LO!D a"so supports D1L1T1,2R1!T1,DRO statements which we
have to dec"are out of 7LO!D 4"oc6#
In the 7LO!D B"oc6 we can 5ive on"y I'S1RT

Вам также может понравиться