1001 Oracle Interview Questions

Embed Size (px)

DESCRIPTION

Interview questions

Citation preview

  • 5/22/2018 1001 Oracle Interview Questions

    1/153

    1. What are the components of physical database structure ofOracle database?Oracle database is comprised of three types of les. One or moredatales, two are more redo log les, and one or more control les.

    2. What are the components of logical database structure ofOracle database?There are tablespaces and database's schema objects.

    3. What is a tablespace?A database is divided into Logical Storage nit called tablespaces. Atablespace is !sed to gro!ped related logical str!ct!res together.

    4. What is SYST! tablespace and "hen is it created?"very Oracle database contains a tablespace named S#ST"$, which isa!tomatically created when the database is created. The S#ST"$tablespace always contains the data dictionary tables for the entire

    database.

    #. $plain the relationship among database% tablespace anddata &le."ach databases logically divided into one or more tablespaces one ormore data les are e%plicitly created for each tablespace.

    '. What is schema?A schema is collection of database objects of a !ser.

    (. What are Schema Ob)ects?

    Schema objects are the logical str!ct!res that directly refer to thedatabase's data. Schema objects incl!de tables, views, se&!ences,synonyms, inde%es, cl!sters, database triggers, proced!res, f!nctionspacages and database lins.

    *. +an ob)ects of the same schema reside in di,erenttablespaces?#es.

    -. +an a tablespace hold ob)ects from di,erent schemes?#es.

    1. What is Oracle table?A table is the basic !nit of data storage in an Oracle database. Thetables of a database hold all of the !ser accessible data. Table data isstored in rows and col!mns.

    11. What is an Oracle /ie"?

    Page 1 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    2/153

    A view is a virt!al table. "very view has a &!ery attached to it. (The&!ery is a S"L")T statement that identies the col!mns and rows ofthe table(s* the view !ses.*11. What is 0artial acup ?A +artial ac!p is any operating system bac!p short of a f!ll bac!p,taen while the database is open or sh!t down.

    12. What is !irrored online edo 5og ?A mirrored on-line redo log consists of copies of on-line redo log lesphysically located on separate diss, changes made to one member ofthe gro!p are made to all members.

    13. What is 6ull acup ?A f!ll bac!p is an operating system bac!p of all data les, on-lineredo log les and control le that constit!te OA)L" database and theparameter.

    14. +an a 7ie" based on another 7ie" ?#es.

    1#. +an a Tablespace hold ob)ects from di,erent Schemes ?#es.

    1'. +an ob)ects of the same Schema reside in di,erenttablespaces.?#es.

    1(. What is the use of +ontrol 6ile ?

    /hen an instance of an OA)L" database is started, its control le is!sed to identify the database and redo log les that m!st be openedfor database operation to proceed. 0t is also !sed in database recovery.

    1*. 8o 7ie" contain 8ata ?1iews do not contain or store data.

    1-. What are the eferential actions supported by 6O9:;

  • 5/22/2018 1001 Oracle Interview Questions

    3/153

    "ach 0nde% has an 0nde% segment that stores all of its data.

    23. $plain the relationship among 8atabase% Tablespace and8ata &le.?"ach databases logically divided into one or more tablespaces one ormore data les are e%plicitly created for each tablespace

    24. What are the di,erent type of Segments ?2ata Segment, 0nde% Segment, ollbac Segment and TemporarySegment.

    2#. What are +lusters ?)l!sters are gro!ps of one or more tables physically stores together toshare common col!mns and are often !sed together.

    2'. What is an 9ntegrity +onstrains ?An integrity constraint is a declarative way to dene a b!siness r!le for

    a col!mn of a table.

    2(. What is an 9nde$ ?An 0nde% is an optional str!ct!re associated with a table to have directaccess to rows, which can be created to increase the performance ofdata retrieval. 0nde% can be created on one or more col!mns of a table.

    2*. What is an $tent ?An "%tent is a specic n!mber of contig!o!s data blocs, obtained in asingle allocation, and !sed to store a specic type of information.

    2-. What is a 7ie" ?A view is a virt!al table. "very view has a 4!ery attached to it. (The4!ery is a S"L")T statement that identies the col!mns and rows ofthe table(s* the view !ses.*

    3. What is Table ?A table is the basic !nit of data storage in an OA)L" database. Thetables of a database hold all of the !ser accessible data. Table data isstored in rows and col!mns.31. +an a /ie" based on another /ie"?#es.

    32. What are the ad/antages of /ie"s?- +rovide an additional level of table sec!rity, by restricting access to apredetermined set of rows and col!mns of a table.- 5ide data comple%ity.- Simplify commands for the !ser.- +resent the data in a di6erent perspective from that of the base table.- Store comple% &!eries.

    Page 3 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    4/153

    33. What is an Oracle se=uence?A se&!ence generates a serial list of !ni&!e n!mbers for n!mericalcol!mns of a database's tables.

    34. What is a synonym?A synonym is an alias for a table, view, se&!ence or program !nit.

    3#. What are the types of synonyms?There are two types of synonyms private and p!blic.

    3'. What is a pri/ate synonym?Only its owner can access a private synonym.

    3(. What is a public synonym?Any database !ser can access a p!blic synonym.

    3*. What are synonyms used for?

    - $as the real name and owner of an object.- +rovide p!blic access to an object- +rovide location transparency for tables, views or program !nits of aremote database.- Simplify the S4L statements for database !sers.

    3-. What is an Oracle inde$?An inde% is an optional str!ct!re associated with a table to have directaccess to rows, which can be created to increase the performance ofdata retrieval. 0nde% can be created on one or more col!mns of a table.

    4. >o" are the inde$ updates?0nde%es are a!tomatically maintained and !sed by Oracle. )hanges totable data are a!tomatically incorporated into all relevant inde%es.41. What is a Tablespace?A database is divided into Logical Storage nit called tablespaces. Atablespace is !sed to gro!ped related logical str!ct!res together

    42. What is ollbac Segment ?A 2atabase contains one or more ollbac Segments to temporarilystore 7!ndo7 information.

    43. What are the +haracteristics of 8ata 6iles ?A data le can be associated with only one database. Once created adata le can't change si8e. One or more data les form a logical !nit ofdatabase storage called a tablespace.

    44. >o" to de&ne 8ata loc sie ?A data bloc si8e is specied for each OA)L" database when thedatabase is created. A database !sers and allocated free database

    Page 4 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    5/153

    space in OA)L" datablocs. loc si8e is specied in 030T.OA le andcan9t be changed latter.

    4#. What does a +ontrol &le +ontain ?A )ontrol le records the physical str!ct!re of the database. 0t containsthe following information.2atabase 3ame3ames and locations of a database's les and redolog les.Time stamp of database creation.

    4'.What is di,erence bet"een @;9A@ constraint and 09!BY

  • 5/22/2018 1001 Oracle Interview Questions

    6/153

    #2. What database bloc sie should 9 use? Ffor 8BGOracle recommends that yo!r database bloc si8e match, or bem!ltiples of yo!r operating system bloc si8e. One can !se smallerbloc si8es, b!t the performance cost is signicant. #o!r choice sho!lddepend on the type of application yo! are r!nning. 0f yo! have manysmall transactions as with OLT+, !se a smaller bloc si8e. /ith fewerb!t larger transactions, as with a 2SS application, !se a larger blocsi8e. 0f yo! are !sing a vol!me manager, consider yo!r 7operatingsystem bloc si8e7 to be I:. This is beca!se vol!me manager prod!cts!se I: blocs (and this is not cong!rable*.

    #3. What are the di,erent approaches used by Optimier inchoosing an e$ecution plan ?!le-based and )ost-based.

    #4. What does O55B+< do ?

    OLLA): retracts any of the changes res!lting from the S4Lstatements in the transaction.

    >o" does one coalesce free space?Ffor 8BGS$O3 coalesces free space (e%tents* into larger, contig!o!s e%tentsevery G ho!rs and even then, only for a short period of time.S$O3 will not coalesce free space if a tablespace's defa!lt storageparameter 7pctincrease7 is set to D. /ith Oracle J.H one can man!allycoalesce a tablespace !sing the ALT" TAL"S+A)" ... )OAL"S)"Fcommand, !ntil then !seS4LK alter session set events 'immediate trace name coalesce level n'F

    /here 'n' is the tablespace n!mber yo! get from S"L")T TS, 3A$"BO$ S#S.TS>F#o! can get stat!s information abo!t this process by selecting from theS#S.2A

  • 5/22/2018 1001 Oracle Interview Questions

    7/153

    tho!sands where additional 0?O may be re&!ired to fetch the additionalblocs where e%tent maps of the segment are stored.

    #'. Where can one &nd the high "ater mar for a table? Ffor8BGThere is no single system table, which contains the high water mar(5/$* for a table. A table's 5/$ can be calc!lated !sing the res!ltsfrom the following S4L statementsS"L")T LO):SBO$ 2A

  • 5/22/2018 1001 Oracle Interview Questions

    8/153

    3o, this is listed as "nhancement e&!est EIDI. /oraro!nd2o a !ser-level e%port of !ser Acreate new !ser 0mport system?manager from!serCA to!serC2rop !ser A'1. 8e&ne Transaction ?A Transaction is a logical !nit of wor that comprises one or more S4Lstatements e%ec!ted by a single !ser.

    '2. What is eadOnly Transaction ?A ead-Only transaction ens!res that the res!lts of each &!erye%ec!ted in the transaction are consistant with respect to the samepoint in time.

    '3. What is a deadloc ? $plain .Two processes wating to !pdate the rows of a table which are loced bythe other process then deadloc arises. 0n a database environment this

    will often happen beca!se of not iss!ing proper row loc commands.+oor design of front-end application may ca!se this sit!ation and theperformance of server will red!ce drastically.These locs will be released a!tomatically when a commit?rollbacoperation performed or any one of this processes being illede%ternally.

    '4. What is a Schema ?The set of objects owned by !ser acco!nt is called the schema.

    '#. What is a cluster

  • 5/22/2018 1001 Oracle Interview Questions

    9/153

    The server that access the database consists ofS=A (2atabase b!6er, 2ictionary )ache !6ers, edo log b!6ers,Shared S4L pool*S$O3 (System $O3ito*+$O3 (+rocess $O3itor*L=/ (Lo= /rite*2/ (2ata ase /rite*A)5 (A)5iver*):+T ()hec +oint*")O2ispatcherser +rocess with associated +=S'*. What is clusters ?=ro!p of tables physically stored together beca!se they share commoncol!mns and are often !sed together is called )l!ster.

    '-. What is an 9nde$ ? >o" it is implemented in Oracle

    8atabase ?An inde% is a database str!ct!re !sed by the server to have directaccess of a row in a table. An inde% is a!tomatically created when a!ni&!e of primary ey constraint cla!se is specied in create tablecomman (1er J.D*

    (. What is a 8atabase instance ? $plainA database instance (Server* is a set of memory str!ct!re andbacgro!nd processes that access a set of database les.The process can be shared by all !sers. The memory str!ct!re that are!sed to store most &!eried data from database. This helps !p to

    improve database performance by decreasing the amo!nt of 0?Operformed against data le.

    (1. WWhat is the use of B;B5YE command ?To perform one of these f!nction on an inde%,table, or cl!ster- To collect statistics abo!t object !sed by the optimi8er and store themin the data dictionary.- To delete statistics abo!t the object !sed by object from the datadictionary.- To validate the str!ct!re of the object.- To identify migrated and chained rows of the table or cl!ster.

    (2. What is default tablespace ?The Tablespace to contain schema objects created witho!t specifying atablespace name.

    (3. What are the system resources that can be controlledthrough 0ro&le ?The n!mber of conc!rrent sessions the !ser can establish the )+processing time available to the !ser's session the )+ processing time

    Page 9 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    10/153

    available to a single call to OA)L" made by a S4L statement theamo!nt of logical 0?O available to the !ser's session the amo!t oflogical 0?O available to a single call to OA)L" made by a S4Lstatement the allowed amo!nt of idle time for the !ser's session theallowed amo!nt of connect time for the !ser's session.

    (4. What is Tablespace Auota ?The collective amo!nt of dis space available to the objects in aschema on a partic!lar tablespace.

    ('. What are the di,erent 5e/els of Buditing ?Statement A!diting, +rivilege A!diting and Object A!diting.

    ((. What is Statement Buditing ?Statement a!diting is the a!diting of the powerf!l system privilegeswitho!t regard to specically named objects.(*. What are the database administrators utilities a/aliable ?

    S4L Q 2A - This allows 2A to monitor and control an OA)L"database. S4L Q Loader - 0t loads data from standard operating systemles (Blat les* into OA)L" database tables. "%port ("R+* and 0mport(imp* !tilities allow yo! to move e%isting data in OA)L" format to andfrom OA)L" database.

    (-. >o" can you enable automatic archi/ing ?Sh!t the databaseac!p the database$odify?0ncl!de LO=o" can "e implement roles ?oles are the easiest way to grant and manage common privilegesneeded by di6erent gro!ps of database !sers. )reating roles andassigning provides to roles. Assign each role to gro!p of !sers. This willsimplify the job of assigning privileges to individ!al !sers.

    *1. What are oles ?oles are named gro!ps of related privileges that are granted to !sersor other roles.

    *2. What are the use of oles ?"2)"2 =A3T03= OB +010L"="S - ather than e%plicitly grantingthe same set of privileges to many !sers a database administrator cangrant the privileges for a gro!p of related !sers granted to a role andthen grant only the role to each member of the gro!p.2#3A$0) +010L"=" $A3A="$"3T - /hen the privileges of a gro!pm!st change, only the privileges of the role need to be modied. Thesec!rity domains of all !sers granted the gro!p's role a!tomaticallyreect the changes made to the role.

    Page 10 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    11/153

    S"L")T01" A1A0LA0L0T# OB +010L"="S - The roles granted to a !sercan be selectively enable (available for !se* or disabled (not availablefor !se*. This allows specic control of a !ser's privileges in any givensit!ation.A++L0)AT0O3 A/A"3"SS - A database application can be designed toa!tomatically enable and disable selective roles when a !ser attemptsto !se the application.

    *3. What is 0ri/ilege Buditing ?+rivilege a!diting is the a!diting of the !se of powerf!l systemprivileges witho!t regard to specically named objects.

    *4. What is Ob)ect Buditing ?Object a!diting is the a!diting of accesses to specic schema objectswitho!t regard to !ser.

    *#. What is Buditing ?

    $onitoring of !ser access to aid in the investigation of database !se.*#. >o" does one see the uptime for a database? Ffor 8BLoo at the following S4L &!eryS"L")T to

  • 5/22/2018 1001 Oracle Interview Questions

    12/153

    where L.:"# lie 'VL0A3V'and S").:"# lie 'VS")O32V'Fselect to03STA3)" S")where L.:"# lie 'VL0A3V'and S").:"# lie 'VS")O32V'F

    *'. Where are my T!0695S% 9 donHt see them in 7I8BTB695or 8BD8BTBD695? Ffor 8BTemples, !nlie normal datales, are not listed in v>datale ordba

  • 5/22/2018 1001 Oracle Interview Questions

    13/153

    !.blocsfrom sys.vsession s, sys.vsortsession s, sys.vsortparameter 1+where s.saddr C !.sessiono" does one get the /ie" de&nition of &$ed /ie"sJtables?4!ery v>%ed

  • 5/22/2018 1001 Oracle Interview Questions

    14/153

    -(. What is T"o0hase +ommit ?Two-phase commit is mechanism that g!arantees a distrib!tedtransaction either commits on all involved nodes or rolls bac on allinvolved nodes to maintain data consistency across the globaldistrib!ted database. 0t has two phase, a +repare +hase and a )ommit+hase.

    -*. >o" can you nforce eferential 9ntegrity in snapshots ?Time the references to occ!r when master tables are not in !se.+eform the reference the man!ally immdiately locing the mastertables. /e can join tables in snopshots by creating a comple%snapshots that will based on the master tables.

    --. What is a SA5 K ;T?S4L Q3"T is OA)L"'s mechanism for interfacing with thecomm!nication protocols !sed by the networs that facilitatedistrib!ted processing and distrib!ted databases. 0t is !sed in )lint-

    Server and Server-Server comm!nications.

    1. What is a S;B0S>OT ?Snapshots are read-only copies of a master table located on a remotenode which is periodically refreshed to reect changes made to themaster table.

    11. What is the mechanism pro/ided by OB+5 for tablereplication ?Snapshots and S3A+S5OT LO=s

    12. What is snapshots?Snapshot is an object !sed to dynamically replicate data betweendistrib!te database at specied time intervals. 0n ver J.D they are readonly.

    13. What are the /arious type of snapshots?Simple and )omple%.14. 8escribe t"o phases of T"ophase commit ?+repare phase - The global coordinator (initiating node* as aparticipants to prepare (to promise to commit or rollbac thetransaction, even if there is a fail!re* )ommit - +hase - 0f all

    participants respond to the coordinator that they are prepared, thecoordinator ass all nodes to commit the transaction, if all participantscannot prepare, the coordinator ass all nodes to roll bac thetransaction.

    1#. What is snapshot log ?0t is a table that maintains a record of modications to the master tablein a snapshot. 0t is stored in the same database as master table and is

    Page 14 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    15/153

    only available for simple snapshots. 0t sho!ld be created beforecreating snapshots.

    1'. What are the bene&ts of distributed options in databases?2atabase on other servers can be !pdated and those transactions canbe gro!ped together with others in a logical !nit.2atabase !ses a two phase commit.

    1(. What are the options a/ailable to refresh snapshots ?)O$+L"T" - Tables are completely regenerated !sing the snapshots&!ery and the master tables every time the snapshot referenced.BAST - 0f simple snapshot !sed then a snapshot log can be !sed to sendthe changes to the snapshot tables.BO)" - 2efa!lt val!e. 0f possible it performs a BAST refreshF Otherwiseit will perform a complete refresh.

    1*. What is a S;B0S>OT 5O: ?

    A snapshot log is a table in the master database that is associated withthe master table. OA)L" !ses a snapshot log to trac the rows thathave been !pdated in the master table. Snapshot logs are !sed in!pdating the snapshots based on the master table.

    1-. What is 8istributed database ?A distrib!ted database is a networ of databases managed by m!ltipledatabase servers that appears to a !ser as single logical database. Thedata of all databases in the distrib!ted database can be sim!ltaneo!slyaccessed and modied.

    11. >o" can "e reduce the net"or traLc?- eplication of data in distrib!ted environment.- sing snapshots to replicate data.- sing remote proced!re calls.

    111. 8i,erentiate simple and comple$% snapshots ?- A simple snapshot is based on a &!ery that does not contains =O+# cla!ses, )O33")T # cla!ses, O03s, s!b-&!ery or snashot ofoperations.- A comple% snapshots contain atleast any one of the above.

    112. What are the uiltins used for sending 0arameters toforms?#o! can pass parameter val!es to a form when an application e%ec!testhe call

  • 5/22/2018 1001 Oracle Interview Questions

    16/153

    content canvas view. At r!n time only one of the content canvas viewsassign to a window is displayed at a time.

    114. 9s the Bfter report trigger &red if the report e$ecutionfails?#es.

    11#. 8oes a efore form trigger &re "hen the parameter formis suppressed?#es.11'. What is S:B?The System =lobal Area in an Oracle database is the area in memoryto facilitate the transfer of information between !sers. 0t holds themost recently re&!ested str!ct!ral information between !sers. 0t holdsthe most recently re&!ested str!ct!ral information abo!t the database.The str!ct!re is database b!6ers, dictionary cache, redo log b!6er andshared pool area.

    11(. What is a shared pool?The data dictionary cache is stored in an area in S=A called the sharedpool. This will allow sharing of parsed S4L statements amongconc!rrent !sers.

    11*. What is mean by 0rogram :lobal Brea F0:BG?0t is area in memory that is !sed by a single Oracle !ser process.

    11-. What is a data segment?2ata segment are the physical areas within a database bloc in which

    the data associated with tables and cl!sters are stored.

    12. What are the factors causing the reparsing of SA5statements in S:B?2!e to ins!Ncient shared pool si8e.$onitor the ratio of the reloads taes place while e%ec!ting S4Lstatements. 0f the ratio is greater than E then increase theS5A"2

  • 5/22/2018 1001 Oracle Interview Questions

    17/153

    A !ser acco!nt is not a physical str!ct!re in database b!t it is havingimportant relationship to the objects in the database and will be havingcertain privileges.

    12#. >o" "ill you enforce security using stored procedures?2on't grant !ser access directly to tables within the application.0nstead grant the ability to access the proced!res that access thetables. /hen proced!re e%ec!ted it will e%ec!te the privilege ofproced!res owner. sers cannot access tables e%cept via theproced!re.

    12'. What are the dictionary tables used to monitor a databasespace?2A

  • 5/22/2018 1001 Oracle Interview Questions

    18/153

    133. When do you use data parameter type?/hen the val!e of a data parameter being passed to a called prod!ctis always the name of the record gro!p dened in the c!rrent form.2ata parameters are !sed to pass data to prod!ts invoed with ther!n

  • 5/22/2018 1001 Oracle Interview Questions

    19/153

    view by str!ct!re.

    141. What are the t"o types of /ie"s a/ailable in the ob)ectna/igatorFspeci&c to report 2.#G?1iew by str!ct!re and view by type .

    142. What are the /b$ controls?1b% control provide a simple method of b!ilding and enhancing !serinterfaces. The controls can !se to obtain !ser inp!ts and displayprogram o!tp!ts.vb% control where originally develop as e%tensions forthe ms vis!al basic environments and incl!de s!ch items as sliders,rides and nobs.

    143. What is the use of transactional triggers?sing transactional triggers we can control or modify the defa!ltf!nctionality of the oracle forms.

    144. >o" do you create a ne" session "hile open a ne" form?sing open

  • 5/22/2018 1001 Oracle Interview Questions

    20/153

    1#1. >o" do you reference a parameter indirectly?To indirectly reference a parameter !se the 3A$" 03, )O+# 'b!ilt-ins toindirectly set and reference the parameters val!e' "%ample name

  • 5/22/2018 1001 Oracle Interview Questions

    21/153

    The ma%im!m no of chars the parameter can store is only valid forchar parameters, which can be !pto PM:. 3o parameters defa!lt toGHytes and 2ate parameter defa!lt to Jytes.

    1'. What are the default e$tensions of the &les created bylibrary module?The defa!lt le e%tensions indicate the library mod!le type and storageformat .pll - pl?s&l library mod!le binary

    1'1. What are the +oordination 0roperties in a !aster8etailrelationship?The coordination properties are2eferredA!to-4!eryThese +roperties determine when the pop!lation phase of bloccoordination sho!ld occ!r.

    1'2. >o" do you display console on a "indo" ?The console incl!des the stat!s line and message line, and is displayedat the bottom of the window to which it is assigned.To specify that theconsole sho!ld be displayed, set the console window form property tothe name of any window in the form. To incl!de the console, setconsole window to 3!ll.

    1'3. What are the di,erent 0arameter types?Te%t +arameters2ata +arameters

    1'4. State any three mouse e/ents system /ariables?

    System.mo!se

  • 5/22/2018 1001 Oracle Interview Questions

    22/153

    Sometimes Oracle taes forever to sh!tdown with the 7immediate7option. As woraro!nd to this problem, sh!tdown !sing thesecommandsalter system checpointFsh!tdown abortstart!p restrictsh!tdown immediate3ote that if yo! database is in A)501"LO= mode, one can still !searchived log les to roll forward from an o6-line bac!p. 0f yo! cannottae yo!r database down for a cold (o6-line* bac!p at a convenienttime, switch yo!r database into A)501"LO= mode and perform hot(on-line* bac!ps.

    1'*. What is the di,erence bet"een S>OWD89TO and89TDTMT9T!?Show editor is the generic b!ilt-in which accepts any editor name andtaes some inp!t string and ret!rns modied o!tp!t string. /hereas

    the edit

  • 5/22/2018 1001 Oracle Interview Questions

    23/153

    on redo generation overhead. $A3 will re-read database blocs !ntilit gets a consistent image of it. Loo at this simple bac!p e%ample.rman target sys?QQQ nocatalogr!n Zallocate channel tE type disFbac!pformat '?app?oracle?db

  • 5/22/2018 1001 Oracle Interview Questions

    24/153

    databaseS4L+LSK connect sys as sysdbaS4L+LSK start!p mo!nt e%cl!siveFS4L+LSK alter database archivelogFS4L+LSK archive log startFS4L+LSK alter database openF3OT"E emember to tae a baseline database bac!p right afterenabling archivelog mode. /itho!t it one wo!ld not be able to recover.Also, implement an archivelog bac!p to prevent the archive logdirectory from lling-!p.3OT"G A)501"LO= mode was introd!ced with Oracle 1P, and isessential for database point-in-time recovery. Archiving can be !sed incombination with on-line and o6-line database bac!ps.3OT"H #o! may want to set the following 030T.OA parameters whenenabling A)501"LO= mode log

  • 5/22/2018 1001 Oracle Interview Questions

    25/153

    logs. This is done to enable reconstr!ction of a bloc if only half of itwas baced !p (split blocs*. eca!se of this, one sho!ld noticeincreased log activity and archiving d!ring on-line bac!ps.1((. What is the !a$imum allo"ed length of ecord group+olumn?ecord gro!p col!mn names cannot e%ceed HD characters.

    1(*. Which parameter can be used to set read le/elconsistency across multiple =ueries?ead only

    1(-. What are the di,erent types of ecord :roups?4!ery ecord =ro!ps3on4!ery ecord =ro!psState ecord =ro!ps

    1*. 6rom "hich designation is it preferred to send the output

    to the printed?+reviewer

    1*1. "hat are di,erence bet"een post database commit andpostform commit?+ost-form commit res once d!ring the post and commit transactionsprocess, after the database commit occ!rs. The post-form-committrigger res after inserts, !pdates and deletes have been posted to thedatabase b!t before the transactions have been nali8ed in the iss!ingthe command. The post-database-commit trigger res after oracleforms iss!es the commit to nali8ed transactions.

    1*2. What are the di,erent display styles of list items?+op

  • 5/22/2018 1001 Oracle Interview Questions

    26/153

    1*(. >o" many "indo"s in a form can ha/e console?Only one window in a form can display the console, and yo! cannotchange the console assignment at r!ntime.1**. What is an administrati/e Fpri/ilegedG user? Ffor 8BOracle 2As and operators typically !se administrative acco!nts tomanage the database and database instance. An administrativeacco!nt is a !ser that is granted S#SO+" or S#S2A privileges.S#S2A and S#SO+" allow access to a database instance even if it isnot r!nning. )ontrol of these privileges is managed o!tside of thedatabase via password les and special operating system gro!ps. Thispassword le is created with the orapwd !tility.

    1*-.What are the t"o repeating frame al"ays associated "ithmatri$ ob)ect?One down repeating frame below one across repeating frame.

    1-. What are the masterdetail triggers?N

    On-)hecOA)L"

  • 5/22/2018 1001 Oracle Interview Questions

    27/153

    1-3. 9s it possible to modify an e$ternal =uery in a report"hich contains it?3o.

    1-4. 8oes a grouping done for ob)ects in the layout editora,ect the grouping done in the data model editor?3o.

    1-#. >o" does one add users to a pass"ord &le? Ffor 8BOne can select from the S#S.1+/B0L"

  • 5/22/2018 1001 Oracle Interview Questions

    28/153

    $odal windows are !s!ally !sed as dialogs, and have restrictedf!nctionality compared to modelless windows. On some platforms fore%ample operators cannot resi8e, scroll or iconify a modal window.

    23. What are the di,erent default triggers created "hen!aster 8eletes 0roperty is set to ;onisolated?$aster 2eletes +roperty es!lting Triggers----------------------------------------------------3on-0solated(the defa!lt* On-)hec-2elete-$asterOn-)lear-2etailsOn-+op!late-2etails

    24. What are the di,erent default triggers created "hen!aster 8eletes 0roperty is set to isolated?$aster 2eletes +roperty es!lting Triggers---------------------------------------------------0solated On-)lear-2etails

    On-+op!late-2etails

    2#. What are the di,erent default triggers created "hen!aster 8eletes 0roperty is set to +ascade?$aster 2eletes +roperty es!lting Triggers---------------------------------------------------)ascading On-)lear-2etailsOn-+op!late-2etails+re-delete

    2'. What is the di,. bet. setting up of parameters in reports

    2. reports2.#?LO1s can be attached to parameters in the reports G. parameter form.

    2(. What are the di,erence bet"een lo/ list item?Lov is a property where as list item is an item. A list item can have onlyone col!mn, lov can have one or more col!mns.2*. What is the ad/antage of the library?Libraries provide a convenient means of storing client-side program!nits and sharing them among m!ltiple applications. Once yo! create alibrary, yo! can attach it to any other form, men!, or library mod!les./hen yo! can call library program !nits from triggers men! items

    commands and !ser named ro!tine, yo! write in the mod!les to whichyo! have attach the library. /hen a library attaches another library,program !nits in the rst library can reference program !nits in theattached library. Library s!pport dynamic loading-that is libraryprogram !nits are loaded into an application only when needed. Thiscan signicantly red!ce the r!n-time memory re&!irements ofapplications.

    2-. What is le$ical reference? >o" can it be created?

    Page 28 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    29/153

    Le%ical reference is placeo" is lin tool operation di,erent bet. reports 2 2.#?0n eports G.D the lin tool has to be selected and then two elds to belined are selected and the lin is a!tomatically created. 0n G. the rsteld is selected and the lin tool is then !sed to lin the rst eld to

    the second eld.

    21'. What are the di,erent styles of acti/ation of ole Ob)ects?0n place activation"%ternal activation

    21(. >o" do you reference a 0arameter?0n +l?S&l, #o! can reference and set the val!es of form parameters!sing bind variables synta%. "%. +AA$"T" name C '' or bloc.item C+AA$"T" +arameter name21*. What is the di,erence bet"een ob)ect embedding lining in Oracle forms?

    0n Oracle forms, "mbedded objects become part of the form mod!le,and lined objects are references from a form mod!le to a linedso!rce le.

    21-. ;ame of the functions used to getJset can/as properties?=et

  • 5/22/2018 1001 Oracle Interview Questions

    30/153

    get

  • 5/22/2018 1001 Oracle Interview Questions

    31/153

    22-. What is W>;8atabaserecord trigger?Bires when oracle forms rst mars a record as an insert or an !pdate.The trigger res as soon as oracle forms determines thro!gh validationthat the record sho!ld be processed by the ne%t post or commit as aninsert or !pdate. c generally occ!rs only when the operators modiesthe rst item in the record, and after the operator attempts to navigateo!t of the item.

    23. What is a di,erence bet"een preselect and pre=uery?Bires d!ring the e%ec!te &!ery and co!nt &!ery processing after oracleforms constr!cts the select statement to be iss!ed, b!t before thestatement is act!ally iss!ed. The pre-&!ery trigger res j!st beforeoracle forms iss!es the select statement to the database after theoperator as dene the e%ample records by entering the &!ery criteriain enter &!ery mode.+re-&!ery trigger res before pre-select trigger.

    231. What are builtins associated "ith timers?nd

  • 5/22/2018 1001 Oracle Interview Questions

    32/153

    $anage0T ac!p and ecoverySterling Software's SA$SAle%andria - formerly from SpectralogicS!n Solstice ac!p

    23(. Why and "hen should one tune? Ffor 8BOne of the biggest responsibilities of a 2A is to ens!re that the Oracledatabase is t!ned properly. The Oracle 2$S is highly t!nable andallows the database to be monitored and adj!sted to increase itsperformance. One sho!ld do performance t!ning for the followingreasonsThe speed of comp!ting might be wasting val!able h!man time (!serswaiting for response*F "nable yo!r system to eep-!p with the speedb!siness is cond!ctedF and Optimi8e hardware !sage to save money(companies are spending millions on hardware*. Altho!gh this BA4 isnot overly concerned with hardware iss!es, one needs to rememberthan yo! cannot t!ne a !ic into a Berrari.

    23*. >o" can a brea order be created on a column in ane$isting group? What are the /arious sub e/ents a mousedouble clic e/ent in/ol/es?y dragging the col!mn o!tside the gro!p.

    23-. What is the use of place holder column? What are the/arious sub e/ents a mouse double clic e/ent in/ol/es?A placeholder col!mn is !sed to hold calc!lated val!es at a speciedplace rather than allowing is to appear in the act!al row where it has toappear.

    24. What is the use of hidden column? What are the /arioussub e/ents a mouse double clic e/ent in/ol/es?A hidden col!mn is !sed to when a col!mn has to embed intoboilerplate te%t.

    241. What database aspects should be monitored? Ffor 8BOne sho!ld implement a monitoring system to constantly monitor thefollowing aspects of a database. /riting c!stom scripts, implementingOracle's "nterprise $anager, or b!ying a third-party monitoringprod!ct can achieve this. 0f an alarm is triggered, the system sho!lda!tomatically notify the 2A (e-mail, page, etc.* to tae appropriate

    action.0nfrastr!ct!re availability. 0s the database !p and responding to re&!ests. Are the listeners !p and responding to re&!ests. Are the Oracle 3ames and L2A+ Servers !p and responding tore&!ests. Are the /eb Listeners !p and responding to re&!ests

    Things that can ca!se service o!tages

    Page 32 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    33/153

    . 0s the archive log destination lling !p\

    . Objects getting close to their ma% e%tents

    . ser and process limits reached

    Things that can ca!se bad performanceSee &!estion 7/hat t!ning indicators can one !se\7.

    242. Where should the tuning e,ort be directed? Ffor 8B)onsider the following areas for t!ning. The order in which steps arelisted needs to be maintained to prevent t!ning side e6ects. Bore%ample, it is no good increasing the b!6er cache if yo! can red!ce 0?Oby rewriting a S4L statement. 2atabase 2esign (if it's not too late*+oor system performance !s!ally res!lts from a poor database design.One sho!ld generally normali8e to the H3B. Selective denormali8ationcan provide val!able performance improvements. /hen designing,always eep the 7data access path7 in mind. Also loo at proper datapartitioning, data replication, aggregation tables for decision s!pport

    systems, etc.Application T!ning"%perience showed that appro%imately IDV of all Oracle systemperformance problems are resolved by coding optimal S4L. Alsoconsider proper sched!ling of batch tass after pea woring ho!rs.$emory T!ning+roperly si8e yo!r database b!6ers (shared pool, b!6er cache, logb!6er, etc* by looing at yo!r b!6er hit ratios. +in large objects intomemory to prevent fre&!ent reloads.2is 0?O T!ning2atabase les needs to be properly si8ed and placed to provide

    ma%im!m dis s!bsystem thro!ghp!t. Also loo for fre&!ent dis sorts,f!ll table scans, missing inde%es, row chaining, data fragmentation, etc"liminate 2atabase )ontentionSt!dy database locs, latches and wait events caref!lly and eliminatewhere possible. T!ne the Operating System$onitor and t!ne operating system )+, 0?O and memory !tili8ation.Bor more information, read the related Oracle BA4 dealing with yo!rspecic operating system.

    243. What are the /arious sub e/ents a mouse double clice/ent in/ol/es? What are the /arious sub e/ents a mouse

    double clic e/ent in/ol/es?2o!ble clicing the mo!se consists of the mo!se down, mo!se !p,mo!se clic, mo!se down X mo!se !p events.

    24#. What are the default parameter that appear at run time inthe parameter screen? What are the /arious sub e/ents amouse double clic e/ent in/ol/es?2estype and 2esname.

    Page 33 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    34/153

    24'. What are the builtins used for +reating and deletinggroups?)"AT"-=O+ (f!nction*)"AT"o" can /alues be passed bet. precompiler e$its Oraclecall interface?y !sing the statement "R")0AB="T X "R")0AB+T.

    2#3. >o" can a s=uare be dra"n in the layout editor of the

    report "riter?y !sing the rectangle tool while pressing the ()onstraint* ey.

    2#4. >o" can a te$t &le be attached to a report "hile creatingin the report "riter?y !sing the lin le property in the layo!t boiler plate property sheet.

    2##. >o" can 9 message to passed to the user from reports?y !sing S/.$"SSA=" f!nction.

    Page 34 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    35/153

    (Continued on next part...)2#'. 8oes one need to dropJ truncate ob)ects beforeimporting? Ffor 8Before one import rows into already pop!lated tables, one needs totr!ncate or drop these tables to get rid of the old data. 0f not, the newdata will be appended to the e%isting tables. One m!st always 2O+e%isting Se&!ences before re-importing. 0f the se&!ences are notdropped, they will generate n!mbers inconsistent with the rest of thedatabase. 3ote 0t is also advisable to drop inde%es before importing tospeed !p the import process. 0nde%es can easily be recreated after thedata was s!ccessf!lly imported.

    2#(. >o" can a button be used in a report to gi/e a drill do"nfacility?y setting the action associated with b!tton to "%ec!te pl?s&l optionand !sing the S/.!n

  • 5/22/2018 1001 Oracle Interview Questions

    36/153

    create a named pipemnod e%p.pipe p read the pipe - o!tp!t to 8ip le in the bacgro!ndg8ip ^ e%p.pipe K scott.e%p.g8 X feed the pipee%p !seridCscott?tiger leCe%p.pipe ...

    2'1. What is bind reference and ho" can it be created?ind reference are !sed to replace the single val!e in s&l, pl?s&lstatements a bind reference can be created !sing a (* before a col!mnor a parameter name.

    2'2. >o" can one impro/e 9mportJ $port performance? Ffor8B"R+OT

    . Set the BB" parameter to a high val!e (e.g. G$*

    . Set the ")O2L"3=T5 parameter to a high val!e (e.g. PM:*. Stop !nnecessary applications to free-!p reso!rces for yo!r job.

    . 0f yo! r!n m!ltiple e%port sessions, ens!re they write to di6erentphysical diss.. 2O 3OT e%port to an 3BS mo!nted lesystem. 0t will tae forever.0$+OT

    . )reate an inde%le so that yo! can create inde%es ABT" yo! haveimported data. 2o this by setting 032"RB0L" to a lename and thenimport. 3o data will be imported b!t a le containing inde% denitionswill be created. #o! m!st edit this le afterwards and s!pply the

    passwords for the schemas on all )O33")T statements.. +lace the le to be imported on a separate physical dis from theoracle data les. 0ncrease 2

  • 5/22/2018 1001 Oracle Interview Questions

    37/153

    2'4. What are the common 9mportJ $port problems? Ffor 8BOA-DDDDE ni&!e constraint (...* violated - #o! are importingd!plicate rows. se 0=3O"C3O to sip tables that already e%ist (impwill give an error if the object is re-created*.OA-DE Snapshot too old - As yo!r !sers to STO+ woring whileyo! are e%porting or !se parameter )O3S0ST"3TC3OOA-DEPG Bailed to e%tend rollbac segment - )reate bigger rollbacsegments or set parameter )O$$0TC# while importing0$+-DDDE Statement failed ... object already e%ists... - se the0=3O"C# import parameter to ignore these errors, b!t be caref!l asyo! might end !p with d!plicate rows.

    2'#. Why is it preferable to create a fe"er no. of =ueries in thedata model?eca!se for each &!ery, report has to open a separate c!rsor and hasto rebind, e%ec!te and fetch data.

    2''. Where is the e$ternal =uery e$ecuted at the client or theser/er?At the server.

    2'(. Where is a procedure return in an e$ternal plJs=l librarye$ecuted at the client or at the ser/er?At the client.

    2'*. What is coordination /ent?Any event that maes a di6erent record in the master bloc the c!rrentrecord is a coordination ca!sing event.

    2'-. What is the di,erence bet"een O5 Ser/er Ole+ontainer?An Ole server application creates ole Objects that are embedded orlined in ole )ontainers e%. Ole servers are ms

  • 5/22/2018 1001 Oracle Interview Questions

    38/153

    After the &!ery is e%ec!ted b!t before the report is e%ec!ted and therecords are displayed.

    2(3. What are the built ins used for !odifying a groupsstructure?A22-=O+A):+ to see which datales are in bac!pmode. This normally saves a signicant amo!nt of database downtime.Thir! 1adivel! contrib!ted the followingBrom Oracle@i onwards, the following command can be !sed to tae allof the datales o!t of hot bac!p modeALT" 2ATAAS" "32 A):+FThe above commands need to be iss!ed when the database ismo!nted.

    2((. What is a Static ecord :roup?

    A static record gro!p is not associated with a &!ery, rather, yo! deneits str!ct!re and row val!es at design time, and they remain %ed atr!ntime.

    2(*. What is a record group?A record gro!p is an internal Oracle Borms that str!ct!re that has acol!mn?row framewor similar to a database table. 5owever, !nliedatabase tables, record gro!ps are separate objects that belong to theform mod!le which they are dened.

    Page 38 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    39/153

    2(-. !y database is do"n and 9 cannot restore. What no"? Ffor8Becovery witho!t any bac!p is normally not s!pported, however,Oracle )ons!lting can sometimes e%tract data from an o_ine database!sing a !tility called 2L (2is nLoad*. This !tility reads data in thedata les and !nloads it into S4LQLoader or e%port d!mp les. 2Ldoes not care abo!t rollbac segments, corr!pted blocs, etc, and canth!s not g!arantee that the data is not logically corr!pt. 0t is intendedas an absol!te last resort and will most liely cost yo!r company a lotof moneyYYY

    2*. 9H/e lost my 8O5O: &les% ho" can 9 get my 8 bac?Ffor 8BThe following 030T.OA parameter may be re&!ired if yo!r c!rrent redologs are corr!pted or blown away. )a!tion is advised when enablingthis parameter as yo! might end-!p losing yo!r entire database.+lease contact Oracle S!pport before !sing it.

  • 5/22/2018 1001 Oracle Interview Questions

    40/153

    2*#. >o" does one create a !B; reco/ery catalog? Ffor 8BStart by creating a database schema (!s!ally called rman*. Assign anappropriate tablespace to it and grant it the recovery

  • 5/22/2018 1001 Oracle Interview Questions

    41/153

    2-1. What are the t"o "ays by "hich data can be generatedfor a parameters list of /alues?E. sing static val!es.G. /riting select statement.

    2-2. What are the /arious methods of performing a calculationin a report ?E. +erform the calc!lation in the S4L statements itself.G. se a calc!lated ? s!mmary col!mn in the data model.

    2-3. What are the default e$tensions of the &les created bymenu module?.mmb,.mm%

    2-4. What are the default e$tensions of the &les created byforms modules?

    .fmb - form mod!le binary.fm% - form mod!le e%ec!table

    2-#. To display the page no. for each page on a report "hat"ould be the source logical page no. or of physical pageno.?X physical page no.2-'. 9t is possible to use ra" de/ices as data &les and "hat isthe ad/antages o/er &le. system &les ?#es. The advantages over le system les. 0?O will be improvedbeca!se Oracle is bye-passing the ernnel which writing into dis. 2is

    )orr!ption will be very less.

    2-(. What are disad/antages of ha/ing ra" de/ices ?/e sho!ld depend on e%port?import !tility for bac!p?recovery (f!llyreliable* The tar command cannot be !sed for physical le bac!p,instead we can !se dd command which is less e%ible and has limitedrecoveries.

    2-*. What is the signi&cance of ha/ing storage clause ?/e can plan the storage for a table as how m!ch initial e%tents arere&!ired, how m!ch can be e%tended ne%t, how m!ch V sho!ld leave

    free for managing row !pdations etc.,

    2--. What is the use of 9;+TY0 option in M0 command ?Type e%port sho!ld be performed)O$+L"T",)$LAT01",03)"$"3TAL. List the se&!ence of eventswhen a large transaction that e%ceeds beyond its optimal val!e whenan entry wraps and ca!ses the rollbac segment toe%pand into anotion)ompletes. e. will be written.

    Page 41 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    42/153

    3. What is the use of 695 option in 9!0 command ?The name of the le from which import sho!ld be performed.

    31. What is a Shared SA5 pool?The data dictionary cache is stored in an area in S=A called the SharedS4L +ool. This will allow sharing of parsed S4L statements amongconc!rrent !sers.

    32. What is hot bacup and ho" it can be taen?Taing bac!p of archive log les when database is open. Bor this theA)501"LO= mode sho!ld be enabled. The following les need to bebaced !p. All data les. All Archive log, redo log les. All control les.

    33. 5ist the Optional 6le$ible Brchitecture FO6BG of Oracledatabase? or >o" can "e organie the tablespaces in Oracledatabase to ha/e ma$imum performance ?S#ST"$ - 2ata dictionary tables.

    2ATA - Standard operational tables.2ATAG- Static tables !sed for standard operations032"R"S - 0nde%es for Standard operational tables.032"R"SE - 0nde%es of static tables !sed for standard operations.TOOLS - Tools table.TOOLSE - 0nde%es for tools table.S - Standard Operations ollbac Segments,SE,SG - Additional?Special ollbac segments.T"$+ - Temporary p!rpose tablespaceT"$+o" to implement the multiple control &les for an e$istingdatabase ?Sh!tdown the database )opy one of the e%isting control le to newlocation "dit )ong ora le by adding new control le. name estartthe database.

    3#. What is ad/antage of ha/ing dis shado"ingJ !irroring ?Shadow set of diss save as a bac!p in the event of dis fail!re. 0nmost Operating System if any dis fail!re occ!rs it a!tomaticallyswitchover to place of failed dis. 0mproved performance beca!se mostOS s!pport vol!me shadowing can direct le 0?O re&!est to !se the

    shadow set of les instead of the main set of les. This red!ces 0?Oload on the main set of diss.

    3'. >o" "ill you force database to use particular rollbacsegment ?S"T TA3SA)T0O3 S" OLLA): S"=$"3T rbs

  • 5/22/2018 1001 Oracle Interview Questions

    43/153

    ollbac segment dynamically e%tent to handle larger transactionsentry loads. A single transaction may wipeo!t all available free spacein the ollbac Segment Tablespace. This prevents other !ser !singollbac segments.

    3*. What is the use of +O8 5;:T> option in M0command ?ecord length in bytes.

    3-. >o" "ill you monitor rollbac segment status ?4!erying the 2A

  • 5/22/2018 1001 Oracle Interview Questions

    44/153

    "n&!e!es and locs are di6erent names for the same thing. oths!pport &!e!ing and conc!rrency. They are &!e!ed and serviced in arst-in-rst-o!t (B0BO* order.Semaphores are an operating system facility !sed to control waiting.Semaphores are controlled by the following ni% parameters semmni,semmns and semmsl. Typical settings aresemmns C s!m of the 7processes7 parameter for each instance(see init^instanceK.ora for each instance*semmni C n!mber of instances r!nning sim!ltaneo!slyFsemmsl C semmns

    31#. What is a logical bacup?Logical bac!p involves reading a set of database records and writingthem into a le. "%port !tility is !sed for taing bac!p and 0mport!tility is !sed to recover from bac!p.

    31'. Where can one get a list of all hidden Oracle parameters?

    Ffor 8BOracle initiali8ation or 030T.OA parameters with an !nderscore in frontare hidden or !ns!pported parameters. One can get a list of all hiddenparameters by e%ec!ting this &!eryselect Qfrom S#S.R>:S++0where s!bstr(:S++03$,E,E* C '

  • 5/22/2018 1001 Oracle Interview Questions

    45/153

    31*. What is a ollbac segment entry ?0t is the set of before image data blocs that contain rows that aremodied by a transaction. "ach ollbac Segment entry m!st becompleted within one rollbac segment. A single rollbac segment canhave m!ltiple rollbac segment entries.

    31-. What database e/ents can be set? Ffor 8BThe following events are fre&!ently !sed by 2As and Oracle S!pportto diagnose problems7 EDDMP trace name conte%t forever, level M Trace S4L statements andshow bind variables in trace o!tp!t.7 EDDMP trace name conte%t forever, level I This shows wait events inthe S4L trace les7 EDDMP trace name conte%t forever, level EG This shows both bindvariable names and wait events in the S4L trace les7 EMDE trace name errorstac, level EG EMDE trace name errorstac,

    level M EMDE trace name processstate 2!mps o!t trace information ifan OA-EMDE 7inserted val!e too large for col!mn7 error occ!rs. TheEMDE can be replaced by any other Oracle Server error code that yo!want to trace.7 PD trace name errorstac level ED Show where in the code Oraclegets a deadloc (OA-PD*, and may help to diagnose the problem.The following lists of events are e%amples only. They might be versionspecic, so please call Oracle before !sing them7 EDGED trace name conte%t forever, level ED EDGEE trace nameconte%t forever, level ED EDGHE trace name conte%t forever, level EDThese events prevent database bloc corr!ptions

    7 EDDM@ trace name conte%t forever, level G $emory protect c!rsor7 EDGED trace name conte%t forever, level G 2ata bloc chec7 EDGEE trace name conte%t forever, level G 0nde% bloc chec7 EDGH trace name conte%t forever, level E $emory heap chec7 EDGPG trace name conte%t forever, level HDD Allow HDD bytesmemory lea for connections3ote #o! can !se the ni% oerr command to get the description of anevent. On ni%, yo! can type 7oerr ora EDDH7 from the commandprompt to get event details.

    32. >o" can one dump internal database structures? Ffor 8B

    The following (mostly !ndoc!mented* commands can be !sed toobtain information abo!t internal database str!ct!res.o 2!mp control le contentsalter session set events 'immediate trace name )O3TOLB level ED'?o 2!mp le headersalter session set events 'immediate trace name B0L"

  • 5/22/2018 1001 Oracle Interview Questions

    46/153

    alter session set events 'immediate trace name "2O52 level ED'?o 2!mp the system state3OT" Tae H s!ccessive S#ST"$STAT" d!mps, with ED-min!teintervals alter session set events 'immediate trace name S#ST"$STAT"level ED'?o 2!mp the process statealter session set events 'immediate trace name +O)"SSSTAT" levelED'?o 2!mp Library )ache detailsalter session set events 'immediate trace name library cache level ED'?o 2!mp optimi8er statistics whenever a S4L statement is parsed (hintchange statement or !sh pool* alter session set events 'EDDH tracename conte%t forever, level E'

    ?o 2!mp a database bloc (Bile? loc m!st be converted to 2Aaddress* )onvert le and bloc n!mber to a 2A (database blocaddress*."g variable % varcharGFe%ec % C dbms

    321. What are the di,erent ind of e$port bacups?B!ll bac - )omplete database0ncremental - Only a6ected tables from last incremental date?f!llbac!p date.)!m!lative bac!p - Only a6ected table from the last c!m!lativedate?f!ll bac!p date.

    322. >o" free e$tents are managed in 7er '. and 7er (. ?Bree e%tents cannot be merged together in 1er P.D.Bree e%tents are periodically coalesces with the neighboring free e%tentin 1er J.D

    323. What is the use of +O8 option in M0 command?Bor 0ncremental e%ports, the ag indirects whether a record will bestores data dictionary tables recording the e%port.324. What is the use of OWS option in M0 command ?Blag to indicate whether table rows sho!ld be e%ported. 0f '3' only 22Lstatements for the database objects will be created.

    32#. What is the use of +O!0SS option in M0 command ?

    Page 46 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    47/153

    Blag to indicate whether e%port sho!ld compress fragmented segmentsinto single e%tents.

    32'. >o" "ill you s"ap ob)ects into a di,erent table space foran e$isting database ?"%port the !ser+erform import !sing the command imp system?managerleCe%port.dmp inde%leCnewrite.s&l.This will create all denitions into newle.s&l. 2rop necessary objects.!n the script newle.s&l after altering the tablespaces.0mport from the bac!p for the necessary objects.

    32(. >o" does Space allocation table place "ithin a bloc ?"ach bloc contains entries as followsBi%ed bloc header1ariable bloc headerow 5eader,row date (m!ltiple rows may e%ists*

    +)T""" (V of free space for row !pdation in f!t!re*

    32*. What are the factors causing the reparsing of SA5statements in S:B?2!e to ins!Ncient Shared S4L pool si8e. $onitor the ratio of thereloads taes place while e%ec!ting S4L statements. 0f the ratio isgreater than E then increase the S5A"2

  • 5/22/2018 1001 Oracle Interview Questions

    48/153

    tablespaces (S* for rollbac segments. 2eactivate ollbac SegmentD and activate the newly created rollbac segments.333. What is cold bacup? What are the elements of it?)old bac!p is taing bac!p of all physical les after normal sh!tdownof database. /e need to tae.- All 2ata les.- All )ontrol les.- All on-line redo log les.- The init.ora le (Optional*

    334. What is meant by redo log bu,er ?)hanges made to entries are written to the on-line redo log les. Sothat they can be !sed in roll forward operations d!ring databaserecoveries. efore writing them into the redo log les, they will rstbro!ght to redo log b!6ers in S=A and L=/ will write into lesfre&!ently. LO=

  • 5/22/2018 1001 Oracle Interview Questions

    49/153

    341. What is the use of 9;8MS option in M0 command ?A ag to indicate whether inde%es on tables will be e%ported.342. What is the use of 9;8MS option in 9!0 command ?A ag to indicate whether import sho!ld import inde% on tables or not.

    343. What is the use of :B;T option in M0 command?A ag to indicate whether grants on databse objects will be e%ported ornot. 1al!e is '#' or '3'.

    344. What is the use of :B;T option in 9!0 command ?A ag to indicate whether grants on database objects will be imported.

    34#. What is the use of 6@55 option in M0 command ?A ag to indicate whether f!ll databse e%port sho!ld be performed.

    34'. What is the use of S>OW option in 9!0 command ?

    A ag to indicate whether le content sho!ld be displayed or not.

    34(. What is the use of +O;STB9;TS option in M0command ?A ag to indicate whether constraints on table need to be e%ported.

    34*. What is the use of +O;S9ST;T F7er (G option in M0command ?A ag to indicate whether a read consistent version of all the e%portedobjects sho!ld be maintained.

    34-. What are the di,erent methods of bacing up oracledatabase ?- Logical ac!ps- )old ac!ps- 5ot ac!ps (Archive log*

    3#. What is the di,erence bet"een O;7B598BT6958trigger and a 0OST+>B;: trigger ?/hen yo! changes the "%isting val!e to n!ll, the On-validate eldtrigger will re post change trigger will not re. At the time of e%ec!te-&!ery post-change trigger will re, on-validate eld trigger will not re.

    3#1. When is 0A@Y trigger e$ecuted ?/hen "%ec!te-&!ery or co!nt-&!ery +acage proced!res are invoed.3#2. >o" do you trap the error in forms 3. ?!sing On-$essage or On-"rror triggers.

    3#3. >o" many pages you can in a single form ?nlimited

    Page 49 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    50/153

    3#4. While specifying masterJdetail relationship bet"een t"oblocs specifying the )oin condition is a must ? True or 6alse. ?Tr!e

    3##. M9TD6O! is a restricted pacage procedure ?a. True b.6alseTr!e

    3#'. What is the usage of an O;9;ST%O;85T and O;@08BT T9::S ?These triggers are e%ec!tes when inserting, deleting and !pdatingoperations are performed and can be !sed to change the defa!ltf!nction of insert, delete or !pdate respectively. Bor "g, instead ofinserting a row in a table an e%isting row can be !pdated in the sametable.

    3#(. What are the types of 0opup "indo" ?

    the pop-!p eld editorpop-!p list of val!espop-!p pages.Alert

    3#*. What is an SA5 K6O!S ?S4L Qforms is M=L tool for developing and e%ec!tingF Oracle basedinteractive application.

    3#-. >o" do you control the constraints in forms ?Select the !se constraint property is O3 loc denition screen.

    LO):

    3'. What is the di,erence bet"een restricted andunrestricted pacage procedure ?estricted pacage proced!re that a6ects the basic f!nctions of S4L QBorms. 0t cannot !sed in all triggers e%cept ey triggers. nrestrictedpacage proced!re that does not interfere with the basic f!nctions ofS4L Q Borms it can be !sed in any triggers.3'1. B =uery fetched 1 records >o" many times does a 0A@Y Trigger and 0OSTA@Y Trigger "ill get e$ecuted ?+"-4"# res once.

    +OST-4"# res ED times.

    3'2. :i/e the se=uence in "hich triggers &red during insertoperations% "hen the follo"ing 3 triggers are de&ned at thesame bloc le/el ?a. O3-03S"T b. +OST-03S"T c. +"-03S"T

    3'3. State the order in "hich these triggers are e$ecuted ?

    Page 50 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    51/153

    +OST-B0"L2,O3-1AL02AT"-B0"L2,+OST-)5A3=" and :"#-3"RTBL2. :"#-3"RTBL2,+OST-)5A3=", O3-1AL02AT"-B0"L2, +OST-B0"L2. g.

    3'4. What the 0B@S pacage procedure does ?+a!se s!spends processing !ntil the operator presses a f!nction ey

    3'#. What do you mean by a page ?+ages are collection of display information, s!ch as constant te%t andgraphics

    3''. What are the type of @ser $its ?OA)L" +recompliers !ser e%itsO)0 (OA)L" )all 0nterface*3on-OA)"L !ser e%its.+age

    3'(. What is the di,erence bet"een an O;7B598BT6958

    trigger and a trigger ?On-validate-eld trigger res, when the eld 1alidation stat!s 3ew orchanged. +ost-eld-trigger whenever the control leaving form the eld,it will re.

    3'*. +an "e use a restricted pacage procedure in O;7B598BT6958 Trigger ?3o

    3'-. 9s a

  • 5/22/2018 1001 Oracle Interview Questions

    52/153

    3(#. What pacage procedure used for in/oe s=l Kplus froms=l Kforms ?5ost (".g. 5ost (s&lpl!s**

    3('. What is the signi&cance of 0B: in forms 3. ?5ide the elds for internal calc!lation.

    3((. What are the di,erent types of ey triggers ?B!nction :ey:ey-f!nction:ey-others:ey-start!p

    3(*. What is the di,erence bet"een a 6unction

  • 5/22/2018 1001 Oracle Interview Questions

    53/153

    3*4. Where can one &nd 9JO statistics per table? Ffor 8BThe TL"STAT report shows 0?O per tablespace b!t one cannot seewhat tables in the tablespace has the most 0?O. The>OA)L"

  • 5/22/2018 1001 Oracle Interview Questions

    54/153

    . 2ecrease the 030T.OA parameter 2

  • 5/22/2018 1001 Oracle Interview Questions

    55/153

    h. 0osti. rea?a. )all - !nrestrictedb. ser "%it - nrestrictedc. )all

  • 5/22/2018 1001 Oracle Interview Questions

    56/153

    2. rea3. +all4. rrorte$t#. 6ormfailure'. 6ormfatal(. $ecute=uery*. Bnchor 7ie"-. !essageDcode?E. "rroro" many ma$imum number of radio buttons can youassign to a radio group?nlimited no of radio b!ttons can be assigned to a radio gro!p411. What is a 5ayout ditor?The Layo!t "ditor is a graphical design facility for creating andarranging items and boilerplate te%t and graphics objects in yo!rapplication's interface.

    Page 56 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    57/153

    412. 5ist the Types of 9tems?Te%t item.)hart item.)hec bo%.2isplay item.0mage item.List item.adio =ro!p.ser Area item.

    413. 5ist system /ariables a/ailable in forms 4.% and nota/ailable in forms 3.?System.cordination

  • 5/22/2018 1001 Oracle Interview Questions

    58/153

    421. :i/e the e=ui/alent term in forms 4. for the follo"ing.0age% 0age ?+age - )anvas-1iew+age D - )anvas-view n!ll.

    422. What triggers are associated "ith the radio group?Only when-radio-changed trigger associated with radio gro!p1is!al Attrib!tes.

    423. What are the triggers associated "ith a chec bo$?Only /hen-checbo%-activated Trigger associated with a )hec bo%.

    424.+an you attach an alert to a &eld?3o

    42#. +an a root "indo" be made modal?3o

    42'. What is a list item?0t is a list of te%t elements.

    42(. 5ist some builtin routines used to manipulate images inimageDitem?0mage

  • 5/22/2018 1001 Oracle Interview Questions

    59/153

    432. Write the Bbbre/iation for the follo"ing 6ile $tension 1.6! 2. !! 3. 055?B$ ----- Borm $od!le inary.$$ ----- $en! $od!le inary.+LL ------ +L?S4L Library $od!le inary.

    433. 5ist the builtin routine for controlling "indo" during runtime?Bind

  • 5/22/2018 1001 Oracle Interview Questions

    60/153

    A record gro!p is an internal oracle forms data str!ct!re that has asimilar col!mn?row frame wor to a database table

    44. :i/e builtin routine related to a record groups?)reate

  • 5/22/2018 1001 Oracle Interview Questions

    61/153

    Oracle 0nventory 5elps an organi8ation mae better inventorydecisions by minimi8ing stoc and ma%imi8ing cash ow.

    Oracle Order "ntry +rovides organi8ations with a sophisticatedorder entry system for managing c!stomer commitments.

    Oracle +ayables Lets an organi8ation process more invoices withfewer sta6 members and tighter controls. 5elps save money

    thro!gh ma%im!m disco!nts, ban oat, and prevention ofd!plicate payment. Oracle +ersonnel 0mproves the management of employee-

    related iss!es by retaining and maing available every form ofpersonnel data.

    Oracle +!rchasing 0mproves b!ying power, helps negotiatebigger disco!nts, eliminates paper ow, increases nancialcontrols, and increases prod!ctivity.

    Oracle eceivables. 0mproves cash ow by letting anorgani8ation process more payments faster, witho!t o6-lineresearch. 5elps correctly acco!nt for cash, red!ce o!tstanding

    receivables, and improve collection e6ectiveness. Oracle even!e Acco!nting =ives an organi8ation timely and

    acc!rate reven!e and e%ible commissions reporting. Oracle Sales Analysis Allows for better forecasting, planning. and

    reporting of sales information.

    44#. What are the design facilities a/ailable in forms 4.?2efa!lt loc facility.Layo!t "ditor.$en! "ditor.Object Lists.

    +roperty Sheets.+L?S4L "ditor.Tables )ol!mns rowser.!ilt-ins rowser.

    44'. What is the most important module in Oracle 6inancials?Ffor 8BThe =eneral Ledger (=L* mod!le is the basis for all other OracleBinancial mod!les. All other mod!les provide information to it. 0f yo!implement Oracle Binancials, yo! sho!ld switch yo!r c!rrent =L systemrst.=L is relatively easy to implement. #o! sho!ld go live with it rst

    to give yo!r implementation team a chance to be familiar with OracleBinancials.

    44(. What are the types of can/as/ie"s?)ontent 1iew, Staced 1iew.

    44*. What is the !ultiOrg and "hat is it used for? Ffor 8B$!ltiOrg or $!ltiple Organi8ations Architect!re allows m!ltipleoperating !nits and their relationships to be dened within a single

    Page 61 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    62/153

    installation of Oracle Applications. This eeps each operating !nit'stransaction data separate and sec!re.se the following &!ery to determine if $!liOrg is intalledselect m!lti

  • 5/22/2018 1001 Oracle Interview Questions

    63/153

    A library is a collection of +l?S4L program !nits, incl!ding !ser namedproced!res, f!nctions X pacages

    4'. >o" imageDitems can be populate to &eld in forms 4.?A fetch from a long raw database col!mn +L?S&l assignment toe%ec!ting the read

  • 5/22/2018 1001 Oracle Interview Questions

    64/153

    4'*. What are t"o parts of pacage ?The two parts of pacage are +A):A=" S+")0B0)AT0O3 X +A):A="O2#. +acage Specication contains declarations that are global tothe pacages and local to the schema. +acage ody contains act!alproced!res and local declaration of the proced!res and c!rsordeclarations.

    4'-. What are t"o /irtual tables a/ailable during databasetrigger e$ecution ?The table col!mns are referred as OL2.col!mn

  • 5/22/2018 1001 Oracle Interview Questions

    65/153

    within the same schema, witho!t them nowing abo!t it. 1+2cong!ration is done via the 2$S1+2

  • 5/22/2018 1001 Oracle Interview Questions

    66/153

    browser session (oemo" many types of database triggers can be speci&ed ona table ? What are they ?0nsert pdate 2eleteefore ow o.. o.. o..After ow o.. o.. o..efore Statement o.. o.. o..After Statement o.. o.. o..

    0f BO "A)5 O/ cla!se is specied, then the trigger for each owa6ected by the statement.0f /5"3 cla!se is specied, the trigger res according to the ret!rnedoolean val!e.

    4*3. What are the modes of parameters that can be passed toa procedure ?03,OT,03-OT parameters.

    4*4. Where the 0reDde&nedDe$ceptions are stored ?0n the standard pacage.

    +roced!res, B!nctions X +acages F

    4*#. Write the order of precedence for /alidation of a columnin a table ?9. done using 8atabase triggers.ii. done using 9ntegarity +onstraints.?0 X ii.

    4*'. :i/e the structure of the function ?B3)T0O3 name (arg!ment list .....* et!rn datatype islocal variable declarations

    egine%ec!table statements"%ceptione%ec!tion handlers"ndF

    4*(. $plain ho" procedures and functions are called in a05JSA5 bloc ?

    Page 66 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    67/153

    B!nction is called as part of an e%pression.sal C calc!late

  • 5/22/2018 1001 Oracle Interview Questions

    68/153

    4-4. What is a cursor for loop ?)!rsor for loop implicitly declares VO/T#+" as loop inde%,opens ac!rsor, fetches rows of val!es from active set into elds in the recordand closes when all the records have been processed.eg. BO emp

  • 5/22/2018 1001 Oracle Interview Questions

    69/153

    4--. What is di,erence bet"een a 0O+8@ 6@;+T9O; ?A B3)T0O3 is always ret!rns a val!e !sing the ret!rn statement.A +O)"2" may ret!rn one or more val!es thro!gh parameters ormay not ret!rn at all.#. What is di,erence bet"een a +ursor declared in aprocedure and +ursor declared in a pacage speci&cation ?A c!rsor declared in a pacage specication is global and can beaccessed by other proced!res or proced!res in a pacage.A c!rsor declared in a proced!re is local to the proced!re that can notbe accessed by other proced!res.

    #1. What are the cursor attributes used in 05JSA5 ?V0SO+"3 - to chec whether c!rsor is open or notV O/)O3T - n!mber of rows fetched?!pdated?deleted.V BO32 - to chec whether c!rsor has fetched any row. Tr!e if rowsare fetched.

    V 3OT BO32 - to chec whether c!rsor has fetched any row. Tr!e ifno rows are featched.These attrib!tes are proceeded with S4L for 0mplicit )!rsors and with)!rsor name for "%plicit )!rsors.

    #2. What are P TY0 and P OWTY0 ? What are thead/antages of using these o/er datatypes?V T#+" provides the data type of a variable or a database col!mn tothat variable.V O/T#+" provides the record type that represents a entire row of atable or view or col!mns selected in the c!rsor.

    The advantages are 0. 3eed not now abo!t variable's data typeii. 0f the database denition of a col!mn in a table changes, the datatype of a variable changes accordingly.

    #3. What is di,erence bet"een P OWTY0 and TY0+O8 ?V O/T#+" is to be !sed whenever &!ery ret!rns a entire row of atable or view.T#+" rec ")O2 is to be !sed whenever &!ery ret!rns col!mns ofdi6erent table or views and variables.

    ".g. T#+" r

  • 5/22/2018 1001 Oracle Interview Questions

    70/153

    ##. What are the ad/antages of ha/ing a 0acage ?0ncreased f!nctionality (for e%ample,global pacage variables can bedeclared and !sed by any proecd!re in the pacage* and performance(for e%ample all objects of the pacage are parsed compiled, andloaded into memory once*

    #'. What are the uses of 8atabase Trigger ?2atabase triggers can be !sed to a!tomatic data generation, a!ditdata modications, enforce comple% 0ntegrity constraints, andc!stomi8e comple% sec!rity a!thori8ations.

    #(. What is a 0rocedure ?A +roced!re consist of a set of S4L and +L?S4L statements that aregro!ped together as a !nit to solve a specic problem or perform a setof related tass.

    #*. What is a 0acage ?A +acage is a collection of related proced!res, f!nctions, variables andother pacage constr!cts together as a !nit in the database.#-. What is di,erence bet"een 0rocedures and 6unctions ?A B!nction ret!rns a val!e to the caller where as a +roced!re does not.

    #1. What is 8atabase Trigger ?A 2atabase Trigger is proced!re (set of S4L and +L?S4L statements*that is a!tomatically e%ec!ted as a res!lt of an insert in,!pdate to, ordelete from a table.

    #11. +an the default /alues be assigned to actual parameters?#es

    #12. +an a primary ey contain more than one columns?#es

    #13. What is an @T5D695.What are di,erent procedures andfunctions associated "ith it?TL

  • 5/22/2018 1001 Oracle Interview Questions

    71/153

    lang!age. The prcompiler translates the embedded S4L and pl?s&lststements into calls to the precompiler r!ntime library.The o!tp!tm!st be compiled and lined with this library to creater an e%ec!table.

    #1#. 8i,erentiate bet"een T@;+BT and 85T?T3)AT" deletes m!ch faster than 2"L"T"T3)AT"2"L"T"0t is a 22L statement0t is a 2$L statement0t is a one way trip,cannot OLLA):One can ollbac2oesn't have selective feat!res (where cla!se*5as2oesn't re database triggers2oes0t re&!ires disabling of referential constraints.

    #1'. What is di,erence bet"een a formal and an actualparameter?The variables declared in the proced!re and which are passed, asarg!ments are called act!al, the parameters in the proced!redeclaration. Act!al parameters contain the val!es that are passed to aproced!re and receive res!lts. Bormal parameters are the placeholdersfor the val!es of act!al parameters#1(. What should be the return type for a cursor /ariable.+an"e use a scalar data type as return type?The ret!rn type for a c!rsor m!st be a record type.0t can be declared

    e%plicitly as a !ser-dened or VO/T#+" can be !sed. eg T#+"t

  • 5/22/2018 1001 Oracle Interview Questions

    72/153

    the o!tp!t lie,SAL (TO

  • 5/22/2018 1001 Oracle Interview Questions

    73/153

    #2#. 8isplay the records bet"een t"o range?select rown!m, empno, ename from emp where rowid in (select rowidfrom emp where rown!m ^CX!pto min!s select rowid from emp whererown!m^XStart*F

    #2'. min/alue.s=l Select the ;th lo"est /alue from a table?select level, min('col

  • 5/22/2018 1001 Oracle Interview Questions

    74/153

    Oracle does not allow a !ser to specically locate tables, since that is apart of the f!nction of the 2$S. 5owever, for the p!rpose ofincreasing performance, oracle allows a developer to create a)LST". A )LST" provides a means for storing data from di6erenttables together for faster retrieval than if the table placement were leftto the 2$S.

    #32. What is O+9. What are its uses?Oracle )all 0nterface is a method of accesing database from a H=Lprogram. ses--3o precompiler is re&!ired,+L?S4L blocs are e%ec!tedlie other 2$L statements.The O)0 library provides--f!nctions to parse S4L statemets--bind inp!t variables--bind o!tp!t variables--e%ec!te statements--fetch the res!lts

    #33. >o" you open and close a cursor /ariable.Why it isre=uired?O+"3 c!rsor variable BO S"L")T...Statement)LOS" c!rsor variable 0n order to associate a c!rsor variable with apartic!lar S"L")T statement O+"3 synta% is !sed. 0n order to free thereso!rces !sed for the &!ery )LOS" statement is !sed.

    #34. 8isplay OddJ /en number of records?Odd n!mber of recordsselect Q from emp where (rowid,E* in (select rowid, mod(rown!m,G*

    from emp*FO!tp!t-EH"ven n!mber of recordsselect Q from emp where (rowid,D* in (select rowid, mod(rown!m,G*from emp*O!tp!t-GM

    P

    #3#. What are /arious constraints used in SA5?-3LL-3OT 3LL-)5"):-2"BALT#3'. +an cursor /ariables be stored in 05JSA5 tables.9f yesho". 9f not "hy?

    Page 74 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    75/153

    3o, a c!rsor variable points a row which cannot be stored in a two-dimensional +L?S4L table.

    #3(. 8i,erence bet"een ;O 8BTB 6O@;8 and P;OT6O@;8?3O 2ATA BO32 is an e%ception raised only for the S"L")T....03TOstatements when the where cla!se of the &!erydoes not match anyrows. /hen the where cla!se of the e%plicit c!rsor does not match anyrows the V3OTBO32 attrib!te is set to T" instead.

    #3*. +an you use a commit statement "ithin a databasetrigger?3o

    #3-. What W> +@;T O6 clause does in a cursor?LOO+S"L")T n!mB79;: clause?

    5A103= cla!se is !sed when yo! want to specify a condition for agro!p f!nction and it is written after =O+ # cla!se. The /5""cla!se is !sed when yo! want to specify a condition for col!mns, singlerow f!nctions e%cept gro!p f!nctions and it is written before =O+ #cla!se if it is !sed.

    #44. 8i,erence bet"een procedure and function.?B!nctions are named +L?S4L blocs that ret!rn a val!e and can becalled with arg!ments proced!re a named bloc that can be called with

    Page 75 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    76/153

    parameter. A proced!re all is a +L?S4L statement by itself, while aB!nction call is called as part of an e%pression.

    #4#. Which is more faster 9; or M9STS?"R0STS is more faster than 03 beca!se "R0STS ret!rns a oolean val!ewhereas 03 ret!rns a val!e.#4'. What is synta$ for dropping a procedure and a function.Bre these operations possible?2rop +roced!re proced!re

  • 5/22/2018 1001 Oracle Interview Questions

    77/153

    304" is not a!tomatically dened to be mandatory m!st also specifythe col!mn is 3OT 3LL.

    ##3. What is use of a cursor /ariable? >o" it is de&ned?A c!rsor variable is associated with di6erent statements at r!n time,which can hold di6erent val!es at r!n time. Static c!rsors can only beassociated with one r!n time &!ery. A c!rsor variable is reference type(lie a pointer in )*.2eclaring a c!rsor variableT#+" type

  • 5/22/2018 1001 Oracle Interview Questions

    78/153

    ltered deletion. 2eleted records can be rolled bac orcommitted.2atabase triggers re on 2"L"T".

    #'1. What is a transaction ?Transaction is logical !nit between two commits and commit androllbac.

    #'2. What are the ad/antages of 79W ?To protect some of the col!mns of a table from other !sers.To hidecomple%ity of a &!ery.To hide comple%ity of calc!lations.

    #'3. >o" "ill you a acti/ateJdeacti/ate integrity constraints ?The integrity constraints can be enabled or disabled by ALT" TAL""3AL" constraint?20SAL" constraint.

    #'4. Where the integrity constraints are stored in 8ata8ictionary ?

    The integrity constraints are stored in S"

  • 5/22/2018 1001 Oracle Interview Questions

    79/153

    #(1. What is eferential 9ntegrity ?$aintaining data integrity thro!gh a set of r!les that restrict the val!esof one or more col!mns of the tables based on the val!es of primaryey or !ni&!e ey of the referenced table.

    #(2. What is a )oin ? $plain the di,erent types of )oins ?oin is a &!ery which retrieves related col!mns or rows from m!ltipletables.Self oin - oining the table with itself."&!i oin - oining twotables by e&!ating two common col!mns.3on-"&!i oin - oining twotables by e&!ating two common col!mns.O!ter oin - oining two tablesin s!ch a way that &!ery can also retrieve rows that do not havecorresponding join val!e in the other table.

    #(3. 9f an uni=ue ey constraint on 8BT column is created%"ill it /alidate the ro"s that are inserted "ith SYS8BT ?0t won't, eca!se S#S2AT" format contains time attached with it.

    #(4. >o" does one stop and start the O!S? Ffor 8Bse the following command se&!ence to stop and start the O$S(Oracle $anagement Server*oemctl start omsoemctl stat!s oms sysman?oem

  • 5/22/2018 1001 Oracle Interview Questions

    80/153

    Lets call this !ser 2!mmy

    #(-. What is a database lin ?2atabase Lin is a named path thro!gh which a remote database canbe accessed.

    #*. >o" does one list oneHs databases in the O! +onsole?Ffor 8BBollow these steps to discover databases and other services from theO"$ )onsole

    E. "ns!re the =LOALB and 7B+>B2 ? Whatis the ma$imum S9E allo"ed for each type ?

    Page 80 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    81/153

    )5A pads blan spaces to the ma%im!m length. 1A)5AG does notpad blan spaces. Bor )5A it is G and GDDD for 1A)5AG.

    #*#. +an a /ie" be updatedJinsertedJdeleted? 9f Yes under"hat conditions ?A 1iew can be !pdated?deleted?inserted if it has only one base table ifthe view is based on col!mns from one or more tables then insert,!pdate and delete is not possible.#*'. What are the di,erent types of +oordinations of the!aster "ith the 8etail bloc?+O+LAT"

  • 5/22/2018 1001 Oracle Interview Questions

    82/153

    ---------HJDD

    #-1. Suppose a customer table is ha/ing di,erent columns liecustomer no% payments.What "ill be the =uery to select topthree ma$ payments?S"L")T c!stomero" you "ill a/oid your =uery from using inde$es?S"L")T Q BO$ emp/here emp

  • 5/22/2018 1001 Oracle Interview Questions

    83/153

    transaction in networh* 2ispatcher (2nnn* The 2ispatcher is !sef!l in $!lti ThreadedArchitect!rei* Lcn /e can have !pto ED loc processes for inter instance locingin parallel s&l.

    #-#. >o" many types of S=l Statements are there in OracleThere are basically P types of s&l statments.They area* 2ata 2enation Lang!age(22L* The 22L statments dene andmaintain objects and drop objects.b* 2ata $anip!lation Lang!age(2$L* The 2$L statments manip!latedatabase data.c* Transaction )ontrol Statements $anage change by 2$Ld* Session )ontrol sed to control the properties of c!rrent sessionenabling and disabling roles and changing .e.g Alter Statements,Setolee* System )ontrol Statements )hange +roperties of Oracle

    0nstance .e.g Alter Systemf* "mbedded S&l 0ncorporate 22L,2$L and T.).S in +rogrammingLang!age.e.g sing the S&l Statements in lang!ages s!ch as ')',Open,Betch, e%ec!te and close

    #-'. What is a Transaction in OracleA transaction is a Logical !nit of wor that compromises one or moreS4L Statements e%ec!ted by a single ser. According to A3S0, atransaction begins with rst e%ec!table statment and ends when it ise%plicitly commited or rolled bac.

    #-(.

  • 5/22/2018 1001 Oracle Interview Questions

    84/153

    !6er.g* +rogram =lobal Area (+=A* The +=A is a memory b!6er thatcontains data and control information for server process.g* 2atabase !6er )ache 2atabese !6er of S=A stores the mostrecently !sed blocs of datatbase data.The set of database b!6ers inan instance is called 2atabase !6er )ache.h* edo log !6er edo log !6er of S=A stores all the redo logentries.i* edo Log Biles edo log les are set of les that protect altereddatabase data in memory that has not been written to 2ata Biles. Theyare basically !sed for bac!p when a database crashes.j* +rocess A +rocess is a 'thread of control' or mechansim inOperating System that e%ec!tes series of steps.#-*. What are 0rocedure%functions and 0acages+roced!res and f!nctions consist of set of +L?S4L statements that aregro!ped together as a !nit to solve a specic problem or perform set ofrelated tass.

    +roced!res do not et!rn val!es while B!nctions ret!rn one One 1al!e+acages +acages +rovide a method of encaps!lating and storingrelated proced!res, f!nctions, variables and other +acage )ontents

    #--. What are 8atabase Triggers and Stored 0rocedures2atabase Triggers 2atabase Triggers are +roced!res that area!tomatically e%ec!ted as a res!lt of insert in, !pdate to, or deletefrom table.2atabase triggers have the val!es old and new to denote the old val!ein the table before it is deleted and the new indicated the new val!ethat will be !sed. 2T are !sef!l for implementing comple% b!siness

    r!les which cannot be enforced !sing the integrity r!les./e can havethe trigger as efore trigger or After Trigger and at Statement or owlevel. e.g operations insert,!pdate ,delete H before ,after HQG A totalof P combinatonsAt statment level(once for the trigger* or row level( for every e%ec!tion* P Q G A total of EG. Th!s a total of EG combinations are there and therestriction of !sage of EG triggers has been lifted from Oracle J.HOnwards.Stored +roced!res Stored +roced!res are +roced!res that are storedin )ompiled form in the database.The advantage of !sing the storedproced!res is that many !sers can !se the same proced!re in compiled

    and ready to !se format.

    '. >o" many 9ntegrity ules are there and "hat are theyThere are Three 0ntegrity !les. They are as follows a* "ntity 0ntegrity !le The "ntity 0ntegrity !le enforces that the+rimary ey cannot be 3!llb* Boreign :ey 0ntegrity !le The B:0 denotes that the relationshipbetween the foreign ey and the primary ey has to be enforced./henthere is data in )hild Tables the $aster tables cannot be deleted.

    Page 84 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    85/153

    c* !siness 0ntegrity !les The Third 0ntigrity r!le is abo!t thecomple% b!siness processes which cannot be implemented by theabove G r!les.

    '1. What are the 7arious !aster and 8etail elation ships.The vario!s $aster and 2etail elationship area* 3on0solated The $aster cannot be deleted when a child is e%isitingb* 0solated The $aster can be deleted when the child is e%isitingc* )ascading The child gets deleted when the $aster is deleted.

    '2. What are the 7arious loc +oordination 0ropertiesThe vario!s loc )oordination +roperties area* 0mmediate 2efa!lt Setting. The 2etail records are shown when the$aster ecord are shown.b* 2e6ered with A!to 4!ery Oracle Borms defer fetching the detailrecords !ntil the operator navigates to the detail bloc.c* 2e6ered with 3o A!to 4!ery The operator m!st navigate to the

    detail bloc and e%plicitly e%ec!te a &!ery'3. What is in all those MI tables? Ffor 8BThe following list attempts to describe some %> tables. The list may notbe complete or acc!rate, b!t represents an attempt to g!re o!t whatinformation they contain. One sho!ld generally not write &!eriesagainst these tables as they are internal to Oracle, and Oracle maychange them witho!t any prior notication.

    R>:G=T"G:ernel G +hase )ommit =lobal Transaction "ntryBi%ed Table

    R>:G=T":ernel G +hase )ommit =lobal Transaction "ntryBi%ed Table

    R>5!6er headers contain information describing thec!rrent contents of a piece of the b!6er cache

    R>:))5

    )ache !6er )!rrent !6er 5eader Bi%ed Table. 0tcan predict the potential loss of decreasing then!mber of database b!6ers. Thedb:23ST Se&!ence )ache Statistics Bi%ed TableR>:2R5S 5istogram str!ct!re Bi%ed Table

    R>:2RST Statistics collection Bi%ed Table

    R>:=5LOne-row s!mmary of L statistics for the sharedpool

    R>:=LO2# 2erived from R>:=LO (col glhdnsp C G*

    R>:=L)LST" 2erived from R>:=LO (col glhdnsp C *

    Page 85 of 153

  • 5/22/2018 1001 Oracle Interview Questions

    86/153

    R>:=L032"R 2erived from R>:=LO (col glhdnsp C M*

    R>:=LL)Latch )lean-!p state for library cache objectsBi%ed Table

    R>:=L+3 Library cache pin Bi%ed Table

    R>:=LTAL" 2erived from R>:=LO (col glhdnsp C E*

    R>:=LT Library )ache Translation Table entry Bi%ed TableR>:=LT0==" 2erived from R>:=LO (col glhdnsp C H*

    R>:=LRS Library )ache Access Table

    R>::$$2Bi%ed table to loo at what databases are mo!ntedand their stat!s

    R>::S1 )!rsor )ache ind 1ariables

    R>:S$S+"ach row represents a piece of memory in theshared pool

    R>:S423 =lobal database name

    R>:S4ST "n&!e!e statistics by type

    R>:S)B)ost f!nction for each :ernel +role (join toR>:S+L*

    R>:S+L eso!rce Limit for each :ernel +role

    R>:Seso!rce sage for each :ernel +role (join withR>:S+L*

    R>:S4ST =ets and waits for di6erent types of en&!e!es

    R>:TT1S0ndicate tablespace that has valid save !ndosegments

    R>:1000nternal instance parameters set at instanceinitiali8ation

    R>:10S Oracle 2ata loc (si8e:10T0nstance internal ags, variables and parametersthat can change d!ring the life of an instance

    R>:RB+)2S )lient 2e&!e!e Statistics

    R>:RB+)$S )lient $essages Statistics

    R>:;2OSepresent an os role as dened by the operatingsystem

    R>:;SO Sec!rity state ole List of enabled roles

    R>L"Loc "lement each +)$ loc that is !sed by theb!6er cache (gc3LS

  • 5/22/2018 1001 Oracle Interview Questions

    87/153

    5andy R>table &!eriesSome handy &!eries based on the R> memory tables. Largest blocs yo! can write at any given timeselect viival writes&stwhere s&stget K DFOracle :ernel S!bsystemsListed below are some of the important s!bsystems in the Oracleernel. This table might help yo! to read those dreaded trace les andinternal messages. Bor e%ample, if yo! see messages lie this, yo! willat least now where they come from O+00+ nca!ght error MMJ. "rrorstac:)B write?open error blocCD%HeIDD onlineCE

    O+0 Oracle +rogram 0nterface

    :: )ompilation Layer - +arse S4L, compile +L?S4L

    :R"%ec!tion Layer - ind and e%ec!te S4L and+L?S4L

    :G 2istrib!ted "%ec!tion Layer - G+) handling

    3+0 3etwor +rogram 0nterface

    :; Sec!rity Layer - 1alidate privs

    :4 4!ery Layer

    +0 ec!rsive +rogram 0nterface

    :A Access Layer:2 2ata Layer

    :T Transaction Layer

    :) )ache Layer

    :S Services Layer

    : Loc $anager Layer

    := =eneric Layer

    :1 :ernel 1ariables (eg. %>:10S and R>:100*

    S or

    O2S Operating System 2ependencies

    '4. What are the 8i,erent Optimisation Techni=uesThe 1ario!s Optimisation techni&!es area* "%ec!te +lan we can see the plan of the &!ery and change itaccordingly based on the inde%esb* Optimi8er

  • 5/22/2018 1001 Oracle Interview Questions

    88/153

    Select ?QW Birst

  • 5/22/2018 1001 Oracle Interview Questions

    89/153

    S#ST"$?$A3A="The defa!lt 2A !ser name (please do not !se S#S*)reated by \?rdbms?admin?s&l.bs&)an password be changed #es (2o so right after the database wascreated*)an !ser be dropped 3OOTL3?OTL3Stored o!tlines for optimi8er plan stability)reated by \?rdbms?admin?s&l.bs&)an password be changed #es (2o so right after the database wascreated*)an !ser be dropped 3OS)OTT?T0=", A2A$S?/OO2, O3"S?ST""L, )LA:?)LOT5 andLA:"?+A+".Training? demonstration !sers containing the pop!lar "$+ and 2"+Ttables)reated by \?rdbms?admin?!tlsampl.s&l

    )an password be chang