Sunteți pe pagina 1din 99

C8ACLL l8LCuLn1L?

ASkLu CuLS1lCnS
What are the components of phys|ca| database structure of Crac|e database?
Cracle daLabase ls comprlsed of Lhree Lypes of flles Cne or more daLaflles Lwo are more redo log flles and one or more
conLrol flles
What are the components of |og|ca| database structure of Crac|e database?
1here are Lablespaces and daLabases schema ob[ecLs
What |s a tab|espace?
A daLabase ls dlvlded lnLo Loglcal SLorage unlL called Lablespaces A Lablespace ls used Lo grouped relaLed loglcal sLrucLures
LogeLher
What |s SS1LM tab|espace and when |s |t created?
Lvery Cracle daLabase conLalns a Lablespace named S?S1LM whlch ls auLomaLlcally creaLed when Lhe daLabase ls creaLed 1he
S?S1LM Lablespace always conLalns Lhe daLa dlcLlonary Lables for Lhe enLlre daLabase
Lxp|a|n the re|at|onsh|p among database tab|espace and data f||e ?
Lach daLabases loglcally dlvlded lnLo one or more Lablespaces one or more daLa flles are expllclLly creaLed for each Lablespace
What |s schema?
A schema ls collecLlon of daLabase ob[ecLs of a user
What are Schema Cb[ects?
Schema ob[ecLs are Lhe loglcal sLrucLures LhaL dlrecLly refer Lo Lhe daLabases daLa Schema ob[ecLs lnclude Lables vlews
sequences synonyms lndexes clusLers daLabase Lrlggers procedures funcLlons packages and daLabase llnks
Can ob[ects of the same schema res|de |n d|fferent tab|espaces?
?es
Can a tab|espace ho|d ob[ects from d|fferent schemes?
?es
What |s Crac|e tab|e?
A Lable ls Lhe baslc unlL of daLa sLorage ln an Cracle daLabase 1he Lables of a daLabase hold all of Lhe user accesslble daLa
1able daLa ls sLored ln rows and columns
What |s an Crac|e v|ew?
A vlew ls a vlrLual Lable Lvery vlew has a query aLLached Lo lL (1he query ls a SLLLC1 sLaLemenL LhaL ldenLlfles Lhe columns and
rows of Lhe Lable(s) Lhe vlew uses)
What |s art|a| 8ackup ?
A arLlal 8ackup ls any operaLlng sysLem backup shorL of a full backup Laken whlle Lhe daLabase ls open or shuL down
What |s M|rrored on||ne kedo Log ?
A mlrrored onllne redo log conslsLs of coples of onllne redo log flles physlcally locaLed on separaLe dlsks changes made Lo one
member of Lhe group are made Lo all members
What |s Iu|| 8ackup ?
A full backup ls an operaLlng sysLem backup of all daLa flles onllne redo log flles and conLrol flle LhaL consLlLuLe C8ACLL
daLabase and Lhe parameLer
Can a V|ew based on another V|ew ?
?es
Can a tab|espace ho|d ob[ects from d|fferent Schemes ?
?es
Can ob[ects of the same Schema res|de |n d|fferent tab|espace ?
?es
What |s the use of Contro| I||e ?
When an lnsLance of an C8ACLL daLabase ls sLarLed lLs conLrol flle ls used Lo ldenLlfy Lhe daLabase and redo log flles LhaL musL
be opened for daLabase operaLlon Lo proceed lL ls also used ln daLabase recovery
Do V|ew conta|n Data ?
vlews do noL conLaln or sLore daLa
What are the keferent|a| act|ons supported by ICkLIGN kL |ntegr|ty constra|nt ?
uuA1L and uLLL1L 8esLrlcL A referenLlal lnLegrlLy rule LhaL dlsallows Lhe updaLe or deleLlon of referenced daLa uLLL1L
Cascade When a referenced row ls deleLed all assoclaLed dependenL rows are deleLed
What are the type of Synonyms?
1here are Lwo Lypes of Synonyms rlvaLe and ubllc
What |s a kedo Log ?
1he seL of 8edo Log flles ?SuA1LuluuSL8 or uSL8Lnv SCL funcLlons or Lhe pseudo columns LLvLL or 8CWnuM
What |s an Index Segment ?
Lach lndex has an lndex segmenL LhaL sLores all of lLs daLa
Lxp|a|n the re|at|onsh|p among Database 1ab|espace and Data f||e?
Lach daLabases loglcally dlvlded lnLo one or more Lablespaces one or more daLa flles are expllclLly creaLed for each Lablespace
What are the d|fferent type of Segments ?
uaLa SegmenL lndex SegmenL 8ollback SegmenL and 1emporary SegmenL
What are C|usters ?
ClusLers are groups of one or more Lables physlcally sLores LogeLher Lo share common columns and are ofLen used LogeLher
What |s an Integr|ty Constra|ns ?
An lnLegrlLy consLralnL ls a declaraLlve way Lo deflne a buslness rule for a column of a Lable
What |s an Index ?
An lndex ls an opLlonal sLrucLure assoclaLed wlLh a Lable Lo have dlrecL access Lo rows whlch can be creaLed Lo lncrease Lhe
performance of daLa reLrleval lndex can be creaLed on one or more columns of a Lable
What |s an Lxtent ?
An LxLenL ls a speclflc number of conLlguous daLa blocks obLalned ln a slngle allocaLlon and used Lo sLore a speclflc Lype of
lnformaLlon
What |s a V|ew ?
A vlew ls a vlrLual Lable Lvery vlew has a Cuery aLLached Lo lL (1he Cuery ls a SLLLC1 sLaLemenL LhaL ldenLlfles Lhe columns and
rows of Lhe Lable(s) Lhe vlew uses)
What |s 1ab|e ?
A Lable ls Lhe baslc unlL of daLa sLorage ln an C8ACLL daLabase 1he Lables of a daLabase hold all of Lhe user accesslble daLa
1able daLa ls sLored ln rows and columns
Can a v|ew based on another v|ew?
?es
What are the advantages of v|ews?
rovlde an addlLlonal level of Lable securlLy by resLrlcLlng access Lo a predeLermlned seL of rows and columns of a Lable
Plde daLa complexlLy
Slmpllfy commands for Lhe user
resenL Lhe daLa ln a dlfferenL perspecLlve from LhaL of Lhe base Lable
SLore complex querles
What |s an Crac|e sequence?
A sequence generaLes a serlal llsL of unlque numbers for numerlcal columns of a daLabases Lables
What |s a synonym?
A synonym ls an allas for a Lable vlew sequence or program unlL
What are the types of synonyms?
1here are Lwo Lypes of synonyms prlvaLe and publlc
What |s a pr|vate synonym?
Cnly lLs owner can access a prlvaLe synonym
What |s a pub||c synonym?
Any daLabase user can access a publlc synonym
What are synonyms used for?
Mask Lhe real name and owner of an ob[ecL
rovlde publlc access Lo an ob[ecL
rovlde locaLlon Lransparency for Lables vlews or program unlLs of a remoLe daLabase
Slmpllfy Lhe SCL sLaLemenLs for daLabase users
What |s an Crac|e |ndex?
An lndex ls an opLlonal sLrucLure assoclaLed wlLh a Lable Lo have dlrecL access Lo rows whlch can be creaLed Lo lncrease Lhe
performance of daLa reLrleval lndex can be creaLed on one or more columns of a Lable
now are the |ndex updates?
lndexes are auLomaLlcally malnLalned and used by Cracle Changes Lo Lable daLa are auLomaLlcally lncorporaLed lnLo all
relevanL lndexes
What |s a 1ab|espace?
A daLabase ls dlvlded lnLo Loglcal SLorage unlL called Lablespace A Lablespace ls used Lo grouped relaLed loglcal sLrucLures
LogeLher
What |s ko||back Segment ?
A uaLabase conLalns one or more 8ollback SegmenLs Lo Lemporarlly sLore undo lnformaLlon
What are the Character|st|cs of Data I||es ?
A daLa flle can be assoclaLed wlLh only one daLabase Cnce creaLed a daLa flle canL change slze Cne or more daLa flles form a
loglcal unlL of daLabase sLorage called a Lablespace
now to def|ne Data 8|ock s|ze ?
A daLa block slze ls speclfled for each C8ACLL daLabase when Lhe daLabase ls creaLed A daLabase users and allocaLed free
daLabase space ln C8ACLL daLa blocks 8lock slze ls speclfled ln lnl1C8A flle and can'L be changed laLLer
What does a Contro| f||e Conta|n ?
A ConLrol flle records Lhe physlcal sLrucLure of Lhe daLabase lL conLalns Lhe followlng lnformaLlon
uaLabase name
names and locaLlons of a daLabases flles and redolog flles
1lme sLamp of daLabase creaLlon
What |s d|fference between UNIUL constra|nt and kIMAk kL constra|nt ?
A column deflned as unlCuL can conLaln nulls whlle a column deflned as 8lMA8? kL? canL conLaln nulls

What |s Index C|uster ?
A ClusLer wlLh an lndex on Lhe ClusLer key
When does a 1ransact|on end ?
When lL ls commlLLed or 8ollbacked
What |s the effect of sett|ng the va|ue ALL_kCWS for C1IMI2Lk_GCAL parameter of the AL1Lk SLSSICN command ? What
are the factors that affect C1IMI2Lk |n choos|ng an Cpt|m|zat|on approach ?
Answer 1he C1lMlZL8_MCuL lnlLlallzaLlon parameLer SLaLlsLlcs ln Lhe uaLa ulcLlonary Lhe C1lMlZL8_CCAL parameLer of Lhe
AL1L8 SLSSlCn command hlnLs ln Lhe sLaLemenL
What |s the effect of sett|ng the va|ue CnCCSL for C1IMI2Lk_GCAL parameter of the AL1Lk SLSSICN Command ?
1he CpLlmlzer chooses CosL_based approach and opLlmlzes wlLh Lhe goal of besL LhroughpuL lf sLaLlsLlcs for aLleasL one of Lhe
Lables accessed by Lhe SCL sLaLemenL exlsL ln Lhe daLa dlcLlonary CLherwlse Lhe C1lMlZL8 chooses 8uLL_based approach
now does one create a new database? (for D8A)
Cne can creaLe and modlfy Cracle daLabases uslng Lhe Cracle dbca (uaLabase ConflguraLlon AsslsLanL) uLlllLy 1he dbca uLlllLy
ls locaLed ln Lhe $C8ACLL_PCML/bln dlrecLory 1he Cracle unlversal lnsLaller (oul) normally sLarLs lL afLer lnsLalllng Lhe
daLabase server sofLware
Cne can also creaLe daLabases manually uslng scrlpLs 1hls opLlon however ls falllng ouL of fashlon as lL ls qulLe lnvolved and
error prone Look aL Lhls example for creaLlng and Cracle 9l daLabase
CCnnLC1 S?S AS S?Su8A
AL1L8 S?S1LM SL1 u8_C8LA1L_llLL_uLS1/u01/oradaLa/
AL1L8 S?S1LM SL1 u8_C8LA1L_CnLlnL_LCC_uLS1_1/u02/oradaLa/
AL1L8 S?S1LM SL1 u8_C8LA1L_CnLlnL_LCC_uLS1_2/u03/oradaLa/
C8LA1L uA1A8ASL
What database b|ock s|ze shou|d I use? (for D8A)
Cracle recommends LhaL your daLabase block slze maLch or be mulLlples of your operaLlng sysLem block slze Cne can use
smaller block slzes buL Lhe performance cosL ls slgnlflcanL ?our cholce should depend on Lhe Lype of appllcaLlon you are
runnlng lf you have many small LransacLlons as wlLh CL1 use a smaller block slze WlLh fewer buL larger LransacLlons as wlLh
a uSS appllcaLlon use a larger block slze lf you are uslng a volume manager conslder your operaLlng sysLem block slze Lo be
8k 1hls ls because volume manager producLs use 8k blocks (and Lhls ls noL conflgurable)
What are the d|fferent approaches used by Cpt|m|zer |n choos|ng an execut|on p|an ?
8ulebased and CosLbased
What does kCLL8ACk do ?
8CLL8ACk reLracLs any of Lhe changes resulLlng from Lhe SCL sLaLemenLs ln Lhe LransacLlon
now does one coa|esce free space ? (for D8A)
SMCn coalesces free space (exLenLs) lnLo larger conLlguous exLenLs every 2 hours and even Lhen only for a shorL perlod of
Llme
SMCn wlll noL coalesce free space lf a Lablespaces defaulL sLorage parameLer pcLlncrease ls seL Lo 0 WlLh Cracle 73 one can
manually coalesce a Lablespace uslng Lhe AL1L8 1A8LLSACL CCALLSCL command unLll Lhen use
SCL alLer sesslon seL evenLs lmmedlaLe Lrace name coalesce level n
Where n ls Lhe Lablespace number you geL from SLLLC1 1S# nAML l8CM S?S1S$
?ou can geL sLaLus lnformaLlon abouL Lhls process by selecLlng from Lhe S?Su8A_l8LL_SACL_CCALLSCLu dlcLlonary vlew
now does one prevent tab|espace fragmentat|on? (for D8A)
Always seL C1lnC8LASL Lo 0 or 100
8lzarre values for C1lnC8LASL wlll conLrlbuLe Lo fragmenLaLlon lor example lf you seL C1lnC8LASL Lo 1 you wlll see LhaL
your exLenLs are golng Lo have welrd and wacky slzes 100k 100k 101k 102k eLc Such exLenLs of blzarre slze are rarely re
used ln Lhelr enLlreLy C1lnC8LASL of 0 or 100 glves you nlce round exLenL slzes LhaL can easlly be reused Lg 100k 100k
200k 400k eLc

use Lhe same exLenL slze for all Lhe segmenLs ln a glven Lablespace Locally Managed Lablespaces (avallable from 8l onwards)
wlLh unlform exLenL slzes vlrLually ellmlnaLes any Lablespace fragmenLaLlon noLe LhaL Lhe number of exLenLs per segmenL does
noL cause any performance lssue anymore unless Lhey run lnLo Lhousands and Lhousands where addlLlonal l/C may be
requlred Lo feLch Lhe addlLlonal blocks where exLenL maps of Lhe segmenL are sLored
Where can one f|nd the h|gh water mark for a tab|e? (for D8A)
1here ls no slngle sysLem Lable whlch conLalns Lhe hlgh waLer mark (PWM) for a Lable A Lables PWM can be calculaLed uslng
Lhe resulLs from Lhe followlng SCL sLaLemenLs
SLLLC1 8LCCkS
l8CM u8A_SLCMLn1S
WPL8L CWnL8uL8(owner) Anu SLCMLn1_nAML uL8(Lable)
AnAL?ZL 1A8LL ownerLable LS1lMA1L S1A1lS1lCS
SLLLC1 LM1?_8LCCkS
l8CM u8A_1A8LLS
WPL8L CWnL8uL8(owner) Anu SLCMLn1_nAML uL8(Lable)
1hus Lhe Lables PWM (query resulL 1) (query resulL 2) 1
nC1L ?ou can also use Lhe u8MS_SACL package and calculaLe Lhe PWM 1C1AL_8LCCkS unuSLu_8LCCkS 1
What |s CCS1based approach to opt|m|zat|on ?
Conslderlng avallable access paLhs and deLermlnlng Lhe mosL efflclenL execuLlon plan based on sLaLlsLlcs ln Lhe daLa dlcLlonary
for Lhe Lables accessed by Lhe sLaLemenL and Lhelr assoclaLed clusLers and lndexes
What does CCMMI1 do ?
CCMMl1 makes permanenL Lhe changes resulLlng from all SCL sLaLemenLs ln Lhe LransacLlon 1he changes made by Lhe SCL
sLaLemenLs of a LransacLlon become vlslble Lo oLher user sesslons LransacLlons LhaL sLarL only afLer LransacLlon ls commlLLed
now are extents a||ocated to a segment? (for D8A)
Cracle8 and above rounds off exLenLs Lo a mulLlple of 3 blocks when more Lhan 3 blocks are requesLed lf one requesLs 16k or 2
blocks (assumlng a 8k block slze) Cracle doesnL round lL up Lo 3 blocks buL lL allocaLes 2 blocks or 16k as requesLed lf one
asks for 8 blocks Cracle wlll round lL up Lo 10 blocks
Space allocaLlon also depends upon Lhe slze of conLlguous free space avallable lf one asks for 8 blocks and Cracle flnds a
conLlguous free space LhaL ls exacLly 8 blocks lL would glve lL you lf lL were 9 blocks Cracle would also glve lL Lo you Clearly
Cracle doesnL always round exLenLs Lo a mulLlple of 3 blocks
1he excepLlon Lo Lhls rule ls locally managed Lablespaces lf a Lablespace ls creaLed wlLh local exLenL managemenL and Lhe
exLenL slze ls 64k Lhen Cracle allocaLes 64k or 8 blocks assumlng 8kblock slze Cracle doesnL round lL up Lo Lhe mulLlple of 3
when a Lablespace ls locally managed
Can one rename a database user (schema)? (for D8A)
no Lhls ls llsLed as LnhancemenL 8equesL 138308 Workaround
uo a userlevel exporL of user A
creaLe new user 8
lmporL sysLem/manager fromuserA Louser8
urop user A
Def|ne 1ransact|on ?
A 1ransacLlon ls a loglcal unlL of work LhaL comprlses one or more SCL sLaLemenLs execuLed by a slngle user
What |s keadCn|y 1ransact|on ?
A 8eadCnly LransacLlon ensures LhaL Lhe resulLs of each query execuLed ln Lhe LransacLlon are conslsLanL wlLh respecL Lo Lhe
same polnL ln Llme
What |s a dead|ock ? Lxp|a|n
1wo processes waLlng Lo updaLe Lhe rows of a Lable whlch are locked by Lhe oLher process Lhen deadlock arlses ln a daLabase
envlronmenL Lhls wlll ofLen happen because of noL lssulng proper row lock commands oor deslgn of fronLend appllcaLlon
may cause Lhls slLuaLlon and Lhe performance of server wlll reduce drasLlcally
1hese locks wlll be released auLomaLlcally when a commlL/rollback operaLlon performed or any one of Lhls processes belng
kllled exLernally
What |s a Schema ?
1he seL of ob[ecLs owned by user accounL ls called Lhe schema
What |s a c|uster key ?
1he relaLed columns of Lhe Lables are called Lhe clusLer key 1he clusLer key ls lndexed uslng a clusLer lndex and lLs value ls
sLored only once for mulLlple Lables ln Lhe clusLer
What |s ara||e| Server ?
MulLlple lnsLances accesslng Lhe same daLabase (Cnly ln MulLlCu envlronmenLs)
What are the bas|c e|ement of 8ase conf|gurat|on of an orac|e Database ?
lL conslsLs of
one or more daLa flles
one or more conLrol flles
Lwo or more redo log flles
1he uaLabase conLalns
mulLlple users/schemas
one or more rollback segmenLs
one or more Lablespaces
uaLa dlcLlonary Lables
user ob[ecLs (Lablelndexesvlews eLc)
1he server LhaL access Lhe daLabase conslsLs of
SCA (uaLabase buffer ulcLlonary Cache 8uffers 8edo log buffers Shared SCL pool)
SMCn (SysLem MCnlLo)
MCn (rocess MCnlLor)
LCW8 (LoC WrlLe)
u8W8 (uaLa 8ase WrlLe)
A8CP (A8CPlver)
Ck1 (Check olnL)
8LCC
ulspaLcher
user rocess wlLh assoclaLed CS
What |s c|usters ?
Croup of Lables physlcally sLored LogeLher because Lhey share common columns and are ofLen used LogeLher ls called ClusLer
What |s an Index ? now |t |s |mp|emented |n Crac|e Database ?
An lndex ls a daLabase sLrucLure used by Lhe server Lo have dlrecL access of a row ln a Lable An lndex ls auLomaLlcally creaLed
when a unlque of prlmary key consLralnL clause ls speclfled ln creaLe Lable comman (ver 70)
What |s a Database |nstance ? Lxp|a|n
A daLabase lnsLance (Server) ls a seL of memory sLrucLure and background processes LhaL access a seL of daLabase flles
1he process can be shared by all users 1he memory sLrucLure LhaL are used Lo sLore mosL querled daLa from daLabase 1hls
helps up Lo lmprove daLabase performance by decreaslng Lhe amounL of l/C performed agalnsL daLa flle
What |s the use of ANAL2L command ?
1o perform one of Lhese funcLlon on an lndex Lable or clusLer
1o collecL sLaLlsLlcs abouL ob[ecL used by Lhe opLlmlzer and sLore Lhem ln Lhe daLa dlcLlonary
1o deleLe sLaLlsLlcs abouL Lhe ob[ecL used by ob[ecL from Lhe daLa dlcLlonary
1o valldaLe Lhe sLrucLure of Lhe ob[ecL
1o ldenLlfy mlgraLed and chalned rows of Lhe Lable or clusLer
What |s defau|t tab|espace ?
1he 1ablespace Lo conLaln schema ob[ecLs creaLed wlLhouL speclfylng a Lablespace name
What are the system resources that can be contro||ed through rof||e ?
1he number of concurrenL sesslons Lhe user can esLabllsh Lhe Cu processlng Llme avallable Lo Lhe users sesslon Lhe Cu
processlng Llme avallable Lo a slngle call Lo C8ACLL made by a SCL sLaLemenL Lhe amounL of loglcal l/C avallable Lo Lhe users
sesslon Lhe amouL of loglcal l/C avallable Lo a slngle call Lo C8ACLL made by a SCL sLaLemenL Lhe allowed amounL of ldle Llme
for Lhe users sesslon Lhe allowed amounL of connecL Llme for Lhe users sesslon
What |s 1ab|espace uota ?
1he collecLlve amounL of dlsk space avallable Lo Lhe ob[ecLs ln a schema on a parLlcular Lablespace
What are the d|fferent Leve|s of Aud|t|ng ?
SLaLemenL AudlLlng rlvllege AudlLlng and Cb[ecL AudlLlng
What |s Statement Aud|t|ng ?
SLaLemenL audlLlng ls Lhe audlLlng of Lhe powerful sysLem prlvlleges wlLhouL regard Lo speclflcally named ob[ecLs
What are the database adm|n|strators ut|||t|es ava||ab|e ?
SCL * u8A 1hls allows u8A Lo monlLor and conLrol an C8ACLL daLabase SCL * Loader lL loads daLa from sLandard operaLlng
sysLem flles (llaL flles) lnLo C8ACLL daLabase Lables LxporL (Lx) and lmporL (lmp) uLlllLles allow you Lo move exlsLlng daLa ln
C8ACLL formaL Lo and from C8ACLL daLabase
now can you enab|e automat|c arch|v|ng ?
ShuL Lhe daLabase
8ackup Lhe daLabase
Modlfy/lnclude LCC_A8CPlvL_S1A81_18uL ln lnlLora flle
SLarL up Lhe daLabase
What are ro|es? now can we |mp|ement ro|es ?
8oles are Lhe easlesL way Lo granL and manage common prlvlleges needed by dlfferenL groups of daLabase users CreaLlng roles
and asslgnlng provldes Lo roles Asslgn each role Lo group of users 1hls wlll slmpllfy Lhe [ob of asslgnlng prlvlleges Lo lndlvldual
users
What are ko|es ?
8oles are named groups of relaLed prlvlleges LhaL are granLed Lo users or oLher roles
What are the use of ko|es ?
8LuuCLu C8An1lnC Cl 8lvlLLCLS 8aLher Lhan expllclLly granLlng Lhe same seL of prlvlleges Lo many users a daLabase
admlnlsLraLor can granL Lhe prlvlleges for a group of relaLed users granLed Lo a role and Lhen granL only Lhe role Lo each
member of Lhe group
u?nAMlC 8lvlLLCL MAnACLMLn1 When Lhe prlvlleges of a group musL change only Lhe prlvlleges of Lhe role need Lo be
modlfled 1he securlLy domalns of all users granLed Lhe groups role auLomaLlcally reflecL Lhe changes made Lo Lhe role
SLLLC1lvL AvAlLA8lLl1? Cl 8lvlLLCLS 1he roles granLed Lo a user can be selecLlvely enable (avallable for use) or dlsabled
(noL avallable for use) 1hls allows speclflc conLrol of a users prlvlleges ln any glven slLuaLlon
ALlCA1lCn AWA8LnLSS A daLabase appllcaLlon can be deslgned Lo auLomaLlcally enable and dlsable selecLlve roles when a
user aLLempLs Lo use Lhe appllcaLlon
What |s r|v||ege Aud|t|ng ?
rlvllege audlLlng ls Lhe audlLlng of Lhe use of powerful sysLem prlvlleges wlLhouL regard Lo speclflcally named ob[ecLs
What |s Cb[ect Aud|t|ng ?
Cb[ecL audlLlng ls Lhe audlLlng of accesses Lo speclflc schema ob[ecLs wlLhouL regard Lo user
What |s Aud|t|ng ?
MonlLorlng of user access Lo ald ln Lhe lnvesLlgaLlon of daLabase use
now does one see the upt|me for a database? (for D8A )
Look aL Lhe followlng SCL query
SLLLC1 Lo_char (sLarLup_LlmeuuMCn???? PP24 Ml SS) u8 SLarLup 1lme
l8CM sysv_$lnsLance
Marco 8ergman provlded Lhe followlng alLernaLlve soluLlon
SLLLC1 Lo_char (logon_Llmeuy dd Mon PP24 Ml SS) u8 SLarLup 1lme
l8CM sysv_$sesslon
WPL8L Sld1 /* Lhls ls pmon */
/
users sLlll runnlng on Cracle 7 can Lry one of Lhe followlng querles
Column S1A81Lu formaL a18 head S1A81u 1lML
SelecL ClnS1AnCL
Lo_daLe (!uLvALuL !)
|| Lo_char (floor (SLCvALuL/3600) 09)
||
|| SubsLr (Lo_char (mod (SLCvALuL/60 60) 09) 2 2)
|| SubsLr (Lo_char (floor (mod (SLCvALuL/60 60)) 09) 2 2)
||
|| SubsLr (Lo_char (mod (SLCvALuL 60) 09) 2 2) S1A81Lu
from S?Sv_$lnS1AnCL !uL
S?Sv_$lnS1AnCL SLC
S?Sv_$1P8LAu C
Where !uLkL? llke !uLlAn
and SLCkL? llke SLCCnu
SelecL Lo_daLe (!uLvALuL !)
|| Lo_char (Lo_daLe (SLCvALuL SSSSS) PP24MlSS) S1A81Lu
from S?Sv_$lnS1AnCL !uL
S?Sv_$lnS1AnCL SLC
where !uLkL? llke !uLlAn
and SLCkL? llke SLCCnu
selecL Lo_char (Lo_daLe (!uLvALuL !) + (SLCvALuL/86400) 8eLurn a uA1L
uuMCn?? PP24MlSS) S1A81Lu
from v$lnS1AnCL !uL
v$lnS1AnCL SLC
where !uLkL? llke !uLlAn
and SLCkL? llke SLCCnu
Where are my 1LMIILLS I dont see them |n V5DA1AIILL or D8A_DA1A_IILL? (for D8A )
1empflles unllke normal daLaflles are noL llsLed ln v$daLaflle or dba_daLa_flles lnsLead query v$Lempflle or dba_Lemp_flles
SLLLC1 * l8CM v$Lempflle
SLLLC1 * l8CM dba_Lemp_flles
now do I f|nd used]free space |n a 1LMCkAk tab|espace? (for D8A )
unllke normal Lablespaces Lrue Lemporary Lablespace lnformaLlon ls noL llsLed ln u8A_l8LL_SACL lnsLead use Lhe
v$1LM_SACL_PLAuL8 vlew
SLLLC1 Lablespace_name SuM (byLes used) SuM (byLes free)
l8CM v$Lemp_space_header
C8Cu 8? Lablespace_name
What |s a prof||e ?
Lach daLabase user ls asslgned a roflle LhaL speclfles llmlLaLlons on varlous sysLem resources avallable Lo Lhe user
now w||| you enforce secur|ty us|ng stored procedures?
uonL granL user access dlrecLly Lo Lables wlLhln Lhe appllcaLlon lnsLead granL Lhe ablllLy Lo access Lhe procedures LhaL access
Lhe Lables When procedure execuLed lL wlll execuLe Lhe prlvllege of procedures owner users cannoL access Lables excepL vla
Lhe procedure
now can one see who |s us|ng a temporary segment? (for D8A )
lor every user uslng Lemporary space Lhere ls an enLry ln S?Sv$_LCCk wlLh Lype 1S
All Lemporary segmenLs are named ffffbbbb where ffff ls Lhe flle lL ls ln and bbbb ls flrsL block of Lhe segmenL lf your
Lemporary Lablespace ls seL Lo 1LMC8A8? all sorLs are done ln one large Lemporary segmenL lor usage sLaLs see
S?Sv_$SC81_SLCMLn1
lrom Cracle 80 one can [usL query S?Sv$sorL_usage Look aL Lhese examples
selecL susername uuSL8 uLablespace uconLenLs uexLenLs ublocks
from sysv_$sesslon s sysv_$sorL_usage u
where saddr usesslon_addr
/
selecL sosuser sprocess susername sserlal#
Sum (ublocks)*vpvalue/1024 sorL_slze
from sysv_$sesslon s sysv_$sorL_usage u sysv_$parameLer v
where ssaddr usesslon_addr
and vpname db_block_slze
and sosuser llke 1
group by sosuser sprocess susername sserlal# vpvalue
/
now does one get the v|ew def|n|t|on of f|xed v|ews]tab|es?
Cuery v$flxed_vlew_deflnlLlon Lxample SLLLC1 * l8CM v$flxed_vlew_deflnlLlon WPL8L vlew_namev$SLSSlCn
What are the d|ct|onary tab|es used to mon|tor a database spaces ?
u8A_l8LL_SACL
u8A_SLCMLn1S
u8A_uA1A_llLLS
now can we spec|fy the Arch|ved |og f||e name format and dest|nat|on?
8y seLLlng Lhe followlng values ln lnlLora flle LCC_A8CPlvL_lC8MA1 arch S/s/1/Larc (S Log sequence number and ls
zero lefL paded s Log sequence number noL padded 1 1hread number lefzeropaded and L 1hread number noL
padded) 1he flle name creaLed ls arch 0001 are lf S ls used LCC_A8CPlvL_uLS1 paLh
What |s user Account |n Crac|e database?
An user accounL ls noL a physlcal sLrucLure ln uaLabase buL lL ls havlng lmporLanL relaLlonshlp Lo Lhe ob[ecLs ln Lhe daLabase and
wlll be havlng cerLaln prlvlleges
When w||| the data |n the snapshot |og be used?
We musL be able Lo creaLe a afLer row Lrlgger on Lable (le lL should be noL be already avallable) AfLer glvlng Lable prlvlleges
We cannoL speclfy snapshoL log name because oracle uses Lhe name of Lhe masLer Lable ln Lhe name of Lhe daLabase ob[ecLs
LhaL supporL lLs snapshoL log 1he masLer Lable name should be less Lhan or equal Lo 23 characLers (1he Lable name creaLed
wlll be MLCCS_Lablename and Lrlgger name wlll be 1LCCS name)
What dynam|c data rep||cat|on?
updaLlng or lnserLlng records ln remoLe daLabase Lhrough daLabase Lrlggers lL may fall lf remoLe daLabase ls havlng any
problem
What |s 1wohase Comm|t ?
1wophase commlL ls mechanlsm LhaL guaranLees a dlsLrlbuLed LransacLlon elLher commlLs on all lnvolved nodes or rolls back
on all lnvolved nodes Lo malnLaln daLa conslsLency across Lhe global dlsLrlbuLed daLabase lL has Lwo phase a repare hase
and a CommlL hase
now can you Lnforce keferent|a| Integr|ty |n snapshots ?
1lme Lhe references Lo occur when masLer Lables are noL ln use eform Lhe reference Lhe manually lmmdlaLely locklng Lhe
masLer Lables We can [oln Lables ln snopshoLs by creaLlng a complex snapshoLs LhaL wlll based on Lhe masLer Lables
What |s a SL * NL1?
SCL *nL1 ls C8ACLLs mechanlsm for lnLerfaclng wlLh Lhe communlcaLlon proLocols used by Lhe neLworks LhaL faclllLaLe
dlsLrlbuLed processlng and dlsLrlbuLed daLabases lL ls used ln CllnLServer and ServerServer communlcaLlons
What |s a SNASnC1 ?
SnapshoLs are readonly coples of a masLer Lable locaLed on a remoLe node whlch ls perlodlcally refreshed Lo reflecL changes
made Lo Lhe masLer Lable
What |s the mechan|sm prov|ded by CkACLL for tab|e rep||cat|on ?
SnapshoLs and SnASPC1 LCCs
What |s snapshots?
SnapshoL ls an ob[ecL used Lo dynamlcally repllcaLe daLa beLween dlsLrlbuLe daLabase aL speclfled Llme lnLervals ln ver 70 Lhey
are read only
What are the var|ous type of snapshots?
Slmple and Complex
Descr|be two phases of 1wophase comm|t ?
repare phase 1he global coordlnaLor (lnlLlaLlng node) ask a parLlclpanLs Lo prepare (Lo promlse Lo commlL or rollback Lhe
LransacLlon even lf Lhere ls a fallure) CommlL hase lf all parLlclpanLs respond Lo Lhe coordlnaLor LhaL Lhey are prepared Lhe
coordlnaLor asks all nodes Lo commlL Lhe LransacLlon lf all parLlclpanLs cannoL prepare Lhe coordlnaLor asks all nodes Lo roll
back Lhe LransacLlon
What |s snapshot |og ?
lL ls a Lable LhaL malnLalns a record of modlflcaLlons Lo Lhe masLer Lable ln a snapshoL lL ls sLored ln Lhe same daLabase as
masLer Lable and ls only avallable for slmple snapshoLs lL should be creaLed before creaLlng snapshoLs
What are the benef|ts of d|str|buted opt|ons |n databases?
uaLabase on oLher servers can be updaLed and Lhose LransacLlons can be grouped LogeLher wlLh oLhers ln a loglcal unlL
uaLabase uses a Lwo phase commlL
What are the opt|ons ava||ab|e to refresh snapshots ?
CCMLL1L 1ables are compleLely regeneraLed uslng Lhe snapshoLs query and Lhe masLer Lables every Llme Lhe snapshoL
referenced
lAS1 lf slmple snapshoL used Lhen a snapshoL log can be used Lo send Lhe changes Lo Lhe snapshoL Lables
lC8CL uefaulL value lf posslble lL performs a lAS1 refresh CLherwlse lL wlll perform a compleLe refresh
What |s a SNASnC1 LCG ?
A snapshoL log ls a Lable ln Lhe masLer daLabase LhaL ls assoclaLed wlLh Lhe masLer Lable C8ACLL uses a snapshoL log Lo Lrack
Lhe rows LhaL have been updaLed ln Lhe masLer Lable SnapshoL logs are used ln updaLlng Lhe snapshoLs based on Lhe masLer
Lable
What |s D|str|buted database ?
A dlsLrlbuLed daLabase ls a neLwork of daLabases managed by mulLlple daLabase servers LhaL appears Lo a user as slngle loglcal
daLabase 1he daLa of all daLabases ln Lhe dlsLrlbuLed daLabase can be slmulLaneously accessed and modlfled
now can we reduce the network traff|c?
8epllcaLlon of daLa ln dlsLrlbuLed envlronmenL
uslng snapshoLs Lo repllcaLe daLa
uslng remoLe procedure calls
D|fferent|ate s|mp|e and comp|ex snapshots ?
A slmple snapshoL ls based on a query LhaL does noL conLalns C8Cu 8? clauses CCnnLC1 8? clauses !Clns subquery or
snashoL of operaLlons
A complex snapshoLs conLaln aLleasL any one of Lhe above
What are the 8u||t|ns used for send|ng arameters to forms?
?ou can pass parameLer values Lo a form when an appllcaLlon execuLes Lhe call_form new_form Cpen_form or 8un_producL
Can you have more than one content canvas v|ew attached w|th a w|ndow?
?es Lach wlndow you creaLe musL have aLleasL one conLenL canvas vlew asslgned Lo lL ?ou can also creaLe a wlndow LhaL has
manlpulaLed conLenL canvas vlew AL run Llme only one of Lhe conLenL canvas vlews asslgn Lo a wlndow ls dlsplayed aL a Llme
Is the After report tr|gger f|red |f the report execut|on fa||s?
?es
Does a 8efore form tr|gger f|re when the parameter form |s suppressed?
?es
What |s SGA?
1he SysLem Clobal Area ln an Cracle daLabase ls Lhe area ln memory Lo faclllLaLe Lhe Lransfer of lnformaLlon beLween users lL
holds Lhe mosL recenLly requesLed sLrucLural lnformaLlon beLween users lL holds Lhe mosL recenLly requesLed sLrucLural
lnformaLlon abouL Lhe daLabase 1he sLrucLure ls daLabase buffers dlcLlonary cache redo log buffer and shared pool area
What |s a shared poo|?
1he daLa dlcLlonary cache ls sLored ln an area ln SCA called Lhe shared pool 1hls wlll allow sharlng of parsed SCL sLaLemenLs
among concurrenL users
What |s mean by rogram G|oba| Area (GA)?
lL ls area ln memory LhaL ls used by a slngle Cracle user process
What |s a data segment?
uaLa segmenL are Lhe physlcal areas wlLhln a daLabase block ln whlch Lhe daLa assoclaLed wlLh Lables and clusLers are sLored
What are the factors caus|ng the repars|ng of SL statements |n SGA?
uue Lo lnsufflclenL shared pool slze
MonlLor Lhe raLlo of Lhe reloads Lakes place whlle execuLlng SCL sLaLemenLs lf Lhe raLlo ls greaLer Lhan 1 Lhen lncrease Lhe
SPA8Lu_CCL_SlZL
What are c|usters?
ClusLers are groups of one or more Lables physlcally sLores LogeLher Lo share common columns and are ofLen used LogeLher
What |s c|uster key?
1he relaLed columns of Lhe Lables ln a clusLer are called Lhe clusLer key
Do a v|ew conta|n data?
vlews do noL conLaln or sLore daLa
What |s user Account |n Crac|e database?
A user accounL ls noL a physlcal sLrucLure ln daLabase buL lL ls havlng lmporLanL relaLlonshlp Lo Lhe ob[ecLs ln Lhe daLabase and
wlll be havlng cerLaln prlvlleges
now w||| you enforce secur|ty us|ng stored procedures?
uonL granL user access dlrecLly Lo Lables wlLhln Lhe appllcaLlon lnsLead granL Lhe ablllLy Lo access Lhe procedures LhaL access
Lhe Lables When procedure execuLed lL wlll execuLe Lhe prlvllege of procedures owner users cannoL access Lables excepL vla
Lhe procedure
What are the d|ct|onary tab|es used to mon|tor a database space?
u8A_l8LL_SACL
u8A_SLCMLn1S
u8A_uA1A_llLLS
Can a property c|ause |tse|f be based on a property c|ause?
?es
If a parameter |s used |n a query w|thout be|ng prev|ous|y def|ned what d|ff ex|st between report 20 and 2S when the
query |s app||ed?
Whlle boLh reporLs 20 and 23 creaLe Lhe parameLer reporL 23 glves a message LhaL a blnd parameLer has been creaLed
What are the sq| c|auses supported |n the ||nk property sheet?
Where sLarL wlLh havlng
What |s tr|gger assoc|ated w|th the t|mer?
WhenLlmerexplred
What are the tr|gger assoc|ated w|th |mage |tems?
WhenlmageacLlvaLed flres when Lhe operaLors double cllcks on an lmage lLemwhenlmagepressed flres when an operaLor
cllcks or double cllcks on an lmage lLem
What are the d|fferent w|ndows events act|vated at runt|mes?
When_wlndow_acLlvaLed
When_wlndow_closed
When_wlndow_deacLlvaLed
When_wlndow_reslzed
WlLhln Lhls Lrlggers you can examlne Lhe bullL ln sysLem varlable sysLem evenL_wlndow Lo deLermlne Lhe name of Lhe wlndow
for whlch Lhe Lrlgger flred
When do you use data parameter type?
When Lhe value of a daLa parameLer belng passed Lo a called producL ls always Lhe name of Lhe record group deflned ln Lhe
currenL form uaLa parameLers are used Lo pass daLa Lo producLs lnvoked wlLh Lhe run_producL bullLln subprogram
What |s d|fference between open_form and ca||_form?
when one form lnvokes anoLher form by execuLlng open_form Lhe flrsL form remalns dlsplayed and operaLors can navlgaLe
beLween Lhe forms as deslred when one form lnvokes anoLher form by execuLlng call_form Lhe called form ls modal wlLh
respecL Lo Lhe calllng form 1haL ls any wlndows LhaL belong Lo Lhe calllng form are dlsabled and operaLors cannoL navlgaLe Lo
Lhem unLll Lhey flrsL exlL Lhe called form
What |s new_form bu||t|n?
When one form lnvokes anoLher form by execuLlng new_form oracle form exlLs Lhe flrsL form and releases lLs memory before
loadlng Lhe new form calllng new form compleLely replace Lhe flrsL wlLh Lhe second lf Lhere are changes pendlng ln Lhe flrsL
form Lhe operaLor wlll be prompLed Lo save Lhem before Lhe new form ls loaded
What |s the LCV of Va||dat|on roperty of an |tem? What |s the use of |t?
When LCv for valldaLlon ls seL Lo 1rue Cracle lorms compares Lhe currenL value of Lhe LexL lLem Lo Lhe values ln Lhe flrsL
column dlsplayed ln Lhe LCv Whenever Lhe valldaLlon evenL occurs lf Lhe value ln Lhe LexL lLem maLches one of Lhe values ln
Lhe flrsL column of Lhe LCv valldaLlon succeeds Lhe LCv ls noL dlsplayed and processlng conLlnues normally lf Lhe value ln Lhe
LexL lLem does noL maLch one of Lhe values ln Lhe flrsL column of Lhe LCv Cracle lorms dlsplays Lhe LCv and uses Lhe LexL lLem
value as Lhe search crlLerla Lo auLomaLlcally reduce Lhe llsL
What |s the d|ff when I|ex mode |s mode on and when |t |s off?
When flex mode ls on reporLs auLomaLlcally reslzes Lhe parenL when Lhe chlld ls reslzed
What |s the d|ff when conf|ne mode |s on and when |t |s off?
When conflne mode ls on an ob[ecL cannoL be moved ouLslde lLs parenL ln Lhe layouL
What are v|sua| attr|butes?
vlsual aLLrlbuLes are Lhe fonL color paLLern proprleLles LhaL you seL for form and menu ob[ecLs LhaL appear ln your appllcaLlon
lnLerface
Wh|ch of the two v|ews shou|d ob[ects accord|ng to possess|on?
vlew by sLrucLure
What are the two types of v|ews ava||ab|e |n the ob[ect nav|gator(spec|f|c to report 2S)?
vlew by sLrucLure and vlew by Lype
What are the vbx contro|s?
vbx conLrol provlde a slmple meLhod of bulldlng and enhanclng user lnLerfaces 1he conLrols can use Lo obLaln user lnpuLs and
dlsplay program ouLpuLsvbx conLrol where orlglnally develop as exLenslons for Lhe ms vlsual baslc envlronmenLs and lnclude
such lLems as sllders rldes and knobs
What |s the use of transact|ona| tr|ggers?
uslng LransacLlonal Lrlggers we can conLrol or modlfy Lhe defaulL funcLlonallLy of Lhe oracle forms
now do you create a new sess|on wh||e open a new form?
uslng open_form bullLln seLLlng Lhe sesslon opLlon Lx Cpen_form(SLocks acLlve sesslon) when lnvoke Lhe mulLlple forms
wlLh open form and call_form ln Lhe same appllcaLlon sLaLe wheLher Lhe followlng are Lrue/lalse
What are the ways to mon|tor the performance of the report?
use reporLs proflle execuLable sLaLemenL use SCL Lrace faclllLy
If two groups are not ||nked |n the data mode| ed|tor What |s the h|erarchy between them?
1wo group LhaL ls above are Lhe lefL mosL rank hlgher Lhan Lhe group LhaL ls Lo rlghL or below lL
An open form can not be execute the ca||_form procedure |f you cha|n of ca||ed forms has been |n|t|ated by another open
form?
1rue
Lxp|a|n about hor|zonta| Vert|ca| too| bar canvas v|ews?
1ool bar canvas vlews are used Lo creaLe Lool bars for lndlvldual wlndows PorlzonLal Lool bars are dlsplay aL Lhe Lop of a
wlndow [usL under lLs menu bar verLlcal 1ool bars are dlsplayed along Lhe lefL slde of a wlndow
What |s the purpose of the product order opt|on |n the co|umn property sheet?
1o speclfy Lhe order of lndlvldual group evaluaLlon ln a cross producLs
What |s the use of |mage_zoom bu||t|n?
1o manlpulaLe lmages ln lmage lLems
now do you reference a parameter |nd|rect|y?
1o lndlrecLly reference a parameLer use Lhe nAML ln CC? bullLlns Lo lndlrecLly seL and reference Lhe parameLers value
Lxample name_ln (caplLal parameLer my param) Copy (Su8LSParameLer my_param)
What |s a t|mer?
1lmer ls an lnLernal Llme clock LhaL you can programmaLlcally creaLe Lo perform an acLlon each Llme Lhe Llmes
What are the two phases of b|ock coord|nat|on?
1here are Lwo phases of block coordlnaLlon Lhe clear phase and Lhe populaLlon phase uurlng Lhe clear phase Cracle lorms
navlgaLes lnLernally Lo Lhe deLall block and flushes Lhe obsoleLe deLall records uurlng Lhe populaLlon phase Cracle lorms
lssues a SLLLC1 sLaLemenL Lo repopulaLe Lhe deLall block wlLh deLall records assoclaLed wlLh Lhe new masLer record 1hese
operaLlons are accompllshed Lhrough Lhe execuLlon of Lrlggers
What are Most Common types of Comp|ex masterdeta|| re|at|onsh|ps?
1here are Lhree mosL common Lypes of complex masLerdeLall relaLlonshlps
masLer wlLh dependenL deLalls
masLer wlLh lndependenL deLalls
deLall wlLh Lwo masLers
What |s a text ||st?
1he LexL llsL sLyle llsL lLem appears as a recLangular box whlch dlsplays Lhe flxed number of values When Lhe LexL llsL conLalns
values LhaL can noL be dlsplayed a verLlcal scroll bar appears allowlng Lhe operaLor Lo vlew and selecL undlsplayed values
What |s term?
1he Lerm ls Lermlnal deflnlLlon flle LhaL descrlbes Lhe Lermlnal form whlch you are uslng r20run
What |s use of term?
1he Lerm flle whlch key ls correspond Lo whlch oracle reporL funcLlons
What |s pop ||st?
1he pop llsL sLyle llsL lLem appears lnlLlally as a slngle fleld (slmllar Lo a LexL lLem fleld) When Lhe operaLor selecLs Lhe llsL lcon a
llsL of avallable cholces appears
What |s the max|mum no of chars the parameter can store?
1he maxlmum no of chars Lhe parameLer can sLore ls only valld for char parameLers whlch can be upLo 64k no parameLers
defaulL Lo 238yLes and uaLe parameLer defaulL Lo 78yLes
What are the defau|t extens|ons of the f||es created by ||brary modu|e?
1he defaulL flle exLenslons lndlcaLe Lhe llbrary module Lype and sLorage formaL pll pl/sql llbrary module blnary
What are the Coord|nat|on ropert|es |n a MasterDeta|| re|at|onsh|p?
1he coordlnaLlon properLles are
ueferred
AuLoCuery
1hese roperLles deLermlne when Lhe populaLlon phase of block
coordlnaLlon should occur
now do you d|sp|ay conso|e on a w|ndow ?
1he console lncludes Lhe sLaLus llne and message llne and ls dlsplayed aL Lhe boLLom of Lhe wlndow Lo whlch lL ls asslgned1o
speclfy LhaL Lhe console should be dlsplayed seL Lhe console wlndow form properLy Lo Lhe name of any wlndow ln Lhe form 1o
lnclude Lhe console seL console wlndow Lo null
What are the d|fferent arameter types?
1exL arameLersuaLa arameLers
State any three mouse events system var|ab|es?
SysLemmouse_buLLon_pressedSysLemmouse_buLLon_shlfL
What are the types of ca|cu|ated co|umns ava||ab|e?
Summary lormula laceholder column
Lxp|a|n about stacked canvas v|ews?
SLacked canvas vlew ls dlsplayed ln a wlndow on Lop of or sLacked on Lhe conLenL canvas vlew asslgned Lo LhaL same wlndow
SLacked canvas vlews obscure some parL of Lhe underlylng conLenL canvas vlew and or ofLen shown and hldden
programmaLlcally
now does one do off||ne database backups? (for D8A )
ShuL down Lhe daLabase from sqlplus or server manager 8ackup all flles Lo secondary sLorage (eg Lapes) Lnsure LhaL you
backup all daLa flles all conLrol flles and all log flles When compleLed resLarL your daLabase
uo Lhe followlng querles Lo geL a llsL of all flles LhaL needs Lo be backed up
selecL name from sysv_$daLaflle
selecL member from sysv_$logflle
selecL name from sysv_$conLrolflle
SomeLlmes Cracle Lakes forever Lo shuLdown wlLh Lhe lmmedlaLe opLlon As workaround Lo Lhls problem shuLdown uslng
Lhese commands
alLer sysLem checkpolnL
shuLdown aborL
sLarLup resLrlcL
shuLdown lmmedlaLe
noLe LhaL lf you daLabase ls ln A8CPlvLLCC mode one can sLlll use archlved log flles Lo roll forward from an offllne backup lf
you cannoL Lake your daLabase down for a cold (offllne) backup aL a convenlenL Llme swlLch your daLabase lnLo A8CPlvLLCC
mode and perform hoL (onllne) backups
What |s the d|fference between SnCW_LDI1Ck and LDI1_1Lk1I1LM?
Show edlLor ls Lhe generlc bullLln whlch accepLs any edlLor name and Lakes some lnpuL sLrlng and reLurns modlfled ouLpuL
sLrlng Whereas Lhe edlL_LexLlLem bullLln needs Lhe lnpuL focus Lo be ln Lhe LexL lLem before Lhe bullLln ls execuLed
What are the bu||t|ns that are used to Attach an LCV programmat|ca||y to an |tem?
seL_lLem_properLy
geL_lLem_properLy
(by seLLlng Lhe LCv_nAML properLy)
now does one do on||ne database backups? (for D8A )
Lach Lablespace LhaL needs Lo be backedup musL be swlLched lnLo backup mode before copylng Lhe flles ouL Lo secondary
sLorage (Lapes) Look aL Lhls slmple example
AL1L8 1A8LLSACL xyz 8LCln 8ACku
! cp xyfllle1 /backupulr/
AL1L8 1A8LLSACL xyz Lnu 8ACku
lL ls beLLer Lo backup Lablespace for Lablespace Lhan Lo puL all Lablespaces ln backup mode 8acklng Lhem up separaLely lncurs
less overhead When done remember Lo backup your conLrol flles Look aL Lhls example
AL1L8 S?S1LM SWl1CP LCCllLL lorce log swlLch Lo updaLe conLrol flle headers
AL1L8 uA1A8ASL 8ACku CCn18CLllLL 1C /backupulr/conLroldbf
nC1L uo noL run onllne backups durlng peak processlng perlods Cracle wlll wrlLe compleLe daLabase blocks lnsLead of Lhe
normal delLas Lo redo log flles whlle ln backup mode 1hls wlll lead Lo excesslve daLabase archlvlng and even daLabase freezes
now does one backup a database us|ng kMAN? (for D8A )
1he blggesL advanLage of 8MAn ls LhaL lL only backup used space ln Lhe daLabase 8man doesnL puL Lablespaces ln backup
mode savlng on redo generaLlon overhead 8MAn wlll reread daLabase blocks unLll lL geLs a conslsLenL lmage of lL Look aL Lhls
slmple backup example
rman LargeL sys/*** nocaLalog
run
allocaLe channel L1 Lype dlsk
backup
formaL /app/oracle/db_backup/d_LL_ss_pp
( daLabase )
release channel L1

Lxample 8MAn resLore
rman LargeL sys/*** nocaLalog
run
allocaLe channel L1 Lype dlsk
# seL unLll Llme Aug 07 2000 31
resLore Lablespace users
recover Lablespace users
release channel L1

1he examples above are exLremely slmpllsLlc and only useful for lllusLraLlng baslc concepLs 8y defaulL Cracle uses Lhe daLabase
conLrolflles Lo sLore lnformaLlon abouL backups normally one would raLher seLup a 8MAn caLalog daLabase Lo sLore 8MAn
meLadaLa ln 8ead Lhe Cracle 8ackup and 8ecovery Culde before lmplemenLlng any 8MAn backups
noLe 8MAn cannoL wrlLe lmage coples dlrecLly Lo Lape Cne needs Lo use a LhlrdparLy medla manager LhaL lnLegraLes wlLh
8MAn Lo backup dlrecLly Lo Lape AlLernaLlvely one can backup Lo dlsk and Lhen manually copy Lhe backups Lo Lape
What are the d|fferent f||e extens|ons that are created by orac|e reports?
8ep flle and 8df flle
What |s str|p sources generate opt|ons?
8emoves Lhe source code from Lhe llbrary flle and generaLes a llbrary flles LhaL conLalns only pcode 1he resulLlng flle can be
used for flnal deploymenL buL can noL be subsequenLly edlLed ln Lhe deslgnerex f43gen moduleold_llbpll userldscoLL/Llger
sLrlp_source ?LS ouLpuL_flle
now does one put a database |nto AkCnIVLLCG mode? (for D8A )
1he maln reason for runnlng ln archlvelog mode ls LhaL one can provlde 24hour avallablllLy and guaranLee compleLe daLa
recoverablllLy lL ls also necessary Lo enable A8CPlvLLCC mode before one can sLarL Lo use onllne daLabase backups 1o enable
A8CPlvLLCC mode slmply change your daLabase sLarLup command scrlpL and bounce Lhe daLabase
SCLLuS connecL sys as sysdba
SCLLuS sLarLup mounL excluslve
SCLLuS alLer daLabase archlvelog
SCLLuS archlve log sLarL
SCLLuS alLer daLabase open
nC1L1 8emember Lo Lake a basellne daLabase backup rlghL afLer enabllng archlvelog mode WlLhouL lL one would noL be able
Lo recover Also lmplemenL an archlvelog backup Lo prevenL Lhe archlve log dlrecLory from fllllngup
nC1L2 A8CPlvLLCC mode was lnLroduced wlLh Cracle v6 and ls essenLlal for daLabase polnLlnLlme recovery Archlvlng can
be used ln comblnaLlon wlLh onllne and offllne daLabase backups
nC1L3 ?ou may wanL Lo seL Lhe followlng lnl1C8A parameLers when enabllng A8CPlvLLCC mode log_archlve_sLarL18uL
log_archlve_desL and log_archlve_formaL
nC1L4 ?ou can change Lhe archlve log desLlnaLlon of a daLabase onllne wlLh Lhe A8CPlvL LCC S1A81 1C dlrecLory
sLaLemenL 1hls sLaLemenL ls ofLen used Lo swlLch archlvlng beLween a seL of dlrecLorles
nC1L3 When runnlng Cracle 8eal AppllcaLlon Server (8AC) you need Lo shuL down all nodes before changlng Lhe daLabase Lo
A8CPlvLLCC mode
What |s the bas|c data structure that |s requ|red for creat|ng an LCV?
8ecord Croup
now does one backup arch|ved |og f||es? (for D8A )
Cne can backup archlved log flles uslng 8MAn or any operaLlng sysLem backup uLlllLy 8emember Lo deleLe flles afLer backlng
Lhem up Lo prevenL Lhe archlve log dlrecLory from fllllng up lf Lhe archlve log dlrecLory becomes full your daLabase wlll hang!
Look aL Lhls slmple 8MAn backup scrlpL
8MAn run
2 allocaLe channel dev1 Lype dlsk
3 backup
4 formaL /app/oracle/arch_backup/log_LL_ss_pp
3 (archlvelog all deleLe lnpuL)
6 release channel dev1
7
Does Crac|e wr|te to data f||es |n beg|n]hot backup mode? (for D8A )
Cracle wlll sLop updaLlng flle headers buL wlll conLlnue Lo wrlLe daLa Lo Lhe daLabase flles even lf a Lablespace ls ln backup
mode
ln backup mode Cracle wlll wrlLe ouL compleLe changed blocks Lo Lhe redo log flles normally only delLas (changes) are logged
Lo Lhe redo logs 1hls ls done Lo enable reconsLrucLlon of a block lf only half of lL was backed up (spllL blocks) 8ecause of Lhls
one should noLlce lncreased log acLlvlLy and archlvlng durlng onllne backups
What |s the Max|mum a||owed |ength of kecord group Co|umn?
8ecord group column names cannoL exceed 30 characLers
Wh|ch parameter can be used to set read |eve| cons|stency across mu|t|p|e quer|es?
8ead only
What are the d|fferent types of kecord Groups?
Cuery 8ecord Croups
nonCuery 8ecord Croups
SLaLe 8ecord Croups
Irom wh|ch des|gnat|on |s |t preferred to send the output to the pr|nted?
revlewer
What are d|fference between post database comm|t and postform comm|t?
osLform commlL flres once durlng Lhe posL and commlL LransacLlons process afLer Lhe daLabase commlL occurs 1he posL
formcommlL Lrlgger flres afLer lnserLs updaLes and deleLes have been posLed Lo Lhe daLabase buL before Lhe LransacLlons have
been flnallzed ln Lhe lssulng Lhe command 1he posLdaLabasecommlL Lrlgger flres afLer oracle forms lssues Lhe commlL Lo
flnallzed LransacLlons
What are the d|fferent d|sp|ay sty|es of ||st |tems?
op_llsL1exL_llsLCombo box
Wh|ch of the above methods |s the faster method?
performlng Lhe calculaLlon ln Lhe query ls fasLer
W|th wh|ch funct|on of summary |tem |s the compute at opt|ons requ|red?
percenLage of LoLal funcLlons
What are parameters?
arameLers provlde a slmple mechanlsm for deflnlng and seLLlng Lhe valuesof lnpuLs LhaL are requlred by a form aL sLarLup
lorm parameLers are varlables of Lype charnumberdaLe LhaL you deflne aL deslgn Llme
What are the three types of user ex|ts ava||ab|e ?
Cracle recompller exlLs Cracle call lnLerface nonCracle user exlLs
now many w|ndows |n a form can have conso|e?
Cnly one wlndow ln a form can dlsplay Lhe console and you cannoL change Lhe console asslgnmenL aL runLlme
What |s an adm|n|strat|ve (pr|v||eged) user? (for D8A )
Cracle u8As and operaLors Lyplcally use admlnlsLraLlve accounLs Lo manage Lhe daLabase and daLabase lnsLance An
admlnlsLraLlve accounL ls a user LhaL ls granLed S?SCL8 or S?Su8A prlvlleges S?Su8A and S?SCL8 allow access Lo a daLabase
lnsLance even lf lL ls noL runnlng ConLrol of Lhese prlvlleges ls managed ouLslde of Lhe daLabase vla password flles and speclal
operaLlng sysLem groups 1hls password flle ls creaLed wlLh Lhe orapwd uLlllLy
What are the two repeat|ng frame a|ways assoc|ated w|th matr|x ob[ect?
Cne down repeaLlng frame below one across repeaLlng frame
What are the masterdeta|| tr|ggers?
CnCheck_deleLe_masLerCn_clear_deLallsCn_populaLe_deLalls
now does one connect to an adm|n|strat|ve user? (for D8A )
lf an admlnlsLraLlve user belongs Lo Lhe dba group on unlx or Lhe C8A_u8A (C8A_sld_u8A) group on n1 he/she can
connecL llke Lhls
connecL / as sysdba
no password ls requlred 1hls ls equlvalenL Lo Lhe desupporLed connecL lnLernal meLhod
A password ls requlred for nonsecure admlnlsLraLlve access 1hese passwords are sLored ln password flles 8emoLe
connecLlons vla neL8 are classlfled as nonsecure Look aL Lhls example
connecL sys/password as sysdba
now does one create a password f||e? (for D8A )
1he Cracle assword llle ($C8ACLL_PCML/dbs/orapw or orapwSlu) sLores passwords for users wlLh admlnlsLraLlve prlvlleges
Cne needs Lo creaLe a password flles before remoLe admlnlsLraLors (llke CLM) wlll be allowed Lo connecL
lollow Lhls procedure Lo creaLe a new password flle
Log ln as Lhe Cracle sofLware owner
8uncommand orapwd flle$C8ACLL_PCML/dbs/orapw$C8ACLL_Slu passwordmypasswd
ShuLdown Lhe daLabase (SCLLuS SPu1uCWn lMMLulA1L)
LdlL Lhe lnl1C8A flle and ensure 8LMC1L_LCCln_ASSWC8ullLLexcluslve ls seL
SLarLup Lhe daLabase (SCLLuS S1A81u)
nC1L 1he orapwd uLlllLy presenLs a securlLy rlsk ln LhaL lL recelves a password from Lhe command llne 1hls password ls vlslble
ln Lhe process Lable of many sysLems AdmlnlsLraLors needs Lo be aware of Lhls!
Is |t poss|b|e to mod|fy an externa| query |n a report wh|ch conta|ns |t?
no
Does a group|ng done for ob[ects |n the |ayout ed|tor affect the group|ng done |n the data mode| ed|tor?
no
now does one add users to a password f||e? (for D8A )
Cne can selecL from Lhe S?Sv_$WllLL_uSL8S vlew Lo see whlch users are llsLed ln Lhe password flle new users can be added
Lo Lhe password flle by granLlng Lhem S?Su8A or S?SCL8 prlvlleges or by uslng Lhe orapwd uLlllLy C8An1 S?Su8A 1C scoLL
If a break order |s set on a co|umn wou|d |t affect co|umns wh|ch are under the co|umn?
no
Why are CS5 accounts a secur|ty r|sk |n a c||ent]server env|ronment? (for D8A)
lf you allow people Lo log ln wlLh CS$ accounLs from Wlndows WorksLaLlons you cannoL be sure who Lhey really are WlLh
Lermlnals you can rely on operaLlng sysLem passwords wlLh Wlndows you cannoL
lf you seL 8LMC1L_CS_Au1PLn118uL ln your lnlLora flle Cracle assumes LhaL Lhe remoLe CS has auLhenLlcaLed Lhe user lf
8LMC1L_CS_Au1PLn1 ls seL Lo lALSL (recommended) remoLe users wlll be unable Lo connecL wlLhouL a password
luLn1lllLu Lx1L8nALL? wlll only be ln effecL from Lhe local hosL Also lf you are uslng CS$ as your preflx you wlll be able Lo
log on locally wlLh or wlLhouL a password regardless of wheLher you have ldenLlfled your lu wlLh a password or deflned lL Lo be
luLn1lllLu Lx1L8nALL?
Do user parameters appear |n the data moda| ed|tor |n 2S?
no
Can you pass data parameters to forms?
no
Is |t poss|b|e to ||nk two groups |ns|de a cross products after the cross products group has been created?
no
What are the d|fferent moda|s of w|ndows?
Modalless wlndows
Modal wlndows
What are moda| w|ndows?
Modal wlndows are usually used as dlalogs and have resLrlcLed funcLlonallLy compared Lo modelless wlndows Cn some
plaLforms for example operaLors cannoL reslze scroll or lconlfy a modal wlndow
What are the d|fferent defau|t tr|ggers created when Master De|etes roperty |s set to Non|so|ated?
MasLer ueleLes roperLy 8esulLlng 1rlggers

nonlsolaLed(Lhe defaulL) CnCheckueleLeMasLer
CnClearueLalls
CnopulaLeueLalls
What are the d|fferent defau|t tr|ggers created when Master De|etes roperty |s set to |so|ated?
MasLer ueleLes roperLy 8esulLlng 1rlggers

lsolaLed CnClearueLalls
CnopulaLeueLalls
What are the d|fferent defau|t tr|ggers created when Master De|etes roperty |s set to Cascade?
MasLer ueleLes roperLy 8esulLlng 1rlggers

Cascadlng CnClearueLalls
CnopulaLeueLalls
redeleLe
What |s the d|ff bet sett|ng up of parameters |n reports 20 reports2S?
LCvs can be aLLached Lo parameLers ln Lhe reporLs 23 parameLer form
What are the d|fference between |ov ||st |tem?
Lov ls a properLy where as llsL lLem ls an lLem A llsL lLem can have only one column lov can have one or more columns
What |s the advantage of the ||brary?
Llbrarles provlde a convenlenL means of sLorlng cllenLslde program unlLs and sharlng Lhem among mulLlple appllcaLlons Cnce
you creaLe a llbrary you can aLLach lL Lo any oLher form menu or llbrary modules When you can call llbrary program unlLs
from Lrlggers menu lLems commands and user named rouLlne you wrlLe ln Lhe modules Lo whlch you have aLLach Lhe llbrary
When a llbrary aLLaches anoLher llbrary program unlLs ln Lhe flrsL llbrary can reference program unlLs ln Lhe aLLached llbrary
Llbrary supporL dynamlc loadlngLhaL ls llbrary program unlLs are loaded lnLo an appllcaLlon only when needed 1hls can
slgnlflcanLly reduce Lhe runLlme memory requlremenLs of appllcaLlons
What |s |ex|ca| reference? now can |t be created?
Lexlcal reference ls place_holder for LexL LhaL can be embedded ln a sql sLaLemenLs A lexlcal reference can be creaLed uslng
before Lhe column or parameLer name
What |s systemcoord|nat|on_operat|on?
lL represenLs Lhe coordlnaLlon causlng evenL LhaL occur on Lhe masLer block ln masLerdeLall relaLlon
What |s synchron|ze?
lL ls a Lermlnal screen wlLh Lhe lnLernal sLaLe of Lhe form lL updaLes Lhe screen dlsplay Lo reflecL Lhe lnformaLlon LhaL oracle
forms has ln lLs lnLernal represenLaLlon of Lhe screen
What use of command ||ne parameter cmd f||e?
lL ls a command llne argumenL LhaL allows you Lo speclfy a flle LhaL conLaln a seL of argumenLs for r20run
What |s a 1ext_|o ackage?
lL allows you Lo read and wrlLe lnformaLlon Lo a flle ln Lhe flle sysLem
What |s forms_DDL?
lssues dynamlc Sql sLaLemenLs aL run Llme lncludlng server slde pl/SCl and uuL
now |s ||nk too| operat|on d|fferent bet reports 2 2S?
ln 8eporLs 20 Lhe llnk Lool has Lo be selecLed and Lhen Lwo flelds Lo be llnked are selecLed and Lhe llnk ls auLomaLlcally creaLed
ln 23 Lhe flrsL fleld ls selecLed and Lhe llnk Lool ls Lhen used Lo llnk Lhe flrsL fleld Lo Lhe second fleld
What are the d|fferent sty|es of act|vat|on of o|e Cb[ects?
ln place acLlvaLlonLxLernal acLlvaLlon
now do you reference a arameter?
ln l/Sql ?ou can reference and seL Lhe values of form parameLers uslng blnd varlables synLax Lx A8AML1L8 name or
blocklLem A8AML1L8 arameLer name
What |s the d|fference between ob[ect embedd|ng ||nk|ng |n Crac|e forms?
ln Cracle forms Lmbedded ob[ecLs become parL of Lhe form module and llnked ob[ecLs are references from a form module Lo
a llnked source flle
Name of the funct|ons used to get]set canvas propert|es?
CeL_vlew_properLy SeL_vlew_properLy
What are the bu||t|ns that are used for sett|ng the LCV propert|es at runt|me?
geL_lov_properLy
seL_lov_properLy
What are the bu||t|ns used for process|ng rows?
CeL_group_row_counL(funcLlon)
CeL_group_selecLlon_counL(funcLlon)
CeL_group_selecLlon(funcLlon)
8eseL_group_selecLlon(procedure)
SeL_group_selecLlon(procedure)
unseL_group_selecLlon(procedure)
What are bu||t|ns used for rocess|ng rows?
CL1_C8Cu_8CW_CCun1(funcLlon)
CL1_C8Cu_SLLLC1lCn_CCun1(funcLlon)
CL1_C8Cu_SLLLC1lCn(funcLlon)
8LSL1_C8Cu_SLLLC1lCn(procedure)
SL1_C8Cu_SLLLC1lCn(procedure)
unSL1_C8Cu_SLLLC1lCn(procedure)
What are the bu||t|n used for gett|ng ce|| va|ues?
CeL_group_char_cell(funcLlon)
CeL_groupcell(funcLlon)
CeL_group_number_cell(funcLlon)
What are the bu||t|ns used for Gett|ng ce|| va|ues?
CL1_C8Cu_CPA8_CLLL (funcLlon)
CL1_C8CuCLLL(funcLlon)
CL1_C8Cu_nuM8L1_CLLL(funcLlon)
At|east how many set of data must a data mode| have before a data mode| can be base on |t?
lour
1o execute row from be|ng d|sp|ayed that st||| use co|umn |n the row wh|ch property can be used?
lormaL Lrlgger
What are d|fferent types of modu|es ava||ab|e |n orac|e form?
lorm module a collecLlon of ob[ecLs and code rouLlnes Menu modules a collecLlon of menus and menu lLem commands LhaL
LogeLher make up an appllcaLlon menu llbrary module a collecLlon of user named procedures funcLlons and packages LhaL can
be called from oLher modules ln Lhe appllcaLlon
What |s the remove on ex|t property?
lor a modelless wlndow lL deLermlnes wheLher oracle forms hldes Lhe wlndow auLomaLlcally when Lhe operaLors navlgaLes Lo
an lLem ln Lhe anoLher wlndow
What |s WnLNDatabaserecord tr|gger?
llres when oracle forms flrsL marks a record as an lnserL or an updaLe 1he Lrlgger flres as soon as oracle forms deLermlnes
Lhrough valldaLlon LhaL Lhe record should be processed by Lhe nexL posL or commlL as an lnserL or updaLe c generally occurs
only when Lhe operaLors modlfles Lhe flrsL lLem ln Lhe record and afLer Lhe operaLor aLLempLs Lo navlgaLe ouL of Lhe lLem
What |s a d|fference between prese|ect and prequery?
llres durlng Lhe execuLe query and counL query processlng afLer oracle forms consLrucLs Lhe selecL sLaLemenL Lo be lssued buL
before Lhe sLaLemenL ls acLually lssued 1he prequery Lrlgger flres [usL before oracle forms lssues Lhe selecL sLaLemenL Lo Lhe
daLabase afLer Lhe operaLor as deflne Lhe example records by enLerlng Lhe query crlLerla ln enLer query moderequery Lrlgger
flres before preselecL Lrlgger
What are bu||t|ns assoc|ated w|th t|mers?
flnd_LlmercreaLe_LlmerdeleLe_Llmer
What are the bu||t|ns used for f|nd|ng ob[ect ID funct|ons?
llnd_group(funcLlon)
llnd_column(funcLlon)
What are the bu||t|ns used for f|nd|ng Cb[ect ID funct|on?
llnu_C8Cu(funcLlon)
llnu_CCLuMn(funcLlon)
Any attempt to nav|gate programmat|ca||y to d|sab|ed form |n a ca||_form stack |s a||owed?
lalse
Use the Add_group_row procedure to add a row to a stat|c record group 1 true or fa|se?
lalse
What th|rd party too|s can be used w|th Crac|e L8U] kMAN? (for D8A)
1he followlng Medla ManagemenL SofLware vendors have lnLegraLed Lhelr medla managemenL sofLware packages wlLh Cracle
8ecovery Manager and Cracle7 LnLerprlse 8ackup uLlllLy 1he Medla ManagemenL vendors wlll provlde flrsL llne Lechnlcal
supporL for Lhe lnLegraLed backup/recover soluLlons
verlLas neL8ackup
LMC uaLa Manager (LuM)
P CMnl8ack ll
l8Ms 1lvoll SLorage Manager formerly AuSM
LegaLo neLworker
Managel1 8ackup and 8ecovery
SLerllng SofLwares SAMSAlexandrla formerly from SpecLraloglc
Sun SolsLlce 8ackup
Why and when shou|d one tune? (for D8A)
Cne of Lhe blggesL responslblllLles of a u8A ls Lo ensure LhaL Lhe Cracle daLabase ls Luned properly 1he Cracle 8u8MS ls hlghly
Lunable and allows Lhe daLabase Lo be monlLored and ad[usLed Lo lncrease lLs performance Cne should do performance Lunlng
for Lhe followlng reasons
1he speed of compuLlng mlghL be wasLlng valuable human Llme (users walLlng for response) Lnable your sysLem Lo keepup
wlLh Lhe speed buslness ls conducLed and CpLlmlze hardware usage Lo save money (companles are spendlng mllllons on
hardware) AlLhough Lhls lAC ls noL overly concerned wlLh hardware lssues one needs Lo remember Lhan you cannoL Lune a
8ulck lnLo a lerrarl
now can a break order be created on a co|umn |n an ex|st|ng group? What are the var|ous sub events a mouse doub|e c||ck
event |nvo|ves?
8y dragglng Lhe column ouLslde Lhe group
What |s the use of p|ace ho|der co|umn? What are the var|ous sub events a mouse doub|e c||ck event |nvo|ves?
A placeholder column ls used Lo hold calculaLed values aL a speclfled place raLher Lhan allowlng ls Lo appear ln Lhe acLual row
where lL has Lo appear
What |s the use of h|dden co|umn? What are the var|ous sub events a mouse doub|e c||ck event |nvo|ves?
A hldden column ls used Lo when a column has Lo embed lnLo bollerplaLe LexL
What database aspects shou|d be mon|tored? (for D8A)
Cne should lmplemenL a monlLorlng sysLem Lo consLanLly monlLor Lhe followlng aspecLs of a daLabase WrlLlng cusLom scrlpLs
lmplemenLlng Cracles LnLerprlse Manager or buylng a LhlrdparLy monlLorlng producL can achleve Lhls lf an alarm ls Lrlggered
Lhe sysLem should auLomaLlcally noLlfy Lhe u8A (emall page eLc) Lo Lake approprlaLe acLlon
lnfrasLrucLure avallablllLy
ls Lhe daLabase up and respondlng Lo requesLs
Are Lhe llsLeners up and respondlng Lo requesLs
Are Lhe Cracle names and LuA Servers up and respondlng Lo requesLs
Are Lhe Web LlsLeners up and respondlng Lo requesLs

1hlngs LhaL can cause servlce ouLages
ls Lhe archlve log desLlnaLlon fllllng up?
Cb[ecLs geLLlng close Lo Lhelr max exLenLs
user and process llmlLs reached

1hlngs LhaL can cause bad performance
See quesLlon WhaL Lunlng lndlcaLors can one use?
Where shou|d the tun|ng effort be d|rected? (for D8A)
Conslder Lhe followlng areas for Lunlng 1he order ln whlch sLeps are llsLed needs Lo be malnLalned Lo prevenL Lunlng slde
effecLs lor example lL ls no good lncreaslng Lhe buffer cache lf you can reduce l/C by rewrlLlng a SCL sLaLemenL uaLabase
ueslgn (lf lLs noL Loo laLe)
oor sysLem performance usually resulLs from a poor daLabase deslgn Cne should generally normallze Lo Lhe 3nl SelecLlve
denormallzaLlon can provlde valuable performance lmprovemenLs When deslgnlng always keep Lhe daLa access paLh ln
mlnd Also look aL proper daLa parLlLlonlng daLa repllcaLlon aggregaLlon Lables for declslon supporL sysLems eLc
AppllcaLlon 1unlng
Lxperlence showed LhaL approxlmaLely 80 of all Cracle sysLem performance problems are resolved by codlng opLlmal SCL
Also conslder proper schedullng of baLch Lasks afLer peak worklng hours
Memory 1unlng
roperly slze your daLabase buffers (shared pool buffer cache log buffer eLc) by looklng aL your buffer hlL raLlos ln large
ob[ecLs lnLo memory Lo prevenL frequenL reloads
ulsk l/C 1unlng
uaLabase flles needs Lo be properly slzed and placed Lo provlde maxlmum dlsk subsysLem LhroughpuL Also look for frequenL
dlsk sorLs full Lable scans mlsslng lndexes row chalnlng daLa fragmenLaLlon eLc
LllmlnaLe uaLabase ConLenLlon
SLudy daLabase locks laLches and walL evenLs carefully and ellmlnaLe where posslble 1une Lhe CperaLlng SysLem
MonlLor and Lune operaLlng sysLem Cu l/C and memory uLlllzaLlon lor more lnformaLlon read Lhe relaLed Cracle lAC
deallng wlLh your speclflc operaLlng sysLem
What are the var|ous sub events a mouse doub|e c||ck event |nvo|ves? What are the var|ous sub events a mouse doub|e c||ck
event |nvo|ves?
uouble cllcklng Lhe mouse conslsLs of Lhe mouse down mouse up mouse cllck mouse down mouse up evenLs
What are the defau|t parameter that appear at run t|me |n the parameter screen? What are the var|ous sub events a mouse
doub|e c||ck event |nvo|ves?
uesLype and uesname
What are the bu||t|ns used for Creat|ng and de|et|ng groups?
C8LA1LC8Cu (funcLlon)
C8LA1L_C8Cu_l8CM_CuL8?(funcLlon)
uLLL1L_C8Cu(procedure)
What are d|fferent types of canvas v|ews?
ConLenL canvas vlews
SLacked canvas vlews
PorlzonLal Loolbar
verLlcal Loolbar
What are the d|fferent types of De|ete deta||s we can estab||sh |n MasterDeta||s?
Cascade
lsolaLe
nonlsolaLe
What |s re|at|on between the w|ndow and canvas v|ews?
Canvas vlews are Lhe back ground ob[ecLs on whlch you place Lhe lnLerface lLems (1exL lLems) check boxes radlo groups eLc)
and bollerplaLe ob[ecLs (boxes llnes lmages eLc) LhaL operaLors lnLeracL wlLh us Lhey run your form Lach canvas vlews
dlsplayed ln a wlndow
What |s a User_ex|t?
Calls Lhe user exlL named ln Lhe user_exlL_sLrlng lnvokes a 3Cl program by name whlch has been properly llnked lnLo your
currenL oracle forms execuLable
now |s |t poss|b|e to se|ect generate a se|ect set for the query |n the query property sheet?
8y uslng Lhe Lables/columns buLLon and Lhen speclfylng Lhe Lable and Lhe column names
now can va|ues be passed bet precomp||er ex|ts Crac|e ca|| |nterface?
8y uslng Lhe sLaLemenL LxLClAlCL1 LxLClAlu1
now can a square be drawn |n the |ayout ed|tor of the report wr|ter?
8y uslng Lhe recLangle Lool whlle presslng Lhe (ConsLralnL) key
now can a text f||e be attached to a report wh||e creat|ng |n the report wr|ter?
8y uslng Lhe llnk flle properLy ln Lhe layouL boller plaLe properLy sheeL
now can I message to passed to the user from reports?
8y uslng S8WMLSSACL funcLlon
Does one need to drop] truncate ob[ects before |mport|ng? (for D8A)
8efore one lmporL rows lnLo already populaLed Lables one needs Lo LruncaLe or drop Lhese Lables Lo geL rld of Lhe old daLa lf
noL Lhe new daLa wlll be appended Lo Lhe exlsLlng Lables Cne musL always u8C exlsLlng Sequences before relmporLlng lf Lhe
sequences are noL dropped Lhey wlll generaLe numbers lnconslsLenL wlLh Lhe resL of Lhe daLabase noLe lL ls also advlsable Lo
drop lndexes before lmporLlng Lo speed up Lhe lmporL process lndexes can easlly be recreaLed afLer Lhe daLa was successfully
lmporLed
now can a button be used |n a report to g|ve a dr||| down fac|||ty?
8y seLLlng Lhe acLlon assoclaLed wlLh buLLon Lo LxecuLe pl/sql opLlon and uslng Lhe S8W8un_reporL funcLlon
Can one |mport]export between d|fferent vers|ons of Crac|e? (for D8A)
ulfferenL verslons of Lhe lmporL uLlllLy ls upwards compaLlble 1hls means LhaL one can Lake an exporL flle creaLed from an old
exporL verslon and lmporL lL uslng a laLer verslon of Lhe lmporL uLlllLy 1hls ls qulLe an effecLlve way of upgradlng a daLabase
from one release of Cracle Lo Lhe nexL
Cracle also shlps some prevlous caLexpxsql scrlpLs LhaL can be execuLed as user S?S enabllng older lmp/exp verslons Lo work
(for backwards compaLlblllLy) lor example one can run $C8ACLL_PCML/rdbms/admln/caLexp7sql on an Cracle 8 daLabase Lo
allow Lhe Cracle 73 exp/lmp uLlllLles Lo run agalnsL an Cracle 8 daLabase
What are d|fferent types of |mages?
8oller plaLe lmageslmage lLems
Can one export to mu|t|p|e f||es?] Can one beat the Un|x 2 G|g ||m|t? (for D8A)
lrom Cracle8l Lhe exporL uLlllLy supporLs mulLlple ouLpuL flles 1hls feaLure enables large exporLs Lo be dlvlded lnLo flles whose
slzes wlll noL exceed any operaLlng sysLem llmlLs (llLLSlZL parameLer) When lmporLlng from mulLlflle exporL you musL
provlde Lhe same fllenames ln Lhe same sequence ln Lhe llLL parameLer Look aL Lhls example
exp SCC11/1lCL8 llLLul1dmpLl2dmp llLLSlZL10m LCCscoLLlog
use Lhe followlng Lechnlque lf you use an Cracle verslon prlor Lo 8l
CreaLe a compressed exporL on Lhe fly uependlng on Lhe Lype of daLa you probably can exporL up Lo 10 glgabyLes Lo a slngle
flle 1hls example uses gzlp lL offers Lhe besL compresslon l know of buL you can also subsLlLuLe lL wlLh zlp compress or
whaLever
# creaLe a named plpe
mknod expplpe p
# read Lhe plpe ouLpuL Lo zlp flle ln Lhe background
gzlp scoLLexpgz
# feed Lhe plpe
exp userldscoLL/Llger flleexpplpe
What |s b|nd reference and how can |t be created?
8lnd reference are used Lo replace Lhe slngle value ln sql pl/sql sLaLemenLs a blnd reference can be creaLed uslng a () before a
column or a parameLer name
now can one |mprove Import] Lxport performance? (for D8A)
LxC81

SeL Lhe 8ullL8 parameLer Lo a hlgh value (eg 2M)
SeL Lhe 8LCC8uLLnC1P parameLer Lo a hlgh value (eg 64k)
SLop unnecessary appllcaLlons Lo freeup resources for your [ob
lf you run mulLlple exporL sesslons ensure Lhey wrlLe Lo dlfferenL physlcal dlsks
uC nC1 exporL Lo an nlS mounLed fllesysLem lL wlll Lake forever
lMC81

CreaLe an lndexflle so LhaL you can creaLe lndexes Al1L8 you have lmporLed daLa uo Lhls by seLLlng lnuLxllLL Lo a fllename
and Lhen lmporL no daLa wlll be lmporLed buL a flle conLalnlng lndex deflnlLlons wlll be creaLed ?ou musL edlL Lhls flle
afLerwards and supply Lhe passwords for Lhe schemas on all CCnnLC1 sLaLemenLs
lace Lhe flle Lo be lmporLed on a separaLe physlcal dlsk from Lhe oracle daLa flles
lncrease u8_CACPL_SlZL (u8_8LCCk_8ullL8S prlor Lo 9l) conslderably ln Lhe lnlL$Sluora flle
SeL Lhe LCC_8ullL8 Lo a blg value and resLarL oracle
SLop redo log archlvlng lf lL ls runnlng (AL1L8 uA1A8ASL nCA8CPlvLLCC)
CreaLe a 8lC Lablespace wlLh a 8lC rollback segmenL lnslde SeL all oLher rollback segmenLs offllne (excepL Lhe S?S1LM rollback
segmenL of course) 1he rollback segmenL musL be as blg as your blggesL Lable (l Lhlnk?)
use CCMMl1n ln Lhe lmporL parameLer flle lf you can afford lL
use AnAL?ZLn ln Lhe lmporL parameLer flle Lo avold Llme consumlng AnAL?ZL sLaLemenLs
8emember Lo run Lhe lndexflle prevlously creaLed
G|ve the sequence of execut|on of the var|ous report tr|ggers?
8efore form AfLer form 8efore reporL 8eLween page AfLer reporL
What are the common Import] Lxport prob|ems? (for D8A )
C8A00001 unlque consLralnL () vlolaLed ?ou are lmporLlng dupllcaLe rows use lCnC8LnC Lo sklp Lables LhaL already exlsL
(lmp wlll glve an error lf Lhe ob[ecL ls recreaLed)
C8A01333 SnapshoL Loo old Ask your users Lo S1C worklng whlle you are exporLlng or use parameLer CCnSlS1Ln1nC
C8A01362 lalled Lo exLend rollback segmenL CreaLe blgger rollback segmenLs or seL parameLer CCMMl1? whlle lmporLlng
lM00013 SLaLemenL falled ob[ecL already exlsLs use Lhe lCnC8L? lmporL parameLer Lo lgnore Lhese errors buL be
careful as you mlghL end up wlLh dupllcaLe rows
Why |s |t preferab|e to create a fewer no of quer|es |n the data mode|?
8ecause for each query reporL has Lo open a separaLe cursor and has Lo reblnd execuLe and feLch daLa
Where |s the externa| query executed at the c||ent or the server?
AL Lhe server
Where |s a procedure return |n an externa| p|]sq| ||brary executed at the c||ent or at the server?
AL Lhe cllenL
What |s coord|nat|on Lvent?
Any evenL LhaL makes a dlfferenL record ln Lhe masLer block Lhe currenL record ls a coordlnaLlon causlng evenL
What |s the d|fference between CLL Server C|e Conta|ner?
An Cle server appllcaLlon creaLes ole Cb[ecLs LhaL are embedded or llnked ln ole ConLalners ex Cle servers are ms_word
ms_excel CLL conLalners provlde a place Lo sLore dlsplay and manlpulaLe ob[ecLs LhaL are creaLed by ole server appllcaLlons
Lx oracle forms ls an example of an ole ConLalner
What |s an ob[ect group?
An ob[ecL group ls a conLalner for a group of ob[ecLs you deflne an ob[ecL group when you wanL Lo package relaLed ob[ecLs so
LhaL you copy or reference Lhem ln oLher modules
What |s an LCV?
An LCv ls a scrollable popup wlndow LhaL provldes Lhe operaLor wlLh elLher a slngle or mulLl column selecLlon llsL
At what po|nt of report execut|on |s the before keport tr|gger f|red?
AfLer Lhe query ls execuLed buL before Lhe reporL ls execuLed and Lhe records are dlsplayed
What are the bu||t |ns used for Mod|fy|ng a groups structure?
AuuC8Cu_CCLuMn (funcLlon)
Auu_C8Cu_8CW (procedure)
uLLL1L_C8Cu_8CW(procedure)
What |s an user ex|t used for?
A way ln whlch Lo pass conLrol (and posslbly argumenLs ) form Cracle reporL Lo anoLher Cracle producLs of 3 CL and Lhen reLurn
conLrol ( and ) back Lo Cracle reporLs
What |s the UserNamed Ld|tor?
A user named edlLor has Lhe same LexL edlLlng funcLlonallLy as Lhe defaulL edlLor buL because lL ls a named ob[ecL you can
speclfy edlLor aLLrlbuLes such as wlndows dlsplay slze poslLlon and LlLle
My database was term|nated wh||e |n 8ACkU MCDL do I need to recover? (for D8A)
lf a daLabase was LermlnaLed whlle one of lLs Lablespaces was ln 8ACku MCuL (AL1L8 1A8LLSACL xyz 8LCln 8ACku) lL wlll
Lell you LhaL medla recovery ls requlred when you Lry Lo resLarL Lhe daLabase 1he u8A ls Lhen requlred Lo recover Lhe daLabase
and apply all archlved logs Lo Lhe daLabase Powever from Cracle72 you can slmply Lake Lhe lndlvldual daLaflles ouL of backup
mode and resLarL Lhe daLabase
AL1L8 uA1A8ASL uA1AllLL /paLh/fllename Lnu 8ACku
Cne can selecL from v$8ACku Lo see whlch daLaflles are ln backup mode 1hls normally saves a slgnlflcanL amounL of daLabase
down Llme
1hlru vadlvelu conLrlbuLed Lhe followlng
lrom Cracle9l onwards Lhe followlng command can be used Lo Lake all of Lhe daLaflles ouL of hoL backup mode
AL1L8 uA1A8ASL Lnu 8ACku
1he above commands need Lo be lssued when Lhe daLabase ls mounLed
What |s a Stat|c kecord Group?
A sLaLlc record group ls noL assoclaLed wlLh a query raLher you deflne lLs sLrucLure and row values aL deslgn Llme and Lhey
remaln flxed aL runLlme
What |s a record group?
A record group ls an lnLernal Cracle lorms LhaL sLrucLure LhaL has a column/row framework slmllar Lo a daLabase Lable
Powever unllke daLabase Lables record groups are separaLe ob[ecLs LhaL belong Lo Lhe form module whlch Lhey are deflned
My database |s down and I cannot restore What now? (for D8A )
8ecovery wlLhouL any backup ls normally noL supporLed however Cracle ConsulLlng can someLlmes exLracL daLa from an
offllne daLabase uslng a uLlllLy called uuL (ulsk unLoad) 1hls uLlllLy reads daLa ln Lhe daLa flles and unloads lL lnLo SCL*Loader
or exporL dump flles uuL does noL care abouL rollback segmenLs corrupLed blocks eLc and can Lhus noL guaranLee LhaL Lhe
daLa ls noL loglcally corrupL lL ls lnLended as an absoluLe lasL resorL and wlll mosL llkely cosL your company a loL of money!!!
Ive |ost my kLDCLCG f||es how can I get my D8 back? (for D8A)
1he followlng lnl1C8A parameLer may be requlred lf your currenL redo logs are corrupLed or blown away CauLlon ls advlsed
when enabllng Lhls parameLer as you mlghL endup loslng your enLlre daLabase lease conLacL Cracle SupporL before uslng lL
_allow_reseLlogs_corrupLlon Lrue
What |s a property c|ause?
A properLy clause ls a named ob[ecL LhaL conLalns a llsL of properLles and Lhelr seLLlngs Cnce you creaLe a properLy clause you
can base oLher ob[ecL on lL An ob[ecL based on a properLy can lnherlL Lhe seLLlng of any properLy ln Lhe clause LhaL makes sense
for LhaL ob[ecL
What |s a phys|ca| page ? What |s a |og|ca| page ?
A physlcal page ls a slze of a page 1haL ls ouLpuL by Lhe prlnLer 1he loglcal page ls Lhe slze of one page of Lhe acLual reporL as
seen ln Lhe revlewer
Ive |ost some ko||back Segments how can I get my D8 back? (for D8A)
8esLarL your daLabase wlLh Lhe followlng lnl1C8A parameLer lf one of your rollback segmenLs ls corrupLed ?ou can Lhen drop
Lhe corrupLed rollback segmenLs and creaLe lL from scraLch
CauLlon ls advlsed when enabllng Lhls parameLer as uncommlLLed LransacLlons wlll be marked as commlLLed Cne can very well
end up wlLh losL or lnconslsLenL daLa!!! lease conLacL Cracle SupporL before uslng lL _CorrupLed_rollback_segmenLs (rbs01
rbs01 rbs03 rbs04)
What are the d|fferences between L8U and kMAN? (for D8A)
LnLerprlse 8ackup uLlllLy (L8u) ls a funcLlonally rlch hlgh performance lnLerface for backlng up Cracle7 daLabases lL ls
someLlmes referred Lo as CL8u for Cracle LnLerprlse 8ackup uLlllLy 1he Cracle 8ecovery Manager (8MAn) uLlllLy LhaL shlps
wlLh Cracle8 and above ls slmllar Lo Cracle7s L8u uLlllLy Powever Lhere ls no dlrecL upgrade paLh from L8u Lo 8MAn
now does one create a kMAN recovery cata|og? (for D8A)
SLarL by creaLlng a daLabase schema (usually called rman) Asslgn an approprlaLe Lablespace Lo lL and granL lL Lhe
recovery_caLalog_owner role Look aL Lhls example
sqlplus sys
SCLcreaLe user rman ldenLlfled by rman
SCL alLer user rman defaulL Lablespace Lools Lemporary Lablespace Lemp
SCL alLer user rman quoLa unllmlLed on Lools
SCL granL connecL resource recovery_caLalog_owner Lo rman
SCL exlL
nexL log ln Lo rman and creaLe Lhe caLalog schema rlor Lo Cracle 8l Lhls was done by runnlng Lhe caLrmansql scrlpL rman
caLalog rman/rman
8MAncreaLe caLalog Lablespace Lools
8MAn exlL
?ou can now conLlnue by reglsLerlng your daLabases ln Lhe caLalog Look aL Lhls example
rman caLalog rman/rman LargeL backdba/backdba
8MAn reglsLer daLabase
now can a group |n a cross products be v|sua||y d|st|ngu|shed from a group that does not form a cross product?
A group LhaL forms parL of a cross producL wlll have a Lhlcker border
What |s the frame repeat|ng frame?
A frame ls a holder for a group of flelds A repeaLlng frame ls used Lo dlsplay a seL of records when Lhe no of records LhaL are Lo
dlsplayed ls noL known before
What |s a combo box?
A combo box sLyle llsL lLem comblnes Lhe feaLures found ln llsL and LexL lLem unllke Lhe pop llsL or Lhe LexL llsL sLyle llsL lLems
Lhe combo box sLyle llsL lLem wlll boLh dlsplay flxed values and accepL one operaLor enLered value
What are three panes that appear |n the run t|me p|]sq| |nterpreter?
1 Source pane
2 lnLerpreLer pane
3 navlgaLor pane
What are the two panes that Appear |n the des|gn t|me p|]sq| |nterpreter?
1 Source pane
2 lnLerpreLer pane
What are the two ways by wh|ch data can be generated for a parameters ||st of va|ues?
1 uslng sLaLlc values
2 WrlLlng selecL sLaLemenL
What are the var|ous methods of perform|ng a ca|cu|at|on |n a report ?
1 erform Lhe calculaLlon ln Lhe SCL sLaLemenLs lLself
2 use a calculaLed / summary column ln Lhe daLa model
What are the defau|t extens|ons of the f||es created by menu modu|e?
mmb
mmx
What are the defau|t extens|ons of the f||es created by forms modu|es?
fmb form module blnary
fmx form module execuLable
1o d|sp|ay the page no for each page on a report what wou|d be the source |og|ca| page no or of phys|ca| page no?
physlcal page no
It |s poss|b|e to use raw dev|ces as data f||es and what |s the advantages over f||e system f||es ?
?es 1he advanLages over flle sysLem flles l/C wlll be lmproved because Cracle ls byepasslng Lhe kernnel whlch wrlLlng lnLo
dlsk ulsk CorrupLlon wlll be very less
What are d|sadvantages of hav|ng raw dev|ces ?
We should depend on exporL/lmporL uLlllLy for backup/recovery (fully rellable) 1he Lar command cannoL be used for physlcal
flle backup lnsLead we can use dd command whlch ls less flexlble and has llmlLed recoverles
What |s the s|gn|f|cance of hav|ng storage c|ause ?
We can plan Lhe sLorage for a Lable as how much lnlLlal exLenLs are requlred how much can be exLended nexL how much
should leave free for managlng row updaLlons eLc
What |s the use of INC1L opt|on |n Lk command ?
1ype exporL should be performed CCMLL1LCuMuLA1lvLlnC8LMLn1AL LlsL Lhe sequence of evenLs when a large
LransacLlon LhaL exceeds beyond lLs opLlmal value when an enLry wraps and causes Lhe rollback segmenL Loexpand lnLo anoLlon
CompleLes e wlll be wrlLLen
What |s the use of IILL opt|on |n IM command ?
1he name of Lhe flle from whlch lmporL should be performed
What |s a Shared SL poo|?
1he daLa dlcLlonary cache ls sLored ln an area ln SCA called Lhe Shared SCL ool 1hls wlll allow sharlng of parsed SCL
sLaLemenLs among concurrenL users
What |s hot backup and how |t can be taken?
1aklng backup of archlve log flles when daLabase ls open lor Lhls Lhe A8CPlvLLCC mode should be enabled 1he followlng flles
need Lo be backed up All daLa flles All Archlve log redo log flles All conLrol flles
L|st the Cpt|ona| I|ex|b|e Arch|tecture (CIA) of Crac|e database? or now can we organ|ze the tab|espaces |n Crac|e database
to have max|mum performance ?
S?S1LM uaLa dlcLlonary Lables
uA1A SLandard operaLlonal Lables
uA1A2 SLaLlc Lables used for sLandard operaLlons
lnuLxLS lndexes for SLandard operaLlonal Lables
lnuLxLS1 lndexes of sLaLlc Lables used for sLandard operaLlons
1CCLS 1ools Lable
1CCLS1 lndexes for Lools Lable
88S SLandard CperaLlons 8ollback SegmenLs
88S188S2 AddlLlonal/Speclal 8ollback segmenLs
1LM 1emporary purpose Lablespace
1LM_uSL8 1emporary Lablespace for users
uSL8S user Lablespace
now to |mp|ement the mu|t|p|e contro| f||es for an ex|st|ng database ?
ShuLdown Lhe daLabase Copy one of Lhe exlsLlng conLrol flle Lo new locaLlon LdlL Conflg ora flle by addlng new conLrol flle
name 8esLarL Lhe daLabase
What |s advantage of hav|ng d|sk shadow|ng] M|rror|ng ?
Shadow seL of dlsks save as a backup ln Lhe evenL of dlsk fallure ln mosL CperaLlng SysLem lf any dlsk fallure occurs lL
auLomaLlcally swlLchover Lo place of falled dlsk lmproved performance because mosL CS supporL volume shadowlng can dlrecL
flle l/C requesL Lo use Lhe shadow seL of flles lnsLead of Lhe maln seL of flles 1hls reduces l/C load on Lhe maln seL of dlsks
now w||| you force database to use part|cu|ar ro||back segment ?
SL1 18AnSAC1lCn uSL 8CLL8ACk SLCMLn1 rbs_name
Why query fa||s somet|mes ?
8ollback segmenL dynamlcally exLenL Lo handle larger LransacLlons enLry loads A slngle LransacLlon may wlpeouL all avallable
free space ln Lhe 8ollback SegmenL 1ablespace 1hls prevenLs oLher user uslng 8ollback segmenLs
What |s the use of kLCCkD LLNG1n opt|on |n Lk command ?
8ecord lengLh ln byLes
now w||| you mon|tor ro||back segment status ?
Cuerylng Lhe u8A_8CLL8ACk_SLCS vlew
ln uSL 8ollback SegmenL ls onllne
AvAlLA8LL 8ollback SegmenL avallable buL noL onllne
CllLlnL 8ollback SegmenL offllne
lnvALlu 8ollback SegmenL uropped
nLLuS 8LCCvL8? ConLalns daLa buL need recovery or corupLed
A81L? AvAlLA8LL ConLalns daLa from an unresolved LransacLlon lnvolvlng a dlsLrlbuLed daLabase
What |s meant by kedo Log f||e m|rror|ng ? now |t can be ach|eved?
rocess of havlng a copy of redo log flles ls called mlrrorlng 1hls can be achleved by creaLlng group of log flles LogeLher so LhaL
LCW8 wlll auLomaLlcally wrlLes Lhem Lo all Lhe members of Lhe currenL onllne redo log group lf any one group falls Lhen
daLabase auLomaLlcally swlLch over Lo nexL group lL degrades performance
Wh|ch parameter |n Storage c|ause w||| reduce no of rows per b|ock?
C1l8LL parameLer
8ow slze also reduces no of rows per block
What |s meant by recurs|ve h|nts ?
number of Llmes processes repeaLedly query Lhe dlcLlonary Lable ls called recurslve hlnLs lL ls due Lo Lhe daLa dlcLlonary cache
ls Loo small 8y lncreaslng Lhe SPA8Lu_CCL_SlZL parameLer we can opLlmlze Lhe slze of uaLa ulcLlonary Cache
What |s the use of AkIILL opt|on |n Lk command ?
name of Lhe parameLer flle Lo be passed for exporL
What |s the d|fference between |ocks |atches enqueues and semaphores? (for D8A)
A laLch ls an lnLernal Cracle mechanlsm used Lo proLecL daLa sLrucLures ln Lhe SCA from slmulLaneous access ALomlc hardware
lnsLrucLlons llke 1LS1AnuSL1 ls used Lo lmplemenL laLches LaLches are more resLrlcLlve Lhan locks ln LhaL Lhey are always
excluslve LaLches are never queued buL wlll spln or sleep unLll Lhey obLaln a resource or Llme ouL
Lnqueues and locks are dlfferenL names for Lhe same Lhlng 8oLh supporL queulng and concurrency 1hey are queued and
servlced ln a flrsLlnflrsLouL (lllC) order
Semaphores are an operaLlng sysLem faclllLy used Lo conLrol walLlng Semaphores are conLrolled by Lhe followlng unlx
parameLers semmnl semmns and semmsl 1yplcal seLLlngs are
semmns sum of Lhe processes parameLer for each lnsLance
(see lnlLora for each lnsLance)
semmnl number of lnsLances runnlng slmulLaneously
semmsl semmns
What |s a |og|ca| backup?
Loglcal backup lnvolves readlng a seL of daLabase records and wrlLlng Lhem lnLo a flle LxporL uLlllLy ls used for Laklng backup
and lmporL uLlllLy ls used Lo recover from backup
Where can one get a ||st of a|| h|dden Crac|e parameters? (for D8A)
Cracle lnlLlallzaLlon or lnl1C8A parameLers wlLh an underscore ln fronL are hldden or unsupporLed parameLers Cne can geL a
llsL of all hldden parameLers by execuLlng Lhls query
selecL *
from S?Sx$kSl
where subsLr(kSlnM11) _
1he followlng query dlsplays parameLer names wlLh Lhelr currenL value
selecL akspplnm arameLer bksppsLvl Sesslon value cksppsLvl lnsLance value
from x$ksppl a x$ksppcv b x$ksppsv c
where alndx blndx and alndx clndx
and subsLr(kspplnm11)_
order by akspplnm
8emember 1hou shall noL play wlLh undocumenLed parameLers!
What |s a database LVLN1 and how does one set |t? (for D8A)
Cracle Lrace evenLs are useful for debugglng Lhe Cracle daLabase server 1he followlng Lwo examples are slmply Lo demonsLraLe
synLax 8efer Lo laLer noLes on Lhls page for an explanaLlon of whaL Lhese parLlcular evenLs do
LlLher addlng Lhem Lo Lhe lnl1C8A parameLer flle can acLlvaLe evenLs Lg
evenL1401 Lrace name errorsLack level 12
or by lssulng an AL1L8 SLSSlCn SL1 LvLn1S command Lg
alLer sesslon seL evenLs 10046 Lrace name conLexL forever level 4
1he alLer sesslon meLhod only affecLs Lhe users currenL sesslon whereas changes Lo Lhe lnl1C8A flle wlll affecL all sesslons
once Lhe daLabase has been resLarLed
What |s a ko||back segment entry ?
lL ls Lhe seL of before lmage daLa blocks LhaL conLaln rows LhaL are modlfled by a LransacLlon Lach 8ollback SegmenL enLry musL
be compleLed wlLhln one rollback segmenL A slngle rollback segmenL can have mulLlple rollback segmenL enLrles
What database events can be set? (for D8A)
1he followlng evenLs are frequenLly used by u8As and Cracle SupporL Lo dlagnose problems
10046 Lrace name conLexL forever level 4 1race SCL sLaLemenLs and show blnd varlables ln Lrace ouLpuL
10046 Lrace name conLexL forever level 8 1hls shows walL evenLs ln Lhe SCL Lrace flles
10046 Lrace name conLexL forever level 12 1hls shows boLh blnd varlable names and walL evenLs ln Lhe SCL Lrace flles
1401 Lrace name errorsLack level 12 1401 Lrace name errorsLack level 4 1401 Lrace name processsLaLe uumps ouL Lrace
lnformaLlon lf an C8A1401 lnserLed value Loo large for column error occurs 1he 1401 can be replaced by any oLher Cracle
Server error code LhaL you wanL Lo Lrace
60 Lrace name errorsLack level 10 Show where ln Lhe code Cracle geLs a deadlock (C8A60) and may help Lo dlagnose Lhe
problem
1he followlng llsLs of evenLs are examples only 1hey mlghL be verslon speclflc so please call Cracle before uslng Lhem
10210 Lrace name conLexL forever level 10 10211 Lrace name conLexL forever level 10 10231 Lrace name conLexL forever
level 10 1hese evenLs prevenL daLabase block corrupLlons
10049 Lrace name conLexL forever level 2 Memory proLecL cursor
10210 Lrace name conLexL forever level 2 uaLa block check
10211 Lrace name conLexL forever level 2 lndex block check
10233 Lrace name conLexL forever level 1 Memory heap check
10262 Lrace name conLexL forever level 300 Allow 300 byLes memory leak for connecLlons
noLe ?ou can use Lhe unlx oerr command Lo geL Lhe descrlpLlon of an evenL Cn unlx you can Lype oerr ora 10033 from Lhe
command prompL Lo geL evenL deLalls
now can one dump |nterna| database structures? (for D8A)
1he followlng (mosLly undocumenLed) commands can be used Lo obLaln lnformaLlon abouL lnLernal daLabase sLrucLures
o uump conLrol flle conLenLs
alLer sesslon seL evenLs lmmedlaLe Lrace name CCn18CLl level 10
/
o uump flle headers
alLer sesslon seL evenLs lmmedlaLe Lrace name llLL_Pu8S level 10
/
o uump redo log headers
alLer sesslon seL evenLs lmmedlaLe Lrace name 8LuCPu8 level 10
/
o uump Lhe sysLem sLaLe
nC1L 1ake 3 successlve S?S1LMS1A1L dumps wlLh 10mlnuLe lnLervals alLer sesslon seL evenLs lmmedlaLe Lrace name
S?S1LMS1A1L level 10
/
o uump Lhe process sLaLe
alLer sesslon seL evenLs lmmedlaLe Lrace name 8CCLSSS1A1L level 10
/
o uump Llbrary Cache deLalls
alLer sesslon seL evenLs lmmedlaLe Lrace name llbrary cache level 10
/
o uump opLlmlzer sLaLlsLlcs whenever a SCL sLaLemenL ls parsed (hlnL change sLaLemenL or flush pool) alLer sesslon seL evenLs
10033 Lrace name conLexL forever level 1
/
o uump a daLabase block (llle/ 8lock musL be converLed Lo u8A address) ConverL flle and block number Lo a u8A (daLabase
block address)
Lg varlable x varchar2
exec x dbms_uLlllLymake_daLa_block_address(112)
prlnL x
alLer sesslon seL evenLs lmmedlaLe Lrace name blockdump level 30360894
/
What are the d|fferent k|nd of export backups?
lull back CompleLe daLabase
lncremenLal Cnly affecLed Lables from lasL lncremenLal daLe/full backup daLe
CumulaLlve backup Cnly affecLed Lable from Lhe lasL cumulaLlve daLe/full backup daLe
now free extents are managed |n Ver 60 and Ver 70 ?
lree exLenLs cannoL be merged LogeLher ln ver 60
lree exLenLs are perlodlcally coalesces wlLh Lhe nelghborlng free exLenL ln ver 70
What |s the use of kLCCkD opt|on |n Lk command?
lor lncremenLal exporLs Lhe flag lndlrecLs wheLher a record wlll be sLores daLa dlcLlonary Lables recordlng Lhe exporL
What |s the use of kCWS opt|on |n Lk command ?
llag Lo lndlcaLe wheLher Lable rows should be exporLed lf n only uuL sLaLemenLs for Lhe daLabase ob[ecLs wlll be creaLed
What |s the use of CCMkLSS opt|on |n Lk command ?
llag Lo lndlcaLe wheLher exporL should compress fragmenLed segmenLs lnLo slngle exLenLs
now w||| you swap ob[ects |nto a d|fferent tab|e space for an ex|st|ng database ?
LxporL Lhe user
erform lmporL uslng Lhe command lmp sysLem/manager flleexporLdmp lndexfllenewrlLesql
1hls wlll creaLe all deflnlLlons lnLo newfllesql urop necessary ob[ecLs
8un Lhe scrlpL newfllesql afLer alLerlng Lhe Lablespaces
lmporL from Lhe backup for Lhe necessary ob[ecLs
now does Space a||ocat|on tab|e p|ace w|th|n a b|ock ?
Lach block conLalns enLrles as follows
llxed block header
varlable block header
8ow Peaderrow daLe (mulLlple rows may exlsLs)
C1L8LL ( of free space for row updaLlon ln fuLure)
What are the factors caus|ng the repars|ng of SL statements |n SGA?
uue Lo lnsufflclenL Shared SCL pool slze MonlLor Lhe raLlo of Lhe reloads Lakes place whlle execuLlng SCL sLaLemenLs lf Lhe
raLlo ls greaLer Lhan 1 Lhen lncrease Lhe SPA8Lu_CCL_SlZL LCClCAL P?SlCAL A8CPl1LC1u8L Cl uA1A8ASL
What |s d|ct|onary cache ?
ulcLlonary cache ls lnformaLlon abouL Lhe daLabse ob[ecLs sLored ln a daLa dlcLlonary Lable
What |s a Contro| f||e ?
uaLabase overall physlcal archlLecLure ls malnLalned ln a flle called conLrol flle lL wlll be used Lo malnLaln lnLernal conslsLency
and gulde recovery operaLlons MulLlple coples of conLrol flles are advlsable
What |s Database 8uffers ?
uaLabase buffers are cache ln Lhe SCA used Lo hold Lhe daLa blocks LhaL are read from Lhe daLa segmenLs ln Lhe daLabase such
as Lables lndexes and clusLers u8_8LCCk_8ullL8S parameLer ln lnl1C8A decldes Lhe slze
now w||| you create mu|t|p|e ro||back segments |n a database ?
CreaLe a daLabase whlch lmpllclLly creaLes a S?S1LM 8ollback SegmenL ln a S?S1LM Lablespace CreaLe a Second 8ollback
SegmenL name 80 ln Lhe S?S1LM Lablespace Make new rollback segmenL avallable (AfLer shuLdown modlfy lnlLora flle and
SLarL daLabase) CreaLe oLher Lablespaces (88S) for rollback segmenLs ueacLlvaLe 8ollback SegmenL 80 and acLlvaLe Lhe newly
creaLed rollback segmenLs
What |s co|d backup? What are the e|ements of |t?
Cold backup ls Laklng backup of all physlcal flles afLer normal shuLdown of daLabase We need Lo Lake
All uaLa flles
All ConLrol flles
All onllne redo log flles
1he lnlLora flle (CpLlonal)
What |s meant by redo |og buffer ?
Changes made Lo enLrles are wrlLLen Lo Lhe onllne redo log flles So LhaL Lhey can be used ln roll forward operaLlons durlng
daLabase recoverles 8efore wrlLlng Lhem lnLo Lhe redo log flles Lhey wlll flrsL broughL Lo redo log buffers ln SCA and LCW8 wlll
wrlLe lnLo flles frequenLly LCC_8ullL8 parameLer wlll declde Lhe slze
now w||| you est|mate the space requ|red by a nonc|ustered tab|es?
CalculaLe Lhe LoLal header slze
CalculaLe Lhe avallable daLaspace per daLa block
CalculaLe Lhe comblned column lengLhs of Lhe average row
CalculaLe Lhe LoLal average row slze
CalculaLe Lhe average number rows LhaL can flL ln a block
CalculaLe Lhe number of blocks and byLes requlred for Lhe Lable
AfLer arrlvlng Lhe calculaLlon add 10 addlLlonal space Lo calculaLe Lhe lnlLlal exLenL slze for a worklng Lable
now w||| you mon|tor the space a||ocat|on ?
8y querylng u8A_SLCMLn1 Lable/vlew
What |s meant by free extent ?
A free exLenL ls a collecLlon of conLlnuous free blocks ln Lablespace When a segmenL ls dropped lLs exLenLs are reallocaLed and
are marked as free
What |s the use of IGNCkL opt|on |n IM command ?
A flag Lo lndlcaLe wheLher Lhe lmporL should lgnore errors encounLer when lssulng C8LA1L commands
What |s the use of ANALSL ( Ver 7) opt|on |n Lk command ?
A flag Lo lndlcaLe wheLher sLaLlsLlcal lnformaLlon abouL Lhe exporLed ob[ecLs should be wrlLLen Lo exporL dump flle
What |s the use of kCWS opt|on |n IM command ?
A flag Lo lndlcaLe wheLher rows should be lmporLed lf Lhls ls seL Lo n Lhen only uuL for daLabase ob[ecLs wlll be execuLed
What |s the use of INDLkLS opt|on |n Lk command ?
A flag Lo lndlcaLe wheLher lndexes on Lables wlll be exporLed
What |s the use of INDLkLS opt|on |n IM command ?
A flag Lo lndlcaLe wheLher lmporL should lmporL lndex on Lables or noL
What |s the use of GkAN1 opt|on |n Lk command?
A flag Lo lndlcaLe wheLher granLs on daLabse ob[ecLs wlll be exporLed or noL value ls ? or n
What |s the use of GkAN1 opt|on |n IM command ?
A flag Lo lndlcaLe wheLher granLs on daLabase ob[ecLs wlll be lmporLed
What |s the use of IULL opt|on |n Lk command ?
A flag Lo lndlcaLe wheLher full daLabse exporL should be performed
What |s the use of SnCW opt|on |n IM command ?
A flag Lo lndlcaLe wheLher flle conLenL should be dlsplayed or noL
What |s the use of CCNS1kAIN1S opt|on |n Lk command ?
A flag Lo lndlcaLe wheLher consLralnLs on Lable need Lo be exporLed
What |s the use of CCNSIS1LN1 (Ver 7) opt|on |n Lk command ?
A flag Lo lndlcaLe wheLher a read conslsLenL verslon of all Lhe exporLed ob[ecLs should be malnLalned
What are the d|fferent methods of back|ng up orac|e database ?
Loglcal 8ackups
Cold 8ackups
PoL 8ackups (Archlve log)
What |s the d|fference between CNVALIDA1LIILLD tr|gger and a CS1CnANGL tr|gger ?
When you changes Lhe LxlsLlng value Lo null Lhe CnvalldaLe fleld Lrlgger wlll flre posL change Lrlgger wlll noL flre AL Lhe Llme of
execuLequery posLchange Lrlgger wlll flre onvalldaLe fleld Lrlgger wlll noL flre
When |s kLULk tr|gger executed ?
When LxecuLequery or counLquery ackage procedures are lnvoked
now do you trap the error |n forms 30 ?
uslng CnMessage or CnLrror Lrlggers
now many pages you can |n a s|ng|e form ?
unllmlLed
Wh||e spec|fy|ng master]deta|| re|at|onsh|p between two b|ocks spec|fy|ng the [o|n cond|t|on |s a must ?
1rue or Ia|se ?
1rue
LkI1_ICkM |s a restr|cted package procedure ?
a 1rue b Ia|se
1rue
What |s the usage of an CNINSLk1CNDLLL1L and CNUDA1L 1kIGGLkS ?
1hese Lrlggers are execuLes when lnserLlng deleLlng and updaLlng operaLlons are performed and can be used Lo change Lhe
defaulL funcLlon of lnserL deleLe or updaLe respecLlvely lor Lg lnsLead of lnserLlng a row ln a Lable an exlsLlng row can be
updaLed ln Lhe same Lable
What are the types of opup w|ndow ?
Lhe popup fleld edlLor
popup llsL of values
popup pages
AlerL
What |s an SL *ICkMS ?
SCL *forms ls 4CL Lool for developlng and execuLlng Cracle based lnLeracLlve appllcaLlon
now do you contro| the constra|nts |n forms ?
SelecL Lhe use consLralnL properLy ls Cn 8lock deflnlLlon screen
8LCCk
What |s the d|fference between restr|cted and unrestr|cted package procedure ?
8esLrlcLed package procedure LhaL affecLs Lhe baslc funcLlons of SCL * lorms lL cannoL used ln all Lrlggers excepL key Lrlggers
unresLrlcLed package procedure LhaL does noL lnLerfere wlLh Lhe baslc funcLlons of SCL * lorms lL can be used ln any Lrlggers
A query fetched 10 records now many t|mes does a kLULk 1r|gger and CS1ULk 1r|gger w||| get executed ?
8LCuL8? flres once
CS1CuL8? flres 10 Llmes
G|ve the sequence |n wh|ch tr|ggers f|red dur|ng |nsert operat|ons when the fo||ow|ng 3 tr|ggers are def|ned at the same
b|ock |eve| ?
a CnlnSL81 b CS1lnSL81 c 8LlnSL81
State the order |n wh|ch these tr|ggers are executed ?
CS1llLLuCnvALluA1LllLLuCS1CPAnCL and kL?nLx1lLu kL?nLx1lLuCS1CPAnCL CnvALluA1LllLLu CS1
llLLu g
What the AUSL package procedure does ?
ause suspends processlng unLll Lhe operaLor presses a funcLlon key
What do you mean by a page ?
ages are collecLlon of dlsplay lnformaLlon such as consLanL LexL and graphlcs
What are the type of User Lx|ts ?
C8ACLL recompllers user exlLs
CCl (C8ACLL Call lnLerface)
nonC8ACLL user exlLs
age
What |s the d|fference between an CNVALIDA1LIILLD tr|gger and a tr|gger ?
CnvalldaLefleld Lrlgger flres when Lhe fleld valldaLlon sLaLus new or changed osLfleldLrlgger whenever Lhe conLrol leavlng
form Lhe fleld lL wlll flre
Can we use a restr|cted package procedure |n CNVALIDA1LIILLD 1r|gger ?
no
Is a key startup tr|gger f|res as resu|t of a operator press|ng a key exp||c|t|y ?
no
Can we use GC8LCCk package |n a pref|e|d tr|gger ?
no
Can we create two b|ocks w|th the same name |n form 30 ?
no
What does an onc|earb|ock 1r|gger f|re?
lL flres [usL before SCL * forms Lhe currenL block
Name the two f||es that are created when you generate the form g|ve the f||ex extens|on ?
ln (Source llle)
l8M (LxecuLable llle)
What package procedure used for |nvoke sq| *p|us from sq| *forms ?
PosL (Lg PosL (sqlplus))
What |s the s|gn|f|cance of AGL 0 |n forms 30 ?
Plde Lhe flelds for lnLernal calculaLlon
What are the d|fferent types of key tr|ggers ?
luncLlon key
keyfuncLlon
keyoLhers
keysLarLup
What |s the d|fference between a Iunct|on key 1r|gger and key Iunct|on 1r|gger ?
luncLlon key Lrlggers are assoclaLed wlLh lndlvldual SCL*lC8MS funcLlon keys ?ou can aLLach key funcLlon Lrlggers Lo 10 keys or
key sequences LhaL normally do noL perform any SCL * lC8MS operaLlons 1hese keys referred as key l0 Lhrough key l9
Comm|tted b|ock somet|mes refer to a 8ASL 1A8LL ?
lalse
When |s cost based opt|m|zat|on tr|ggered? (for D8A)
lLs lmporLanL Lo have sLaLlsLlcs on all Lables for Lhe C8C (CosL 8ased CpLlmlzer) Lo work correcLly lf one Lable lnvolved ln a
sLaLemenL does noL have sLaLlsLlcs Cracle has Lo reverL Lo rulebased opLlmlzaLlon for LhaL sLaLemenL So you really wanL for all
Lables Lo have sLaLlsLlcs rlghL away lL wonL help much Lo [usL have Lhe larger Lables analyzed
Cenerally Lhe C8C can change Lhe execuLlon plan when you
1 Change sLaLlsLlcs of ob[ecLs by dolng an AnAL?ZL
2 Change some lnlLlallzaLlon parameLers (for example hash_[oln_enabled sorL_area_slze db_flle_mulLlblock_read_counL)
now can one opt|m|ze k2 quer|es? (for D8A)
lL ls posslble Lo lmprove x?Z querles by forclng Lhe opLlmlzer Lo scan all Lhe enLrles from Lhe lndex lnsLead of Lhe Lable 1hls
can be done by speclfylng hlnLs lf Lhe lndex ls physlcally smaller Lhan Lhe Lable (whlch ls usually Lhe case) lL wlll Lake less Llme
Lo scan Lhe enLlre lndex Lhan Lo scan Lhe enLlre Lable
What Lnter package procedure does ?
LnLer valldaLedaLa ln Lhe currenL valldaLlon unlL
Where can one f|nd I]C stat|st|cs per tab|e? (for D8A)
1he u1LLS1A1 reporL shows l/C per Lablespace buL one cannoL see whaL Lables ln Lhe Lablespace has Lhe mosL l/C 1he
$C8ACLL_PCML/rdbms/admln/caLlosql scrlpL creaLes a sample_lo procedure and Lable Lo gaLher Lhe requlred lnformaLlon
AfLer execuLlng Lhe procedure one can do a slmple SLLLC1 * l8CM lo_per_ob[ecL Lo exLracL Lhe requlred lnformaLlon lor
more deLalls look aL Lhe header commenLs ln Lhe $C8ACLL_PCML/rdbms/admln/caLlosql scrlpL
My query was flne lasL week and now lL ls slow Why? (for u8A)
1he llkely cause of Lhls ls because Lhe execuLlon plan has changed CeneraLe a currenL explaln plan of Lhe offendlng query and
compare lL Lo a prevlous one LhaL was Laken when Lhe query was performlng well usually Lhe prevlous plan ls noL avallable
Some facLors LhaL can cause a plan Lo change are
Whlch Lables are currenLly analyzed? Were Lhey prevlously analyzed? (le Was Lhe query uslng 88C and now C8C?)
Pas C1lMlZL8_MCuL been changed ln lnl1C8A?
Pas Lhe uLC8LL of parallellsm been deflned/changed on any Lable?
Pave Lhe Lables been reanalyzed? Were Lhe Lables analyzed uslng esLlmaLe or compuLe? lf esLlmaLe whaL percenLage was
used?
Pave Lhe sLaLlsLlcs changed?
Pas Lhe lnl1C8A parameLer u8_llLL_MuL1l8LCCk_8LAu_CCun1 been changed?
Pas Lhe lnl1C8A parameLer SC81_A8LA_SlZL been changed?
Pave any oLher lnl1C8A parameLers been changed?
WhaL do you Lhlnk Lhe plan should be? 8un Lhe query wlLh hlnLs Lo see lf Lhls produces Lhe requlred performance
Why |s Crac|e not us|ng the damn |ndex? (for D8A)
1hls problem normally only arlses when Lhe query plan ls belng generaLed by Lhe CosL 8ased CpLlmlzer 1he usual cause ls
because Lhe C8C calculaLes LhaL execuLlng a lull 1able Scan would be fasLer Lhan accesslng Lhe Lable vla Lhe lndex
lundamenLal Lhlngs LhaL can be checked are
uSL8_1A8_CCLuMnSnuM_ulS1lnC1 1hls column deflnes Lhe number of dlsLlncL values Lhe column holds
uSL8_1A8LLSnuM_8CWS lf nuM_ulS1lnC1 nuM_8CWS Lhen uslng an lndex would be preferable Lo dolng a luLL 1A8LL
SCAn As Lhe nuM_ulS1lnC1 decreases Lhe cosL of uslng an lndex lncrease Lhereby ls maklng Lhe lndex less deslrable
uSL8_lnuLxLSCLuS1L8lnC_lAC1C8 1hls deflnes how ordered Lhe rows are ln Lhe lndex lf CLuS1L8lnC_lAC1C8
approaches Lhe number of blocks ln Lhe Lable Lhe rows are ordered lf lL approaches Lhe number of rows ln Lhe Lable Lhe rows
are randomly ordered ln such a case lL ls unllkely LhaL lndex enLrles ln Lhe same leaf block wlll polnL Lo rows ln Lhe same daLa
blocks
uecrease Lhe lnl1C8A parameLer u8_llLL_MuL1l8LCCk_8LAu_CCun1 A hlgher value wlll make Lhe cosL of a luLL 1A8LL
SCAn cheaper
8emember LhaL you MuS1 supply Lhe leadlng column of an lndex for Lhe lndex Lo be used (unless you use a lAS1 luLL SCAn
or Skl SCAnnlnC)
1here are many oLher facLors LhaL affecL Lhe cosL buL someLlmes Lhe above can help Lo show why an lndex ls noL belng used
by Lhe C8C lf from checklng Lhe above you sLlll feel LhaL Lhe query should be uslng an lndex Lry speclfylng an lndex hlnL CbLaln
an explaln plan of Lhe query elLher uslng 1k8Cl wlLh 1lMLu_S1A1lS1lCS so LhaL one can see Lhe Cu uLlllzaLlon or wlLh
Au1C18ACL Lo see Lhe sLaLlsLlcs Compare Lhls Lo Lhe explaln plan when noL uslng an lndex
When shou|d one rebu||d an |ndex? (for D8A)
?ou can run Lhe AnAL?ZL lnuLx vALluA1L S18uC1u8L command on Lhe affecLed lndexes each lnvocaLlon of Lhls command
creaLes a slngle row ln Lhe lnuLx_S1A1S vlew 1hls row ls overwrlLLen by Lhe nexL AnAL?ZL lnuLx command so copy Lhe
conLenLs of Lhe vlew lnLo a local Lable afLer each AnAL?ZL 1he badness of Lhe lndex can Lhen be [udged by Lhe raLlo of
uLL_Ll_8CWS Lo Ll_8CWS
What are the unrestr|cted procedures used to change the popup screen pos|t|on dur|ng run t|me ?
Anchorvlew
8eslze vlew
Movevlew
What |s an A|ert ?
An alerL ls wlndow LhaL appears ln Lhe mlddle of Lhe screen overlaylng a porLlon of Lhe currenL dlsplay
De|et|ng a page removes |nformat|on about a|| the f|e|ds |n that page ?
a 1rue b Ia|se
a 1rue
1wo popup pages can appear on the screen at a t|me ?1wo popup pages can appear on the screen at a t|me ?
a 1rue b Ia|se?
a 1rue
C|ass|fy the restr|cted and unrestr|cted procedure from the fo||ow|ng
a Ca||
b UserLx|t
c Ca||uery
d Up
e Lxecuteuery
f Message
g Lx|tIrom
h ost
| 8reak?

a Call unresLrlcLed
b user LxlL unresLrlcLed
c Call_query unresLrlcLed
d up 8esLrlcLed
e LxecuLe Cuery 8esLrlcLed
f Message 8esLrlcLed
g LxlL_form 8esLrlcLed
h osL 8esLrlcLed
l 8reak unresLrlcLed
What |s an User Lx|ts ?
A user exlL ls a subrouLlne whlch are wrlLLen ln programmlng languages uslng pro*C pro *Cobol eLc LhaL llnk lnLo Lhe SCL *
forms execuLable
What |s a 1r|gger ?
A plece of loglc LhaL ls execuLed aL or Lrlggered by a SCL *forms evenL
What |s a ackage rocedure ?
A ackage procedure ls bullL ln L/SCL procedure
What |s the max|mum s|ze of a form ?
233 characLer wldLh and 233 characLers LengLh
What |s the d|fference between systemcurrent_f|e|d and systemcursor_f|e|d ?
1 SysLemcurrenL_fleld glves name of Lhe fleld
2 SysLemcursor_fleld glves name of Lhe fleld wlLh block name
L|st the system var|ab|es re|ated |n 8|ock and I|e|d?
1 SysLemblock_sLaLus
2 SysLemcurrenL_block
3 SysLemcurrenL_fleld
4 SysLemcurrenL_value
3 SysLemcursor_block
6 SysLemcursor_fleld
7 SysLemfleld_sLaLus
What are the d|fferent types of ackage rocedure ?
1 8esLrlcLed package procedure
2 unresLrlcLed package procedure
What are the types of 1kIGGLkS ?
1 navlgaLlonal 1rlggers
2 1ransacLlon 1rlggers
Ident|fy package funct|on from the fo||ow|ng ?
1 LrrorCode
2 8reak
3 Ca||
4 Lrrortext
S Iormfa||ure
6 Iormfata|
7 Lxecutequery
Anchor V|ew
9 Message_code?

1 Lrror_Code
2 Lrror_1exL
3 lorm_lallure
4 lorm_laLal
3 Message_Code
Can you attach an |ov to a f|e|d at runt|me? |f yes g|ve the bu||d|n name?
?es SeL_lLem_propreLy
Is |t poss|b|e to attach same ||brary to more than one form?
?es
Can you attach an |ov to a f|e|d at des|gn t|me?
?es
L|st the w|ndows event tr|ggers ava||ab|e |n Iorms 40?
WhenwlndowacLlvaLed
whenwlndowclosed
whenwlndowdeacLlvaLed
whenwlndowreslzed
What are the tr|ggers assoc|ated w|th the |mage |tem?
WhenlmageacLlvaLed(llres when Lhe operaLor double cllcks on an lmage lLems)
Whenlmagepressed(flres when Lhe operaLor selecLs or deselecLs Lhe lmage lLem)
What |s a v|sua| attr|bute?
vlsual ALLrlbuLes are Lhe fonL color and paLLern characLerlsLlcs of ob[ecLs LhaL operaLors see and lnLracL wlLh ln our appllcaLlon
now many max|mum number of rad|o buttons can you ass|gn to a rad|o group?
unllmlLed no of radlo buLLons can be asslgned Lo a radlo group
now do you pass the parameters from one form to another form?
1o pass one or more parameLers Lo a called form Lhe calllng form musL perform Lhe followlng sLeps ln a Lrlgger or user named
rouLlne execuLe Lhe creaLe_parameLer_llsL bullLln funcLlon Lo programmaLlcally CreaLe a parameLer llsL Lo execuLe Lhe add
parameLer bullLln procedure Lo add one or more parameLers llsL LxecuLe Lhe call_form new_form or run_producL bullL_ln
procedure and lnclude Lhe name or ld of Lhe parameLer llsL Lo be passed Lo Lhe called form
What |s a Layout Ld|tor?
1he LayouL LdlLor ls a graphlcal deslgn faclllLy for creaLlng and arranglng lLems and bollerplaLe LexL and graphlcs ob[ecLs ln your
appllcaLlons lnLerface
L|st the 1ypes of Items?
1exL lLem
CharL lLem
Check box
ulsplay lLem
lmage lLem
LlsL lLem
8adlo Croup
user Area lLem
L|st system var|ab|es ava||ab|e |n forms 40 and not ava||ab|e |n forms 30?
SysLemcordlnaLlon_operaLlon
SysLem uaLe_Lhreshold
SysLemeffecLlve_uaLe
SysLemevenL_wlndow
SysLemsuppress_worklng
What are the d|sp|ay sty|es of an a|ert?
SLop CauLlon noLe
What bu||t|n |s used for show|ng the a|ert dur|ng runt|me?
Show_alerL
What bu||t|n |s used for chang|ng the propert|es of the w|ndow dynam|ca||y?
SeL_wlndow_properLy
Canvasvlew
What are the d|fferent types of w|ndows?
8ooL wlndow secondary wlndow
What |s a predef|ned except|on ava||ab|e |n forms 40?
8alse form_Lrlgger_fallure
What |s a rad|o Group?
8adlo groups dlsplay a flxed no of opLlons LhaL are muLually Lxcluslve user can selecL one ouL of n number of opLlons
What are the d|fferent type of a record group?
Cuery record group
SLaLlc record group
non query record group
What are the menu |tems that orac|e forms 40 supports?
laln Check8adlo SeparaLor Maglc
G|ve the equ|va|ent term |n forms 40 for the fo||ow|ng age age 0?
age Canvasvlew
age 0 Canvasvlew null
What tr|ggers are assoc|ated w|th the rad|o group?
Cnly whenradlochanged Lrlgger assoclaLed wlLh radlo group
vlsual ALLrlbuLes
What are the tr|ggers assoc|ated w|th a check box?
Cnly WhencheckboxacLlvaLed 1rlgger assoclaLed wlLh a Check box
Can you attach an a|ert to a f|e|d?
no
Can a root w|ndow be made moda|?
no
What |s a ||st |tem?
lL ls a llsL of LexL elemenLs
L|st some bu||t|n rout|nes used to man|pu|ate |mages |n |mage_|tem?
lmage_add
lmage_and
lmage_subLracL
lmage_xor
lmage_zoom
Can you change the a|ert messages at runt|me?
lf yes glve Lhe name of Lhe bullLln Lo change Lhe alerL messages aL runLlme ?es SeL_alerL_properLy
What |s the bu||t|n used to get and set |ov propert|es dur|ng runt|me?
CeL_lov_properLy
SeL_lov_properLy
8ecord Croup
What |s the bu||t|n rout|ne used to count the no of rows |n a group?
CeL_group _row_counL
SysLem varlables
G|ve the 1ypes of modu|es |n a form?
lorm
Menu
Llbrary
Wr|te the Abbrev|at|on for the fo||ow|ng I||e Lxtens|on 1 IM8 2 MM8 3 LL?
lM8 lorm Module 8lnary
MM8 Menu Module 8lnary
LL L/SCL Llbrary Module 8lnary
L|st the bu||t|n rout|ne for contro|||ng w|ndow dur|ng runt|me?
llnd_wlndow
geL_wlndow_properLy
hlde_wlndow
move_wlndow
reslze_wlndow
seL_wlndow_properLy
show_vlew
L|st the bu||t|n rout|ne for contro|||ng w|ndow dur|ng runt|me?
llnd_canvas
CeLCanvas_properLy
CeL_vlew_properLy
Plde_vlew
8eplace_conLenL_vlew
Scroll_vlew
SeL_canvas_properLy
SeL_vlew_properLy
Show_vlew
AlerL
What |s the bu||t|n funct|on used for f|nd|ng the a|ert?
llnd_alerL
LdlLors
L|st the ed|tors ava||ab|es |n forms 40?
uefaulL edlLor
user_deflned edlLors
sysLem edlLors
What bu|||n rout|nes are used to d|sp|ay ed|tor dynam|ca||y?
LdlL_LexL lLem
show_edlLor
LCv
What |s an Lov?
A llsL of values ls a slngle or mulLl column selecLlon llsL dlsplayed ln a popup wlndow
What |s a record Group?
A record group ls an lnLernal oracle forms daLa sLrucLure LhaL has a slmllar column/row frame work Lo a daLabase Lable
G|ve bu||t|n rout|ne re|ated to a record groups?
CreaLe_group (luncLlon)
CreaLe_group_from_query(luncLlon)
ueleLe_group(rocedure)
Add_group_column(luncLlon)
Add_group_row(rocedure)
ueleLe_group_row(rocedure)
opulaLe_group(luncLlon)
opulaLe_group_wlLh_query(luncLlon)
SeL_group_Char_cell(procedure)
L|st the bu||t|n rout|nes for the contro|||ng canvas v|ews dur|ng runt|me?
llnd_canvas
CeLCanvas_properLy
CeL_vlew_properLy
Plde_vlew
8eplace_conLenL_vlew
Scroll_vlew
SeL_canvas_properLy
SeL_vlew_properLy
Show_vlew
AlerL
Systemeffect|ve_date system var|ab|e |s read on|y 1rue]Ia|se?
lalse
What are the bu||t_|n used to trapp|ng errors |n forms 4?
Lrror_Lype reLurn characLer
Lrror_code reLurn number
Lrror_LexL reLurn char
ubms_error_code reLurn no
ubms_error_LexL reLurn char
What |s Crac|e I|nanc|a|s? (for D8A)
Cracle llnanclals producLs provlde organlzaLlons wlLh soluLlons Lo a wlde range of long and shorLLerm accounLlng sysLem
lssues 8egardless of Lhe slze of Lhe buslness Cracle llnanclals can meeL accounLlng managemenL demands wlLh
Cracle AsseLs Lnsures LhaL an organlzaLlons properLy and equlpmenL lnvesLmenL ls accuraLe and LhaL Lhe correcL asseL Lax
accounLlng sLraLegles are chosen
Cracle Ceneral Ledger Cffers a compleLe soluLlon Lo [ournal enLry budgeLlng allocaLlons consolldaLlon and flnanclal reporLlng
needs
Cracle lnvenLory Pelps an organlzaLlon make beLLer lnvenLory declslons by mlnlmlzlng sLock and maxlmlzlng cash flow
Cracle Crder LnLry rovldes organlzaLlons wlLh a sophlsLlcaLed order enLry sysLem for managlng cusLomer commlLmenLs
Cracle ayables LeLs an organlzaLlon process more lnvolces wlLh fewer sLaff members and LlghLer conLrols Pelps save money
Lhrough maxlmum dlscounLs bank floaL and prevenLlon of dupllcaLe paymenL
Cracle ersonnel lmproves Lhe managemenL of employee relaLed lssues by reLalnlng and maklng avallable every form of
personnel daLa
Cracle urchaslng lmproves buylng power helps negoLlaLe blgger dlscounLs ellmlnaLes paper flow lncreases flnanclal
conLrols and lncreases producLlvlLy
Cracle 8ecelvables lmproves cash flow by leLLlng an organlzaLlon process more paymenLs fasLer wlLhouL offllne research
Pelps correcLly accounL for cash reduce ouLsLandlng recelvables and lmprove collecLlon effecLlveness
Cracle 8evenue AccounLlng Clves an organlzaLlon Llmely and accuraLe revenue and flexlble commlsslons reporLlng
Cracle Sales Analysls Allows for beLLer forecasLlng plannlng and reporLlng of sales lnformaLlon
What are the des|gn fac|||t|es ava||ab|e |n forms 40?
uefaulL 8lock faclllLy
LayouL LdlLor
Menu LdlLor
Cb[ecL LlsLs
roperLy SheeLs
L/SCL LdlLor
1ables Columns 8rowser
8ullLlns 8rowser
What |s the most |mportant modu|e |n Crac|e I|nanc|a|s? (for D8A)
1he Ceneral Ledger (CL) module ls Lhe basls for all oLher Cracle llnanclal modules All oLher modules provlde lnformaLlon Lo lL
lf you lmplemenL Cracle llnanclals you should swlLch your currenL CL sysLem flrsLCL ls relaLlvely easy Lo lmplemenL ?ou
should go llve wlLh lL flrsL Lo glve your lmplemenLaLlon Leam a chance Lo be famlllar wlLh Cracle llnanclals
What are the types of canvasv|ews?
ConLenL vlew SLacked vlew
What |s the Mu|t|Crg and what |s |t used for? (for D8A)
MulLlCrg or MulLlple CrganlzaLlons ArchlLecLure allows mulLlple operaLlng unlLs and Lhelr relaLlonshlps Lo be deflned wlLhln a
slngle lnsLallaLlon of Cracle AppllcaLlons 1hls keeps each operaLlng unlLs LransacLlon daLa separaLe and secure
use Lhe followlng query Lo deLermlne lf MullCrg ls lnLalled
selecL mulLl_org_flag from fnd_producL_groups
What |s the d|fference between I|e|ds and I|exI|e|ds? (for D8A)
A fleld ls a poslLlon on a form LhaL one uses Lo enLer vlew updaLe or deleLe lnformaLlon A fleld prompL descrlbes each fleld by
Lelllng whaL klnd of lnformaLlon appears ln Lhe fleld or alLernaLlvely whaL klnd of lnformaLlon should be enLered ln Lhe fleld
A flexfleld ls an Cracle AppllcaLlons fleld made up of segmenLs Lach segmenL has an asslgned name and a seL of valld values
Cracle AppllcaLlons uses flexflelds Lo capLure lnformaLlon abouL your organlzaLlon 1here are Lwo Lypes of flexflelds key
flexflelds and descrlpLlve flexflelds
Lxp|a|n types of 8|ock |n forms40?
8ase Lable 8locks
ConLrol 8locks
1 A base Lable block ls one LhaL ls assoclaLed wlLh a speclflc daLabase Lable or vlew
2 A conLrol block ls a block LhaL ls noL assoclaLed wlLh a daLabase Lable l1LMS
What |s an A|ert?
An alerL ls a modal wlndow LhaL dlsplays a message noLlfles Lhe operaLor of some appllcaLlon condlLlon
What are the bu||t|n rout|nes |s ava||ab|e |n forms 40 to create and man|pu|ate a parameter ||st?
Add_parameLer
CreaLe_arameLer_llsL
ueleLe_parameLer
uesLroy_parameLer_llsL
CeL_parameLer_aLLr
CeL_parameLer_llsL
seL_parameLer_aLLr
What |s a record Group?
A record group ls an lnLernal oracle forms daLa sLrucLure LhaL has a slmllar column/row frame work Lo a daLabase Lable
What |s a Nav|gab|e |tem?
A navlgable lLem ls one LhaL operaLors can navlgaLe Lo wlLh Lhe keyboard durlng defaulL navlgaLlon or LhaL Cracle forms can
navlgaLe Lo by execuLlng a navlgaLlonal bullLln procedure
What |s a ||brary |n Iorms 40?
A llbrary ls a collecLlon of l/SCL program unlLs lncludlng user named procedures funcLlons packages
now |mage_|tems can be popu|ate to f|e|d |n forms 40?
A feLch from a long raw daLabase column L/Sql asslgnmenL Lo execuLlng Lhe read_lmage_flle bullL_ln procedure Lo geL an
lmage from Lhe flle sysLem
What |s the content v|ew and stacked v|ew?
A conLenL vlew ls Lhe 8ase vlew LhaL occuples Lhe enLlre conLenL pane of Lhe wlndow ln whlch lL ls dlsplayed A sLacked vlew
dlffers from a conLenL canvas vlew ln LhaL lL ls noL Lhe base vlew for Lhe wlndow Lo whlch lL ls asslgned
What |s a Check 8ox?
A Check 8ox ls a Lwo sLaLe conLrol LhaL lndlcaLes wheLher a cerLaln condlLlon or value ls on or off Lrue or false 1he dlsplay sLaLe
of a check box ls always elLher checked or unchecked
What |s a canvasv|ew?
A canvasvlew ls Lhe background ob[ecL on whlch you layouL Lhe lnLerface lLems (LexLlLems check boxes radlo groups and so
on) and bollerplaLe ob[ecLs LhaL operaLors see and lnLeracL wlLh as Lhey run your form AL runLlme operaLors can see only
Lhose lLems LhaL have been asslgned Lo a speclflc canvas Lach canvas ln Lerm musL be dlsplayed ln a speclflc wlndow
Lxp|a|n the fo||ow|ng f||e extens|on re|ated to ||brary?
pllllbpld
1he llbrary pll flles ls a porLable deslgn flle comparable Lo an fmb form flle
1he llbrary llb flle ls a plaL form speclflc generaLed llbrary flle comparable Lo a fmx form flle
1he pld flle ls 1xL formaL flle and can be used for source conLrolllng your llbrary flles arameLer
Lxp|a|n the usage of WnLkL CUkkLN1 CI c|ause |n cursors ?
WPL8L Cu88Ln1 Cl clause ln an uuA1LuLLL1L sLaLemenL refers Lo Lhe laLesL row feLched from a cursor uaLabase 1rlggers
Name the tab|es where character|st|cs of ackage procedure and funct|ons are stored ?
user_ob[ecLs user_Source and user_error
Lxp|a|n the two type of Cursors ?
1here are Lwo Lypes of cursors lmpllclL Cursor and LxpllclL Cursor L/SCL uses lmpllclL Cursors for querles user deflned cursors
are called LxpllclL Cursors 1hey can be declared and used
What are two parts of package ?
1he Lwo parLs of package are ACkACL SLClllCA1lCn ACkACL 8Cu? ackage SpeclflcaLlon conLalns declaraLlons LhaL are
global Lo Lhe packages and local Lo Lhe schema ackage 8ody conLalns acLual procedures and local declaraLlon of Lhe
procedures and cursor declaraLlons
What are two v|rtua| tab|es ava||ab|e dur|ng database tr|gger execut|on ?
1he Lable columns are referred as CLucolumn_name and nLWcolumn_name
lor Lrlggers relaLed Lo lnSL81 only nLWcolumn_name values only avallable
lor Lrlggers relaLed Lo uuA1L only CLucolumn_name nLWcolumn_name values only avallable
lor Lrlggers relaLed Lo uLLL1L only CLucolumn_name values only avallable
What |s I|ne Gra|ned Aud|t|ng? (for D8A)
llne Cralned AudlLlng (u8MS_lCA) allows audlLlng records Lo be generaLed when cerLaln rows are selecLed from a Lable A llsL
of deflned pollcles can be obLalned from u8A_Auul1_CLlClLS AudlL records are sLored ln u8A_lCA_Auul1_18AlL Look aL
Lhls example
o Add pollcy on Lable wlLh auLlLlng condlLlon
execuLe dbms_fgaadd_pollcy(P8 LM pollcy1 depLno 10)
o MusL AnAL?ZL Lhls feaLure works wlLh C8C (CosL 8ased CpLlmlzer)
analyze Lable LM compuLe sLaLlsLlcs
selecL * from LM where c1 11 Wlll Lrlgger audlLlng
selecL * from LM where c1 09 no audlLlng
o now we can see Lhe sLaLmenLs LhaL Lrlggered Lhe audlLlng condlLlon
selecL sqlLexL from sysfga_log$
deleLe from sysfga_log$
What |s a package ? What are the advantages of packages ? What |s ragma LkLC1ICN_INI1 ? Lxp|a|n the usage ?
1he 8ACMA LxLC1lCn_lnl1 Lells Lhe compller Lo assoclaLe an excepLlon wlLh an oracle error 1o geL an error message of a
speclflc oracle error eg 8ACMA LxCL1lCn_lnl1 (excepLlon name oracle error number)
What |s a V|rtua| r|vate Database? (for D8A)
Cracle 8l lnLroduced Lhe noLlon of a vlrLual rlvaLe uaLabase (vu) A vu offers llneCralned Access ConLrol (lCAC) for secure
separaLlon of daLa 1hls ensures LhaL users only have access Lo daLa LhaL perLalns Lo Lhem uslng Lhls opLlon one could even
sLore mulLlple companles daLa wlLhln Lhe same schema wlLhouL Lhem knowlng abouL lL vu conflguraLlon ls done vla Lhe
u8MS_8LS (8ow Level SecurlLy) package SelecL from S?Sv$vu_CLlC? Lo see exlsLlng vu conflguraLlon
What |s ka|se_app||cat|on_error ?
8alse_appllcaLlon_error ls a procedure of package u8MS_S1AnuA8u whlch allows Lo lssue an user_deflned error messages
from sLored subprogram or daLabase Lrlgger
What |s Crac|e Labe| Secur|ty? (for D8A)
Cracle Label SecurlLy (formerly called 1rusLed Cracle MLS 8u8MS) uses Lhe vu (vlrLual rlvaLe uaLabase) feaLure of Cracle8l
Lo lmplemenL row level securlLy Access Lo rows are resLrlcLed accordlng Lo a users securlLy senslLlvlLy Lag or label Cracle Label
SecurlLy ls conflgured conLrolled and managed from Lhe ollcy Manager an LnLerprlse Managerbased Cul uLlllLy
G|ve the structure of the procedure ?
8CCLuu8L name (parameLer llsL)
ls
local varlable declaraLlons
8LCln
LxecuLable sLaLemenLs
LxcepLlon
excepLlon handlers
end
What |s CLM (Crac|e Lnterpr|se Manager)? (for D8A)
CLM ls a seL of sysLems managemenL Lools provlded by Cracle CorporaLlon for managlng Lhe Cracle envlronmenL lL provldes
Lools Lo monlLor Lhe Cracle envlronmenL and auLomaLe Lasks (boLh oneLlme and repeLlLlve ln naLure) Lo Lake daLabase
admlnlsLraLlon a sLep closer Lo LlghLs CuL managemenL
uest|on What |s L]SL ?
L/SCL ls a procedural language LhaL has boLh lnLeracLlve SCL and procedural programmlng language consLrucLs such as
lLeraLlon condlLlonal branchlng
What are the components of CLM? (for D8A)
Cracle LnLerprlse Manager (CLM) has Lhe followlng componenLs
ManagemenL Server (CMS) Mlddle Ller server LhaL handles communlcaLlon wlLh Lhe lnLelllgenL agenLs 1he CLM Console
connecLs Lo Lhe managemenL server Lo monlLor and conflgure Lhe Cracle enLerprlse
Console 1hls ls a graphlcal lnLerface from where one can schedule [obs evenLs and monlLor Lhe daLabase 1he console can be
opened from a Wlndows worksLaLlon unlx x1erm (oemapp command) or Web browser sesslon (oem_websLage)
lnLelllgenL AgenL (ClA) 1he ClA runs on Lhe LargeL daLabase and Lakes care of Lhe execuLlon of [obs and evenLs scheduled
Lhrough Lhe Console
What happens |f a procedure that updates a co|umn of tab|e k |s ca||ed |n a database tr|gger of the same tab|e ?
MuLaLlon of Lable occurs
Is |t poss|b|e to use 1ransact|on contro| Statements such a kCLL8ACk or CCMMI1 |n Database 1r|gger ? Why ?
lL ls noL posslble As Lrlggers are deflned for each Lable lf you use CCMMl1 of 8CLL8ACk ln a Lrlgger lL affecLs loglcal
LransacLlon processlng
now many types of database tr|ggers can be spec|f|ed on a tab|e ? What are they ?
lnserL updaLe ueleLe
8efore 8ow ok ok ok
AfLer 8ow ok ok ok
8efore SLaLemenL ok ok ok
AfLer SLaLemenL ok ok ok
lf lC8 LACP 8CW clause ls speclfled Lhen Lhe Lrlgger for each 8ow affecLed by Lhe sLaLemenL
lf WPLn clause ls speclfled Lhe Lrlgger flres accordlng Lo Lhe reLurned 8oolean value
What are the modes of parameters that can be passed to a procedure ?
lnCu1lnCu1 parameLers
Where the re_def|ned_except|ons are stored ?
ln Lhe sLandard package
rocedures luncLlons ackages
Wr|te the order of precedence for va||dat|on of a co|umn |n a tab|e ?
I done us|ng Database tr|ggers
|| done us|ng Integar|ty Constra|nts?

l ll
G|ve the structure of the funct|on ?
lunC1lCn name (argumenL llsL ) 8eLurn daLaLype ls
local varlable declaraLlons
8egln
execuLable sLaLemenLs
LxcepLlon
execuLlon handlers
Lnd
Lxp|a|n how procedures and funct|ons are ca||ed |n a L]SL b|ock ?
luncLlon ls called as parL of an expresslon
sal calculaLe_sal (a822)
procedure ls called as a L/SCL sLaLemenL
calculaLe_bonus (A822)
What are advantages fo Stored rocedures?
LxLenslblllLyModularlLy 8eusablllLy MalnLalnablllLy and one Llme compllaLlon
What |s an Lxcept|on ? What are types of Lxcept|on ?
LxcepLlon ls Lhe error handllng parL of L/SCL block 1he Lypes are redeflned and user deflned Some of redeflned excepLlons
are
Cu8SC8_AL8LAu?_CLn
uu_vAL_Cn_lnuLx
nC_uA1A_lCunu
1CC_MAn?_8CWS
lnvALlu_Cu8SC8
lnvALlu_nuM8L8
LCCCn_uLnlLu
nC1_LCCCLu_Cn
8CC8AML88C8
S1C8ACL_L88C8
1lMLCu1_Cn_8LSCu8CL
vALuL_L88C8
ZL8C_ulvluL
C1PL8S
What are the L]SL Statements used |n cursor process|ng ?
uLCLA8L Cu8SC8 name CLn cursor name lL1CP cursor name ln1C or 8ecord Lypes CLCSL cursor name
What are the components of a L]SL 8|ock ?
ueclaraLlve parL LxecuLable parL and LxcepLlon parL
uaLaLypes L/SCL
What |s a database tr|gger ? Name some usages of database tr|gger ?
uaLabase Lrlgger ls sLored L/SCL program unlL assoclaLed wlLh a speclflc daLabase Lable usages are AudlL daLa modlflcaLlons
Log evenLs LransparenLly Lnforce complex buslness rules uerlve column values auLomaLlcally lmplemenL complex securlLy
auLhorlzaLlons MalnLaln repllcaLe Lables
What |s a cursor ? Why Cursor |s requ|red ?
Cursor ls a named prlvaLe SCL area from where lnformaLlon can be accessed Cursors are requlred Lo process rows lndlvldually
for querles reLurnlng mulLlple rows
What |s a cursor for |oop ?
Cursor for loop lmpllclLly declares 8CW1?L as loop lndex opens a cursor feLches rows of values from acLlve seL lnLo flelds ln
Lhe record and closes when all Lhe records have been processed
eg lC8 emp_rec ln C1 LCC
salary_LoLal salary_LoLal +emp_rec sal
Lnu LCC
What w||| happen after comm|t statement ?
Cursor C1 ls
SelecL empno
ename from emp
8egln
open C1 loop
leLch C1 lnLo
enoename
LxlL When
C1 noLfound
commlL
end loop
end
1he cursor havlng query as SLLLC1 lC8 uuA1L geLs closed afLer CCMMl1/8CLL8ACk
1he cursor havlng query as SLLLC1 does noL geL closed even afLer CCMMl1/8CLL8ACk
now packaged procedures and funct|ons are ca||ed from the fo||ow|ng?
a Stored procedure or anonymous b|ock
b an app||cat|on program such a kC *C kC* CC8CL
c SL *LUS??

a ACkACL nAML8CCLuu8L nAML (parameLers)
varlable ACkACL nAMLlunC1lCn nAML (argumenLs)
LxLC SCL LxLCu1L
b8LCln
ACkACL nAML8CCLuu8L nAML (parameLers)
varlable ACkACL nAMLlunC1lCn nAML (argumenLs)
Lnu
Lnu LxLC
c LxLCu1L ACkACL nAML8CCLuu8L lf Lhe procedures does noL have any ouL/lnouL parameLers A funcLlon can noL be
called
What |s a stored procedure ?
A sLored procedure ls a sequence of sLaLemenLs LhaL perform speclflc funcLlon
What are the components of a L]SL b|ock ?
A seL of relaLed declaraLlons and procedural sLaLemenLs ls called block
What |s d|fference between a kCCLDUkL IUNC1ICN ?
A lunC1lCn ls always reLurns a value uslng Lhe reLurn sLaLemenL
A 8CCLuu8L may reLurn one or more values Lhrough parameLers or may noL reLurn aL all
What |s d|fference between a Cursor dec|ared |n a procedure and Cursor dec|ared |n a package spec|f|cat|on ?
A cursor declared ln a package speclflcaLlon ls global and can be accessed by oLher procedures or procedures ln a package
A cursor declared ln a procedure ls local Lo Lhe procedure LhaL can noL be accessed by oLher procedures
What are the cursor attr|butes used |n L]SL ?
lSCLn Lo check wheLher cursor ls open or noL
8CWCCun1 number of rows feLched/updaLed/deleLed
lCunu Lo check wheLher cursor has feLched any row 1rue lf rows are feLched
nC1 lCunu Lo check wheLher cursor has feLched any row 1rue lf no rows are feaLched
1hese aLLrlbuLes are proceeded wlLh SCL for lmpllclL Cursors and wlLh Cursor name for LxpllclL Cursors
What are 1L and kCW1L ? What are the advantages of us|ng these over datatypes?
1?L provldes Lhe daLa Lype of a varlable or a daLabase column Lo LhaL varlable
8CW1?L provldes Lhe record Lype LhaL represenLs a enLlre row of a Lable or vlew or columns selecLed ln Lhe cursor
1he advanLages are
l need noL know abouL varlables daLa Lype
ll lf Lhe daLabase deflnlLlon of a column ln a Lable changes Lhe daLa Lype of a varlable changes accordlngly
What |s d|fference between kCW1L and 1L kLCCkD ?
8CW1?L ls Lo be used whenever query reLurns a enLlre row of a Lable or vlew
1?L rec 8LCC8u ls Lo be used whenever query reLurns columns of dlfferenL Lable or vlews and varlables
Lg 1?L r_emp ls 8LCC8u (eno empempno Lypeename emp ename Lype )
e_rec emp 8CW1?L
cursor c1 ls selecL empnodepLno from emp
e_rec c1 8CW1?L
What are the d|fferent types of L]SL program un|ts that can be def|ned and stored |n CkACLL database ?
rocedures and luncLlonsackages and uaLabase 1rlggers
What are the advantages of hav|ng a ackage ?
lncreased funcLlonallLy (for exampleglobal package varlables can be declared and used by any proecdure ln Lhe package) and
performance (for example all ob[ecLs of Lhe package are parsed complled and loaded lnLo memory once)
What are the uses of Database 1r|gger ?
uaLabase Lrlggers can be used Lo auLomaLlc daLa generaLlon audlL daLa modlflcaLlons enforce complex lnLegrlLy consLralnLs
and cusLomlze complex securlLy auLhorlzaLlons
What |s a rocedure ?
A rocedure conslsL of a seL of SCL and L/SCL sLaLemenLs LhaL are grouped LogeLher as a unlL Lo solve a speclflc problem or
perform a seL of relaLed Lasks
What |s a ackage ?
A ackage ls a collecLlon of relaLed procedures funcLlons varlables and oLher package consLrucLs LogeLher as a unlL ln Lhe
daLabase
What |s d|fference between rocedures and Iunct|ons ?
A luncLlon reLurns a value Lo Lhe caller where as a rocedure does noL
What |s Database 1r|gger ?
A uaLabase 1rlgger ls procedure (seL of SCL and L/SCL sLaLemenLs) LhaL ls auLomaLlcally execuLed as a resulL of an lnserL ln
updaLe Lo or deleLe from a Lable
Can the defau|t va|ues be ass|gned to actua| parameters?
?es
Can a pr|mary key conta|n more than one co|umns?
?es
What |s an U1L_IILLWhat are d|fferent procedures and funct|ons assoc|ated w|th |t?
u1L_llLL ls a package LhaL adds Lhe ablllLy Lo read and wrlLe Lo operaLlng sysLem flles rocedures assoclaLed wlLh lL are
lCLCSL lCLCSL_ALL and 3 procedures Lo ouLpuL daLa Lo a flle u1 u1_LlnL nLW_LlnL u1l llLuSPu1
llLuSPu1_LlnLllLuSPnLW_LlnL luncLlons assoclaLed wlLh lL are lCLn lSCLn
What are CkACLL kLCCMILLkS?
uslng C8ACLL 8LCCMlLL8S SCL sLaLemenLs and L/SCL blocks can be conLalned lnslde 3CL programs wrlLLen ln
CC++CC8CLASCAL lC818AnL/1 Anu AuA 1he recompllers are known as ro*Cro*Cobol 1hls form of L/SCL ls
known as embedded pl/sqlLhe language ln whlch pl/sql ls embedded ls known as Lhe hosL language 1he prcompller LranslaLes
Lhe embedded SCL and pl/sql sLaLemenLs lnLo calls Lo Lhe precompller runLlme llbrary 1he ouLpuL musL be complled and llnked
wlLh Lhls llbrary Lo creaLor an execuLable
D|fferent|ate between 1kUNCA1L and DLLL1L?
18unCA1L deleLes much fasLer Lhan uLLL1L
18unCA1L
uLLL1L
lL ls a uuL sLaLemenL
lL ls a uML sLaLemenL
lL ls a one way Lrlp cannoL 8CLL8ACk
Cne can 8ollback
uoesnL have selecLlve feaLures (where clause)
Pas
uoesnL flre daLabase Lrlggers
uoes
lL requlres dlsabllng of referenLlal consLralnLs
What |s d|fference between a forma| and an actua| parameter?
1he varlables declared ln Lhe procedure and whlch are passed as argumenLs are called acLual Lhe parameLers ln Lhe procedure
declaraLlon AcLual parameLers conLaln Lhe values LhaL are passed Lo a procedure and recelve resulLs lormal parameLers are
Lhe placeholders for Lhe values of acLual parameLers
What shou|d be the return type for a cursor var|ab|e Can we use a sca|ar data type as return type?
1he reLurn Lype for a cursor musL be a record LypelL can be declared expllclLly as a userdeflned or 8CW1?L can be used eg
1?L L_sLudenLsref lS 8Ll Cu8SC8 8L1u8n sLudenLs8CW1?L
What are d|fferent Crac|e database ob[ects?
1A8LLS
vlLWS
lnuLxLS
S?nCn?MS
SLCuLnCLS
1A8LLSACLS eLc
What |s d|fference between SU8S1k and INS1k?
Su8S18 reLurns a speclfled porLlon of a sLrlng eg Su8S18(8CuLl4) ouLpuL 8CuL lnS18 provldes characLer poslLlon ln whlch a
paLLern ls found ln a sLrlng eg lnS18(A8CuCl2) ouLpuL 7 (2nd occurence of )
D|sp|ay the number va|ue |n Words?
SCL selecL sal (Lo_char(Lo_daLe(sal[) [sp))
from emp
Lhe ouLpuL llke
SAL (1C_CPA8(1C_uA1L(SAL!)!S))

800 elghL hundred
1600 one Lhousand slx hundred
1230 one Lhousand Lwo hundred flfLy
lf you wanL Lo add some LexL llke 8s 1hree 1housand only
SCL selecL sal Salary
( 8s || (Lo_char(Lo_daLe(sal[) !sp))|| only))
Sal ln Words from emp
/
Salary Sal ln Words

800 8s LlghL Pundred only
1600 8s Cne 1housand Slx Pundred only
1230 8s Cne 1housand 1wo Pundred llfLy only
What |s d|fference between SL and SL*LUS?
SCL*LuS ls a command llne Lool where as SCL and L/SCL language lnLerface and reporLlng Lool lLs a command llne Lool LhaL
allows user Lo Lype SCL commands Lo be execuLed dlrecLly agalnsL an Cracle daLabase SCL ls a language used Lo query Lhe
relaLlonal daLabase(uMLuCLuuL) SCL*LuS commands are used Lo formaL query resulL SeL opLlons LdlL SCL commands and
L/SCL
What are var|ous [o|ns used wh||e wr|t|ng SU8ULkILS?
Self [olnlLs a [oln forelgn key of a Lable references Lhe same Lable CuLer !olnlLs a [oln condlLlon used where Cne can query all
Lhe rows of one of Lhe Lables ln Lhe [oln condlLlon even Lhough Lhey donL saLlsfy Lhe [oln condlLlon
Lqul[olnlLs a [oln condlLlon LhaL reLrleves rows from one or more Lables ln whlch one or more columns ln one Lable are equal
Lo one or more columns ln Lhe second Lable
What a SLLLC1 ICk UDA1L cursor represent?
SLLLC1l8CMlC8uuA1LCl columnreferencenCWAl1
1he processlng done ln a feLch loop modlfles Lhe rows LhaL have been reLrleved by Lhe cursor A convenlenL way of modlfylng
Lhe rows ls done by a meLhod wlLh Lwo parLs Lhe lC8 uuA1L clause ln Lhe cursor declaraLlon WPL8L Cu88Ln1 Cl CLAuSL ln
an uuA1L or declaraLlon sLaLemenL
What are var|ous pr|v||eges that a user can grant to another user?
SLLLC1
CCnnLC1
8LSCu8CLS
D|sp|ay the records between two range?
selecL rownum empno ename from emp where rowld ln (selecL rowld from emp where rownum upLo mlnus selecL rowld
from emp where rownumSLarL)
m|nva|uesq| Se|ect the Nth |owest va|ue from a tab|e?
selecL level mln(col_name) from my_Lable where level n connecL by prlor (col_name) col_name)
group by level
Lxample
Clven a Lable called emp wlLh Lhe followlng columns
ld number
name varchar2(20)
sal number

lor Lhe second lowesL salary
selecL level mln(sal) from emp
where level2
connecL by prlor sal sal
group by level
What |s d|fference between kename and A||as?
8ename ls a permanenL name glven Lo a Lable or column whereas Allas ls a Lemporary name glven Lo a Lable or column whlch
do noL exlsL once Lhe SCL sLaLemenL ls execuLed
D|fference between an |mp||c|t an exp||c|t cursor?
only one row Poweverquerles LhaL reLurn more Lhan one row you musL declare an expllclL cursor or use a cursor lC8 loop
LxpllclL cursor ls a cursor ln whlch Lhe cursor name ls expllclLly asslgned Lo a SLLLC1 sLaLemenL vla Lhe Cu8SC8lS sLaLemenL
An lmpllclL cursor ls used for all SCL sLaLemenLs ueclare Cpen leLch Close An expllclL cursors are used Lo process mulLlrow
SLLLC1 sLaLemenLs An lmpllclL cursor ls used Lo process lnSL81 uuA1L uLLL1L and slngle row SLLLC1 ln1C sLaLemenLs
What |s a CU1Lk ICIN?
CuLer !olnlLs a [oln condlLlon used where you can query all Lhe rows of one of Lhe Lables ln Lhe [oln condlLlon even Lhough
Lhey don'L saLlsfy Lhe [oln condlLlon
What |s a cursor?
Cracle uses work area Lo execuLe SCL sLaLemenLs and sLore processlng lnformaLlon L/SCL consLrucL called a cursor leLs you
name a work area and access lLs sLored lnformaLlon A cursor ls a mechanlsm used Lo feLch more Lhan one row ln a l/SCl block
What |s the purpose of a c|uster?
Cracle does noL allow a user Lo speclflcally locaLe Lables slnce LhaL ls a parL of Lhe funcLlon of Lhe 8u8MS Powever for Lhe
purpose of lncreaslng performance oracle allows a developer Lo creaLe a CLuS1L8 A CLuS1L8 provldes a means for sLorlng
daLa from dlfferenL Lables LogeLher for fasLer reLrleval Lhan lf Lhe Lable placemenL were lefL Lo Lhe 8u8MS
What |s CCI What are |ts uses?
Cracle Call lnLerface ls a meLhod of acceslng daLabase from a 3CL program usesno precompller ls requlredL/SCL blocks are
execuLed llke oLher uML sLaLemenLs
1he CCl llbrary provldes
funcLlons Lo parse SCL sLaLemeLs
blnd lnpuL varlables
blnd ouLpuL varlables
execuLe sLaLemenLs
feLch Lhe resulLs
now you open and c|ose a cursor var|ab|e Why |t |s requ|red?
CLn cursor varlable lC8 SLLLC1SLaLemenL
CLCSL cursor varlable ln order Lo assoclaLe a cursor varlable wlLh a parLlcular SLLLC1 sLaLemenL CLn synLax ls used ln order Lo
free Lhe resources used for Lhe query CLCSL sLaLemenL ls used
D|sp|ay Cdd] Lven number of records?
Cdd number of records
selecL * from emp where (rowld1) ln (selecL rowld mod(rownum2) from emp)
CuLpuL
1
3
3
Lven number of records
selecL * from emp where (rowld0) ln (selecL rowld mod(rownum2) from emp)
CuLpuL
2
4
6
What are var|ous constra|nts used |n SL?
nuLL
nC1 nuLL
CPLCk
uLlAuL1
Can cursor var|ab|es be stored |n L]SL tab|es If yes how If not why?
no a cursor varlable polnLs a row whlch cannoL be sLored ln a Lwodlmenslonal L/SCL Lable
D|fference between NC DA1A ICUND and NC1ICUND?
nC uA1A lCunu ls an excepLlon ralsed only for Lhe SLLLC1ln1C sLaLemenLs when Lhe where clause of Lhe querydoes noL
maLch any rows When Lhe where clause of Lhe expllclL cursor does noL maLch any rows Lhe nC1lCunu aLLrlbuLe ls seL Lo
18uL lnsLead
Can you use a comm|t statement w|th|n a database tr|gger?
no
What WnLkL CUkkLN1 CI c|ause does |n a cursor?
LCC
SLLLC1 num_credlLs ln1C v_numcredlLs l8CM classes
WPL8L depL123 and course101
uuA1L sLudenLs
lPkCSL1 currenL_credlLscurrenL_credlLs+v_numcredlLs
WPL8L Cu88Ln1 Cl x
1here |s a str|ng 120000 12 0 12S how you w||| f|nd the pos|t|on of the dec|ma| p|ace?
lnS18(120000 12 0 1231)
ouLpuL 13
What are d|fferent modes of parameters used |n funct|ons and procedures?
ln Cu1 lnCu1
now you were pass|ng cursor var|ab|es |n L]SL 22?
ln L/SCL 22 cursor varlables cannoL be declared ln a package1hls ls because Lhe sLorage for a cursor varlable has Lo be
allocaLed uslng ro*C or CCl wlLh verslon 22 Lhe only means of passlng a cursor varlable Lo a L/SCL block ls vla blnd varlable
or a procedure parameLer
When do you use WnLkL c|ause and when do you use nAVING c|ause?
PAvlnC clause ls used when you wanL Lo speclfy a condlLlon for a group funcLlon and lL ls wrlLLen afLer C8Cu 8? clause 1he
WPL8L clause ls used when you wanL Lo speclfy a condlLlon for columns slngle row funcLlons excepL group funcLlons and lL ls
wrlLLen before C8Cu 8? clause lf lL ls used
D|fference between procedure and funct|on?
luncLlons are named L/SCL blocks LhaL reLurn a value and can be called wlLh argumenLs procedure a named block LhaL can be
called wlLh parameLer A procedure all ls a L/SCL sLaLemenL by lLself whlle a luncLlon call ls called as parL of an expresslon
Wh|ch |s more faster IN or LkIS1S?
LxlS1S ls more fasLer Lhan ln because LxlS1S reLurns a 8oolean value whereas ln reLurns a value
What |s syntax for dropp|ng a procedure and a funct|on Are these operat|ons poss|b|e?
urop rocedure procedure_name
urop luncLlon funcLlon_name
now w||| you de|ete dup||cat|ng rows from a base tab|e?
deleLe from Lable_name where rowld noL ln (selecL max(rowld) from Lable group by dupllcaLe_values_fleld_name) or deleLe
dupllcaLe_values_fleld_name dv from Lable_name La where rowld (selecL mln(rowld) from Lable_name Lb where LadvLbdv)
D|fference between database tr|ggers and form tr|ggers?
uaLa base Lrlgger(u81) flres when a uML operaLlon ls performed on a daLa base Lable lorm Lrlgger(l1) llres when user presses
a key or navlgaLes beLween flelds on Lhe screen
Can be row level or sLaLemenL level no dlsLlncLlon beLween row level and sLaLemenL level
Can manlpulaLe daLa sLored ln Cracle Lables vla SCL Can manlpulaLe daLa ln Cracle Lables as well as varlables ln forms
Can be flred from any sesslon execuLlng Lhe Lrlggerlng uML sLaLemenLs Can be flred only from Lhe form LhaL deflne Lhe Lrlgger
Can cause oLher daLabase Lrlggers Lo flre Can cause oLher daLabase Lrlggers Lo flre buL noL oLher form Lrlggers
What |s a cursor for |oop?
Cursor lor Loop ls a loop where oracle lmpllclLly declares a loop varlable Lhe loop lndex LhaL of Lhe same record Lype as Lhe
cursors record
now you w||| avo|d dup||cat|ng records |n a query?
8y uslng ulS1lnC1
What |s a v|ew ?
A vlew ls sLored procedure based on one or more Lables lL's a vlrLual Lable
What |s d|fference between UNIUL and kIMAk kL constra|nts?
A Lable can have only one 8lMA8? kL? whereas Lhere can be any number of unlCuL keys 1he columns LhaL compose k are
auLomaLlcally deflne nC1 nuLL whereas a column LhaL compose a unlCuL ls noL auLomaLlcally deflned Lo be mandaLory musL
also speclfy Lhe column ls nC1 nuLL
What |s use of a cursor var|ab|e? now |t |s def|ned?
A cursor varlable ls assoclaLed wlLh dlfferenL sLaLemenLs aL run Llme whlch can hold dlfferenL values aL run Llme SLaLlc cursors
can only be assoclaLed wlLh one run Llme query A cursor varlable ls reference Lype (llke a polnLer ln C)
ueclarlng a cursor varlable
1?L Lype_name lS 8Ll Cu8SC8 8L1u8n reLurn_Lype Lype_name ls Lhe name of Lhe reference LypereLurn_Lype ls a record
Lype lndlcaLlng Lhe Lypes of Lhe selecL llsL LhaL wlll evenLually be reLurned by Lhe cursor varlable
now do you f|nd the numbert of rows |n a 1ab|e ?
A bad answer ls counL Lhem (SLLLC1 CCun1(*) l8CM Lable_name)
A good answer ls
8y generaLlng SCL Lo AnAL?ZL 1A8LL Lable_name CCun1 S1A1lS1lCS by querylng Cracle SysLem CaLalogues (eg uSL8_1A8LLS
or ALL_1A8LLS)
1he besL answer ls Lo refer Lo Lhe uLlllLy whlch Cracle released whlch makes lL unnecessary Lo do AnAL?ZL 1A8LL for each 1able
lndlvldually
What |s the max|mum buffer s|ze that can be spec|f|ed us|ng the D8MS_CU1U1LNA8LL funct|on?
100000
What are cursor attr|butes?
8CWCCun1
nC1lCunu
lCunu
lSCLn
1here |s a s|gn |n one f|e|d of a co|umn What w||| be the query to f|nd |t?
Should be used before
What |s CN DLLL1L CASCADL ?
When Cn uLLL1L CASCAuL ls speclfled C8ACLL malnLalns referenLlal lnLegrlLy by auLomaLlcally removlng dependenL forelgn
key values lf a referenced prlmary or unlque key value ls removed
What |s the fastest way of access|ng a row |n a tab|e ?
uslng 8CWluCCnS18Aln1S
What |s d|fference between 1kUNCA1L DLLL1L ?
18unCA1L commlLs afLer deleLlng enLlre Lable le can noL be rolled back uaLabase Lrlggers do noL flre on 18unCA1LuLLL1L
allows Lhe fllLered deleLlon ueleLed records can be rolled back or commlLLed uaLabase Lrlggers flre on uLLL1L
What |s a transact|on ?
1ransacLlon ls loglcal unlL beLween Lwo commlLs and commlL and rollback
What are the advantages of VILW ?
1o proLecL some of Lhe columns of a Lable from oLher users1o hlde complexlLy of a query1o hlde complexlLy of calculaLlons
now w||| you a act|vate]deact|vate |ntegr|ty constra|nts ?
1he lnLegrlLy consLralnLs can be enabled or dlsabled by AL1L8 1A8LL LnA8LL consLralnL/ulSA8LL consLralnL
Where the |ntegr|ty constra|nts are stored |n Data D|ct|onary ?
1he lnLegrlLy consLralnLs are sLored ln uSL8_CCnS18Aln1S
What |s the Subquery ?
Sub query ls a query whose reLurn values are used ln fllLerlng condlLlons of Lhe maln query
now to access the current va|ue and next va|ue from a sequence ? Is |t poss|b|e to access the current va|ue |n a sess|on
before access|ng next va|ue ?
Sequence name Cu88vAL Sequence name nLx1vALlL ls noL posslble Cnly lf you access nexL value ln Lhe sesslon currenL value
can be accessed
What are the usage of SAVLCIN1S ?va|ue |n a sess|on before access|ng next va|ue ?
SAvLCln1S are used Lo subdlvlde a LransacLlon lnLo smaller parLs lL enables rolllng back parL of a LransacLlon Maxlmum of
flve save polnLs are allowed
What |s kCWID ?|n a sess|on before access|ng next va|ue ?
8CWlu ls a pseudo column aLLached Lo each row of a Lable lL ls 18 characLer long blockno rownumber are Lhe componenLs of
8CWlu
Lxp|a|n Connect by r|or ?|n a sess|on before access|ng next va|ue ?
8eLrleves rows ln hlerarchlcal ordereg selecL empno ename from emp where
now many LCNG co|umns are a||owed |n a tab|e ? Is |t poss|b|e to use LCNG co|umns |n WnLkL c|ause or CkDLk 8 ?
Cnly one LCnC columns ls allowed lL ls noL posslble Lo use LCnC column ln WPL8L or C8uL8 8? clause
What |s keferent|a| Integr|ty ?
MalnLalnlng daLa lnLegrlLy Lhrough a seL of rules LhaL resLrlcL Lhe values of one or more columns of Lhe Lables based on Lhe
values of prlmary key or unlque key of Lhe referenced Lable
What |s a [o|n ? Lxp|a|n the d|fferent types of [o|ns ?
!oln ls a query whlch reLrleves relaLed columns or rows from mulLlple LablesSelf !oln !olnlng Lhe Lable wlLh lLselfLqul !oln
!olnlng Lwo Lables by equaLlng Lwo common columnsnonLqul !oln !olnlng Lwo Lables by equaLlng Lwo common
columnsCuLer !oln !olnlng Lwo Lables ln such a way LhaL query can also reLrleve rows LhaL do noL have correspondlng [oln
value ln Lhe oLher Lable
If an un|que key constra|nt on DA1L co|umn |s created w||| |t va||date the rows that are |nserted w|th SSDA1L ?
lL wonL 8ecause S?SuA1L formaL conLalns Llme aLLached wlLh lL
now does one stop and start the CMS? (for D8A)
use Lhe followlng command sequence Lo sLop and sLarL Lhe CMS (Cracle ManagemenL Server)
oemcLl sLarL oms
oemcLl sLaLus oms sysman/oem_Lemp
oemcLl sLop oms sysman/oem_Lemp
Wlndows n1/2000 users can [usL sLop and sLarL Lhe requlred servlces 1he defaulL CLM admlnlsLraLor ls sysman wlLh a
password of oem_Lemp
nC1L use command oemcLrl lnsLead of oemcLl for Cracle 8l and below
What |s an Integr|ty Constra|nt ?
lnLegrlLy consLralnL ls a rule LhaL resLrlcLs values Lo a column ln a Lable
now does one create a repos|tory? (for D8A)
lor CLM v2 and above sLarL Lhe Cracle LnLerprlse Manager ConflguraLlon AsslsLanL (emca on unlx) Lo creaLe and conflgure Lhe
managemenL server and reposlLory 8emember Lo seLup a backup for Lhe reposlLory daLabase afLer creaLlng lL
If a V|ew on a s|ng|e base tab|e |s man|pu|ated w||| the changes be ref|ected on the base tab|e ?
lf changes are made Lo Lhe Lables whlch are base Lables of a vlew wlll Lhe changes be reference on Lhe vlew

1he followlng descrlbes means Lo creaLe a CLM v1x (very old!!!) reposlLory on Wlndowsn1

CreaLe a Lablespace LhaL would hold Lhe reposlLory daLa A slze beLween 200 230 M8 would be ldeal LeL us call lL
uummy_Space
CreaLe an Cracle user who would own Lhls reposlLory Asslgn u8A SnMAgenL Lxp_lull_daLabase lmp_lull_daLabase roles
Lo Lhls user LeLs call Lhls user uummy_user Asslgn uummy_Space as Lhe defaulL Lablespace
CreaLe an operaLlng sysLem user wlLh Lhe same name as Lhe Cracle username le uummy_user Add Log on as a baLch [ob
under advanced rlghLs ln user manager
llre up LnLerprlse manager and log ln as uummy_user and enLer Lhe password 1hls would Lrlgger Lhe creaLlon of Lhe
reposlLory lrom now on LnLerprlse manager ls ready Lo accepL [obs
What |s a database ||nk ?
uaLabase Llnk ls a named paLh Lhrough whlch a remoLe daLabase can be accessed
now does one ||st ones databases |n the CLM Conso|e? (for D8A)
lollow Lhese sLeps Lo dlscover daLabases and oLher servlces from Lhe CLM Console
1 Lnsure Lhe CLC8AL_u8nAML parameLer ls seL for all daLabases ln your LlS1LnL8C8A flle (opLlonal) 1hese names wlll be
llsLed ln Lhe CLM Console lease noLe LhaL names enLered are case senslLlve A porLlon of a llsLenerora flle
(Slu_uLSC
(CLC8AL_u8nAML u8_name_for_CLM)
(Slu_nAML
2 SLarL Lhe Cracle lnLelllgenL AgenL on Lhe machlne you wanL Lo dlscover See secLlon Pow does one sLarL Lhe Cracle
lnLelllgenL AgenL?
3 SLarL Lhe CLM Console navlgaLe Lo menu navlgaLor/ ulscover nodes 1he CLM ulscovery Wlzard wlll gulde you Lhrough
Lhe process of dlscoverlng your daLabases and oLher servlces
What |s CCLL]NC CCLL |n a Sequence ?
C?CLL speclfles LhaL Lhe sequence conLlnues Lo generaLe values afLer reachlng elLher maxlmum or mlnlmum value AfLer pan
ascendlng sequence reaches lLs maxlmum value lL generaLes lLs mlnlmum value AfLer a descendlng sequence reaches lLs
mlnlmum lL generaLes lLs maxlmumnC C?CLL speclfles LhaL Lhe sequence cannoL generaLe more values afLer reachlng lLs
maxlmum or mlnlmum value
What |s corre|ated subquery ?
CorrelaLed sub query ls a sub query whlch has reference Lo Lhe maln query
What are the data types a||owed |n a tab|e ?
CPA8vA8CPA82nuM8L8uA1L8AWLCnC and LCnC 8AW
What |s d|fference between CnAk and VAkCnAk2 ? What |s the max|mum SI2L a||owed for each type ?
CPA8 pads blank spaces Lo Lhe maxlmum lengLh vA8CPA82 does noL pad blank spaces lor CPA8 lL ls 233 and 2000 for
vA8CPA82
Can a v|ew be updated]|nserted]de|eted? If es under what cond|t|ons ?
A vlew can be updaLed/deleLed/lnserLed lf lL has only one base Lable lf Lhe vlew ls based on columns from one or more Lables
Lhen lnserL updaLe and deleLe ls noL posslble
What are the d|fferent types of Coord|nat|ons of the Master w|th the Deta|| b|ock?
CuLA1L_C8Cu(funcLlon)
CuLA1L_C8Cu_Wl1P_CuL8?(funcLlon)
SL1_C8Cu_CPA8_CLLL(procedure)
SL1_C8CuCLLL(procedure)
SL1_C8Cu_nuM8L8_CLLL(procedure)
Use the ADD_GkCU_CCLUMN funct|on to add a co|umn to a record group that was created at des|gn t|me?
I) 1kUL II) IALSL
ll) lALSL
Use the ADD_GkCU_kCW procedure to add a row to a stat|c record group?
I) 1kUL II) IALSL
l) lALSL
maxva|uesq| Se|ect the Nth n|ghest va|ue from a tab|e?
selecL level max(col_name) from my_Lable where level n connecL by prlor (col_name) col_name)
group by level
Lxample
Clven a Lable called emp wlLh Lhe followlng columns
ld number
name varchar2(20)
sal number

lor Lhe second hlghesL salary
selecL level max(sal) from emp
where level2
connecL by prlor sal sal
group by level
I|nd out nth h|ghest sa|ary from emp tab|e?
SLLLC1 ulS1lnC1 (asal) l8CM LM A WPL8L n (SLLLC1 CCun1 (ulS1lnC1 (bsal)) l8CM LM 8 WPL8L asalbsal)
lor Lg
LnLer value for n 2
SAL

3700
Suppose a customer tab|e |s hav|ng d|fferent co|umns ||ke customer no paymentsWhat w||| be the query to se|ect top three
max payments?
SLLLC1 cusLomer_no paymenLs from cusLomer C1
WPL8L 3(SLLLC1 CCun1(*) from cusLomer C2
WPL8L C1paymenL C2paymenL)
now you w||| avo|d your query from us|ng |ndexes?
SLLLC1 * l8CM emp
Where emp_no+ 12343
le you have Lo concaLenaLe Lhe column name wlLh space wlLhln codes ln Lhe where condlLlon
SLLLC1 /*+ luLL(a) */ ename emp_no from emp
where emp_no1234
le uslng Pln1S
What ut|||ty |s used to create a phys|ca| backup?
LlLher rman or alLer Lablespace begln backup wlll do
What are the 8ack ground processes |n Crac|e and what are they
1hls ls one of Lhe mosL frequenLly asked quesLlon1here are baslcally 9 rocesses buL ln a general sysLem we need Lo menLlon
Lhe flrsL flve background processes1hey do Lhe house keeplng acLlvlLles for Lhe Cracle and are common ln any sysLem
1he varlous background processes ln oracle are
a) uaLa 8ase WrlLer(u8W8) uaLa 8ase WrlLer WrlLes Modlfled blocks from uaLabase buffer cache Lo uaLa llles1hls ls requlred
slnce Lhe daLa ls noL wrlLLen whenever a LransacLlon ls commlLLed
b)LogWrlLer(LCW8) LogWrlLer wrlLes Lhe redo log enLrles Lo dlsk 8edo Log daLa ls generaLed ln redo log buffer of SCA As
LransacLlon commlLs and log buffer fllls LCW8 wrlLes log enLrles lnLo a onllne redo log flle
c) SysLem MonlLor(SMCn) 1he SysLem MonlLor performs lnsLance recovery aL lnsLance sLarLup 1hls ls useful for recovery
from sysLem fallure
d)rocess MonlLor(MCn) 1he rocess MonlLor performs process recovery when user rocess falls mon Clears and lrees
resources LhaL process was uslng
e) CheckolnL(Ck1) AL Speclfled Llmes all modlfled daLabase buffers ln SCA are wrlLLen Lo daLa flles by u8W8 aL CheckpolnLs
and updaLlng all daLa flles and conLrol flles of daLabase Lo lndlcaLe Lhe mosL recenL checkpolnL
f)Archleves(A8CP) 1he Archlver coples onllne redo log flles Lo archlval sLoral when Lhey are busy
g) 8ecoveror(8LCC) 1he 8ecoveror ls used Lo resolve Lhe dlsLrlbuLed LransacLlon ln neLwork
h) ulspaLcher (unnn) 1he ulspaLcher ls useful ln MulLl 1hreaded ArchlLecLure
l) Lckn We can have upLo 10 lock processes for lnLer lnsLance locklng ln parallel sql
now many types of Sq| Statements are there |n Crac|e
1here are baslcally 6 Lypes of sql sLaLmenLs1hey are
a) uaLa ueflnlLlon Language(uuL) 1he uuL sLaLemenLs deflne and malnLaln ob[ecLs and drop ob[ecLs
b) uaLa ManlpulaLlon Language(uML) 1he uML sLaLemenLs manlpulaLe daLabase daLa
c) 1ransacLlon ConLrol SLaLemenLs Manage change by uML
d) Sesslon ConLrol used Lo conLrol Lhe properLles of currenL sesslon enabllng and dlsabllng roles and changlng eg AlLer
SLaLemenLs SeL 8ole
e) SysLem ConLrol SLaLemenLs Change roperLles of Cracle lnsLance eg AlLer SysLem
f) Lmbedded Sql lncorporaLe uuL uML and 1CS ln rogrammlng Languageeg uslng Lhe Sql SLaLemenLs ln languages such
as C Cpen leLch execuLe and close
What |s a 1ransact|on |n Crac|e
A LransacLlon ls a Loglcal unlL of work LhaL compromlses one or more SCL SLaLemenLs execuLed by a slngle user Accordlng Lo
AnSl a LransacLlon beglns wlLh flrsL execuLable sLaLemenL and ends when lL ls expllclLly commlLLed or rolled back
key Words Used |n Crac|e
1he key words LhaL are used ln Cracle are
a) CommlLLlng A LransacLlon ls sald Lo be commlLLed when Lhe LransacLlon makes permanenL changes resulLlng from Lhe SCL
sLaLemenLs
b) 8ollback A LransacLlon LhaL reLracLs any of Lhe changes resulLlng from SCL sLaLemenLs ln 1ransacLlon
c) SaveolnL lor long LransacLlons LhaL conLaln many SCL sLaLemenLs lnLermedlaLe markers or savepolnLs are declared
SavepolnLs can be used Lo dlvlde a LransacLlon lnLo smaller polnLs
d) 8olllng lorward rocess of applylng redo log durlng recovery ls called rolllng forward
e) Cursor A cursor ls a handle ( name or a polnLer) for Lhe memory assoclaLed wlLh a speclflc sLamen A cursor ls baslcally an
area allocaLed by Cracle for execuLlng Lhe Sql SLaLemenL Cracle uses an lmpllclL cursor sLaLemenL for Slngle row query and
uses LxpllclL cursor for a mulLl row query
f) SysLem Clobal Area(SCA) 1he SCA ls a shared memory reglon allocaLed by Lhe Cracle LhaL conLalns uaLa and conLrol
lnformaLlon for one Cracle lnsLance lL conslsLs of uaLabase 8uffer Cache and 8edo log 8uffer
g) rogram Clobal Area (CA) 1he CA ls a memory buffer LhaL conLalns daLa and conLrol lnformaLlon for server process
g) uaLabase 8uffer Cache uaLabase 8uffer of SCA sLores Lhe mosL recenLly used blocks of daLabase daLa 1he seL of daLabase
buffers ln an lnsLance ls called uaLabase 8uffer Cache
h) 8edo log 8uffer 8edo log 8uffer of SCA sLores all Lhe redo log enLrles
l) 8edo Log llles 8edo log flles are seL of flles LhaL proLecL alLered daLabase daLa ln memory LhaL has noL been wrlLLen Lo uaLa
llles 1hey are baslcally used for backup when a daLabase crashes
[) rocess A rocess ls a Lhread of conLrol or mechanlsm ln CperaLlng SysLem LhaL execuLes serles of sLeps

What are rocedure funct|ons and ackages ?
rocedures and funcLlons conslsL of seL of L/SCL sLaLemenLs LhaL are grouped LogeLher as a unlL Lo solve a speclflc problem or
perform seL of relaLed Lasks
rocedures do noL 8eLurn values whlle luncLlons reLurn one Cne value ackages ackages rovlde a meLhod of encapsulaLlng
and sLorlng relaLed procedures funcLlons varlables and oLher ackage ConLenLs
What are Database 1r|ggers and Stored rocedures
uaLabase 1rlggers uaLabase 1rlggers are rocedures LhaL are auLomaLlcally execuLed as a resulL of lnserL ln updaLe Lo or
deleLe from Lable
uaLabase Lrlggers have Lhe values old and new Lo denoLe Lhe old value ln Lhe Lable before lL ls deleLed and Lhe new lndlcaLed
Lhe new value LhaL wlll be used u1 are useful for lmplemenLlng complex buslness rules whlch cannoL be enforced uslng Lhe
lnLegrlLy rulesWe can have Lhe Lrlgger as 8efore Lrlgger or AfLer 1rlgger and aL SLaLemenL or 8ow level eg operaLlons
lnserLupdaLe deleLe 3 before afLer 3*2 A LoLal of 6 comblnaLons
AL sLaLmenL level(once for Lhe Lrlgger) or row level( for every execuLlon ) 6 * 2 A LoLal of 12 1hus a LoLal of 12 comblnaLlons are
Lhere and Lhe resLrlcLlon of usage of 12 Lrlggers has been llfLed from Cracle 73 Cnwards
SLored rocedures SLored rocedures are rocedures LhaL are sLored ln Complled form ln Lhe daLabase1he advanLage of
uslng Lhe sLored procedures ls LhaL many users can use Lhe same procedure ln complled and ready Lo use formaL
now many Integr|ty ku|es are there and what are they
1here are 1hree lnLegrlLy 8ules 1hey are as follows
a) LnLlLy lnLegrlLy 8ule 1he LnLlLy lnLegrlLy 8ule enforces LhaL Lhe rlmary key cannoL be null
b) lorelgn key lnLegrlLy 8ule 1he lkl8 denoLes LhaL Lhe relaLlonshlp beLween Lhe forelgn key and Lhe prlmary key has Lo be
enforcedWhen Lhere ls daLa ln Chlld 1ables Lhe MasLer Lables cannoL be deleLed
c) 8uslness lnLegrlLy 8ules 1he 1hlrd lnLlgrlLy rule ls abouL Lhe complex buslness processes whlch cannoL be lmplemenLed by
Lhe above 2 rules
What are the Var|ous Master and Deta|| ke|at|on sh|ps
1he varlous MasLer and ueLall 8elaLlonshlp are
a) nonlsolaLed 1he MasLer cannoL be deleLed when a chlld ls exlslLlng
b) lsolaLed 1he MasLer can be deleLed when Lhe chlld ls exlslLlng
c) Cascadlng 1he chlld geLs deleLed when Lhe MasLer ls deleLed
What are the Var|ous 8|ock Coord|nat|on ropert|es
1he varlous 8lock CoordlnaLlon roperLles are
a) lmmedlaLe uefaulL SeLLlng 1he ueLall records are shown when Lhe MasLer 8ecord are shown
b) ueffered wlLh AuLo Cuery Cracle lorms defer feLchlng Lhe deLall records unLll Lhe operaLor navlgaLes Lo Lhe deLall block
c) ueffered wlLh no AuLo Cuery 1he operaLor musL navlgaLe Lo Lhe deLall block and expllclLly execuLe a query
What are the D|fferent Cpt|m|zat|on 1echn|ques
1he varlous CpLlmlsaLlon Lechnlques are
a) LxecuLe lan we can see Lhe plan of Lhe query and change lL accordlngly based on Lhe lndexes
b) CpLlmlzer_hlnL
seL_lLem_properLy(uepL8lockC1lMlZL8_Pln1ll8S1_8CWS)
SelecL /*+ llrsL_8ows */ uepLnounameLoc8owld from depL
where (uepLno 23)
c) CpLlmlze_Sql
8y seLLlng Lhe CpLlmlze_Sql no Cracle lorms asslgns a slngle cursor for all SCL sLaLemenLs1hls slow downs Lhe processlng
because for everLlme Lhe SCL musL be parsed whenver Lhey are execuLed
f43run module my_flrsLform userld scoLL/Llger opLlmlze_sql no
d) CpLlmlze_1p
8y seLLlng Lhe CpLlmlze_1p no Cracle lorms asslgns seperaLe cursor only for each query SLLLC1 sLaLemenL All oLher SCL
sLaLemenLs reuse Lhe cursor
f43run module my_flrsLform userld scoLL/Llger opLlmlze_1p no
now does one change an Crac|e users password?(for D8A)
lssue Lhe followlng SCL command
AL1L8 uSL8 luLn1lllLu 8?
lrom Cracle8 you can [usL Lype password from SCL*lus or lf you need Lo change anoLher users password Lype password
user_name Look aL Lhls example
SCL password
Changlng password for SCC11
Cld password
new password
8eLype new password
now does one create and drop database users?
Look aL Lhese examples
C8LA1L uSL8 scoLL
luLn1lllLu 8? Llger Asslgn password
uLlAuL1 1A8LLSACL Lools Asslgn space for Lable and lndex segmenLs
1LMC8A8? 1A8LLSACL Lemp Asslgn sorL space
u8C uSL8 scoLL CASCAuL 8emove user
AfLer creaLlng a new user asslgn Lhe requlred prlvlleges
C8An1 CCnnLC1 8LSCu8CL 1C scoLL
C8An1 u8A 1C scoLL Make user a u8 AdmlnlsLraLor
8emember Lo glve Lhe user some space quoLa on lLs Lablespaces
AL1L8 uSL8 scoLL CuC1A unLlMl1Lu Cn Lools
Who created a|| these users |n my database?] Can I drop th|s user? (for D8A)
Cracle creaLes a number of defaulL daLabase users or schemas when a new daLabase ls creaLed 8elow are a few of Lhem
S?S/CPAnCL_Cn_lnS1ALL or ln1L8nAL
Cracle uaLa ulcLlonary/ CaLalog
CreaLed by ?/rdbms/admln/sqlbsq and varlous caL*sql scrlpLs
Can password be changed ?es (uo so rlghL afLer Lhe daLabase was creaLed)
Can user be dropped nC
S?S1LM/MAnACL8
1he defaulL u8A user name (please do noL use S?S)
CreaLed by ?/rdbms/admln/sqlbsq
Can password be changed ?es (uo so rlghL afLer Lhe daLabase was creaLed)
Can user be dropped nC
Cu1Ln/Cu1Ln
SLored ouLllnes for opLlmlzer plan sLablllLy
CreaLed by ?/rdbms/admln/sqlbsq
Can password be changed ?es (uo so rlghL afLer Lhe daLabase was creaLed)
Can user be dropped nC
SCC11/1lCL8 AuAMS/WCCu !CnLS/S1LLL CLA8k/CLC1P and 8LAkL/AL8
1ralnlng/ demonsLraLlon users conLalnlng Lhe popular LM and uL1 Lables
CreaLed by ?/rdbms/admln/uLlsamplsql
Can password be changed ?es
Can user be dropped ?LS urop users cascade from all producLlon envlronmenLs
P8/P8 (Puman 8esources) CL/CL (Crder LnLry) SP/SP (Sales PlsLory)
1ralnlng/ demonsLraLlon users conLalnlng Lhe popular LMLC?LLS and uLA81MLn1S Lables
CreaLed by ?/demo/schema/mksamplesql
Can password be changed ?es
Can user be dropped ?LS urop users cascade from all producLlon envlronmenLs
C1xS?S/C1xS?S
Cracle lnLerMedla (Con1exL CarLrldge) admlnlsLraLor user
CreaLed by ?/cLx/admln/dr0csyssql
18ACLSv8/18ACL
Cracle 1race server
CreaLed by ?/rdbms/admln/oLrcsvrsql
u8SnM/u8SnM
Cracle lnLelllgenL agenL
CreaLed by ?/rdbms/admln/caLsnmpsql called from caLalogsql
Can password be changed ?es puL Lhe new password ln snmp_rwora flle
Can user be dropped ?LS Cnly lf you do noL use Lhe lnLelllgenL AgenLs
C8uLuClnS/C8uLuClnS
Cb[ecL 8elaLlonal uaLa (C8u) user used by 1lme Serles eLc
CreaLed by ?/ord/admln/ordlnsLsql
C8uS?S/C8uS?S
Cb[ecL 8elaLlonal uaLa (C8u) user used by 1lme Serles eLc
CreaLed by ?/ord/admln/ordlnsLsql
uSS?S/uSS?S
Cracle uynamlc Servlces and SyndlcaLlon Server
CreaLed by ?/ds/sql/dssys_lnlLsql
MuS?S/MuS?S
Cracle SpaLlal admlnlsLraLor user
CreaLed by ?/ord/admln/ordlnsLsql
Au8C8A$C88$unAu1PLn1lCA1Lu/lnvALlu
used for users who do noL auLhenLlcaLe ln Aurora/C88
CreaLed by ?/[avavm/lnsLall/lnlL_orbsql called from ?/[avavm/lnsLall/lnlL[vmsql
L8lS1A1/L8lS1A1
Cracle SLaLlsLlcs ackage (S1A1SACk) LhaL supersedes u1L8S1A1/u1LLS1A1
CreaLed by ?/rdbms/admln/sLaLscresql
8emember Lo change Lhe passwords for Lhe S?S and S?S1LM users lmmedlaLely afLer lnsLallaLlon!
LxcepL for Lhe user S?S Lhere should be no problem alLerlng Lhese users Lo use a dlfferenL defaulL and Lemporary Lablespace
now does one enforce str|ct password contro|? (for D8A)
8y defaulL Cracles securlLy ls noL exLremely good lor example Cracle wlll allow users Lo choose slngle characLer passwords
and passwords LhaL maLch Lhelr names and userlds Also passwords donL ever explre 1hls means LhaL one can hack an accounL
for years wlLhouL ever locklng Lhe user
lrom Cracle8 one can manage passwords Lhrough proflles Some of Lhe Lhlngs LhaL one can resLrlcL
lAlLLu_LCCln_A11LM1S falled logln aLLempLs before Lhe accounL ls locked
ASSWC8u_LllL_1lML llmlLs Lhe number of days Lhe same password can be used for auLhenLlcaLlon
ASSWC8u_8LuSL_1lML number of days before a password can be reused
ASSWC8u_8LuSL_MAx number of password changes requlred before Lhe currenL password can be reused
ASSWC8u_LCCk_1lML number of days an accounL wlll be locked afLer maxlmum falled logln aLLempLs
ASSWC8u_C8ACL_1lML number of days afLer Lhe grace perlod beglns durlng whlch a warnlng ls lssued and logln ls allowed
ASSWC8u_vL8ll?_lunC1lCn password complexlLy verlflcaLlon scrlpL
Look aL Lhls slmple example
C8LA1L 8CllLL my_proflle LlMl1
ASSWC8u_LllL_1lML 30
AL1L8 uSL8 scoLL 8CllLL my_proflle
now does one sw|tch to another user |n Crac|e? (for D8A)
users normally use Lhe connecL sLaLemenL Lo connecL from one daLabase user Lo anoLher Powever u8As can swlLch from
one user Lo anoLher wlLhouL a password Cf course lL ls noL advlsable Lo brldge Cracles securlLy buL look aL Lhls example SCL
selecL password from dba_users where usernameSCC11
ASSWC8u
l894844C34402867
SCL alLer user scoLL ldenLlfled by llon
user alLered

SCL connecL scoLL/llon
ConnecLed

8LM uo whaLever you llke
SCL connecL sysLem/manager
ConnecLed

SCL alLer user scoLL ldenLlfled by values l894844C34402867
user alLered
SCL connecL scoLL/Llger
ConnecLed
noLe Also see Lhe susql scrlpL ln Lhe useful ScrlpLs and Sample rograms age
What are snap shots and v|ews
SnapshoLs are mlrror or repllcas of Lables vlews are bullL uslng Lhe columns from one or more Lables 1he Slngle 1able vlew can
be updaLed buL Lhe vlew wlLh mulLl Lable cannoL be updaLed
What are the CCS concepts |n Crac|e
Cracle does lmplemenL Lhe CCS concepLs 1he besL example ls Lhe roperLy Classes We can caLegorlze Lhe properLles by
seLLlng Lhe vlsual aLLrlbuLes and Lhen aLLach Lhe properLy classes for Lhe ob[ecLs CCS supporLs Lhe concepLs of ob[ecLs and
classes and we can conslder Lhe properLy classes as classes and Lhe lLems as ob[ecLs
What |s the d|fference between cand|date key un|que key and pr|mary key
CandldaLe keys are Lhe columns ln Lhe Lable LhaL could be Lhe prlmary keys and Lhe prlmary key ls Lhe key LhaL has been
selecLed Lo ldenLlfy Lhe rows unlque key ls also useful for ldenLlfylng Lhe dlsLlncL rows ln Lhe Lable)
What |s concurrency
Concurrency ls allowlng slmulLaneous access of same daLa by dlfferenL users Locks useful for acceslng Lhe daLabase are
a) Lxcluslve
1he excluslve lock ls useful for locklng Lhe row when an lnserLupdaLe or deleLe ls belng done1hls lock should noL be applled
when we do only selecL from Lhe row
b) Share lock
We can do Lhe Lable as Share_Lock as many share_locks can be puL on Lhe same resource
rev||eges and Grants
revlleges are Lhe rlghL Lo execuLe a parLlculare Lype of SCL sLaLemenLs eg 8lghL Lo ConnecL 8lghL Lo creaLe 8lghL Lo
resource CranLs are glven Lo Lhe ob[ecLs so LhaL Lhe ob[ecL mlghL be accessed accordlngly1he granL has Lo be glven by Lhe
owner of Lhe ob[ecL
1ab|e SpaceData I||esarameter I||e Contro| I||es
1able Space 1he Lable space ls useful for sLorlng Lhe daLa ln Lhe daLabaseWhen a daLabase ls creaLed Lwo Lable spaces are
creaLed
a) SysLem 1able space 1hls daLa flle sLores all Lhe Lables relaLed Lo Lhe sysLem and dba Lables
b) user 1able space 1hls daLa flle sLores all Lhe user relaLed Lables
We should have seperaLe Lable spaces for sLorlng Lhe Lables and lndexes so LhaL Lhe access ls fasL
uaLa llles Lvery Cracle uaLa 8ase has one or more physlcal daLa flles1hey sLore Lhe daLa for Lhe daLabaseLvery daLaflle ls
assoclaLed wlLh only one daLabaseCnce Lhe uaLa flle ls creaLed Lhe slze cannoL change1o lncrease Lhe slze of Lhe daLabase Lo
sLore more daLa we have Lo add daLa flle
arameLer llles arameLer flle ls needed Lo sLarL an lnsLanceA parameLer flle conLalns Lhe llsL of lnsLance conflguraLlon
parameLers eg
db_block_buffers 300
db_name C8A7
db_domaln usacme lang
ConLrol llles ConLrol flles record Lhe physlcal sLrucLure of Lhe daLa flles and redo log flles
1hey conLaln Lhe ub name name and locaLlon of dbs daLa flles redo log flles and Llme sLamp
hys|ca| Storage of the Data
1he flnesL level of granularlLy of Lhe daLa base are Lhe daLa blocks
uaLa 8lock Cne uaLa 8lock correspond Lo speclflc number of physlcal daLabase space
LxLenL LxLenL ls Lhe number of speclflc number of conLlglous daLa blocks
SegmenLs SeL of LxLenLs allocaLed for LxLenLs 1here are Lhree Lypes of SegmenLs
a) uaLa SegmenL non ClusLered 1able has daLa segmenL daLa of every Lable ls sLored ln clusLer daLa segmenL
b) lndex SegmenL Lach lndex has lndex segmenL LhaL sLores daLa
c) 8oll 8ack SegmenL 1emporarlly sLore undo lnformaLlon
What are the ct Iree and ct Used
cL lree ls used Lo denoLe Lhe percenLage of Lhe free space LhaL ls Lo be lefL when creaLlng a Lable Slmllarly cL used ls used Lo
denoLe Lhe percenLage of Lhe used space LhaL ls Lo be used when creaLlng a Lable
eg cLfree 20 cLused 40
What |s kow Cha|n|ng
1he daLa of a row ln a Lable may noL be able Lo flL Lhe same daLa blockuaLa for row ls sLored ln a chaln of daLa blocks
What |s a 2 hase Comm|t
1wo hase commlL ls used ln dlsLrlbuLed daLa base sysLems 1hls ls useful Lo malnLaln Lhe lnLegrlLy of Lhe daLabase so LhaL all
Lhe users see Lhe same values lL conLalns uML sLaLemenLs or 8emoLe rocedural calls LhaL reference a remoLe ob[ecL 1here
are baslcally 2 phases ln a 2 phase commlL
a) repare hase Clobal coordlnaLor asks parLlclpanLs Lo prepare
b) CommlL hase CommlL all parLlclpanLs Lo coordlnaLor Lo repared 8ead only or aborL 8eply
What |s the d|fference between de|et|ng and truncat|ng of tab|es
ueleLlng a Lable wlll noL remove Lhe rows from Lhe Lable buL enLry ls Lhere ln Lhe daLabase dlcLlonary and lL can be reLrleved 8uL
LruncaLlng a Lable deleLes lL compleLely and lL cannoL be reLrleved
What are mutat|ng tab|es
When a Lable ls ln sLaLe of LranslLlon lL ls sald Lo be muLaLlng eg lf a row has been deleLed Lhen Lhe Lable ls sald Lo be
muLaLlng and no operaLlons can be done on Lhe Lable excepL selecL
What are Codd ku|es
Codd 8ules descrlbe Lhe ldeal naLure of a 8u8MS no 8u8MS saLlsfles all Lhe 12 codd rules and Cracle SaLlsfles 11 of Lhe 12
rules and ls Lhe only 8dbms Lo saLlsfy Lhe maxlmum number of rules
What |s Norma||sat|on
normallsaLlon ls Lhe process of organlslng Lhe Lables Lo remove Lhe redundancy1here are malnly 3 normallsaLlon rules
a) 1 normal lorm A Lable ls sald Lo be ln 1sL normal lorm when Lhe aLLrlbuLes are aLomlc
b) 2 normal lorm A Lable ls sald Lo be ln 2nd normal lorm when all Lhe candldaLe keys are dependanL on Lhe prlmary key
c) 3rd normal lorm A Lable ls sald Lo be Lhlrd normal form when lL ls noL dependanL LranslLlvely
What |s the D|fference between a post query and a pre query
A posL query wlll flre for every row LhaL ls feLched buL Lhe pre query wlll flre only once
De|et|ng the Dup||cate rows |n the tab|e
We can deleLe Lhe dupllcaLe rows ln Lhe Lable by uslng Lhe 8owld
Can U d|sab|e database tr|gger? now?
?es WlLh respecL Lo Lable
AL1L8 1A8LL 1A8LL
ulSA8LL all_Lrlgger
What |s pseudo co|umns ? Name them?
A pseudocolumn behaves llke a Lable column buL ls noL acLually sLored ln Lhe Lable ?ou can selecL from pseudocolumns buL
you cannoL lnserL updaLe or deleLe Lhelr values 1hls secLlon descrlbes Lhese pseudocolumns
* Cu88vAL
* nLx1vAL
* LLvLL
* 8CWlu
* 8CWnuM
now many co|umns can tab|e have?
1he number of columns ln a Lable can range from 1 Lo 234
Is space acqu|red |n b|ocks or extents ?
ln exLenLs
What |s c|ustered |ndex?
ln an lndexed clusLer rows are sLored LogeLher based on Lhelr clusLer key values Can noL applled for PASP
What are the datatypes supported 8y orac|e (IN1LkNAL)?
varchar2 numberChar MLSLA8LL
What are attr|butes of cursor?
lCunu nC1lCunu lSCLn8CWCCun1
Can you use se|ect |n IkCM c|ause of SL se|ect ?
?es
Wh|ch tr|gger are created when master deta|| re|ay?
masLer deleLe properLy
* nCnlSCLA1Lu (defaulL)
a) on check deleLe masLer
b) on clear deLalls
c) on populaLe deLalls
* lSCLA1Lu
a) on clear deLalls
b) on populaLe deLalls
* CASCAuL
a) perdeleLe
b) on clear deLalls
c) on populaLe deLalls
wh|ch system var|ab|es can be set by users?
S?S1LMMLSSACL_LLvLL
S?S1LMuA1L_1P8LSPCLu
S?S1LMLllLC1lvL_uA1L
S?S1LMSu8LSS_WC8klnC
What are ob[ect group?
An ob[ecL group ls a conLalner for a group of ob[ecLs ?ou deflne an ob[ecL group when you wanL Lo package relaLed ob[ecLs so
you can copy or reference Lhem ln anoLher module
What are referenced ob[ects?
8eferenclng allows you Lo creaLe ob[ecLs LhaL lnherlL Lhelr funcLlonallLy and appearance from oLher ob[ecLs 8eferenclng an
ob[ecL ls slmllar Lo copylng an ob[ecL excepL LhaL Lhe resulLlng reference ob[ecL malnLalns a llnk Lo lLs source ob[ecL A reference
ob[ecL auLomaLlcally lnherlLs any changes LhaL have been made Lo Lhe source ob[ecL when you open or regeneraLe Lhe module
LhaL conLalns Lhe reference ob[ecL
Can you store ob[ects |n ||brary?
8eferenclng allows you Lo creaLe ob[ecLs LhaL lnherlL Lhelr funcLlonallLy and appearance from oLher ob[ecLs 8eferenclng an
ob[ecL ls slmllar Lo copylng an ob[ecL excepL LhaL Lhe resulLlng reference ob[ecL malnLalns a llnk Lo lLs source ob[ecL A reference
ob[ecL auLomaLlcally lnherlLs any changes LhaL have been made Lo Lhe source ob[ecL when you open or regeneraLe Lhe module
LhaL conLalns Lhe reference ob[ecL
Is forms 4S ob[ect or|ented too| ? why?
yes parLlally 1) 8CL81? CLASS lnherlLance properLy 2) CvL8LCAulnC procedures and funcLlons
Can you |ssue DDL |n forms?
yes buL you have Lo use lC8MS_uuL
8eferenclng allows you Lo creaLe ob[ecLs LhaL lnherlL Lhelr funcLlonallLy and appearance from oLher ob[ecLs 8eferenclng an
ob[ecL ls slmllar Lo copylng an ob[ecL excepL LhaL Lhe resulLlng reference ob[ecL malnLalns a llnk Lo lLs source ob[ecL A reference
ob[ecL auLomaLlcally lnherlLs any changes LhaL have been made Lo Lhe source ob[ecL when you open or regeneraLe Lhe module
LhaL conLalns Lhe reference ob[ecL Any sLrlng expresslon up Lo 32k
a llLeral
an expresslon or a varlable represenLlng Lhe LexL of a block of dynamlcally creaLed L/SCL code
a uML sLaLemenL or
a uuL sLaLemenL
8esLrlcLlons
1he sLaLemenL you pass Lo lC8MS_uuL may noL conLaln blnd varlable references ln Lhe sLrlng buL Lhe values of blnd varlables
can be concaLenaLed lnLo Lhe sLrlng before passlng Lhe resulL Lo lC8MS_uuL
What |s SLCUkL property?
Pldes characLers LhaL Lhe operaLor Lypes lnLo Lhe LexL lLem 1hls seLLlng ls Lyplcally used for password proLecLlon
What are the types of tr|ggers and how the sequence of f|r|ng |n text |tem
1rlggers can be classlfled as key 1rlggers Mouse 1rlggers navlgaLlonal 1rlggers
key 1rlggers key 1rlggers are flred as a resulL of key acLloneg keynexLfleld keyupkeyuown
Mouse 1rlggers Mouse 1rlggers are flred as a resulL of Lhe mouse navlgaLloneg WhenmousebuLLonpresedwhenmouse
doublecllckedeLc
navlgaLlonal 1rlggers 1hese 1rlggers are flred as a resulL of navlgaLlon Lg osL1exLlLemreLexLlLem
We also have evenL Lrlggers llke when ?newformlnsLance and whennewblocklnsLance
We cannoL call resLrlcLed procedures llke go_Lo(?my_blockflrsL_lLem?) ln Lhe navlgaLlonal Lrlggers
8uL can use Lhem ln Lhe keynexLlLem
1he ulfference beLween keynexL and osL1exL ls an very lmporLanL quesLlon 1he keynexL ls flred as a resulL of Lhe key acLlon
whlle Lhe posL LexL ls flred as a resulL of Lhe mouse movemenL key nexL wlll noL flre unless Lhere ls a key evenL 1he sequence
of flrlng ln a LexL lLem are as follows
a) pre LexL
b) when new lLem
c) keynexL
d) when valldaLe
e) posL LexL
Can you store p|ctures |n database? now?
?es ln long 8aw daLaLype
What are property c|asses ? Can property c|asses have tr|gger?
roperLy class lnherlLance ls a powerful feaLure LhaL allows you Lo qulckly deflne ob[ecLs LhaL conform Lo your own lnLerface
and funcLlonallLy sLandards roperLy classes also allow you Lo make global changes Lo appllcaLlons qulckly 8y slmply changlng
Lhe deflnlLlon of a properLy class you can change Lhe deflnlLlon of all ob[ecLs LhaL lnherlL properLles from LhaL class
?es All Lype of Lrlggers
If you have property c|ass attached to an |tem and you have same tr|gger wr|tten for the |tem Wh|ch w||| f|re f|rst?
lLem level Lrlgger flres lf lLem level Lrlgger flres properLy level Lrlgger wonL flre 1rlggers aL Lhe lowesL level are always glven
Lhe flrsL preference 1he lLem level Lrlgger flres flrsL and Lhen Lhe block and Lhen Lhe lorm level Lrlgger
What are record groups ? * Can record groups created at runt|me?
A record group ls an lnLernal Cracle lorms daLa sLrucLure LhaL has a column/row framework slmllar Lo a daLabase Lable
Powever unllke daLabase Lables record groups are separaLe ob[ecLs LhaL belong Lo Lhe form module ln whlch Lhey are deflned
A record group can have an unllmlLed number of columns of Lype CPA8 LCnC nuM8L8 or uA1L provlded LhaL Lhe LoLal
number of columns does noL exceed 64k 8ecord group column names cannoL exceed 30 characLers
rogrammaLlcally record groups can be used whenever Lhe funcLlonallLy offered by a Lwodlmenslonal array of mulLlple daLa
Lypes ls deslrable
1?LS Cl 8LCC8u C8Cu
Cuery 8ecord Croup A query record group ls a record group LhaL has an assoclaLed SLLLC1 sLaLemenL 1he columns ln a query
record group derlve Lhelr defaulL names daLa Lypes and lengLhs from Lhe daLabase columns referenced ln Lhe SLLLC1
sLaLemenL 1he records ln a query record group are Lhe rows reLrleved by Lhe query assoclaLed wlLh LhaL record group
nonquery 8ecord Croup A nonquery record group ls a group LhaL does noL have an assoclaLed query buL whose sLrucLure and
values can be modlfled programmaLlcally aL runLlme
SLaLlc 8ecord Croup A sLaLlc record group ls noL assoclaLed wlLh a query raLher you deflne lLs sLrucLure and row values aL
deslgn Llme and Lhey remaln flxed aL runLlme
What are ALLk1?
An ALL81 ls a modal wlndow LhaL dlsplays a message noLlfylng operaLor of some appllcaLlon condlLlon
Can a button have |con and |abe| at the same t|me ?
nC
What |s mouse nav|gate property of button?
When Mouse navlgaLe ls 1rue (Lhe defaulL) Cracle lorms performs sLandard navlgaLlon Lo move Lhe focus Lo Lhe lLem when
Lhe operaLor acLlvaLes Lhe lLem wlLh Lhe mouse
When Mouse navlgaLe ls seL Lo lalse Cracle lorms does noL perform navlgaLlon (and Lhe resulLlng valldaLlon) Lo move Lo Lhe
lLem when an operaLor acLlvaLes Lhe lLem wlLh Lhe mouse
What |s ICkMS_MDI_WINDCW?
forms run lnslde Lhe Mul appllcaLlon wlndow 1hls properLy ls useful for calllng a form from anoLher one
What are t|mers ? when whent|merexp|red does not f|re?
1he When1lmerLxplred Lrlgger can noL flre durlng Lrlgger navlgaLlon or LransacLlon processlng
Can ob[ect group have a b|ock?
?es ob[ecL group can have block as well as program unlLs
now many types of canvases are there
1here are 2 Lypes of canvases called as ConLenL and SLack Canvas ConLenL canvas ls Lhe defaulL and Lhe one LhaL ls used mosLly
for glvlng Lhe base effecL lLs llke a plaLe on whlch we add lLems and sLacked canvas ls used for glvlng 3 dlmenslonal effecL
What are userex|ts?
lL lnvokes 3CL programs
Can you pass va|ues toandfro from fore|gn funct|on ? how ?
?es ?ou obLaln a reLurn value from a forelgn funcLlon by asslgnlng Lhe reLurn value Lo an Cracle lorms varlable or lLem Make
sure LhaL Lhe Cracle lorms varlable or lLem ls Lhe same daLa Lype as Lhe reLurn value from Lhe forelgn funcLlon
AfLer asslgnlng an Cracle lorms varlable or lLem value Lo a L/SCL varlable pass Lhe L/SCL varlable as a parameLer value ln
Lhe L/SCL lnLerface of Lhe forelgn funcLlon 1he L/SCL varlable LhaL ls passed as a parameLer musL be a valld L/SCL daLa
Lype lL musL also be Lhe approprlaLe parameLer Lype as deflned ln Lhe L/SCL lnLerface
What |s IAk18 structure ?
1he enLrles of ro * C and user exlLs and Lhe form whlch slmulaLe Lhe proc or user_exlL are sLored ln lAx18 Lable ln d/b
Can you ca|| WINSDk thru user ex|ts?
?LS
Does user ex|ts supports DLL on MSWINDCWS ?
?LS
What |s path sett|ng for DLL?
Make sure you lnclude Lhe name of Lhe uLL ln Lhe lC8MS43_uSL8Lxl1 varlable of Lhe C8ACLLlnl flle or rename Lhe uLL Lo
l43x18uLL lf you rename Lhe uLL Lo l43x18uLL replace Lhe exlsLlng l43x18uLL ln Lhe C8AWln8ln dlrecLory wlLh Lhe new
l43x18uLL
now |s mapp|ng of name of DLL and funct|on done?
1he dll can be creaLed uslng Lhe vlsual C++ / vlsual 8aslc 1ools and Lhen Lhe dll ls puL ln Lhe paLh LhaL ls deflned Lhe reglsLry
What |s precomp||er?
lL ls slmllar Lo C precompller dlrecLlves
Can you connect to non orac|e datasource ?
?es
What are keymode and |ock|ng mode propert|es? |eve| ?
key Mode Speclfles how oracle forms unlquely ldenLlfles rows ln Lhe daLabase1hls ls properLy lncludes for appllcaLlon LhaL wlll
run agalnsL nCnC8ACLL daLasources
key seLLlng unlque (defaulL)
daLeable
nupdaLeable

Locklng mode
Speclfles when Cracle lorms should aLLempL Lo obLaln daLabase locks on rows LhaL correspond Lo querled records ln Lhe form
a) lmmedlaLe b) delayed
What are savepo|nt mode and cursor mode propert|es ? |eve|?
Speclfles wheLher Cracle lorms should lssue savepolnLs durlng a sesslon 1hls properLy ls lncluded prlmarlly for appllcaLlons
LhaL wlll run agalnsL nonC8ACLL daLa sources lor appllcaLlons LhaL wlll run agalnsL C8ACLL use Lhe defaulL seLLlng
Cursor mode deflne cursor sLaLe across LransacLlon Cpen/close
What |s transact|ona| tr|gger property?
ldenLlfles a block as LransacLlonal conLrol block le non daLabase block LhaL oracle forms should manage as LransacLlonal
block(nCnC8ACLL daLasource) defaulL lALSL
What |s CLL automat|on ?
CLL auLomaLlon allows an CLL server appllcaLlon Lo expose a seL of commands and funcLlons LhaL can be lnvoked from an CLL
conLalner appllcaLlon CLL auLomaLlon provldes a way for an CLL conLalner appllcaLlon Lo use Lhe feaLures of an CLL server
appllcaLlon Lo manlpulaLe an CLL ob[ecL from Lhe CLL conLalner envlronmenL (lC8MS_CLL)
What does |nvoke bu||t|n do?
1hls procedure lnvokes a meLhod
SynLax
8CCLuu8L CLL2lnvCkL
(ob[ecL ob[_Lype
meLhod vA8CPA82
llsL llsL_Lype 0)
arameLers
ob[ecL ls an CLL2 AuLomaLlon Cb[ecL
meLhod ls a meLhod (procedure) of Lhe CLL2 ob[ecL
llsL ls Lhe name of an argumenL llsL asslgned Lo Lhe CLL2C8LA1L_A8CLlS1 funcLlon
What are CLN_ICkMCALL_ICkMNLW_ICkM? d|ff?
CALL_lC8M lL calls Lhe oLher form buL parenL remalns acLlve when called form compleLes Lhe operaLlon lL releases lock and
conLrol goes back Lo Lhe calllng form
When you call a form Cracle lorms lssues a savepolnL for Lhe called form lf Lhe CLLA8_lC8M funcLlon causes a rollback when
Lhe called form ls currenL Cracle lorms rolls back uncommlLLed changes Lo Lhls savepolnL
CLn_lC8M When you call a form Cracle lorms lssues a savepolnL for Lhe called form lf Lhe CLLA8_lC8M funcLlon causes a
rollback when Lhe called form ls currenL Cracle lorms rolls back uncommlLLed changes Lo Lhls savepolnL
nLW_lC8M LxlLs Lhe currenL form and enLers Lhe lndlcaLed form 1he calllng form ls LermlnaLed as Lhe parenL form lf Lhe
calllng form had been called by a hlgher form Cracle lorms keeps Lhe hlgher call acLlve and LreaLs lL as a call Lo Lhe new form
Cracle lorms releases memory (such as daLabase cursors) LhaL Lhe LermlnaLed form was uslng
Cracle lorms runs Lhe new form wlLh Lhe same 8unform opLlons as Lhe parenL form lf Lhe parenL form was a called form
Cracle lorms runs Lhe new form wlLh Lhe same opLlons as Lhe parenL form
What |s ca|| form stack?
When successlve forms are loaded vla Lhe CALL_lC8M procedure Lhe resulLlng module hlerarchy ls known as Lhe call form
sLack
Can u port app||ct|ons across the p|atforms? how?
?es we can porL appllcaLlons across plaLformsConslder Lhe form developed ln a wlndows sysLem1he form would be generaLed
ln unlx sysLem by uslng f43gen my_formfmb scoLL/Llger
What |s a v|sua| attr|bute?
vlsual aLLrlbuLes are Lhe fonL color and paLLern properLles LhaL you seL for form and menu ob[ecLs LhaL appear ln your
appllcaLlons lnLerface
D|ff between VA1 and roperty C|ass?
named vlsual aLLrlbuLes deflne only fonL color and paLLern aLLrlbuLes properLy classes can conLaln Lhese and any oLher
properLles
?ou can change Lhe appearance of ob[ecLs aL runLlme by changlng Lhe named vlsual aLLrlbuLe programmaLlcally properLy class
asslgnmenL cannoL be changed programmaLlcally When an ob[ecL ls lnherlLlng from boLh a properLy class and a named vlsual
aLLrlbuLe Lhe named vlsual aLLrlbuLe seLLlngs Lake precedence and any vlsual aLLrlbuLe properLles ln Lhe class are lgnored
Wh|ch tr|gger re|ated to mouse?
WhenMouseCllck
WhenMouseuoubleCllck
WhenMouseuown
WhenMouseLnLer
WhenMouseLeave
WhenMouseMove
WhenMouseup
What |s Current record attr|bute property?
Speclfles Lhe named vlsual aLLrlbuLe used when an lLem ls parL of Lhe currenL record CurrenL 8ecord ALLrlbuLe ls frequenLly
used aL Lhe block level Lo dlsplay Lhe currenL row ln a mulLlrecord lf you deflne an lLemlevel CurrenL 8ecord ALLrlbuLe you can
dlsplay a predeLermlned lLem ln a speclal color when lL ls parL of Lhe currenL record buL you cannoL dynamlcally hlghllghL Lhe
currenL lLem as Lhe lnpuL focus changes
Can u change VA1 at run t|me?
?es ?ou can programmaLlcally change an ob[ecLs named vlsual aLLrlbuLe seLLlng Lo change Lhe fonL color and paLLern of Lhe
ob[ecL aL runLlme
Can u set defau|t font |n forms?
?es Change wlndows reglsLry(regedlL) SeL form43_fonL Lo Lhe deslred fonL
_break
What |s Log Sw|tch ?
1he polnL aL whlch C8ACLL ends wrlLlng Lo one onllne redo log flle and beglns wrlLlng Lo anoLher ls called a log swlLch
What |s Cn||ne kedo Log?
1he Cnllne 8edo Log ls a seL of Low or more onllne redo flles LhaL record all commlLLed changes made Lo Lhe daLabase
Whenever a LransacLlon ls commlLLed Lhe correspondlng redo enLrles Lemporarlly sLores ln redo log buffers of Lhe SCA are
wrlLLen Lo an onllne redo log flle by Lhe background process LCW8 1he onllne redo log flles are used ln cycllcal fashlon
Wh|ch parameter spec|f|ed |n the DLIAUL1 S1CkAGL c|ause of CkLA1L 1A8LLSACL cannot be a|tered after creat|ng the
tab|espace?
All Lhe defaulL sLorage parameLers deflned for Lhe Lablespace can be changed uslng Lhe AL1L8 1A8LLSACL command When
ob[ecLs are creaLed Lhelr lnl1lAL and MlnLx1LnS values cannoL be changed
What are the steps |nvo|ved |n Database Startup ?
SLarL an lnsLance MounL Lhe uaLabase and Cpen Lhe uaLabase
8olllng forward Lo recover daLa LhaL has noL been recorded ln daLa flles yeL has been recorded ln Lhe onllne redo log lncludlng
Lhe conLenLs of rollback segmenLs 8olllng back LransacLlons LhaL have been expllclLly rolled back or have noL been commlLLed
as lndlcaLed by Lhe rollback segmenLs regeneraLed ln sLep a 8eleaslng any resources (locks) held by LransacLlons ln process aL
Lhe Llme of Lhe fallure 8esolvlng any pendlng dlsLrlbuLed LransacLlons undergolng a Lwophase commlL aL Lhe Llme of Lhe
lnsLance fallure
Can Iu|| 8ackup be performed when the database |s open ?
no
What are the d|fferent modes of mount|ng a Database w|th the ara||e| Server ?
Lxcluslve Mode lf Lhe flrsL lnsLance LhaL mounLs a daLabase does so ln excluslve mode only LhaL lnsLance can mounL Lhe
daLabase
arallel Mode lf Lhe flrsL lnsLance LhaL mounLs a daLabase ls sLarLed ln parallel mode oLher lnsLances LhaL are sLarLed ln parallel
mode can also mounL Lhe daLabase
What are the advantages of operat|ng a database |n AkCnIVLLCG mode over operat|ng |t |n NC AkCnIVLLCG mode ?
CompleLe daLabase recovery from dlsk fallure ls posslble only ln A8CPlvLLCC mode Cnllne daLabase backup ls posslble only ln
A8CPlvLLCC mode
What are the steps |nvo|ved |n Database Shutdown ?
Close Lhe uaLabase ulsmounL Lhe uaLabase and ShuLdown Lhe lnsLance
What |s Arch|ved kedo Log ?
Archlved 8edo Log conslsLs of 8edo Log flles LhaL have archlved before belng reused
What |s kestr|cted Mode of Instance Startup ?
An lnsLance can be sLarLed ln (or laLer alLered Lo be ln) resLrlcLed mode so LhaL when Lhe daLabase ls open connecLlons are
llmlLed only Lo Lhose whose user accounLs have been granLed Lhe 8LS18lC1Lu SLSSlCn sysLem prlvllege
Can u have CLL ob[ects |n forms?
?es
Can u have V8k and CCk contro|s |n forms ?
?es
What r the types of w|ndows (W|ndow sty|e)?
Speclfles wheLher Lhe wlndow ls a uocumenL wlndow or a ulalog wlndow
What |s CLL Act|vat|on sty|e property?
Speclfles Lhe evenL LhaL wlll acLlvaLe Lhe CLL conLalnlng lLem
Can u change the mouse po|nter ? now?
?es Speclfles Lhe mouse cursor sLyle use Lhls properLy Lo dynamlcally change Lhe shape of Lhe cursor
now many types of co|umns are there and what are they
lormula columns lor dolng maLhemaLlcal calculaLlons and reLurnlng one value Summary Columns lor dolng summary
calculaLlons such as summaLlons eLc lace holder Columns 1hese columns are useful for sLorlng Lhe value ln a varlable
Can u have more than one |ayout |n report
lL ls posslble Lo have more Lhan one layouL ln a reporL by uslng Lhe addlLlonal layouL opLlon ln Lhe layouL edlLor
Can u run the report w|th out a parameter form
?es lL ls posslble Lo run Lhe reporL wlLhouL parameLer form by seLLlng Lhe A8AM value Lo null
What |s the |ock opt|on |n reports |ayout
8y uslng Lhe lock opLlon we cannoL move Lhe flelds ln Lhe layouL edlLor ouLslde Lhe frame 1hls ls useful for malnLalnlng Lhe
flelds
What |s I|ex
llex ls Lhe properLy of movlng Lhe relaLed flelds LogeLher by seLLlng Lhe flex properLy on
What are the m|n|mum number of groups requ|red for a matr|x report
1he mlnlmum of groups requlred for a maLrlx reporL are 4 e
What |s a Synonym ?
A synonym ls an allas for a Lable vlew sequence or program unlL
What |s a Sequence ?
A sequence generaLes a serlal llsL of unlque numbers for numerlcal columns of a daLabases Lables
What |s a Segment ?
A segmenL ls a seL of exLenLs allocaLed for a cerLaln loglcal sLrucLure
What |s schema?
A schema ls collecLlon of daLabase ob[ecLs of a user
Descr|be keferent|a| Integr|ty ?
A rule deflned on a column (or seL of columns) ln one Lable LhaL allows Lhe lnserL or updaLe of a row only lf Lhe value for Lhe
column or seL of columns (Lhe dependenL value) maLches a value ln a column of a relaLed Lable (Lhe referenced value) lL also
speclfles Lhe Lype of daLa manlpulaLlon allowed on referenced daLa and Lhe acLlon Lo be performed on dependenL daLa as a
resulL of any acLlon on referenced daLa
What |s nash C|uster ?
A row ls sLored ln a hash clusLer based on Lhe resulL of applylng a hash funcLlon Lo Lhe rows clusLer key value All rows wlLh Lhe
same hash key value are sLores LogeLher on dlsk
What |s a r|vate Synonyms ?
A rlvaLe Synonyms can be accessed only by Lhe owner
What |s Database L|nk ?
A daLabase llnk ls a named ob[ecL LhaL descrlbes a paLh from one daLabase Lo anoLher
What |s |ndex c|uster?
A clusLer wlLh an lndex on Lhe clusLer key
What |s hash c|uster?
A row ls sLored ln a hash clusLer based on Lhe resulL of applylng a hash funcLlon Lo Lhe rows clusLer key value All rows wlLh Lhe
same hash key value are sLores LogeLher on dlsk
When can hash c|uster used?
Pash clusLers are beLLer cholce when a Lable ls ofLen querled wlLh equallLy querles lor such querles Lhe speclfled clusLer key
value ls hashed 1he resulLlng hash key value polnLs dlrecLly Lo Lhe area on dlsk LhaL sLores Lhe speclfled rows
When can hash c|uster used?
Pash clusLers are beLLer cholce when a Lable ls ofLen querled wlLh equallLy querles lor such querles Lhe speclfled clusLer key
value ls hashed 1he resulLlng hash key value polnLs dlrecLly Lo Lhe area on dlsk LhaL sLores Lhe speclfled rows
What are the types of database ||nks?
rlvaLe daLabase llnk publlc daLabase llnk neLwork daLabase llnk
What |s pr|vate database ||nk?
rlvaLe daLabase llnk ls creaLed on behalf of a speclflc user A prlvaLe daLabase llnk can be used only when Lhe owner of Lhe llnk
speclfles a global ob[ecL name ln a SCL sLaLemenL or ln Lhe deflnlLlon of Lhe owners vlews or procedures
What |s pub||c database ||nk?
ubllc daLabase llnk ls creaLed for Lhe speclal user group u8LlC A publlc daLabase llnk can be used when any user ln Lhe
assoclaLed daLabase speclfles a global ob[ecL name ln a SCL sLaLemenL or ob[ecL deflnlLlon
What |s network database ||nk?
neLwork daLabase llnk ls creaLed and managed by a neLwork domaln servlce A neLwork daLabase llnk can be used when any
user of any daLabase ln Lhe neLwork speclfles a global ob[ecL name ln a SCL sLaLemenL or ob[ecL deflnlLlon
What |s data b|ock?
Cracle daLabases daLa ls sLored ln daLa blocks Cne daLa block corresponds Lo a speclflc number of byLes of physlcal daLabase
space on dlsk
now to def|ne data b|ock s|ze?
A daLa block slze ls speclfled for each Cracle daLabase when Lhe daLabase ls creaLed A daLabase users and allocaLed free
daLabase space ln Cracle daLa blocks 8lock slze ls speclfled ln lnlLora flle and cannoL be changed laLLer
What |s row cha|n|ng?
ln clrcumsLances all of Lhe daLa for a row ln a Lable may noL be able Lo flL ln Lhe same daLa block When Lhls occurs Lhe daLa for
Lhe row ls sLored ln a chaln of daLa block (one or more) reserved for LhaL segmenL
What |s an extent?
An exLenL ls a speclflc number of conLlguous daLa blocks obLalned ln a slngle allocaLlon and used Lo sLore a speclflc Lype of
lnformaLlon
What are the d|fferent types of segments?
uaLa segmenL lndex segmenL rollback segmenL and Lemporary segmenL
What |s a data segment?
Lach nonclusLered Lable has a daLa segmenL All of Lhe Lables daLa ls sLored ln Lhe exLenLs of lLs daLa segmenL Lach clusLer has
a daLa segmenL 1he daLa of every Lable ln Lhe clusLer ls sLored ln Lhe clusLers daLa segmenL
What |s an |ndex segment?
Lach lndex has an lndex segmenL LhaL sLores all of lLs daLa
What |s ro||back segment?
A daLabase conLalns one or more rollback segmenLs Lo Lemporarlly sLore undo lnformaLlon
What are the uses of ro||back segment?
1o generaLe readconslsLenL daLabase lnformaLlon durlng daLabase recovery and Lo rollback uncommlLLed LransacLlons by Lhe
users
What |s a temporary segment?
1emporary segmenLs are creaLed by Cracle when a SCL sLaLemenL needs a Lemporary work area Lo compleLe execuLlon When
Lhe sLaLemenL flnlshes execuLlon Lhe Lemporary segmenL exLenLs are released Lo Lhe sysLem for fuLure use
What |s a dataf||e?
Lvery Cracle daLabase has one or more physlcal daLa flles A daLabases daLa flles conLaln all Lhe daLabase daLa 1he daLa of
loglcal daLabase sLrucLures such as Lables and lndexes ls physlcally sLored ln Lhe daLa flles allocaLed for a daLabase
What are the character|st|cs of data f||es?
A daLa flle can be assoclaLed wlLh only one daLabase Cnce creaLed a daLa flle canL change slze Cne or more daLa flles form a
loglcal unlL of daLabase sLorage called a Lablespace
What |s a redo |og?
1he seL of redo log flles for a daLabase ls collecLlvely known as Lhe daLabase redo log
What |s the funct|on of redo |og?
1he prlmary funcLlon of Lhe redo log ls Lo record all changes made Lo daLa
What |s the use of redo |og |nformat|on?
1he lnformaLlon ln a redo log flle ls used only Lo recover Lhe daLabase from a sysLem or medla fallure prevenLs daLabase daLa
from belng wrlLLen Lo a daLabases daLa flles
What does a contro| f||e conta|ns?
uaLabase name
names and locaLlons of a daLabases flles and redolog flles
1lme sLamp of daLabase creaLlon
What |s the use of contro| f||e?
When an lnsLance of an Cracle daLabase ls sLarLed lLs conLrol flle ls used Lo ldenLlfy Lhe daLabase and redo log flles LhaL musL
be opened for daLabase operaLlon Lo proceed lL ls also used ln daLabase recovery
Is |t poss|b|e to sp||t the pr|nt rev|ewer |nto more than one reg|on?
?es
Is |t poss|b|e to center an ob[ect hor|zonta||y |n a repeat|ng frame that has a var|ab|e hor|zonta| s|ze?
?es
Ior a f|e|d |n a repeat|ng frame can the source come from the co|umn wh|ch does not ex|st |n the data group wh|ch forms
the base for the frame?
?es
Can a f|e|d be used |n a report w|thout |t appear|ng |n any data group?
?es
1he [o|n def|ned by the defau|t data ||nk |s an outer [o|n yes or no?
?es
Can a formu|a co|umn referred to co|umns |n h|gher group?
?es
Can a formu|a co|umn be obta|ned through a se|ect statement?
?es
Is |t poss|b|e to |nsert comments |nto sq| statements return |n the data mode| ed|tor?
?es
Is |t poss|b|e to d|sab|e the parameter from wh||e runn|ng the report?
?es
When a form |s |nvoked w|th ca||_form Does orac|e forms |ssues a save po|nt?
?es
Lxp|a|n the d|fference between a hot backup and a co|d backup and the benef|ts assoc|ated w|th each
A hoL backup ls baslcally Laklng a backup of Lhe daLabase whlle lL ls sLlll up and runnlng and lL musL be ln archlve log mode A
cold backup ls Laklng a backup of Lhe daLabase whlle lL ls shuL down and does noL requlre belng ln archlve log mode 1he beneflL
of Laklng a hoL backup ls LhaL Lhe daLabase ls sLlll avallable for use whlle Lhe backup ls occurrlng and you can recover Lhe
daLabase Lo any polnL ln Llme 1he beneflL of Laklng a cold backup ls LhaL lL ls Lyplcally easler Lo admlnlsLer Lhe backup and
recovery process ln addlLlon slnce you are Laklng cold backups Lhe daLabase does noL requlre belng ln archlve log mode and
Lhus Lhere wlll be a sllghL performance galn as Lhe daLabase ls noL cuLLlng archlve logs Lo dlsk
ou have [ust had to restore from backup and do not have any contro| f||es now wou|d you go about br|ng|ng up th|s
database?
l would creaLe a LexL based backup conLrol flle sLlpulaLlng where on dlsk all Lhe daLa flles where and Lhen lssue Lhe recover
command wlLh Lhe uslng backup conLrol flle clause
now do you sw|tch from an |n|tora f||e to a spf||e?
lssue Lhe creaLe spflle from pflle command
Lxp|a|n the d|fference between a data b|ock an extent and a segment
A daLa block ls Lhe smallesL unlL of loglcal sLorage for a daLabase ob[ecL As ob[ecLs grow Lhey Lake chunks of addlLlonal sLorage
LhaL are composed of conLlguous daLa blocks 1hese grouplngs of conLlguous daLa blocks are called exLenLs All Lhe exLenLs LhaL
an ob[ecL Lakes when grouped LogeLher are consldered Lhe segmenL of Lhe daLabase ob[ecL
G|ve two examp|es of how you m|ght determ|ne the structure of the tab|e DL1
use Lhe descrlbe command or use Lhe dbms_meLadaLageL_ddl package
Where wou|d you |ook for errors from the database eng|ne?
ln Lhe alerL log
Compare and contrast 1kUNCA1L and DLLL1L for a tab|e
8oLh Lhe LruncaLe and deleLe command have Lhe deslred ouLcome of geLLlng rld of all Lhe rows ln a Lable 1he dlfference
beLween Lhe Lwo ls LhaL Lhe LruncaLe command ls a uuL operaLlon and [usL moves Lhe hlgh waLer mark and produces a now
rollback 1he deleLe command on Lhe oLher hand ls a uML operaLlon whlch wlll produce a rollback and Lhus Lake longer Lo
compleLe
G|ve the reason|ng beh|nd us|ng an |ndex
lasLer access Lo daLa blocks ln a Lable
G|ve the two types of tab|es |nvo|ved |n produc|ng a star schema and the type of data they ho|d
lacL Lables and dlmenslon Lables A facL Lable conLalns measuremenLs whlle dlmenslon Lables wlll conLaln daLa LhaL wlll help
descrlbe Lhe facL Lables
What type of |ndex shou|d you use on a fact tab|e?
A 8lLmap lndex
G|ve two examp|es of referent|a| |ntegr|ty constra|nts
A prlmary key and a forelgn key
A tab|e |s c|ass|f|ed as a parent tab|e and you want to drop and recreate |t now wou|d you do th|s w|thout affect|ng the
ch||dren tab|es?
ulsable Lhe forelgn key consLralnL Lo Lhe parenL drop Lhe Lable recreaLe Lhe Lable enable Lhe forelgn key consLralnL
Lxp|a|n the d|fference between AkCnIVLLCG mode and NCAkCnIVLLCG mode and the benef|ts and d|sadvantages to each
A8CPlvLLCC mode ls a mode LhaL you can puL Lhe daLabase ln for creaLlng a backup of all LransacLlons LhaL have occurred ln
Lhe daLabase so LhaL you can recover Lo any polnL ln Llme nCA8CPlvLLCC mode ls baslcally Lhe absence of A8CPlvLLCC mode
and has Lhe dlsadvanLage of noL belng able Lo recover Lo any polnL ln Llme nCA8CPlvLLCC mode does have Lhe advanLage of
noL havlng Lo wrlLe LransacLlons Lo an archlve log and Lhus lncreases Lhe performance of Lhe daLabase sllghLly
What command wou|d you use to create a backup contro| f||e?
AlLer daLabase backup conLrol flle Lo Lrace
G|ve the stages of |nstance startup to a usab|e state where norma| users may access |t
S1A81u nCMCun1 lnsLance sLarLup
S1A81u MCun1 1he daLabase ls mounLed
S1A81u CLn 1he daLabase ls opened
What co|umn d|fferent|ates the V5 v|ews to the GV5 v|ews and how?
1he lnS1_lu column whlch lndlcaLes Lhe lnsLance ln a 8AC envlronmenL Lhe lnformaLlon came from
now wou|d you go about generat|ng an LkLAIN p|an?
CreaLe a plan Lable wlLh uLlxplansql
use Lhe explaln plan seL sLaLemenL_ld LsL1 lnLo plan_Lable for a SCL sLaLemenL
Look aL Lhe explaln plan wlLh uLlxplpsql or uLlxplssql
now wou|d you go about |ncreas|ng the buffer cache h|t rat|o?
use Lhe buffer cache advlsory over a glven workload and Lhen query Lhe v$db_cache_advlce Lable lf a change was necessary
Lhen l would use Lhe alLer sysLem seL db_cache_slze command
Lxp|a|n an CkA01SSS
?ou geL Lhls error when you geL a snapshoL Loo old wlLhln rollback lL can usually be solved by lncreaslng Lhe undo reLenLlon or
lncreaslng Lhe slze of rollbacks ?ou should also look aL Lhe loglc lnvolved ln Lhe appllcaLlon geLLlng Lhe error message
Lxp|a|n the d|fference between 5CkACLL_nCML and 5CkACLL_8ASL
C8ACLL_8ASL ls Lhe rooL dlrecLory for oracle C8ACLL_PCML locaLed beneaLh C8ACLL_8ASL ls where Lhe oracle producLs
reslde
now wou|d you determ|ne the t|me zone under wh|ch a database was operat|ng?
selecL u81lMLZCnL from dual
Lxp|a|n the use of sett|ng GLC8AL_NAMLS equa| to 1kUL
SeLLlng CLC8AL_nAMLS dlcLaLes how you mlghL connecL Lo a daLabase 1hls varlable ls elLher 18uL or lALSL and lf lL ls seL Lo
18uL lL enforces daLabase llnks Lo have Lhe same name as Lhe remoLe daLabase Lo whlch Lhey are llnklng
What command wou|d you use to encrypt a L]SL app||cat|on?
W8A
Lxp|a|n the d|fference between a IUNC1ICN kCCLDUkL and ACkAGL
A funcLlon and procedure are Lhe same ln LhaL Lhey are lnLended Lo be a collecLlon of L/SCL code LhaL carrles a slngle Lask
Whlle a procedure does noL have Lo reLurn any values Lo Lhe calllng appllcaLlon a funcLlon wlll reLurn a slngle value A package
on Lhe oLher hand ls a collecLlon of funcLlons and procedures LhaL are grouped LogeLher based on Lhelr commonallLy Lo a
buslness funcLlon or appllcaLlon
Lxp|a|n the use of tab|e funct|ons
1able funcLlons are deslgned Lo reLurn a seL of rows Lhrough L/SCL loglc buL are lnLended Lo be used as a normal Lable or vlew
ln a SCL sLaLemenL 1hey are also used Lo plpellne lnformaLlon ln an L1L process
Name three adv|sory stat|st|cs you can co||ect
8uffer Cache Advlce SegmenL Level SLaLlsLlcs 1lmed SLaLlsLlcs
Where |n the Crac|e d|rectory tree structure are aud|t traces p|aced?
ln unlx $C8ACLL_PCML/rdbms/audlL ln Wlndows Lhe evenL vlewer
Lxp|a|n mater|a||zed v|ews and how they are used
MaLerlallzed vlews are ob[ecLs LhaL are reduced seLs of lnformaLlon LhaL have been summarlzed grouped or aggregaLed from
base Lables 1hey are Lyplcally used ln daLa warehouse or declslon supporL sysLems
When a user process fa||s what background process c|eans up after |t?
MCn
What background process refreshes mater|a||zed v|ews?
1he !ob Cueue rocesses
now wou|d you determ|ne what sess|ons are connected and what resources they are wa|t|ng for?
use of v$SLSSlCn and v$SLSSlCn_WAl1
Descr|be what redo |ogs are
8edo logs are loglcal and physlcal sLrucLures LhaL are deslgned Lo hold all Lhe changes made Lo a daLabase and are lnLended Lo
ald ln Lhe recovery of a daLabase
now wou|d you force a |og sw|tch?
AL1L8 S?S1LM SWl1CP LCCllLL
G|ve two methods you cou|d use to determ|ne what DDL changes have been made
?ou could use Logmlner or SLreams
What does coa|esc|ng a tab|espace do?
Coalesclng ls only valld for dlcLlonarymanaged Lablespaces and defragmenLs space by comblnlng nelghborlng free exLenLs lnLo
large slngle exLenLs
What |s the d|fference between a 1LMCkAk tab|espace and a LkMANLN1 tab|espace?
A Lemporary Lablespace ls used for Lemporary ob[ecLs such as sorL sLrucLures whlle permanenL Lablespaces are used Lo sLore
Lhose ob[ecLs meanL Lo be used as Lhe Lrue ob[ecLs of Lhe daLabase
Name a tab|espace automat|ca||y created when you create a database
1he S?S1LM Lablespace
When creat|ng a user what perm|ss|ons must you grant to a||ow them to connect to the database?
CranL Lhe CCnnLC1 Lo Lhe user
now do you add a data f||e to a tab|espace
AL1L8 1A8LLSACL Auu uA1AllLL SlZL
now do you res|ze a data f||e?
AL1L8 uA1A8ASL uA1AllLL 8LSlZL
What v|ew wou|d you use to |ook at the s|ze of a data f||e?
u8A_uA1A_llLLS
What v|ew wou|d you use to determ|ne free space |n a tab|espace?
u8A_l8LL_SACL
now wou|d you determ|ne who has added a row to a tab|e?
1urn on flne graln audlLlng for Lhe Lable
now can you rebu||d an |ndex?
AL1L8 lnuLx 8L8ulLu
Lxp|a|n what part|t|on|ng |s and what |ts benef|t |s
arLlLlonlng ls a meLhod of Laklng large Lables and lndexes and spllLLlng Lhem lnLo smaller more manageable pleces
ou have [ust comp||ed a L]SL package but got errors how wou|d you v|ew the errors?
SPCW L88C8S
now can you gather stat|st|cs on a tab|e?
1he AnAL?ZL command
now can you enab|e a trace for a sess|on?
use Lhe u8MS_SLSSlCnSL1_SCL_18ACL or
use AL1L8 SLSSlCn SL1 SCL_18ACL 18uL
What |s the d|fference between the SL*Loader and IMCk1 ut|||t|es?
1hese Lwo Cracle uLlllLles are used for loadlng daLa lnLo Lhe daLabase 1he dlfference ls LhaL Lhe lmporL uLlllLy relles on Lhe daLa
belng produced by anoLher Cracle uLlllLy LxC81 whlle Lhe SCL*Loader uLlllLy allows daLa Lo be loaded LhaL has been produced
by oLher uLlllLles from dlfferenL daLa sources [usL so long as lL conforms Lo ASCll formaLLed or dellmlLed flles
Name two f||es used for network connect|on to a database
1nSnAMLSC8A and SCLnL1C8A
What |s the funct|on of Cpt|m|zer ?
1he goal of Lhe opLlmlzer ls Lo choose Lhe mosL efflclenL way Lo execuLe a SCL sLaLemenL
What |s Lxecut|on |an ?
1he comblnaLlons of Lhe sLeps Lhe opLlmlzer chooses Lo execuLe a sLaLemenL ls called an execuLlon plan
Can one res|ze tab|espaces and data f||es? (for D8A)
Cne can manually lncrease or decrease Lhe slze of a daLaflle from Cracle 72 uslng Lhe command
AL1L8 uA1A8ASL uA1AllLL fllename2 8LSlZL 100M
8ecause you can change Lhe slzes of daLaflles you can add more space Lo your daLabase wlLhouL addlng more daLaflles 1hls ls
beneflclal lf you are concerned abouL reachlng Lhe maxlmum number of daLaflles allowed ln your daLabase
Manually reduclng Lhe slzes of daLaflles allows you Lo reclalm unused space ln Lhe daLabase 1hls ls useful for correcLlng errors
ln esLlmaLlons of space requlremenLs
Also daLaflles can be allowed Lo auLomaLlcally exLend lf more space ls requlred Look aL Lhe followlng command
C8LA1L 1A8LLSACL pcs_daLa_Ls
uA1AllLL cora_appspcspcsdaLa1dbf SlZL 3M
Au1CLx1Lnu Cn nLx1 1M MAxSlZL unLlMl1Lu
uLlAuL1 S1C8ACL (lnl1lAL 10240
nLx1 10240
MlnLx1Ln1S 1
MAxLx1Ln1S unLlMl1Lu
C1lnC8LASL 0)
CnLlnL
L8MAnLn1
What |s SAVL CIN1 ?
lor long LransacLlons LhaL conLaln many SCL sLaLemenLs lnLermedlaLe markers or savepolnLs can be declared whlch can be
used Lo dlvlde a LransacLlon lnLo smaller parLs 1hls allows Lhe opLlon of laLer rolllng back all work performed from Lhe currenL
polnL ln Lhe LransacLlon Lo a declared savepolnL wlLhln Lhe LransacLlon
What are the va|ues that can be spec|f|ed for C1IMI2Lk MCDL arameter ?
CCS1 and 8uLL
Can one rename a tab|espace? (for D8A)
no Lhls ls llsLed as LnhancemenL 8equesL 148742 Workaround
LxporL all of Lhe ob[ecLs from Lhe Lablespace
urop Lhe Lablespace lncludlng conLenLs
8ecreaLe Lhe Lablespace
lmporL Lhe ob[ecLs
What |s kULLbased approach to opt|m|zat|on ?
Chooslng an execuLlng planbased on Lhe access paLhs avallable and Lhe ranks of Lhese access paLhs
What are the va|ues that can be spec|f|ed for C1IMI2Lk_GCAL parameter of the AL1Lk SLSSICN Command ?
CPCCSLALL_8CWSll8S1_8CWS and 8uLL
now does one create a standby database? (for D8A)
Whlle your producLlon daLabase ls runnlng Lake an (lmage copy) backup and resLore lL on dupllcaLe hardware noLe LhaL an
exporL wlll noL work!!!
Cn your sLandby daLabase lssue Lhe followlng commands
AL1L8 uA1A8ASL C8LA1L S1Anu8? CCn18CLllLL AS fllename
AL1L8 uA1A8ASL MCun1 S1Anu8? uA1A8ASL
8LCCvL8 S1Anu8? uA1A8ASL
Cn sysLems prlor Lo Cracle 8l wrlLe a [ob Lo copy archlved redo log flles from Lhe prlmary daLabase Lo Lhe sLandby sysLem and
apply Lhe redo log flles Lo Lhe sLandby daLabase (plpe lL) 8emember Lhe daLabase ls recoverlng and wlll prompL you for Lhe
nexL log flle Lo apply
Cracle 8l onwards provlde an AuLomaLed SLandby uaLabase feaLure whlch wlll send archlved log flles Lo Lhe remoLe slLe vla
nL18 and apply Lhen Lo Lhe sLandby daLabase
When one needs Lo acLlvaLe Lhe sLandby daLabase sLop Lhe recovery process and acLlvaLe lL
AL1L8 uA1A8ASL AC1lvA1L S1Anu8? uA1A8ASL
now does one g|ve deve|opers access to trace f||es (requ|red as |nput to tkprof)? (for D8A)
1he alLer sesslon seL sql_LraceLrue command generaLes Lrace flles ln uSL8_uuM_uLS1 LhaL can be used by developers as
lnpuL Lo Lkprof Cn unlx Lhe defaulL flle mask for Lhese flles are rwx r
1here ls an undocumenLed lnl1C8A parameLer LhaL wlll allow everyone Lo read (rwx rr) Lhese Lrace flles
_Lrace_flles_publlc Lrue
lnclude Lhls ln your lnl1C8A flle and bounce your daLabase for lL Lo Lake effecL
What are the respons|b|||t|es of a Database Adm|n|strator ?
lnsLalllng and upgradlng Lhe Cracle Server and appllcaLlon Lools AllocaLlng sysLem sLorage and plannlng fuLure sLorage
requlremenLs for Lhe daLabase sysLem Managlng prlmary daLabase sLrucLures (Lablespaces) Managlng prlmary ob[ecLs
(Lablevlewslndexes) Lnrolllng users and malnLalnlng sysLem securlLy Lnsurlng compllance wlLh Cralce llcense agreemenL
ConLrolllng and monlLorlng user access Lo Lhe daLabase MonlLorlng and opLlmlzlng Lhe performance of Lhe daLabase lannlng
for backup and recovery of daLabase lnformaLlon MalnLaln archlved daLa on Lape 8acklng up and resLorlng Lhe daLabase
ConLacLlng Cracle CorporaLlon for Lechnlcal supporL
What |s a trace f||e and how |s |t created ?
Lach server and background process can wrlLe an assoclaLed Lrace flle When an lnLernal error ls deLecLed by a process or user
process lL dumps lnformaLlon abouL Lhe error Lo lLs Lrace 1hls can be used for Lunlng Lhe daLabase
What are the ro|es and user accounts created automat|ca||y w|th the database?
u8A role ConLalns all daLabase sysLem prlvlleges
S?S user accounL 1he u8A role wlll be asslgned Lo Lhls accounL All of Lhe base Lables and vlews for Lhe daLabases dlcLlonary
are sLore ln Lhls schema and are manlpulaLed only by C8ACLL S?S1LM user accounL lL has all Lhe sysLem prlvlleges for Lhe
daLabase and addlLlonal Lables and vlews LhaL dlsplay admlnlsLraLlve lnformaLlon and lnLernal Lables and vlews used by oracle
Lools are creaLed uslng Lhls username
What are the m|n|mum parameters shou|d ex|st |n the parameter f||e (|n|tora) ?
u8 nAML MusL seL Lo a LexL sLrlng of no more Lhan 8 characLers and lL wlll be sLored lnslde Lhe daLaflles redo log flles and
conLrol flles and conLrol flle whlle daLabase creaLlon
u8_uCMAln lL ls sLrlng LhaL speclfles Lhe neLwork domaln where Lhe daLabase ls creaLed 1he global daLabase name ls
ldenLlfled by seLLlng Lhese parameLers
(u8_nAML u8_uCMAln) CCn1C8L llLLS LlsL of conLrol fllenames of Lhe daLabase lf name ls noL menLloned Lhen defaulL
name wlll be used
u8_8LCCk_8ullL8S 1o deLermlne Lhe no of buffers ln Lhe buffer cache ln SCA
8CCLSSLS 1o deLermlne number of operaLlng sysLem processes LhaL can be connecLed Lo C8ACLL concurrenLly 1he value
should be 3 (background process) and addlLlonal 1 for each user
8CLL8ACk_SLCMLn1S LlsL of rollback segmenLs an C8ACLL lnsLance acqulres aL daLabase sLarLup Also opLlonally
LlCLnSL_MAx_SLSSlCnSLlCLnSL_SLSSlCn_WA8nlnC and LlCLnSL_MAx_uSL8S
Why and when shou|d I backup my database? (for D8A)
8ackup and recovery ls one of Lhe mosL lmporLanL aspecLs of a u8As [ob lf you lose your companys daLa you could very well
lose your [ob Pardware and sofLware can always be replaced buL your daLa may be lrreplaceable!
normally one would schedule a hlerarchy of dally weekly and monLhly backups however consulL wlLh your users before
decldlng on a backup schedule 8ackup frequency normally depends on Lhe followlng facLors
8aLe of daLa change/ LransacLlon raLe
uaLabase avallablllLy/ Can you shuLdown for cold backups?
CrlLlcallLy of Lhe daLa/ value of Lhe daLa Lo Lhe company
8eadonly Lablespace needs backlng up [usL once rlghL afLer you make lL readonly
lf you are runnlng ln archlvelog mode you can backup parLs of a daLabase over an exLended cycle of days
lf archlve logglng ls enabled one needs Lo backup archlved log flles Llmeously Lo prevenL daLabase freezes
LLc
Carefully plan backup reLenLlon perlods Lnsure enough backup medla (Lapes) are avallable and LhaL old backups are explred ln
Llme Lo make medla avallable for new backups CffslLe vaulLlng ls also hlghly recommended
lrequenLly LesL your ablllLy Lo recover and documenL all posslble scenarlos 8emember lLs Lhe llLLle Lhlngs LhaL wlll geL you
MosL falled recoverles are a resulL of organlzaLlonal errors and mlscommunlcaLlons
What strateg|es are ava||ab|e for back|ngup an Crac|e database? (for D8A)
1he followlng meLhods are valld for backlngup an Cracle daLabase
LxporL/lmporL LxporLs are loglcal daLabase backups ln LhaL Lhey exLracL loglcal deflnlLlons and daLa from Lhe daLabase Lo a
flle
Cold or Cffllne 8ackups ShuL Lhe daLabase down and backup up ALL daLa log and conLrol flles
PoL or Cnllne 8ackups lf Lhe daLabases are avallable and ln A8CPlvLLCC mode seL Lhe Lablespaces lnLo backup mode and
backup Lhelr flles Also remember Lo backup Lhe conLrol flles and archlved redo log flles
8MAn 8ackups Whlle Lhe daLabase ls offllne or onllne use Lhe rman uLlllLy Lo backup Lhe daLabase
lL ls advlsable Lo use more Lhan one of Lhese meLhods Lo backup your daLabase lor example lf you choose Lo do onllne
daLabase backups also cover yourself by dolng daLabase exporLs Also LesL ALL backup and recovery scenarlos carefully lL ls
beLLer Lo be save Lhan sorry
8egardless of your sLraLegy also remember Lo backup all requlred sofLware llbrarles parameLer flles password flles eLc lf your
daLabase ls ln A8CClvLLCC mode you also need Lo backup archlved log flles
What |s the d|fference between on||ne and off||ne backups? (for D8A)
A hoL backup ls a backup performed whlle Lhe daLabase ls onllne and avallable for read/wrlLe LxcepL for Cracle exporLs one
can only do onllne backups when runnlng ln A8CPlvLLCC mode
A cold backup ls a backup performed whlle Lhe daLabase ls offllne and unavallable Lo lLs users
What |s the d|fference between restor|ng and recover|ng? (for D8A)
8esLorlng lnvolves copylng backup flles from secondary sLorage (backup medla) Lo dlsk 1hls can be done Lo replace damaged
flles or Lo copy/move a daLabase Lo a new locaLlon
8ecovery ls Lhe process of applylng redo logs Lo Lhe daLabase Lo roll lL forward Cne can rollforward unLll a speclflc polnLln
Llme (before Lhe dlsasLer occurred) or rollforward unLll Lhe lasL LransacLlon recorded ln Lhe log flles Sql connecL S?S as
S?Su8A
Sql 8LCCvL8 uA1A8ASL un1lL 1lML 20010306160000 uSlnC 8ACku CCn18CLllLL
now does one backup a database us|ng the export ut|||ty? (for D8A)
Cracle exporLs are loglcal daLabase backups (noL physlcal) as Lhey exLracL daLa and loglcal deflnlLlons from Lhe daLabase lnLo a
flle CLher backup sLraLegles normally backup Lhe physlcal daLa flles
Cne of Lhe advanLages of exporLs ls LhaL one can selecLlvely relmporL Lables however one cannoL rollforward from an
resLored exporL flle 1o compleLely resLore a daLabase from an exporL flle one pracLlcally needs Lo recreaLe Lhe enLlre daLabase
Always do full sysLem level exporLs (luLL?LS) lull exporLs lnclude more lnformaLlon abouL Lhe daLabase ln Lhe exporL flle Lhan
user level exporLs
What are the bu||t_|ns used the d|sp|ay the LCV?
Show_lov
LlsL_values
now do you ca|| other Crac|e roducts from Crac|e Iorms?
8un_producL ls a bullLln used Lo lnvoke one of Lhe supporLed oracle Lools producLs and speclfles Lhe name of Lhe documenL or
module Lo be run lf Lhe called producL ls unavallable aL Lhe Llme of Lhe call Cracle lorms reLurns a message Lo Lhe operaLor
What |s the ma|n d|ff bet keports 20 keports 2S?
8eporL 23 ls ob[ecL orlenLed
What are the 8u||t|ns to d|sp|ay the usernamed ed|tor?
A user named edlLor can be dlsplayed programmaLlcally wlLh Lhe bullL ln procedure SPCWLul1C8 Lul1_1L1l1LM lndependenL
of any parLlcular LexL lLem
now many number of co|umns a record group can have?
A record group can have an unllmlLed number of columns of Lype CPA8 LCnC nuM8L8 or uA1L provlded LhaL Lhe LoLal
number of column does noL exceed 64k
What |s a uery kecord Group?
A query record group ls a record group LhaL has an assoclaLed SLLLC1 sLaLemenL 1he columns ln a query record group derlve
Lhelr defaulL names daLa Lypes had lengLhs from Lhe daLabase columns referenced ln Lhe SLLLC1 sLaLemenL 1he records ln
query record group are Lhe rows reLrleved by Lhe query assoclaLed wlLh LhaL record group
What does the term pane| refer to w|th regard to pages?
A panel ls Lhe no of physlcal pages needed Lo prlnL one loglcal page
What |s a master deta|| re|at|onsh|p?
A masLer deLall relaLlonshlp ls an assoclaLlon beLween Lwo base Lable blocks a masLer block and a deLall block 1he relaLlonshlp
beLween Lhe blocks reflecLs a prlmary key Lo forelgn key relaLlonshlp beLween Lhe Lables on whlch Lhe blocks are based
What |s a ||brary?
A llbrary ls a collecLlon of subprograms lncludlng user named procedures funcLlons and packages
What |s an anchor|ng ob[ect what |s |ts use? What are the var|ous sub events a mouse doub|e c||ck event |nvo|ves?
An anchorlng ob[ecL ls a prlnL condlLlon ob[ecL whlch used Lo expllclLly or lmpllclLly anchor oLher ob[ecLs Lo lLself
Use the add_group_co|umn funct|on to add a co|umn to record group that was created at a des|gn t|me?
lalse
What are the var|ous sub events a mouse doub|e c||ck event |nvo|ves? What are the var|ous sub events a mouse doub|e c||ck
event |nvo|ves?
uouble cllcklng Lhe mouse conslsLs of Lhe mouse down mouse up mouse cllck mouse down mouse up evenLs
What |s the use of break group? What are the var|ous sub events a mouse doub|e c||ck event |nvo|ves?
A break group ls used Lo dlsplay one record for one group ones Whlle mulLlple relaLed records ln oLher group can be dlsplayed
What tun|ng |nd|cators can one use? (for D8A)
1he followlng hlghlevel Lunlng lndlcaLors can be used Lo esLabllsh lf a daLabase ls performlng opLlmally or noL
8uffer Cache PlL 8aLlo
lormula PlL 8aLlo (Loglcal 8eads hyslcal 8eads) / Loglcal 8eads
AcLlon lncrease u8_CACPL_SlZL (u8_8LCCk_8ullL8S prlor Lo 9l) Lo lncrease hlL raLlo
Llbrary Cache PlL 8aLlo
AcLlon lncrease Lhe SPA8Lu_CCL_SlZL Lo lncrease hlL raLlo
What too|s]ut|||t|es does Crac|e prov|de to ass|st w|th performance tun|ng? (for D8A)
Cracle provlde Lhe followlng Lools/ uLlllLles Lo asslsL wlLh performance monlLorlng and Lunlng
1krof
u1L8S1A1SCL and u1LLS1A1SCL 8egln and end sLaLs monlLorlng
SLaLspack
Cracle LnLerprlse Manager 1unlng ack
What |s S1A1SACk and how does one use |t? (for D8A)
SLaLspack ls a seL of performance monlLorlng and reporLlng uLlllLles provlded by Cracle from Cracle8l and above SLaLspack
provldes lmproved 8S1A1/LS1A1 funcLlonallLy Lhough Lhe old 8S1A1/LS1A1 scrlpLs are sLlll avallable lor more lnformaLlon
abouL S1A1SACk read Lhe documenLaLlon ln flle $C8ACLL_PCML/rdbms/admln/spdocLxL
lnsLall SLaLspack
cd $C8ACLL_PCML/rdbms/admln
sqlplus / as sysdba [spdropsql lnsLall SLaLspack
sqlplus / as sysdba [spcreaLesql LnLer Lablespace names when prompLed
use SLaLspack
sqlplus perfsLaL/perfsLaL
exec sLaLspacksnap 1ake a performance snapshoLs
exec sLaLspacksnap
o CeL a llsL of snapshoLs
selecL SnA_lu SnA_1lML from S1A1S$SnASPC1
[spreporLsql LnLer Lwo snapshoL lds for dlfference reporL
CLher SLaLspack ScrlpLs
sppurgesql urge a range of SnapshoL lds beLween Lhe speclfled begln and end Snap lds
spauLosql Schedule a dbms_[ob Lo auLomaLe Lhe collecLlon of S1A1ACk sLaLlsLlcs
spcreaLesql lnsLalls Lhe S1A1SACk user Lables and package on a daLabase (8un as S?S)
spdropsql uelnsLall S1A1SACk from daLabase (8un as S?S)
sppurgesql ueleLe a range of SnapshoL lds from Lhe daLabase
spreporLsql 8eporL on dlfferences beLween values recorded ln Lwo snapshoLs
spLruncsql 1runcaLes all daLa ln SLaLspack Lables
What are the common kMAN errors (w|th so|ut|ons)? (for D8A)
Some of Lhe common 8MAn errors are
8MAn20242 SpeclflcaLlon does noL maLch any archlvelog ln Lhe recovery caLalog
Add Lo 8MAn scrlpL sql alLer sysLem archlve log currenL
8MAn06089 archlved log xyz noL found or ouL of sync wlLh caLalog
LxecuLe from 8MAn change archlvelog all valldaLe
now can you execute the user def|ned tr|ggers |n forms 30 ?
LxecuLe 1rlgger (Lrlggername)
What LkASL package procedure does ?
Lrase removes an lndlcaLed global varlable
What |s the d|fference between NAML_IN and CC ?
Copy ls package procedure and wrlLes values lnLo a fleld
name ln ls a package funcLlon and reLurns Lhe conLenLs of Lhe varlable Lo whlch you apply
What package procedure |s used for ca|||ng another form ?
Call (Lg Call(formname)
When the form |s runn|ng |n DL8UG mode If you want to exam|ne the va|ues of g|oba| var|ab|es and other form var|ab|es
What package procedure command you wou|d use |n your tr|gger text ?
8reak
S?S1LM vA8lA8LLS
1he va|ue recorded |n system|ast_record var|ab|e |s of type
a Number
b 8oo|ean
c Character ?
b 8oolean
What |s mean by rogram G|oba| Area (GA) ?
lL ls area ln memory LhaL ls used by a Slngle Cracle user rocess
What |s h|t rat|o ?
lL ls a measure of well Lhe daLa cache buffer ls handllng requesLs for daLa PlL 8aLlo (Loglcal 8eads hyslcal 8eads PlLs
Mlsses)/ Loglcal 8eads
now do u |mp|ement the If statement |n the Se|ect Statement
We can lmplemenL Lhe lf sLaLemenL ln Lhe selecL sLaLemenL by uslng Lhe uecode sLaLemenL eg selecL uLCCuL
(LM_CA11llrsL2Secondnull) Pere Lhe null ls Lhe else sLaLemenL where null ls done
now many types of Lxcept|ons are there
1here are 2 Lypes of excepLlons 1hey are
a) SysLem LxcepLlons
eg When no_daLa_found When Loo_many_rows
b) user ueflned LxcepLlons
eg My_excepLlon excepLlon
When My_excepLlon Lhen
What are the |n||ne and the precomp||er d|rect|ves
1he lnllne and precompller dlrecLlves deLecL Lhe values dlrecLly
now do you use the same |ov for 2 co|umns
We can use Lhe same lov for 2 columns by passlng Lhe reLurn values ln global values and uslng Lhe global values ln Lhe code
now many m|n|mum groups are requ|red for a matr|x report
1he mlnlmum number of groups ln maLrlx reporL are 4
What |s the d|fference between stat|c and dynam|c |ov
1he sLaLlc lov conLalns Lhe predeLermlned values whlle Lhe dynamlc lov conLalns values LhaL come aL run Llme
now does one manage Crac|e database users? (for D8A)
Cracle user accounLs can be locked unlocked forced Lo choose new passwords eLc lor example all accounLs excepL S?S and
S?S1LM wlll be locked afLer creaLlng an Cracle9lu8 daLabase uslng Lhe u8 ConflguraLlon AsslsLanL (dbca) u8As musL unlock
Lhese accounLs Lo make Lhem avallable Lo users
Look aL Lhese examples
AL1L8 uSL8 scoLL ACCCun1 LCCk lock a user accounL
AL1L8 uSL8 scoLL ACCCun1 unLCCk unlocks a locked users accounL
AL1L8 uSL8 scoLL ASSWC8u Lxl8L lorce user Lo choose a new password
What |s the d|fference between D8I||e Sequent|a| and Scattered keads?(for D8A)
8oLh db flle sequenLlal read and db flle scaLLered read evenLs slgnlfy Llme walLed for l/C read requesLs Lo compleLe 1lme ls
reporLed ln 100s of a second for Cracle 8l releases and below and 1000s of a second for Cracle 9l and above MosL people
confuse Lhese evenLs wlLh each oLher as Lhey Lhlnk of how daLa ls read from dlsk lnsLead Lhey should Lhlnk of how daLa ls read
lnLo Lhe SCA buffer cache
db flle sequenLlal read
A sequenLlal read operaLlon reads daLa lnLo conLlguous memory (usually a slngleblock read wlLh p31 buL can be mulLlple
blocks) Slngle block l/Cs are usually Lhe resulL of uslng lndexes 1hls evenL ls also used for rebulldlng Lhe conLrol flle and
readlng daLa flle headers (21) ln general Lhls evenL ls lndlcaLlve of dlsk conLenLlon on lndex reads
db flle scaLLered read
Slmllar Lo db flle sequenLlal reads excepL LhaL Lhe sesslon ls readlng mulLlple daLa blocks and scaLLers Lhem lnLo dlfferenL
dlsconLlnuous buffers ln Lhe SCA 1hls sLaLlsLlc ls nC8MALL? lndlcaLlng dlsk conLenLlon on full Lable scans 8arely daLa from full
Lable scans could be flLLed lnLo a conLlguous buffer area Lhese walLs would Lhen show up as sequenLlal reads lnsLead of
scaLLered reads
1he followlng query shows average walL Llme for sequenLlal versus scaLLered reads
prompL AvL8ACL WAl1 1lML lC8 8LAu 8LCuLS1S
selecL aaverage_walL SLC 8LAu baverage_walL SCA1 8LAu
from sysv_$sysLem_evenL a sysv_$sysLem_evenL b
where aevenL db flle sequenLlal read
and bevenL db flle scaLLered read
What |s the use of AkIILL opt|on |n Lk command ?
name of Lhe parameLer flle Lo be passed for exporL
What |s the use of 1A8LLS opt|on |n Lk command ?
LlsL of Lables should be exporLedze)
What |s the C1IMAL parameter?
lL ls used Lo seL Lhe opLlmal lengLh of a rollback segmenL
now does one use CkADL8UG from Server Manager] SL*|us? (for D8A)
LxecuLe Lhe C8AuL8uC PLL command from svrmgrl or sqlplus Lo obLaln a llsL of valld C8AuL8uC commands Look aL Lhese
examples
SCLLuS 8LM 1race SCL sLaLemenLs wlLh blnd varlables
SCLLuS oradebug seLospld 10121
Cracle pld 91 unlx process pld 10121 lmage oracleorcl
SCLLuS oradebug LvLn1 10046 Lrace name conLexL forever level 12
SLaLemenL processed
SCLLuS ! vl /app/oracle/admln/orcl/bdump/ora_10121Lrc
SCLLuS 8LM 1race rocess SLaLlsLlcs
SCLLuS oradebug seLorapld 2
unlx process pld 1436 lmage ora_pmon_orcl
SCLLuS oradebug procsLaL
SLaLemenL processed
SCLLuS oradebug 18ACLllLL_nAML
/app/oracle/admln/orcl/bdump/pmon_1436Lrc
SCLLuS 8LM LlsL semaphores and shared memory segmenLs ln use
SCLLuS oradebug lpc
SCLLuS 8LM uump Lrror SLack
SCLLuS oradebug seLospld
SCLLuS oradebug evenL lmmedlaLe Lrace name errorsLack level 3
SCLLuS 8LM uump arallel Server uLM locks
SCLLuS oradebug lkdebug a convlock
SCLLuS oradebug lkdebug a convres
SCLLuS oradebug lkdebug r (le 0x8066d338 from convres dump)
Are there any undocumented commands |n Crac|e? (for D8A)
Sure Lhere are buL lL ls hard Lo flnd Lhem Look aL Lhese examples
lrom Server Manager (Cracle73 and above) C8AuL8uC PLL
lL looks llke one can change memory locaLlons wlLh Lhe C8AuL8uC CkL command Anyone brave enough Lo LesL Lhls one for
us? revlously Lhls funcLlonallLy was avallable wlLh C8Au8x (ls l $C8ACLL_PCML/rdbms/llb/oradbxo make f oraclemk
oradbx) SCL*lus AL1L8 SLSSlCn SL1 Cu88Ln1_SCPLMA S?S
|f the max|mum record retr|eved property of the query |s set to 10 then a summary va|ue w||| be ca|cu|ated?
Cnly for 10 records
What are the d|fferent ob[ects that you cannot copy or reference |n ob[ect groups?
Cb[ecLs of dlfferenL modules
AnoLher ob[ecL groups
lndlvldual block dependenL lLems
rogram unlLs
What |s an CLL?
Cb[ecL Llnklng Lmbeddlng provldes you wlLh Lhe capablllLy Lo lnLegraLe ob[ecLs from many MsWlndows appllcaLlons lnLo a
slngle compound documenL creaLlng lnLegraLed appllcaLlons enables you Lo use Lhe feaLures form
Can a repeat|ng frame be created w|thout a data group as a base?
no
Is |t poss|b|e to set a f||ter cond|t|on |n a cross product group |n matr|x reports?
no
What |s Cver|oad|ng of procedures ?
1he Same procedure name ls repeaLed wlLh parameLers of dlfferenL daLaLypes and parameLers ln dlfferenL poslLlons varylng
number of parameLers ls called overloadlng of procedures eg u8MS_Cu1u1 puL_llne
What are the return va|ues of funct|ons SLCCDL and SLLkkM ? What |s ragma LkLC1ICN_INI1 ? Lxp|a|n the usage ?
SCLCCuL reLurns Lhe laLesL code of Lhe error LhaL has occurred
SCLL88M reLurns Lhe relevanL error message of Lhe SCLCCuL
What are the datatypes a ava||ab|e |n L]SL ?
Some scalar daLa Lypes such as nuM8L8 vA8CPA82 uA1L CPA8 LCnC 8CCLLAn Some composlLe daLa Lypes such as
8LCC8u 1A8LL
What are the two parts of a procedure ?
rocedure SpeclflcaLlon and rocedure 8ody
What |s the bas|c structure of L]SL ?
L/SCL uses block sLrucLure as lLs baslc sLrucLure Anonymous blocks or nesLed blocks can be used ln L/SCL
What |s L]SL tab|e ?
Cb[ecLs of Lype 1A8LL are called L/SCL Lables whlch are modeled as (buL noL Lhe same as) daLabase Lables L/SCL Lables
use a prlmary L/SCL Lables can have one column and a prlmary key Cursors
WnA1 IS kMAN ? (for D8A)
8ecovery Manager ls a Lool LhaL manages Lhe process of creaLlng backups and also manages Lhe process of resLorlng and
recoverlng from Lhem
Wn USL kMAN ? (for D8A)
no exLra cosLs lLs avallable free
?8MAn lnLroduced ln Cracle 8 lL has become slmpler wlLh newer verslons and easler Lhan user managed backups
?roper securlLy
??ou are 100 sure your daLabase has been backed up
?lLs conLalns deLall of Lhe backups Laken eLc ln lLs cenLral reposlLory
laclllLy for LesLlng valldlLy of backups also commands llke crosscheck Lo check Lhe sLaLus of backup
lasLer backups and resLores compared Lo backups wlLhouL 8MAn
8MAn ls Lhe only backup Lool whlch supporLs lncremenLal backups
Cracle 10g has goL furLher opLlmlzed lncremenLal backup whlch has resulLed ln lmprovemenL of performance durlng backup
and recovery Llme
arallel operaLlons are supporLed
8eLLer querylng faclllLy for knowlng dlfferenL deLalls of backup
no exLra redo generaLed when backup ls Lakencompared Lo onllne
backup wlLhouL 8MAn whlch resulLs ln savlng of space ln hard dlsk
8MAn an lnLelllgenL Lool
MalnLalns reposlLory of backup meLadaLa
8emembers backup seL locaLlon
knows whaL need Lo backed up
knows whaL ls requlred for recovery
knows whaL backups are redundanL
UNDLkS1ANDING 1nL kMAN AkCnI1LC1UkL
An oracle 8MAn comprlses of
8MAn LxLCu1A8LL 1hls could be presenL and flred even Lhrough cllenL slde
1A8CL1 uA1A8ASL 1hls ls Lhe daLabase whlch needs Lo be backed up
8LCCvL8? CA1ALCC 8ecovery caLalog ls opLlonal oLherwlse backup deLalls are sLored ln LargeL daLabase conLrolflle
lL ls a reposlLory of lnformaLlon querled and updaLed by 8ecovery Manager
lL ls a schema or user sLored ln Cracle daLabase Cne schema can supporL many daLabases
lL conLalns lnformaLlon abouL physlcal schema of LargeL daLabase daLaflle and archlve log backup seLs and pleces 8ecovery
caLalog ls a musL ln followlng scenarlos
ln order Lo sLore scrlpLs
lor Lablespace polnL ln Llme recovery

Medla ManagemenL SofLware
Medla ManagemenL sofLware ls a musL lf you are uslng 8MAn for sLorlng backup ln Lape drlve dlrecLly

8ackups ln 8MAn
Cracle backups ln 8MAn are of Lhe followlng Lype
8MAn compleLe backup C8 8MAn lncremenLal backup
1hese backups are of 8MAn proprleLary naLure

lMACL CC?
1he advanLage of ulng lmage copy ls lLs noL ln 8MAn proprleLary formaL

8ackup lormaL
8MAn backup ls noL ln oracle formaL buL ln 8MAn formaL Cracle backup comprlses of backup seLs and lL conslsLs of backup
pleces 8ackup seLs are loglcal enLlLy ln oracle 9l lL geLs sLored ln a defaulL locaLlon 1here are Lwo Lype of backup seLs uaLaflle
backup seLs Archlvelog backup seLs Cne more lmporLanL polnL of daLa flle backup seLs ls lL do noL lnclude empLy blocks A
backup seL would conLaln many backup pleces
A slngle backup plece conslsLs of physlcal flles whlch are ln 8MAn proprleLary formaL

Lxample of Laklng backup uslng 8MAn
1aklng 8MAn 8ackup
ln non archlve mode ln dos prompL Lype
8MAn
?ou geL Lhe 8MAn prompL
8MAn ConnecL 1argeL
ConnecL Lo LargeL daLabase Maglc
uslng LargeL daLabase conLrolflle lnsLead of recovery caLalog

LeLs Lake a slmple backup of daLabase ln non archlve mode
shuLdown lmmedlaLe ShuLdowns Lhe daLabase
sLarLup mounL
backup daLabase lLs sLarL backlng Lhe daLabase
alLer daLabase open
We can flre Lhe same command ln archlve log mode
And whole of daLaflles wlll be backed
8ackup daLabase plus archlvelog

8esLorlng daLabase
8esLorlng daLabase has been made very slmple ln 9l
lL ls [usL
8esLore daLabase
8MAn has become lnLelllgenL Lo ldenLlfy whlch daLaflles has Lo be resLored
and Lhe locaLlon of backuped up flle

Cracle LnhancemenL for 8MAn ln 10 C

llash 8ecovery Area
8lghL now Lhe prlce of hard dlsk ls falllng Many dba are Laklng oracle daLabase backup lnslde Lhe hard dlsk lLself slnce lL resulLs
ln lesser mean Llme beLween recoverablllLy
1he new parameLer lnLroduced ls
u8_8LCCvL8?_llLL_uLS1 /oracle/flash_recovery_area
8y conflgurlng Lhe 8MAn 8L1Ln1lCn CLlC? Lhe flash recovery area wlll auLomaLlcally deleLe obsoleLe backups and archlve
logs LhaL are no longer requlred based on LhaL conflguraLlon Cracle has lnLroduced new feaLures ln lncremenLal backup

Change 1racklng llle
Cracle 10g has Lhe faclllLy Lo dellver fasLer lncremenLals wlLh Lhe lmplemenLaLlon of changed Lracklng flle feaLure1hls wlll
resulLs ln fasLer backups lesser space consumpLlon and also reduces Lhe Llme needed for dally backups

lncremenLally updaLed 8ackups
Cracle daLabase 10g lncremenLally updaLes 8ackup feaLures merges Lhe lmage copy of a daLaflle wlLh 8MAn lncremenLal
backup 1he resulLlng lmage copy ls now updaLed wlLh block changes capLured by lncremenLal backups1he merglng of Lhe
lmage copy and lncremenLal backup ls lnlLlaLed wlLh 8MAn recover command 1hls resulLs ln fasLer recovery

8lnary compresslon Lechnlque reduces backup space usage by 3073

WlLh Lhe new uu8A1lCn opLlon for Lhe 8MAn 8ACku command u8As can welgh backup performance agalnsL sysLem servlce
level requlremenLs 8y speclfylng a duraLlon 8MAn wlll auLomaLlcally calculaLe Lhe approprlaLe backup raLe ln addlLlon u8As
can opLlonally speclfy wheLher backups should mlnlmlze Llme or sysLem load

new leaLures ln Cem Lo ldenLlfy 8MAn relaLed backup llke backup pleces backup seLs and lmage copy

Cracle 9l new feaLures erslsLenL 8MAn ConflguraLlon
A new conflgure command has been lnLroduced ln Cracle 9l LhaL leLs you conflgure varlous feaLures lncludlng auLomaLlc
channels parallellsm backup opLlons eLc
1hese auLomaLlc allocaLlons and opLlons can be overrldden by commands ln a 8MAn command flle

ConLrolflle AuLo backups
1hrough Lhls new feaLure 8MAn wlll auLomaLlcally perform a conLrolflle auLo backup afLer every backup or copy command

8lock Medla 8ecovery
lf we can resLore a few blocks raLher Lhan an enLlre flle we only need few blocks
We even donL need Lo brlng Lhe daLa flle offllne
SynLax for lL as follows
8lock 8ecover daLaflle 8 block 22

Conflgure 8ackup CpLlmlzaLlon
rlor Lo 9l whenever we backed up daLabase uslng 8MAn our backup also used Lake backup of read only Lable spaces whlch had
already been backed up and also Lhe same wlLh archlve log Loo
now wlLh 9l backup opLlmlzaLlon parameLer we can prevenL repeaL backup of read only Lablespace and archlve log 1he
command for Lhls ls as follows Conflgure backup opLlmlzaLlon on

Archlve Log fallover
lf 8MAn cannoL read a block ln an archlved log from a desLlnaLlon 8MAn auLomaLlcally aLLempLs Lo read from an alLernaLe
locaLlon Lhls ls called as archlve log fallover

1here are addlLlonal commands llke
backup daLabase noL backed up slnce Llme 31[an2002 140000
uo noL backup prevlously backed up flles
(say a prevlous backup falled and you wanL Lo resLarL from where lL lefL off)
Slmllar synLax ls supporLed for resLores
backup devlce sbL backup seL all Copy a dlsk backup Lo Lape
(backlng up a backup
AddlLlonally lL supporLs
8ackup of server parameLer flle
arallel operaLlon supporLed
LxLenslve reporLlng avallable
ScrlpLlng
uuplex backup seLs
CorrupL block deLecLlon
8ackup archlve logs

lLfalls of uslng 8MAn
revlous Lo verslon Cracle 9l backups were noL LhaL easy whlch means you had Lo allocaLe a channel compulsorlly Lo Lake
backup ?ou had Lo glve a run eLc 1he synLax was a blL complex 8MAn has now become very slmple and easy Lo use
lf you changed Lhe locaLlon of backup seL lL ls compulsory for you Lo reglsLer lL uslng 8MAn or whlle you are Lrylng Lo resLore
backup lL resulLed ln hanglng slLuaLlons
1here ls no meLhod Lo know wheLher durlng recovery daLabase resLore ls golng Lo fall because of mlsslng archlve log flle
Compulsory Medla ManagemenL only lf uslng Lape backup
lncremenLal backups Lhough used Lo consume less space used Lo be slower slnce lL used Lo read Lhe enLlre daLabase Lo flnd Lhe
changed blocks and also 1hey have dlfflculL Llme sLreamlng Lhe Lape devlce
Conslderable lmprovemenL has been made ln 10g Lo opLlmlze Lhe algorlLhm Lo handle changed block

CbservaLlon
lnLroduced ln Cracle 8 lL has become more powerful and slmpler wlLh newer verslon of Cracle 9 and 10 g
So lf you really donL wanL Lo mlss someLhlng crlLlcal please sLarL uslng 8MAn
Lxp|a|n UNICNMINUSUNICN ALL IN1LkSLC1 ?
ln1L8SLC1 reLurns all dlsLlncL rows selecLed by boLh querlesMlnuS reLurns all dlsLlncL rows selecLed by Lhe flrsL query buL noL
by Lhe secondunlCn reLurns all dlsLlncL rows selecLed by elLher queryunlCn ALL reLurns all rows selecLed by elLher query
lncludlng all dupllcaLes
Shou|d the CLM Conso|e be d|sp|ayed at a|| t|mes (when there are schedu|ed [obs)? (for D8A)
When a [ob ls submlLLed Lhe agenL wlll conflrm Lhe sLaLus of Lhe [ob When Lhe sLaLus shows up as scheduled you can close
down Lhe CLM console 1he processlng of Lhe [ob ls managed by Lhe ClA (Cracle lnLelllgenL AgenL) 1he ClA malnLalns a [ou flle
ln Lhe agenLs subdlrecLory When Lhe console ls launched communlcaLlon wlLh Lhe AgenL ls esLabllshed and Lhe conLenLs of Lhe
[ou flle (blnary) are reporLed Lo Lhe console [ob subsysLem noLe LhaL CLM wlll noL be able Lo send emall and paglng
noLlflcaLlons when Lhe Console ls noL sLarLed
D|fference between SU8S1k and INS1k ?
lnS18 (SLrlng1SLrlng2(n(m))lnS18 reLurns Lhe poslLlon of Lhe mLh occurrence of Lhe sLrlng 2 lnsLrlng1 1he search beglns from
nLh poslLlon of sLrlng1Su8S18 (SLrlng1 nm)Su8S18 reLurns a characLer sLrlng of slze m ln sLrlng1 sLarLlng from nLh poslLlon of
sLrlng1
What k|nd of [obs can one schedu|e w|th CLM? (for D8A)
CLM comes wlLh predeflned [obs llke LxporL lmporL run CS commands run sql scrlpLs SCL*lus commands eLc lL also glves
you Lhe flexlblllLy of schedullng cusLom [obs wrlLLen wlLh Lhe 1CL language
What are the pre requ|s|tes ?
l Lo modlfy daLa Lype of a column ? ll Lo add a column wlLh nC1 nuLL consLralnL ? 1o Modlfy Lhe daLaLype of a column Lhe
column musL be empLy Lo add a column wlLh nC1 nuLL consLraln Lhe Lable musL be empLy
now does one backout events and [obs dur|ng ma|ntenance s|ots? (for D8A)
ManagemneL and daLa collecLlon acLlvlLy can be suspended by lmposlng a blackouL Look aL Lhese examples
agenLcLl sLarL blackouL # 8lackouL Lhe enLrlre agenL
agenLcLl sLop blackouL # 8esume normal monlLorlng and managemenL
agenLcLl sLarL blackouL C8CL # 8lackouL daLabase C8CL
agenLcLl sLop blackouL C8CL # 8esume normal monlLorlng and managemenL
agenLcLl sLarL blackouL s [obs d 0020 # 8lackouL [obs for 20 mlnuLes
What are the types of SL Statement ?
uaLa ueflnlLlon Language
C8LA1LAL1L8u8C18unCA1L8LvCkLnC Auul1 CCMMl1

uaLa ManlpulaLlon Language
lnSL81uuA1LuLLL1LLCCk

1A8LLLxLAln LAn SLLLC11ransacLlonal ConLrol
CCMMl1 8CLL8ACkSesslon ConLrol AL1L8SLSSlCn SL1

8CLLSysLem ConLrol
AL1L8 S?S1LM
What |s the Crac|e Inte|||gent Agent? (for D8A)
1he Cracle lnLelllgenL AgenL (ClA) ls an auLonomous process LhaL needs Lo run on a remoLe node ln Lhe neLwork Lo make Lhe
node CLM manageable 1he Cracle lnLelllgenL AgenL ls responslble for
ulscoverlng LargeLs LhaL can be managed (uaLabase Servers neL8 LlsLeners eLc)
MonlLorlng of evenLs reglsLered ln LnLerprlse Manager and
LxecuLlng Lasks assoclaLed wlLh [obs submlLLed Lo LnLerprlse Manager
now does one start the Crac|e Inte|||gent Agent? (for D8A)
Cne needs Lo sLarL an ClA (Cracle lnLelllgenL AgenL) process on all machlnes LhaL wlll Lo be managed vla CLM
lor CLM 9l and above
agenLcLl sLarL agenL
agenLcLl sLop agenL

lor CLM 21 and below
lsnrcLl dbsnmp_sLarL
lsnrcLl dbsnmp_sLaLus

Cn Wlndows n1 sLarL Lhe CracleAgenL Servlce
lf Lhe agenL doesnL wanL Lo sLarL ensure your envlronmenL varlables are seL correcLly and deleLe Lhe followlng flles before
Lrylng agaln
1) ln $C8ACLL_PCML/neLwork/admln snmp_roora and snmp_rwora
2) Also deleLe ALL flles ln $C8ACLL_PCML/neLwork/agenL/
Can one wr|te scr|pts to send a|ert messages to the conso|e?
SLarL Lhe CLM console and creaLe a new evenL SelecL opLlon Lnable unsollclLed LvenL SelecL LesL unsollclLed LvenL When
enLerlng Lhe parameLers enLer values slmllar Lo Lhese
LvenL name /oracle/scrlpL/myalerL
Cb[ecL *
SeverlLy *
Message *
Cne can now wrlLe Lhe scrlpL and lnvoke Lhe oemevenL command Lo send alerLs Lo Lhe console Look aL Lhls example oemevenL
/oracle/scrlpL/myalerL uLS1lnA1lCn alerL My cusLom error message where uLS1lnA1lCn ls Lhe same value as enLered ln Lhe
MonlLored uesLlnaLlons fleld when youve reglsLered Lhe evenL ln Lhe CLM Console
Where can one get more |nformat|on about 1CL? (for D8A)
Cne can wrlLe cusLom evenL checklng rouLlnes for CLM uslng Lhe 1CL (1ool Command Language) language Check Lhe followlng
slLes for more lnformaLlon abouL 1CL
1he 1cl ueveloper xchange download and learn abouL 1CL
Cra1CL aL Sourceforge uownload Lhe Cra1CL package
1om olndexLers 1cl age CraLcl was orlglnally wrlLLen by 1om olndexLer
Are there any troub|eshoot|ng t|ps for CLM? (for D8A)
CreaLe Lhe CLM reposlLory wlLh a user (whlch wlll manage Lhe CLM) and sLore lL ln a Lablespace LhaL does noL share any daLa
wlLh oLher daLabase users lL ls a bad pracLlce Lo creaLe Lhe reposlLory wlLh S?S and SysLem
lf you are unable Lo launch Lhe console or Lhere ls a communlcaLlon problem wlLh Lhe lnLelllgenL agenL (daemon) Lnsure CCx
flles are reglsLered 1ype Lhe followlng ln Lhe uCS prompL (Lhe currenL dlrecLory should be $C8ACLL_PCML8ln
CCrawln938ln 8egSvr32 mmdx32CCx
CCrawln938ln 8egSvr32 vo[LCCx
lf you have a problem sLarLlng Lhe Cracle AgenL
SoluLlon A 8ackup Lhe *C flles and ueleLe all Lhe *C llles ($Cracle_home/neLwork/agenL folder)
8ackup and deleLe SnM_8Cora SnM_8Wora dbsnmpver and servlcesora flles ($Cracle_Pome/neLwork/admln folder)
SLarL Lhe Cracle AgenL servlce
SoluLlon 8 ?our verslon of lnLelllgenL AgenL could be buggy Check wlLh Cracle for any avallable paLches lor example Lhe
lnLelllgenL AgenL LhaL comes wlLh Cracle 804 ls buggy
SomeLlmes you geL a lalled sLaLus for Lhe [ob LhaL was execuLed successfully
Check Lhe log Lo see Lhe resulLs of Lhe execuLlon raLher Lhan relylng on Lhls sLaLus
What |s |mport]export and why does one need |t? (for D8A)
1he Cracle exporL (Lx) and lmporL (lM) uLlllLles are used Lo perform loglcal daLabase backup and recovery 1hey are also used
Lo move Cracle daLa from one machlne daLabase or schema Lo anoLher
1he lmp/exp uLlllLles use an Cracle proprleLary blnary flle formaL and can Lhus only be used beLween Cracle daLabases Cne
cannoL exporL daLa and expecL Lo lmporL lL lnLo a nonCracle daLabase lor more lnformaLlon on how Lo load and unload daLa
from flles read Lhe SCL*Loader lAC
1he exporL/lmporL uLlllLles are also commonly used Lo perform Lhe followlng Lasks
8ackup and recovery (small daLabases only)
8eorganlzaLlon of daLa/ LllmlnaLe daLabase fragmenLaLlon
ueLecL daLabase corrupLlon Lnsure LhaL all Lhe daLa can be read
1ransporLlng Lablespaces beLween daLabases
LLc
What |s a d|sp|ay |tem?
ulsplay lLems are slmllar Lo LexL lLems buL sLore only feLched or asslgned values CperaLors cannoL navlgaLe Lo a dlsplay lLem or
edlL Lhe value lL conLalns
now does one use the |mport]export ut|||t|es? (for D8A)
Look for Lhe lmp and exp execuLables ln your $C8ACLL_PCML/bln dlrecLory Cne can run Lhem lnLeracLlvely uslng
command llne parameLers or uslng parameLer flles Look aL Lhe lmp/exp parameLers before sLarLlng 1hese parameLers can be
llsLed by execuLlng Lhe followlng commands exp helpyes or lmp helpyes
1he followlng examples demonsLraLe how Lhe lmp/exp uLlllLles can be used
exp scoLL/Llger flleempdmp logemplog Lablesemp rowsyes lndexesno
exp scoLL/Llger flleempdmp Lables(empdepL)
lmp scoLL/Llger flleempdmp fullyes
lmp scoLL/Llger flleempdmp fromuserscoLL LouserscoLL LablesdepL
exp userldscoLL/Llger[orcl parflleexporLLxL
where exporLLxL conLalns
8ullL8100000
llLLaccounLdmp
luLLn
CWnL8scoLL
C8An1Sy
CCM8LSSy
nC1L lf you do noL llke command llne uLlllLles you can lmporL and exporL daLa wlLh Lhe Schema Manager Cul LhaL shlps wlLh
Cracle LnLerprlse Manager (CLM)
What are the types of v|sua| attr|bute sett|ngs?
CusLom vlsual aLLrlbuLes uefaulL vlsual aLLrlbuLes named vlsual aLLrlbuLes Wlndow
Can one export a subset of a tab|e? (for D8A)
lrom Cracle8l one can use Lhe CuL8? exporL parameLer Lo selecLlvely unload a subseL of Lhe daLa from a Lable Look aL Lhls
example
exp scoLL/Llger Lablesemp querywhere depLno10
What are the two ways to |ncorporate |mages |nto a orac|e forms app||cat|on?
8ollerplaLe lmages
lmage_lLems
Can one mon|tor how fast a tab|e |s |mported? (for D8A)
lf you need Lo monlLor how fasL rows are lmporLed from a runnlng lmporL [ob Lry one of Lhe followlng meLhods
MeLhod 1
selecL subsLr(sql_LexLlnsLr(sql_LexLln1C )30) Lable_name
rows_processed
round((sysdaLeLo_daLe(flrsL_load_Llmeyyyymmdd hh24mlss))*24*601) mlnuLes
Lrunc(rows_processed/((sysdaLeLo_daLe(flrsL_load_Llmeyyyymmdd hh24mlss))*24*60)) rows_per_mln
from sysv_$sqlarea
where sql_LexL llke lnSL81 ln1C
and command_Lype 2
and open_verslons 0
lor Lhls Lo work one needs Lo be on Cracle 73 or hlgher (72 mlghL also be Ck) lf Lhe lmporL has more Lhan one Lable Lhls
sLaLemenL wlll only show lnformaLlon abouL Lhe currenL Lable belng lmporLed
ConLrlbuLed by Csvaldo Ancarola 8s As ArgenLlna
MeLhod 2
use Lhe lLLu8ACkn lmporL parameLer 1hls command wlll Lell lM Lo dlsplay a doL for every n rows lmporLed
Can one |mport tab|es to a d|fferent tab|espace? (for D8A)
Cracle offers no parameLer Lo speclfy a dlfferenL Lablespace Lo lmporL daLa lnLo Cb[ecLs wlll be recreaLed ln Lhe Lablespace
Lhey were orlglnally exporLed from Cne can alLer Lhls behavlour by followlng one of Lhese procedures recreaLe Lhe Lable(s)
ln Lhe correcL Lablespace
lmporL Lhe dump flle uslng Lhe lnuLxllLL opLlon
LdlL Lhe lndexflle 8emove remarks and speclfy Lhe correcL Lablespaces
8un Lhls lndexflle agalnsL your daLabase Lhls wlll creaLe Lhe requlred Lables ln Lhe approprlaLe Lablespaces
lmporL Lhe Lable(s) wlLh Lhe lCnC8L? opLlon
Change Lhe defaulL Lablespace for Lhe user

8evoke Lhe unLlMl1Lu 1A8LLSACL prlvllege from Lhe user
8evoke Lhe users quoLa from Lhe Lablespace from where Lhe ob[ecL was exporLed 1hls forces Lhe lmporL uLlllLy Lo creaLe
Lables ln Lhe users defaulL Lablespace
Make Lhe Lablespace Lo whlch you wanL Lo lmporL Lhe defaulL Lablespace for Lhe user
lmporL Lhe Lable
What do you mean by a b|ock |n forms40?
8lock ls a slngle mechanlsm for grouplng relaLed lLems lnLo a funcLlonal unlL for sLorlng dlsplaylng and manlpulaLlng records
now |s poss|b|e to restr|ct the user to a ||st of va|ues wh||e enter|ng va|ues for parameters?
8y seLLlng Lhe 8esLrlcL 1o LlsL properLy Lo Lrue ln Lhe parameLer properLy sheeL
What |s SL*Loader and what |s |t used for? (for D8A)
SCL*Loader ls a bulk loader uLlllLy used for movlng daLa from exLernal flles lnLo Lhe Cracle daLabase lLs synLax ls slmllar Lo LhaL
of Lhe u82 Load uLlllLy buL comes wlLh more opLlons SCL*Loader supporLs varlous load formaLs selecLlve loadlng and mulLl
Lable loads
now does one use the SL*Loader ut|||ty? (for D8A)
Cne can load daLa lnLo an Cracle daLabase by uslng Lhe sqlldr (sqlload on some plaLforms) uLlllLy lnvoke Lhe uLlllLy wlLhouL
argumenLs Lo geL a llsL of avallable parameLers Look aL Lhe followlng example
sqlldr scoLL/Llger conLrolloadercLl
1hls sample conLrol flle (loadercLl) wlll load an exLernal daLa flle conLalnlng dellmlLed daLa
load daLa
lnflle cdaLamydaLacsv
lnLo Lable emp
flelds LermlnaLed by opLlonally enclosed by
( empno empname sal depLno )
1he mydaLacsv flle may look llke Lhls
10001ScoLL 1lger 1000 40
10002lrank naude 300 20
AnoLher Sample conLrol flle wlLh lnllne daLa formaLLed as flx lengLh records 1he Lrlck ls Lo speclfy * as Lhe name of Lhe daLa
flle and use 8LClnuA1A Lo sLarL Lhe daLa secLlon ln Lhe conLrol flle
load daLa
lnflle *
replace
lnLo Lable deparLmenLs
( depL poslLlon (0203) char(4)
depLname poslLlon (0827) char(20)
)
beglndaLa
CCSC CCMu1L8 SClLnCL
LnCL LnCLlSP Ll1L8A1u8L
MA1P MA1PLMA1lCS
CL? CLl1lCAL SClLnCL
now can a cross product be created?
8y selecLlng Lhe cross producLs Lool and drawlng a new group surroundlng Lhe base group of Lhe cross producLs
Is there a SL*Un|oader to down|oad data to a f|at f||e? (for D8A)
Cracle does noL supply any daLa unload uLlllLles Powever you can use SCL*lus Lo selecL and formaL your daLa and Lhen spool
lL Lo a flle
seL echo off newpage 0 space 0 pageslze 0 feed off head off Lrlmspool on
spool oradaLaLxL
selecL col1 || || col2 || || col3
from Lab1
where col2 x?Z
spool off
AlLernaLlvely use Lhe u1L_llLL L/SCL package
rem 8emember Lo updaLe lnlLSluora uLl_flle_dlrcoradaLa parameLer
declare
fp uLl_flleflle_Lype
begln
fp uLl_fllefopen(coradaLaLab1LxLw)
uLl_fllepuLf(fp s sn 1exLlleld 33)
uLl_fllefclose(fp)
end
/
?ou mlghL also wanL Lo lnvesLlgaLe Lhlrd parLy Lools llke SCLWays from lsplrer SysLems 1CAu from CuesL or Managel1 lasL
unloader from CA Lo help you unload daLa from Cracle
Can one |oad var|ab|e and f|x |ength data records? (for D8A)
?es look aL Lhe followlng conLrol flle examples ln Lhe flrsL we wlll load dellmlLed daLa (varlable lengLh)
LCAu uA1A
lnllLL *
ln1C 1A8LL load_dellmlLed_daLa
llLLuS 1L8MlnA1Lu 8? C1lCnALL? LnCLCSLu 8?
18AlLlnC nuLLCCLS
( daLa1
daLa2
)
8LClnuA1A
11111AAAAAAAAAA
22222A8Cu
lf you need Lo load poslLlonal daLa (flxed lengLh) look aL Lhe followlng conLrol flle example
LCAu uA1A
lnllLL *
ln1C 1A8LL load_poslLlonal_daLa
( daLa1 CSl1lCn(13)
daLa2 CSl1lCn(613)
)
8LClnuA1A
11111AAAAAAAAAA
222228888888888
Can one sklp header records load whlle loadlng?
use Lhe Skl n keyword where n number of loglcal rows Lo sklp Look aL Lhls example
LCAu uA1A
lnllLL *
ln1C 1A8LL load_poslLlonal_daLa
Skl 3
( daLa1 CSl1lCn(13)
daLa2 CSl1lCn(613)
)
8LClnuA1A
11111AAAAAAAAAA
222228888888888
Can one mod|fy data as |t |oads |nto the database? (for D8A)
uaLa can be modlfled as lL loads lnLo Lhe Cracle uaLabase noLe LhaL Lhls only applles for Lhe convenLlonal load paLh and noL for
dlrecL paLh loads
LCAu uA1A
lnllLL *
ln1C 1A8LL modlfled_daLa
( rec_no my_db_sequencenexLval
reglon CCnS1An1 31
Llme_loaded Lo_char(S?SuA1L PP24Ml)
daLa1 CSl1lCn(13) daLa1/100
daLa2 CSl1lCn(613) upper(daLa2)
daLa3 CSl1lCn(1622)Lo_daLe(daLa3 ??MMuu)
)
8LClnuA1A
11111AAAAAAAAAA991201
222228888888888990112
LCAu uA1A
lnllLL mall_ordersLxL
8AullLL bad_ordersLxL
ALnu
ln1C 1A8LL malllng_llsL
llLLuS 1L8MlnA1Lu 8?
( addr
clLy
sLaLe
zlpcode
malllng_addr decode(malllng_addr null addr malllng_addr)
malllng_clLy decode(malllng_clLy null clLy malllng_clLy)
malllng_sLaLe
)
Can one |oad data |nto mu|t|p|e tab|es at once? (for D8A)
Look aL Lhe followlng conLrol flle
LCAu uA1A
lnllLL *
8LLACL
ln1C 1A8LL emp
WPLn empno !
( empno CSl1lCn(14) ln1LCL8 Lx1L8nAL
ename CSl1lCn(613) CPA8
depLno CSl1lCn(1718) CPA8
mgr CSl1lCn(2023) ln1LCL8 Lx1L8nAL
)
ln1C 1A8LL pro[
WPLn pro[no !
( pro[no CSl1lCn(2327) ln1LCL8 Lx1L8nAL
empno CSl1lCn(14) ln1LCL8 Lx1L8nAL
)
What |s the d|fference between bo||er p|at |mages and |mage |tems?
8oller plaLe lmages are sLaLlc lmages (LlLher vecLor or blL map) LhaL you lmporL from Lhe flle sysLem or daLabase Lo use a
graphlcal elemenLs ln your form such as company logos and maps lmage lLems are speclal Lypes of lnLerface conLrols LhaL
sLore and dlsplay elLher vecLor or blLmap lmages Llke oLher lLems LhaL sLore values lmage lLems can be elLher base Lable
lLems(lLems LhaL relaLe dlrecLly Lo daLabase columns) or conLrol lLems 1he deflnlLlon of an lmage lLem ls sLored as parL of Lhe
form module lM8 and lMx flles buL no lmage flle ls acLually assoclaLed wlLh an lmage lLem unLll Lhe lLem ls populaLe aL run
Llme
What are the tr|ggers ava||ab|e |n the reports?
8efore reporL 8efore form AfLer form 8eLween page AfLer reporL
Why |s a Where c|ause faster than a group f||ter or a format tr|gger?
8ecause ln a where clause Lhe condlLlon ls applled durlng daLa reLrlevalLhan afLer reLrlevlng Lhe daLa
Can one se|ect|ve|y |oad on|y the records that one need? (for D8A)
Look aL Lhls example (01) ls Lhe flrsL characLer (3037) are characLers 30 Lo 37
LCAu uA1A
lnllLL mydaLadaL 8AullLL mydaLabad ulSCA8ullLL mydaLadls
ALnu
ln1C 1A8LL my_selecLlve_Lable
WPLn (01) P and (01) 1 and (3037) 19991217
(
reglon CCnS1An1 31
servlce_key CSl1lCn(0111) ln1LCL8 Lx1L8nAL
call_b_no CSl1lCn(1229) CPA8
)
Can one sk|p certa|n co|umns wh||e |oad|ng data? (for D8A)
Cne cannoL use CS1lCn(xy) wlLh dellmlLed daLa Lucklly from Cracle 8l one can speclfy llLLL8 columns llLLL8 columns are
used Lo sklp columns/flelds ln Lhe load flle lgnorlng flelds LhaL one does noL wanL Look aL Lhls example Cne cannoL use
CS1lCn(xy) as lL ls sLream daLa Lhere are no poslLlonal fleldsLhe nexL fleld beglns afLer some dellmlLer noL ln column x
LCAu uA1A
18unCA1L ln1C 1A8LL 11
llLLuS 1L8MlnA1Lu 8?
( fleld1
fleld2 llLLL8
fleld3
)
now does one |oad mu|t|||ne records? (for D8A)
Cne can creaLe one loglcal record from mulLlple physlcal records uslng one of Lhe followlng Lwo clauses
CCnCA1LnA1L use when SCL*Loader should comblne Lhe same number of physlcal records LogeLher Lo form one loglcal
record
CCn1lnuLll use lf a condlLlon lndlcaLes LhaL mulLlple records should be LreaLed as one Lg by havlng a # characLer ln
column 1
now can get SL*Loader to CCMMI1 on|y at the end of the |oad f||e? (for D8A)
Cne cannoL buL by seLLlng Lhe 8CWS parameLer Lo a large value commlLLlng can be reduced Make sure you have blg rollback
segmenLs ready when you use a hlgh value for 8CWS
Can one |mprove the performance of SL*Loader? (for D8A)
A very slmple buL easlly overlooked hlnL ls noL Lo have any lndexes and/or consLralnLs (prlmary key) on your load Lables durlng
Lhe load process 1hls wlll slgnlflcanLly slow down load Llmes even wlLh 8CWS seL Lo a hlgh value
Add Lhe followlng opLlon ln Lhe command llne ul8LC118uL 1hls wlll effecLlvely bypass mosL of Lhe 8u8MS processlng
Powever Lhere are cases when you canL use dlrecL load 8efer Lo chapLer 8 on Cracle server uLlllLles manual
1urn off daLabase logglng by speclfylng Lhe un8LCCvL8A8LL opLlon 1hls opLlon can only be used wlLh dlrecL daLa loads 8un
mulLlple load [obs concurrenLly
now does one use SL*Loader to |oad |mages sound c||ps and documents? (for D8A)
SCL*Loader can load daLa from a prlmary daLa flle Sul (Secondary uaLa flle for loadlng nesLed Lables and vA88A?s) or
LCCllLL 1he LC8llLL meLhod provldes and easy way Lo load documenLs lmages and audlo cllps lnLo 8LC8 and CLC8 columns
Look aL Lhls example
Clven Lhe followlng Lable
C8LA1L 1A8LL lmage_Lable (
lmage_ld nuM8L8(3)
flle_name vA8CPA82(30)
lmage_daLa 8LC8)
ConLrol llle
LCAu uA1A
lnllLL *
ln1C 1A8LL lmage_Lable
8LLACL
llLLuS 1L8MlnA1Lu 8?
(
lmage_ld ln1LCL8(3)
flle_name CPA8(30)
lmage_daLa LC8llLL (flle_name) 1L8MlnA1Lu 8? LCl
)
8LClnuA1A
001lmage1glf
002lmage2[pg
What |s the d|fference between the convent|ona| and d|rect path |oader? (for D8A)
1he convenLlonal paLh loader essenLlally loads Lhe daLa by uslng sLandard lnSL81 sLaLemenLs 1he dlrecL paLh loader
(ul8LC118uL) bypasses much of Lhe loglc lnvolved wlLh LhaL and loads dlrecLly lnLo Lhe Cracle daLa flles More lnformaLlon
abouL Lhe resLrlcLlons of dlrecL paLh loadlng can be obLalned from Lhe uLlllLles users Culde

What are the var|ous types of Lxcept|ons ?
user deflned and redeflned LxcepLlons
Can we def|ne except|ons tw|ce |n same b|ock ?
no
What |s the d|fference between a procedure and a funct|on ?
luncLlons reLurn a slngle varlable by value whereas procedures do noL reLurn any varlable by value 8aLher Lhey reLurn mulLlple
varlables by passlng varlables by reference Lhrough Lhelr Cu1 parameLer
Can you have two funct|ons w|th the same name |n a L]SL b|ock ?
?es
Can you have two stored funct|ons w|th the same name ?
?es
Can you ca|| a stored funct|on |n the constra|nt of a tab|e ?
no
What are the var|ous types of parameter modes |n a procedure ?
ln Cu1 Anu lnCu1
What |s Cver Load|ng and what are |ts restr|ct|ons ?
CverLoadlng means an ob[ecL performlng dlfferenL funcLlons dependlng upon Lhe no of parameLers or Lhe daLa Lype of Lhe
parameLers passed Lo lL
Can funct|ons be over|oaded ?
?es
Can 2 funct|ons have same name |nput parameters but d|ffer on|y by return datatype ?
no
What are the constructs of a procedure funct|on or a package ?
1he consLrucLs of a procedure funcLlon or a package are
varlables and consLanLs
cursors
excepLlons
Why Create or kep|ace and not Drop and recreate procedures ?
So LhaL CranLs are noL dropped
Can you pass parameters |n packages ? now ?
?es ?ou can pass parameLers Lo procedures or funcLlons ln a package
What are the parts of a database tr|gger ?
1he parLs of a Lrlgger are
A Lrlggerlng evenL or sLaLemenL
A Lrlgger resLrlcLlon
A Lrlgger acLlon
What are the var|ous types of database tr|ggers ?
1here are 12 Lypes of Lrlggers Lhey are comblnaLlon of
lnserL ueleLe and updaLe 1rlggers
8efore and AfLer 1rlggers
8ow and SLaLemenL 1rlggers
(3*2*212)
What |s the advantage of a stored procedure over a database tr|gger ?
We have conLrol over Lhe flrlng of a sLored procedure buL we have no conLrol over Lhe flrlng of a Lrlgger
What |s the max|mum no of statements that can be spec|f|ed |n a tr|gger statement ?
Cne
Can v|ews be spec|f|ed |n a tr|gger statement ?
no
What are the va|ues of new and o|d |n Insert]De|ete]Update 1r|ggers ?
lnSL81 new new value old nuLL
uLLL1L new nuLL old old value
uuA1L new new value old old value
What are cascad|ng tr|ggers? What |s the max|mum no of cascad|ng tr|ggers at a t|me?
When a sLaLemenL ln a Lrlgger body causes anoLher Lrlgger Lo be flred Lhe Lrlggers are sald Lo be cascadlng Max 32
What are mutat|ng tr|ggers ?
A Lrlgger glvlng a SLLLC1 on Lhe Lable on whlch Lhe Lrlgger ls wrlLLen
What are constra|n|ng tr|ggers ?
A Lrlgger glvlng an lnserL/updaLe on a Lable havlng referenLlal lnLegrlLy consLralnL on Lhe Lrlggerlng Lable
Descr|be Crac|e databases phys|ca| and |og|ca| structure ?
hyslcal uaLa flles 8edo Log flles ConLrol flle
Loglcal 1ables vlews 1ablespaces eLc
Can you |ncrease the s|ze of a tab|espace ? now ?
?es by addlng daLaflles Lo lL
What |s the use of Contro| f||es ?
ConLalns polnLers Lo locaLlons of varlous daLa flles redo log flles eLc
What |s the use of Data D|ct|onary ?
used by Cracle Lo sLore lnformaLlon abouL varlous physlcal and loglcal Cracle sLrucLures eg 1ables 1ablespaces daLaflles eLc
What are the advantages of c|usters ?
Access Llme reduced for [olns
What are the d|sadvantages of c|usters ?
1he Llme for lnserL lncreases
Can Long]Long kAW be c|ustered ?
no
Can nu|| keys be entered |n c|uster |ndex norma| |ndex ?
?es
Can Check constra|nt be used for se|f referent|a| |ntegr|ty ? now ?
?es ln Lhe CPLCk condlLlon for a column of a Lable we can reference some oLher column of Lhe same Lable and Lhus enforce
self referenLlal lnLegrlLy
What are the m|n extents a||ocated to a ro||back extent ?
1wo
What are the states of a ro||back segment ? What |s the d|fference between part|y ava||ab|e and needs recovery ?
1he varlous sLaLes of a rollback segmenL are
CnLlnL CllLlnL A81L? AvAlLA8LL nLLuS 8LCCvL8? and lnvALlu
What |s the d|fference between un|que key and pr|mary key ?
unlque key can be null rlmary key cannoL be null
An |nsert statement fo||owed by a create tab|e statement fo||owed by ro||back ? W||| the rows be |nserted ?
no
an you def|ne mu|t|p|e savepo|nts ?
?es
Can you ko||back to any savepo|nt ?
?es
What |s the max|mum no of co|umns a tab|e can have ?
234
What |s the s|gn|f|cance of the and operators |n L SL ?
1he operaLor means LhaL Lhe L SCL block requlres user lnpuL for a varlable 1he operaLor means LhaL Lhe value of Lhls
varlable should be Lhe same as lnpuLLed by Lhe user prevlously for Lhls same varlable lf a LransacLlon ls very large and Lhe
rollback segmenL ls noL able Lo hold Lhe rollback lnformaLlon Lhen wlll Lhe LransacLlon span across dlfferenL rollback segmenLs
or wlll lL LermlnaLe ? lL wlll LermlnaLe (lease check )
Can you pass a parameter to a cursor ?
LxpllclL cursors can Lake parameLers as Lhe example below shows A cursor parameLer can appear ln a query wherever a
consLanL can appear Cu8SC8 c1 (medlan ln nuM8L8) lS SLLLC1 [ob ename l8CM emp WPL8L sal medlan
What are the var|ous types of ko||8ack Segments ?
ubllc Avallable Lo all lnsLances
rlvaLe Avallable Lo speclflc lnsLance
Can you use kowCount as a parameter to a cursor ?
?es
Is the query be|ow a||owed
Se|ect sa| ename Into x Irom emp Where ename kING
(Where x |s a record of Number(4) and Char(1S))
?es
Is the ass|gnment g|ven be|ow a||owed
A8C k (Where A8C and k are records)
?es
Is th|s for |oop a||owed
Ior x |n StartLnd Loop
?es
now many rows w||| the fo||ow|ng SL return
Se|ect * from emp Where rownum
9 rows
now many rows w||| the fo||ow|ng SL return
Se|ect * from emp Where rownum 10
no rows
Wh|ch symbo| preceeds the path to the tab|e |n the remote database ?
[
Are v|ews automat|ca||y updated when base tab|es are updated ?
?es
Can a tr|gger wr|tten for a v|ew ?
no
If a|| the va|ues from a cursor have been fetched and another fetch |s |ssued the output w||| be error |ast record or f|rst
record ?
LasL 8ecord
A tab|e has the fo||ow|ng data S Nu|| 10 What w||| the average funct|on return ?
73
Is Sysdate a system var|ab|e or a system funct|on?
SysLem luncLlon
Cons|der a sequence whose currva| |s 1 and gets |ncremented by 1 by us|ng the nextva| reference we get the next number 2
Suppose at th|s po|nt we |ssue an ro||back and aga|n |ssue a nextva| What w||| the output be ?
3
Def|n|t|on of re|at|ona| Data8ase by Dr Codd (I8M)?
A 8elaLlonal uaLabase ls a daLabase where all daLa vlslble Lo Lhe user ls organlzed sLrlcLly as Lables of daLa values and where all
daLabase operaLlons work on Lhese Lables
What |s Mu|t| 1hreaded Server (M1A) ?
ln a Slngle 1hreaded ArchlLecLure (or a dedlcaLed server conflguraLlon) Lhe daLabase manager creaLes a separaLe process for
each daLabase user 8uL ln M1A Lhe daLabase manager can asslgn mulLlple users (mulLlple user processes) Lo a slngle dlspaLcher
(server process) a conLrolllng process LhaL queues requesL for work Lhus reduclng Lhe daLabases memory requlremenL and
resources
Wh|ch are |n|t|a| kD8MS n|erarch|ca| N]w database ?
8u8MS 8 sysLem
Plerarchlcal lMS
n/W u81C
What |s Iunct|ona| Dependency
Clven a relaLlon 8 aLLrlbuLe ? of 8 ls funcLlonally dependenL on aLLrlbuLe x of 8 lf and only lf each xvalue has assoclaLed wlLh lL
preclsely one ? value ln 8
What |s Aud|t|ng ?
1he daLabase has Lhe ablllLy Lo audlL all acLlons LhaL Lake place wlLhln lL
a) Logln aLLempLs b) Cb[ecL Accesss c) uaLabase AcLlon 8esulL of CreaLesL(1nuLL) or LeasL(1nuLL) nuLL
Wh||e des|gn|ng |n c||ent]server what are the 2 |mp th|ngs to be cons|dered ?
neLwork Cverhead (Lrafflc) Speed and Load of cllenL server
When to create |ndexes ?
1o be creaLed when Lable ls querled for less Lhan 2 or 4 Lo 23 of Lhe Lable rows
now can you avo|d |ndexes ?
1C make lndex access paLh unavallable use luLL hlnL Lo opLlmlzer for full Lable scan use lnuLx or AnuLCuAL hlnL Lo
opLlmlzer Lo use one lndex or seL Lo lndexes lnsLead of anoLher use an expresslon ln Lhe Where Clause of Lhe SCL
What |s the resu|t of the fo||ow|ng SL
Se|ect 1 from dua|
UNICN
Se|ect A from dua|
Lrror
Can database tr|gger wr|tten on synonym of a tab|e and |f |t can be then what wou|d be the effect |f or|g|na| tab|e |s
accessed
?es daLabase Lrlgger would flre
Can you a|ter synonym of v|ew or v|ew ?
no
Can you create |ndex on v|ew ?
no
What |s the d|fference between a v|ew and a synonym ?
Synonym ls [usL a second name of Lable used for mulLlple llnk of daLabase vlew can be creaLed wlLh many Lables and wlLh
vlrLual columns and wlLh condlLlons 8uL synonym can be on vlew
What |s the d|fference between a||as and synonym ?
Allas ls Lemporary and used wlLh one query Synonym ls permanenL and noL used as allas
What |s the effect of synonym and tab|e name used |n same Se|ect statement ?
valld
Whats the |ength of SL |nteger ?
32 blL lengLh
What |s the d|fference between fore|gn key and reference key ?
lorelgn key ls Lhe key le aLLrlbuLe whlch refers Lo anoLher Lable prlmary key 8eference key ls Lhe prlmary key of Lable referred
by anoLher Lable
Can dua| tab|e be de|eted dropped or a|tered or updated or |nserted ?
?es
If content of dua| |s updated to some va|ue computat|on takes p|ace or not ?
?es
If any other tab|e same as dua| |s created wou|d |t act s|m||ar to dua|?
?es
Ior wh|ch re|at|ona| operators |n where c|ause |ndex |s not used ?
llke ls nC1 funcLlons fleld +consLanL fleld ||
Assume that there are mu|t|p|e databases runn|ng on one mach|ne now can you sw|tch from one to another ?
Changlng Lhe C8ACLL_Slu
What are the advantages of Crac|e ?
orLablllLy Cracle ls porLed Lo more plaLforms Lhan any of lLs compeLlLors runnlng on more Lhan 100 hardware plaLforms and
20 neLworklng proLocols
MarkeL resence Cracle ls by far Lhe largesL 8u8MS vendor and spends more on 8 u Lhan mosL of lLs compeLlLors earn ln
LoLal revenue 1hls markeL clouL means LhaL you are unllkely Lo be lefL ln Lhe lurch by Cracle and Lhere are always loLs of Lhlrd
parLy lnLerfaces avallable
8ackup and 8ecovery Cracle provldes lndusLrlal sLrengLh supporL for onllne backup and recovery and good sofLware faulL
Lolerence Lo dlsk fallure ?ou can also do polnLlnLlme recovery
erformance Speed of a Luned Cracle uaLabase and appllcaLlon ls qulLe good even wlLh large daLabases Cracle can manage
100C8 daLabases
MulLlple daLabase supporL Cracle has a superlor ablllLy Lo manage mulLlple daLabases wlLhln Lhe same LransacLlon uslng a
Lwophase commlL proLocol
What |s a forward dec|arat|on ? What |s |ts use ?
L/SCL requlres LhaL you declare an ldenLlfler before uslng lL 1herefore you musL declare a subprogram before calllng lL 1hls
declaraLlon aL Lhe sLarL of a subprogram ls called forward declaraLlon A forward declaraLlon conslsLs of a subprogram
speclflcaLlon LermlnaLed by a semlcolon
What are actua| and forma| parameters ?
AcLual arameLers Subprograms pass lnformaLlon uslng parameLers 1he varlables or expresslons referenced ln Lhe parameLer
llsL of a subprogram call are acLual parameLers lor example Lhe followlng procedure call llsLs Lwo acLual parameLers named
emp_num and amounL
Lg ralse_salary(emp_num amounL)
lormal arameLers 1he varlables declared ln a subprogram speclflcaLlon and referenced ln Lhe subprogram body are formal
parameLers lor example Lhe followlng procedure declares Lwo formal parameLers named emp_ld and lncrease Lg
8CCLuu8L ralse_salary (emp_ld ln1LCL8 lncrease 8LAL) lS currenL_salary 8LAL
What are the types of Notat|on ?
oslLlon named Mlxed and 8esLrlcLlons
What a|| |mportant parameters of the |n|tora are supposed to be |ncreased |f you want to |ncrease the SGA s|ze ?
ln our case db_block_buffers was changed from 60 Lo 1000 (sLd values are 60 330 3300) shared_pool_slze was changed
from 33M8 Lo 9M8 (sLd values are 33 3 9M8) open_cursors was changed from 200 Lo 300 (sLd values are 200 300)
db_block_slze was changed from 2048 (2k) Lo 4096 (4k) aL Lhe Llme of daLabase creaLlon
1he lnlLlal SCA was around 4M8 when Lhe server 8AM was 32M8 and 1he new SCA was around 13M8 when Lhe server 8AM
was lncreased Lo 128M8
If I have an execute pr|v||ege on a procedure |n another users schema can I execute h|s procedure even though I do not have
pr|v||eges on the tab|es w|th|n the procedure ?
?es
What are var|ous types of [o|ns ?
Lqul[olns nonequl[olns self [oln ouLer [oln
What |s a package cursor ?
A package cursor ls a cursor whlch you declare ln Lhe package speclflcaLlon wlLhouL an SCL sLaLemenL 1he SCL sLaLemenL for
Lhe cursor ls aLLached dynamlcally aL runLlme from calllng procedures
If you |nsert a row |n a tab|e then create another tab|e and then say ko||back In th|s case w||| the row be |nserted ?
?es 8ecause CreaLe Lable ls a uuL whlch commlLs auLomaLlcally as soon as lL ls execuLed 1he uuL commlLs Lhe LransacLlon
even lf Lhe creaLe sLaLemenL falls lnLernally (eg Lable already exlsLs error) and noL synLacLlcally
What are the var|ous types of quer|es ??
normal Cuerles
Sub Cuerles
CorelaLed querles
nesLed querles
Compound querles
What |s a transact|on ?
A LransacLlon ls a seL of SCL sLaLemenLs beLween any Lwo CCMMl1 and 8CLL8ACk sLaLemenLs
What |s |mp||c|t cursor and how |s |t used by Crac|e ?
An lmpllclL cursor ls a cursor whlch ls lnLernally creaLed by Cracle lL ls creaLed by Cracle for each lndlvldual SCL
Wh|ch of the fo||ow|ng |s not a schema ob[ect Indexes tab|es pub||c synonyms tr|ggers and packages ?
ubllc synonyms
What |s L]SL?
L/SCL ls Cracles rocedural Language exLenslon Lo SCL 1he language lncludes ob[ecL orlenLed programmlng Lechnlques such
as encapsulaLlon funcLlon overloadlng lnformaLlon hldlng (all buL lnherlLance) and so brlngs sLaLeofLhearL programmlng Lo
Lhe Cracle daLabase server and a varleLy of Cracle Lools
Is there a L]SL Lng|ne |n SL*|us?
no unllke Cracle lorms SCL*lus does noL have a L/SCL englne 1hus all your L/SCL are send dlrecLly Lo Lhe daLabase
englne for execuLlon 1hls makes lL much more efflclenL as SCL sLaLemenLs are noL sLrlpped off and send Lo Lhe daLabase
lndlvldually
Is there a ||m|t on the s|ze of a L]SL b|ock?
CurrenLly Lhe maxlmum parsed/complled slze of a L/SCL block ls 64k and Lhe maxlmum code slze ls 100k ?ou can run Lhe
followlng selecL sLaLemenL Lo query Lhe slze of an exlsLlng package or procedure
SCL selecL * from dba_ob[ecL_slze where name procedure_name
Can one read]wr|te f||es from L]SL?
lncluded ln Cracle 73 ls a u1L_llLL package LhaL can read and wrlLe flles 1he dlrecLory you lnLend wrlLlng Lo has Lo be ln your
lnl1C8A flle (see u1L_llLL_ul8 parameLer) 8efore Cracle 73 Lhe only means of wrlLlng a flle was Lo use u8MS_Cu1u1
wlLh Lhe SCL*lus SCCL command
uLCLA8L
fllePandler u1L_llLLllLL_1?L
8LCln
fllePandler u1L_llLLlCLn(/home/oracle/Lmp myouLpuLW)
u1L_llLLu1l(fllePandler value of func1 ls sn func1(1))
u1L_llLLlCLCSL(fllePandler)
Lnu
now can I protect my L]SL source code?
L/SCL v22 avallable wlLh Cracle72 lmplemenLs a blnary wrapper for L/SCL programs Lo proLecL Lhe source code 1hls ls
done vla a sLandalone uLlllLy LhaL Lransforms Lhe L/SCL source code lnLo porLable blnary ob[ecL code (somewhaL larger Lhan
Lhe orlglnal) 1hls way you can dlsLrlbuLe sofLware wlLhouL havlng Lo worry abouL exposlng your proprleLary algorlLhms and
meLhods SCL*lus and SCL*u8A wlll sLlll undersLand and know how Lo execuLe such scrlpLs !usL be careful Lhere ls no
decode command avallable
1he synLax ls
wrap lnamemyscrlpLsql onamexxxxyyy
Can one use dynam|c SL w|th|n L]SL? Ck Can you use a DDL |n a procedure ? now ?
lrom L/SCL v21 one can use Lhe u8MS_SCL package Lo execuLe dynamlc SCL sLaLemenLs
Lg C8LA1L C8 8LLACL 8CCLuu8L u?nSCL
AS
cur lnLeger
rc lnLeger
8LCln
cur u8MS_SCLCLn_Cu8SC8
u8MS_SCLA8SL(curC8LA1L 1A8LL x (? uA1L) u8MS_SCLnA1lvL)
rc u8MS_SCLLxLCu1L(cur)
u8MS_SCLCLCSL_Cu8SC8(cur)
Lnu

S-ar putea să vă placă și