The document discusses various components and concepts related to the physical and logical structure of Oracle databases. It covers topics such as tablespaces, data files, redo log files, control files, schemas, schema objects, tables, views, synonyms, indexes, and more. Key points include that a database contains data files, redo log files, and control files at the physical level, and is divided into tablespaces and schemas at the logical level. Objects within a schema can reside in different tablespaces.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
179 views
1001 Oracle Interview Questions
The document discusses various components and concepts related to the physical and logical structure of Oracle databases. It covers topics such as tablespaces, data files, redo log files, control files, schemas, schema objects, tables, views, synonyms, indexes, and more. Key points include that a database contains data files, redo log files, and control files at the physical level, and is divided into tablespaces and schemas at the logical level. Objects within a schema can reside in different tablespaces.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 153
1.
What are the components of physical database structure of
Oracle database? Oracle database is comprised of three types of fles. One or more datafles, two are more redo log fles, and one or more control fles. 2. What are the components of logical database structure of Oracle database? There are tablespaces and database's schema objects. 3. What is a tablespace? A database is divided into Logical Storage nit called tablespaces. A tablespace 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 is a!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 and data &le. "ach databases logically divided into one or more tablespaces one or more data fles 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 the database's data. Schema objects incl!de tables, views, se&!ences, synonyms, inde%es, cl!sters, database triggers, proced!res, f!nctions pac'ages and database lin's. *. +an ob)ects of the same schema reside in di,erent tablespaces? #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. The tables of a database hold all of the !ser accessible data. Table data is stored in rows and col!mns. 11. What is an Oracle /ie"? Page 1 of 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 identifes the col!mns and rows of the table(s* the view !ses.* 11. What is 0artial 1ac2up ? A +artial ,ac'!p is any operating system bac'!p short of a f!ll bac'!p, ta'en while the database is open or sh!t down. 12. What is !irrored on3line 4edo 5og ? A mirrored on-line redo log consists of copies of on-line redo log fles physically located on separate dis's, changes made to one member of the gro!p are made to all members. 13. What is 6ull 1ac2up ? A f!ll bac'!p is an operating system bac'!p of all data fles, on-line redo log fles and control fle that constit!te O.A)L" database and the parameter. 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,erent tablespaces.? #es. 1(. What is the use of +ontrol 6ile ? /hen an instance of an O.A)L" database is started, its control fle is !sed to identify the database and redo log fles that m!st be opened for 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 4eferential actions supported by 6O49:; <Y integrity constraint ? +2AT" and 2"L"T" .estrict - A referential integrity r!le that disallows the !pdate or deletion of referenced data. 2"L"T" )ascade - /hen a referenced row is deleted all associated dependent rows are deleted. 2.. What are the type of Synonyms? There are two types of Synonyms +rivate and +!blic. 21. What is a 4edo 5og ? The set of .edo Log fles #S2AT",02,S". or S"."31 S4L f!nctions, or the pse!do col!mns L"1"L or .O/3$. 22. What is an 9nde$ Segment ? Page 2 of 153 "ach 0nde% has an 0nde% segment that stores all of its data. 23. $plain the relationship among 8atabase% Tablespace and 8ata &le.? "ach databases logically divided into one or more tablespaces one or more data fles are e%plicitly created for each tablespace 24. What are the di,erent type of Segments ? 2ata Segment, 0nde% Segment, .ollbac' Segment and Temporary Segment. 2#. What are +lusters ? )l!sters are gro!ps of one or more tables physically stores together to share common col!mns and are often !sed together. 2'. What is an 9ntegrity +onstrains ? An integrity constraint is a declarative way to defne 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 direct access to rows, which can be created to increase the performance of data retrieval. 0nde% can be created on one or more col!mns of a table. 2*. What is an $tent ? An "%tent is a specifc n!mber of contig!o!s data bloc's, obtained in a single allocation, and !sed to store a specifc type of information. 2-. What is a 7ie" ? A view is a virt!al table. "very view has a 4!ery attached to it. (The 4!ery is a S"L")T statement that identifes the col!mns and rows of the table(s* the view !ses.* 3.. What is Table ? A table is the basic !nit of data storage in an O.A)L" database. The tables of a database hold all of the !ser accessible data. Table data is stored 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 a predetermined 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 33. What is an Oracle se=uence? A se&!ence generates a serial list of !ni&!e n!mbers for n!merical col!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 a remote 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 direct access to rows, which can be created to increase the performance of data 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 to table 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. A tablespace is !sed to gro!ped related logical str!ct!res together 42. What is 4ollbac2 Segment ? A 2atabase contains one or more .ollbac' Segments to temporarily store 7!ndo7 information. 43. What are the +haracteristics of 8ata 6iles ? A data fle can be associated with only one database. Once created a data fle can't change si8e. One or more data fles form a logical !nit of database storage called a tablespace. 44. >o" to de&ne 8ata 1loc2 si?e ? A data bloc' si8e is specifed for each O.A)L" database when the database is created. A database !sers and allocated free database Page 4 of 153 space in O.A)L" databloc's. ,loc' si8e is specifed in 030T.O.A fle and can9t be changed latter. 4#. What does a +ontrol &le +ontain ? A )ontrol fle records the physical str!ct!re of the database. 0t contains the following information. 2atabase 3ame 3ames and locations of a database's fles and redolog fles. Time stamp of database creation. 4'.What is di,erence bet"een @;9A@ constraint and 049!B4Y <Y constraint ? A col!mn defned as 304" can contain 3!lls while a col!mn defned as +.0$A.# :"# can't contain 3!lls. 4(.What is 9nde$ +luster ? A )l!ster with an inde% on the )l!ster :ey 4*.When does a Transaction end ? /hen it is committed or .ollbac'ed. 4-. What is the e,ect of setting the /alue CB55D4OWSC for O0T9!9E4D:OB5 parameter of the B5T4 SSS9O; command ? What are the factors that a,ect O0T9!9E4 in choosing an Optimi?ation approach ? Answer The O+T0$0;".<$O2" initiali8ation parameter Statistics in the 2ata 2ictionary the O+T0$0;".<=OAL parameter of the ALT". S"SS0O3 command hints in the statement. #.. What is the e,ect of setting the /alue C+>OOSC for O0T9!9E4D:OB5% parameter of the B5T4 SSS9O; +ommand ? The Optimi8er chooses )ost<based approach and optimi8es with the goal of best thro!ghp!t if statistics for atleast one of the tables accessed by the S4L statement e%ist in the data dictionary. Otherwise the O+T0$0;". chooses .L"<based approach. #1. >o" does one create a ne" database? Ffor 81BG One can create and modify Oracle databases !sing the Oracle 7dbca7 (2atabase )onfg!ration Assistant* !tility. The dbca !tility is located in the >O.A)L"<5O$"?bin directory. The Oracle niversal 0nstaller (o!i* normally starts it after installing the database server software. One can also create databases man!ally !sing scripts. This option, however, is falling o!t of fashion, as it is &!ite involved and error prone. Loo' at this e%ample for creating and Oracle @i databaseA )O33")T S#S AS S#S2,A ALT". S#ST"$ S"T 2,<)."AT"<B0L"<2"STC'?!DE?oradata?'F ALT". S#ST"$ S"T 2,<)."AT"<O3L03"<LO=<2"ST<EC'?!DG?oradata?'F ALT". S#ST"$ S"T 2,<)."AT"<O3L03"<LO=<2"ST<GC'?!DH?oradata?'F )."AT" 2ATA,AS"F Page 5 of 153 #2. What database bloc2 si?e should 9 use? Ffor 81BG Oracle recommends that yo!r database bloc' si8e match, or be m!ltiples of yo!r operating system bloc' si8e. One can !se smaller bloc' si8es, b!t the performance cost is signifcant. #o!r choice sho!ld depend on the type of application yo! are r!nning. 0f yo! have many small transactions as with OLT+, !se a smaller bloc' si8e. /ith fewer b!t larger transactions, as with a 2SS application, !se a larger bloc' si8e. 0f yo! are !sing a vol!me manager, consider yo!r 7operating system bloc' si8e7 to be I:. This is beca!se vol!me manager prod!cts !se I: bloc's (and this is not confg!rable*. #3. What are the di,erent approaches used by Optimi?er in choosing an e$ecution plan ? .!le-based and )ost-based. #4. What does 4O551B+< do ? .OLL,A): retracts any of the changes res!lting from the S4L statements in the transaction. >o" does one coalesce free space?Ffor 81BG S$O3 coalesces free space (e%tents* into larger, contig!o!s e%tents every 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 storage parameter 7pctincrease7 is set to D. /ith Oracle J.H one can man!ally coalesce a tablespace !sing the ALT". TA,L"S+A)" ... )OAL"S)"F command, !ntil then !seA S4LK alter session set events 'immediate trace name coalesce level n'F /here 'n' is the tablespace n!mber yo! get from S"L")T TSL, 3A$" B.O$ S#S.TS>F #o! can get stat!s information abo!t this process by selecting from the S#S.2,A<B.""<S+A)"<)OAL"S)"2 dictionary view. ##. >o" does one pre/ent tablespace fragmentation? Ffor 81BG Always set +)T03)."AS" to D or EDD. ,i8arre val!es for +)T03)."AS" will contrib!te to fragmentation. Bor e%ample if yo! set +)T03)."AS" to E yo! will see that yo!r e%tents are going to have weird and wac'y si8esA EDD:, EDD:, EDE:, EDG:, etc. S!ch e%tents of bi8arre si8e are rarely re-!sed in their entirety. +)T03)."AS" of D or EDD gives yo! nice ro!nd e%tent si8es that can easily be re!sed. "g. EDD:, EDD:, GDD:, MDD:, etc. Thir! 1adivel! contrib!ted the followingA se the same e%tent si8e for all the segments in a given tablespace. Locally $anaged tablespaces (available from Ii onwards* with !niform e%tent si8es virt!ally eliminates any tablespace fragmentation. 3ote that the n!mber of e%tents per segment does not ca!se any performance iss!e anymore, !nless they r!n into tho!sands and Page 6 of 153 tho!sands where additional 0?O may be re&!ired to fetch the additional bloc's where e%tent maps of the segment are stored. #'. Where can one &nd the high "ater mar2 for a table? Ffor 81BG There 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!lts from the following S4L statementsA S"L")T ,LO):S B.O$ 2,A<S"=$"3TS /5"." O/3".C++".(owner* A32 S"=$"3T<3A$" C ++".(table*F A3AL#;" TA,L" owner.table "ST0$AT" STAT0ST0)SF S"L")T "$+T#<,LO):S B.O$ 2,A<TA,L"S /5"." O/3".C++".(owner* A32 S"=$"3T<3A$" C ++".(table*F Th!s, the tables' 5/$ C (&!ery res!lt E* - (&!ery res!lt G* - E 3OT"A #o! can also !se the 2,$S<S+A)" pac'age and calc!late the 5/$ C TOTAL<,LO):S - 3S"2<,LO):S - E. #(. What is +OST3based approach to optimi?ation ? )onsidering available access paths and determining the most eNcient e%ec!tion plan based on statistics in the data dictionary for the tables accessed by the statement and their associated cl!sters and inde%es. #*. What does +O!!9T do ? )O$$0T ma'es permanent the changes res!lting from all S4L statements in the transaction. The changes made by the S4L statements of a transaction become visible to other !ser sessions transactions that start only after transaction is committed. #-. >o" are e$tents allocated to a segment? Ffor 81BG OracleI and above ro!nds o6 e%tents to a m!ltiple of O bloc's when more than O bloc's are re&!ested. 0f one re&!ests EP: or G bloc's (ass!ming a I: bloc' si8e*, Oracle doesn't ro!nd it !p to O bloc's, b!t it allocates G bloc's or EP: as re&!ested. 0f one as's for I bloc's, Oracle will ro!nd it !p to ED bloc's. Space allocation also depends !pon the si8e of contig!o!s free space available. 0f one as's for I bloc's and Oracle fnds a contig!o!s free space that is e%actly I bloc's, it wo!ld give it yo!. 0f it were @ bloc's, Oracle wo!ld also give it to yo!. )learly Oracle doesn't always ro!nd e%tents to a m!ltiple of O bloc's. The e%ception to this r!le is locally managed tablespaces. 0f a tablespace is created with local e%tent management and the e%tent si8e is PM:, then Oracle allocates PM: or I bloc's ass!ming I:-bloc' si8e. Oracle doesn't ro!nd it !p to the m!ltiple of O when a tablespace is locally managed. '.. +an one rename a database user FschemaG? Ffor 81BG Page 7 of 153 3o, this is listed as "nhancement .e&!est EOIODI. /or'aro!ndA 2o a !ser-level e%port of !ser A create new !ser , 0mport system?manager from!serCA to!serC, 2rop !ser A '1. 8e&ne Transaction ? A Transaction is a logical !nit of wor' that comprises one or more S4L statements e%ec!ted by a single !ser. '2. What is 4ead3Only Transaction ? A .ead-Only transaction ens!res that the res!lts of each &!ery e%ec!ted in the transaction are consistant with respect to the same point in time. '3. What is a deadloc2 ? $plain . Two processes wating to !pdate the rows of a table which are loc'ed by the 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 the performance of server will red!ce drastically. These loc's will be released a!tomatically when a commit?rollbac' operation performed or any one of this processes being 'illed e%ternally. '4. What is a Schema ? The set of objects owned by !ser acco!nt is called the schema. '#. What is a cluster <ey ? The related col!mns of the tables are called the cl!ster 'ey. The cl!ster 'ey is inde%ed !sing a cl!ster inde% and its val!e is stored only once for m!ltiple tables in the cl!ster. ''. What is 0arallel Ser/er ? $!ltiple instances accessing the same database (Only 0n $!lti-)+ environments* '(. What are the basic element of 1ase con&guration of an oracle 8atabase ? 0t consists of one or more data fles. one or more control fles. two or more redo log fles. The 2atabase contains m!ltiple !sers?schemas one or more rollbac' segments one or more tablespaces 2ata dictionary tables ser objects (table,inde%es,views etc.,* Page 8 of 153 The server that access the database consists of S=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* .")O 2ispatcher ser +rocess with associated +=S '*. What is clusters ? =ro!p of tables physically stored together beca!se they share common col!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 direct access of a row in a table. An inde% is a!tomatically created when a !ni&!e of primary 'ey constraint cla!se is specifed in create table comman (1er J.D* (.. What is a 8atabase instance ? $plain A database instance (Server* is a set of memory str!ct!re and bac'gro!nd processes that access a set of database fles. 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?O performed against data fle. (1. WWhat is the use of B;B5YE command ? To perform one of these f!nction on an inde%,table, or cl!sterA - To collect statistics abo!t object !sed by the optimi8er and store them in the data dictionary. - To delete statistics abo!t the object !sed by object from the data dictionary. - 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 a tablespace name. (3. What are the system resources that can be controlled through 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 available to a single call to O.A)L" made by a S4L statement the amo!nt of logical 0?O available to the !ser's session the amo!t of logical 0?O available to a single call to O.A)L" made by a S4L statement the allowed amo!nt of idle time for the !ser's session the allowed 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 a schema 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 privileges witho!t regard to specifcally named objects. (*. What are the database administrators utilities a/aliable ? S4L Q 2,A - This allows 2,A to monitor and control an O.A)L" database. S4L Q Loader - 0t loads data from standard operating system fles (Blat fles* into O.A)L" database tables. "%port ("R+* and 0mport (imp* !tilities allow yo! to move e%isting data in O.A)L" format to and from O.A)L" database. (-. >o" can you enable automatic archi/ing ? Sh!t the database ,ac'!p the database $odify?0ncl!de LO=<A.)501"<STA.T<T." in init.ora fle. Start !p the database. *.. What are roles? >o" can "e implement roles ? .oles are the easiest way to grant and manage common privileges needed by di6erent gro!ps of database !sers. )reating roles and assigning provides to roles. Assign each role to gro!p of !sers. This will simplify the job of assigning privileges to individ!al !sers. *1. What are 4oles ? .oles are named gro!ps of related privileges that are granted to !sers or other roles. *2. What are the use of 4oles ? ."2)"2 =.A3T03= OB +.010L"="S - .ather than e%plicitly granting the same set of privileges to many !sers a database administrator can grant the privileges for a gro!p of related !sers granted to a role and then grant only the role to each member of the gro!p. 2#3A$0) +.010L"=" $A3A="$"3T - /hen the privileges of a gro!p m!st change, only the privileges of the role need to be modifed. The sec!rity domains of all !sers granted the gro!p's role a!tomatically reSect the changes made to the role. Page 10 of 153 S"L")T01" A1A0LA,0L0T# OB +.010L"="S - The roles granted to a !ser can be selectively enable (available for !se* or disabled (not available for !se*. This allows specifc control of a !ser's privileges in any given sit!ation. A++L0)AT0O3 A/A."3"SS - A database application can be designed to a!tomatically enable and disable selective roles when a !ser attempts to !se the application. *3. What is 0ri/ilege Buditing ? +rivilege a!diting is the a!diting of the !se of powerf!l system privileges witho!t regard to specifcally named objects. *4. What is Ob)ect Buditing ? Object a!diting is the a!diting of accesses to specifc schema objects witho!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 81B Loo' at the following S4L &!eryA S"L")T to<char (start!p<time,'22-$O3-#### 55GMA $0A SS'* 72, Start!p Time7 B.O$ sys.v<>instanceF $arco ,ergman provided the following alternative sol!tionA S"L")T to<char (logon<time,'2y dd $on 55GMA $0A SS'* 72, Start!p Time7 B.O$ sys.v<>session /5"." SidCE ?Q this is pmon Q? ? sers still r!nning on Oracle J can try one of the following &!eriesA )ol!mn STA.T"2 format aEI head 'STA.T+ T0$"' Select ).03STA3)", to<date (TL.1AL", 'T'* UU to<char (Soor (S").1AL"?HPDD*, 'D@'* UU 'A' -- UU S!bstr (to<char (mod (S").1AL"?PD, PD*, 'D@'*, G, G* UU S!bstr (to<char (Soor (mod (S").1AL"?PD, PD**, 'D@'*, G, G* UU '.' UU S!bstr (to<char (mod (S").1AL", PD*, 'D@'*, G, G* STA.T"2 from S#S.1<>03STA3)" TL, S#S.1<>03STA3)" S"), S#S.1<>T5."A2 ) /here TL.:"# li'e 'VTL0A3V' and S").:"# li'e 'VS")O32V'F Select to<date (TL.1AL", 'T'* UU to<char (to<date (S").1AL", 'SSSSS'*, ' 55GMA$0ASS'* STA.T"2 from S#S.1<>03STA3)" TL, S#S.1<>03STA3)" S") Page 11 of 153 where TL.:"# li'e 'VTL0A3V' and S").:"# li'e 'VS")O32V'F select to<char (to<date (TL.1AL", 'T'* W (S").1AL"?IPMDD*, -.et!rn a 2AT" '22-$O3-## 55GMA$0ASS'* STA.T"2 from 1>03STA3)" TL, 1>03STA3)" S") where TL.:"# li'e 'VTL0A3V' and S").:"# li'e 'VS")O32V'F *'. Where are my T!0695S% 9 donHt see them in 7I8BTB695 or 81BD8BTBD695? Ffor 81B Tempfles, !nli'e normal datafles, are not listed in v>datafle or dba<data<fles. 0nstead &!ery v>tempfle or dba<temp<flesA S"L")T Q B.O$ v>tempfleF S"L")T Q B.O$ dba<temp<flesF *(. >o" do 9 &nd usedJfree space in a T!0O4B4Y tablespace? Ffor 81B nli'e normal tablespaces, tr!e temporary tablespace information is not listed in 2,A<B.""<S+A)". 0nstead !se the 1>T"$+<S+A)"<5"A2". viewA S"L")T tablespace<name, S$ (bytes !sed*, S$ (bytes free* B.O$ 1>temp<space<header =.O+ ,# tablespace<nameF **. What is a pro&le ? "ach database !ser is assigned a +rofle that specifes limitations on vario!s system reso!rces available to the !ser. *-. >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 the tables. /hen proced!re e%ec!ted it will e%ec!te the privilege of proced!res owner. sers cannot access tables e%cept via the proced!re. -.. >o" can one see "ho is using a temporary segment? Ffor 81B Bor every !ser !sing temporary space, there is an entry in S#S.1><LO): with type 'TS'. All temporary segments are named '66.bbbb' where '66' is the fle it is in and 'bbbb' is frst bloc' of the segment. 0f yo!r temporary tablespace is set to T"$+O.A.#, all sorts are done in one large temporary segment. Bor !sage stats, see S#S.1<>SO.T<S"=$"3T Brom Oracle I.D, one can j!st &!ery S#S.v>sort<!sage. Loo' at these e%amplesA select s.!sername, !.7S".7, !.tablespace, !.contents, !.e%tents, Page 12 of 153 !.bloc's from sys.v<>session s, sys.v<>sort<!sage ! where s.addr C !.session<addr ? select s.os!ser, s.process, s.!sername, s.serialL, S!m (!.bloc's*Qvp.val!e?EDGM sort<si8e from sys.v<>session s, sys.v<>sort<!sage !, sys.v<>parameter 1+ where s.saddr C !.session<addr and vp.name C 'db<bloc'<si8e' and s.os!ser li'e 'XE' gro!p by s.os!ser, s.process, s.!sername, s.serialL, vp.val!e ? -1. >o" does one get the /ie" de&nition of &$ed /ie"sJtables? 4!ery v>f%ed<view<defnition. "%ampleA S"L")T Q B.O$ v>f%ed<view<defnition /5"." view<nameC'1>S"SS0O3'F -2. What are the dictionary tables used to monitor a database spaces ? 2,A<B.""<S+A)" 2,A<S"=$"3TS 2,A<2ATA<B0L"S. -3. >o" can "e specify the Brchi/ed log &le name format and destination? ,y setting the following val!es in init.ora fle. LO=<A.)501"<BO.$AT C arch VS?s?T?tarc (VS - Log se&!ence n!mber and is 8ero left paded, Vs - Log se&!ence n!mber not padded. VT - Thread n!mber lef-8ero- paded and Vt - Thread n!mber not padded*. The fle name created is arch DDDE are if VS is !sed. LO=<A.)501"<2"ST C path. -4. What is user Bccount in Oracle database? An !ser acco!nt is not a physical str!ct!re in 2atabase b!t it is having important relationship to the objects in the database and will be having certain privileges. -#. When "ill the data in the snapshot log be used? /e m!st be able to create a after row trigger on table (i.e., it sho!ld be not be already available* After giving table privileges. /e cannot specify snapshot log name beca!se oracle !ses the name of the master table in the name of the database objects that s!pport its snapshot log. The master table name sho!ld be less than or e&!al to GH characters. (The table name created will be $LO=S<tablename, and trigger name will be TLO=S name*. -'. What dynamic data replication? pdating or 0nserting records in remote database thro!gh database triggers. 0t may fail if remote database is having any problem. Page 13 of 153 -(. What is T"o30hase +ommit ? Two-phase commit is mechanism that g!arantees a distrib!ted transaction either commits on all involved nodes or rolls bac' on all involved nodes to maintain data consistency across the global distrib!ted database. 0t has two phase, a +repare +hase and a )ommit +hase. -*. >o" can you nforce 4eferential 9ntegrity in snapshots ? Time the references to occ!r when master tables are not in !se. +eform the reference the man!ally immdiately loc'ing the master tables. /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 O.A)L"'s mechanism for interfacing with the comm!nication protocols !sed by the networ's that facilitate distrib!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 remote node which is periodically refreshed to reSect changes made to the master table. 1.1. What is the mechanism pro/ided by O4B+5 for table replication ? Snapshots and S3A+S5OT LO=s 1.2. What is snapshots? Snapshot is an object !sed to dynamically replicate data between distrib!te database at specifed time intervals. 0n ver J.D they are read only. 1.3. What are the /arious type of snapshots? Simple and )omple%. 1.4. 8escribe t"o phases of T"o3phase commit ? +repare phase - The global coordinator (initiating node* as' a participants to prepare (to promise to commit or rollbac' the transaction, even if there is a fail!re* )ommit - +hase - 0f all participants respond to the coordinator that they are prepared, the coordinator as's all nodes to commit the transaction, if all participants cannot prepare, the coordinator as's all nodes to roll bac' the transaction. 1.#. What is snapshot log ? 0t is a table that maintains a record of modifcations to the master table in a snapshot. 0t is stored in the same database as master table and is Page 14 of 153 only available for simple snapshots. 0t sho!ld be created before creating snapshots. 1.'. What are the bene&ts of distributed options in databases? 2atabase on other servers can be !pdated and those transactions can be 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 send the changes to the snapshot tables. BO.)" - 2efa!lt val!e. 0f possible it performs a BAST refreshF Otherwise it 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 with the master table. O.A)L" !ses a snapshot log to trac' the rows that have 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!ltiple database servers that appears to a !ser as single logical database. The data of all databases in the distrib!ted database can be sim!ltaneo!sly accessed and modifed. 11.. >o" can "e reduce the net"or2 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, TO03s, s!b-&!ery or snashot of operations. - A comple% snapshots contain atleast any one of the above. 112. What are the 1uilt3ins used for sending 0arameters to forms? #o! can pass parameter val!es to a form when an application e%ec!tes the call<form, 3ew<form, Open<form or .!n<prod!ct. 113. +an you ha/e more than one content can/as /ie" attached "ith a "indo"? #es. "ach window yo! create m!st have atleast one content canvas view assigned to it. #o! can also create a window that has manip!lated Page 15 of 153 content canvas view. At r!n time only one of the content canvas views assign to a window is displayed at a time. 114. 9s the Bfter report trigger &red if the report e$ecution fails? #es. 11#. 8oes a 1efore form trigger &re "hen the parameter form is suppressed? #es. 11'. What is S:B? The System =lobal Area in an Oracle database is the area in memory to facilitate the transfer of information between !sers. 0t holds the most recently re&!ested str!ct!ral information between !sers. 0t holds the 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 and shared pool area. 11(. What is a shared pool? The data dictionary cache is stored in an area in S=A called the shared pool. This will allow sharing of parsed S4L statements among conc!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 SA5 statements in S:B? 2!e to ins!Ncient shared pool si8e. $onitor the ratio of the reloads ta'es place while e%ec!ting S4L statements. 0f the ratio is greater than E then increase the S5A."2<+OOL<S0;". 121. What are clusters? )l!sters are gro!ps of one or more tables physically stores together to share common col!mns and are often !sed together. 122. What is cluster 2ey? The related col!mns of the tables in a cl!ster are called the cl!ster 'ey. 123. 8o a /ie" contain data? 1iews do not contain or store data. 124. What is user Bccount in Oracle database? Page 16 of 153 A !ser acco!nt is not a physical str!ct!re in database b!t it is having important relationship to the objects in the database and will be having certain 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 the tables. /hen proced!re e%ec!ted it will e%ec!te the privilege of proced!res owner. sers cannot access tables e%cept via the proced!re. 12'. What are the dictionary tables used to monitor a database space? 2,A<B.""<S+A)" 2,A<S"=$"3TS 2,A<2ATA<B0L"S. 12(. +an a property clause itself be based on a property clause? #es 12*. 9f a parameter is used in a =uery "ithout being pre/iously de&ned% "hat di,. e$ist bet". report 2.. and 2.# "hen the =uery is applied? /hile both reports G.D and G.O create the parameter, report G.O gives a message that a bind parameter has been created. 12-. What are the s=l clauses supported in the lin2 property sheet? /here start with having. 13.. What is trigger associated "ith the timer? /hen-timer-e%pired. 131. What are the trigger associated "ith image items? /hen-image-activated fres when the operators do!ble clic's on an image itemwhen-image-pressed fres when an operator clic's or do!ble clic's on an image item 132. What are the di,erent "indo"s e/ents acti/ated at runtimes? /hen<window<activated /hen<window<closed /hen<window<deactivated /hen<window<resi8ed /ithin this triggers, yo! can e%amine the b!ilt in system variable system. event<window to determine the name of the window for which the trigger fred. Page 17 of 153 133. When do you use data parameter type? /hen the val!e of a data parameter being passed to a called prod!ct is always the name of the record gro!p defned in the c!rrent form. 2ata parameters are !sed to pass data to prod!ts invo'ed with the r!n<prod!ct b!ilt-in s!bprogram. 134. What is di,erence bet"een openDform and callDform? when one form invo'es another form by e%ec!ting open<form the frst form remains displayed, and operators can navigate between the forms as desired. when one form invo'es another form by e%ec!ting call<form, the called form is modal with respect to the calling form. That is, any windows that belong to the calling form are disabled, and operators cannot navigate to them !ntil they frst e%it the called form. 13#. What is ne"Dform built3in? /hen one form invo'es another form by e%ec!ting new<form oracle form e%its the frst form and releases its memory before loading the new form calling new form completely replace the frst with the second. 0f there are changes pending in the frst form, the operator will be prompted to save them before the new form is loaded. 13'. What is the C5O7 of 7alidationC 0roperty of an item? What is the use of it? /hen LO1 for 1alidation is set to Tr!e, Oracle Borms compares the c!rrent val!e of the te%t item to the val!es in the frst col!mn displayed in the LO1. /henever the validation event occ!rs. 0f the val!e in the te%t item matches one of the val!es in the frst col!mn of the LO1, validation s!cceeds, the LO1 is not displayed, and processing contin!es normally. 0f the val!e in the te%t item does not match one of the val!es in the frst col!mn of the LO1, Oracle Borms displays the LO1 and !ses the te%t item val!e as the search criteria to a!tomatically red!ce the list. 13(. What is the di,. "hen 6le$ mode is mode on and "hen it is o,? /hen Se% mode is on, reports a!tomatically resi8es the parent when the child is resi8ed. 13*. What is the di,. "hen con&ne mode is on and "hen it is o,? /hen confne mode is on, an object cannot be moved o!tside its parent in the layo!t. 13-. What are /isual attributes? 1is!al attrib!tes are the font, color, pattern proprieties that yo! set for form and men! objects that appear in yo!r application interface. 14.. Which of the t"o /ie"s should ob)ects according to possession? Page 18 of 153 view by str!ct!re. 141. What are the t"o types of /ie"s a/ailable in the ob)ect na/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 !ser interfaces. The controls can !se to obtain !ser inp!ts and display program o!tp!ts.vb% control where originally develop as e%tensions for the 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!lt f!nctionality of the oracle forms. 144. >o" do you create a ne" session "hile open a ne" form? sing open<form b!ilt-in setting the session option "%. Open<form('Stoc's ',active,session*. when invo'e the m!litiple forms with open form and call<form in the same application, state whether the following are tr!e?Balse 14#. What are the "ays to monitor the performance of the report? se reports profle e%ec!table statement. se S4L trace facility. 14'. 9f t"o groups are not lin2ed in the data model editor% What is the hierarchy bet"een them? Two gro!p that is above are the left most ran' higher than the gro!p that is to right or below it. 14(. Bn open form can not be e$ecute the callDform procedure if you chain of called forms has been initiated by another open form? Tr!e 14*. $plain about hori?ontal% 7ertical tool bar can/as /ie"s? Tool bar canvas views are !sed to create tool bars for individ!al windows. 5ori8ontal tool bars are display at the top of a window, j!st !nder its men! bar. 1ertical Tool bars are displayed along the left side of a window 14-. What is the purpose of the product order option in the column property sheet? To specify the order of individ!al gro!p eval!ation in a cross prod!cts. 1#.. What is the use of imageD?oom built3in? To manip!late images in image items. Page 19 of 153 1#1. >o" do you reference a parameter indirectly? To indirectly reference a parameter !se the 3A$" 03, )O+# 'b!ilt-ins to indirectly set and reference the parameters val!e' "%ample name<in ('capital parameter my param'*, )opy ('S."S5','+arameter my<param'* 1#2. What is a timer? Timer is an 7internal time cloc'7 that yo! can programmatically create to perform an action each time the times. 1#3. What are the t"o phases of bloc2 coordination? There are two phases of bloc' coordinationA the clear phase and the pop!lation phase. 2!ring, the clear phase, Oracle Borms navigates internally to the detail bloc' and S!shes the obsolete detail records. 2!ring the pop!lation phase, Oracle Borms iss!es a S"L")T statement to repop!late the detail bloc' with detail records associated with the new master record. These operations are accomplished thro!gh the e%ec!tion of triggers. 1#4. What are !ost +ommon types of +omple$ master3detail relationships? There are three most common types of comple% master-detail relationshipsA master with dependent details master with independent details detail with two masters 1##. What is a te$t list? The te%t list style list item appears as a rectang!lar bo% which displays the f%ed n!mber of val!es. /hen the te%t list contains val!es that can not be displayed, a vertical scroll bar appears, allowing the operator to view and select !ndisplayed val!es. 1#'. What is term? The term is terminal defnition fle that describes the terminal form which yo! are !sing rGDr!n. 1#(. What is use of term? The term fle which 'ey is correspond to which oracle report f!nctions. 1#*. What is pop list? The pop list style list item appears initially as a single feld (similar to a te%t item feld*. /hen the operator selects the list icon, a list of available choices appears. 1#-. What is the ma$imum no of chars the parameter can store? Page 20 of 153 The ma%im!m no of chars the parameter can store is only valid for char parameters, which can be !pto PM:. 3o parameters defa!lt to GH,ytes and 2ate parameter defa!lt to J,ytes. 1'.. What are the default e$tensions of the &les created by library module? The defa!lt fle e%tensions indicate the library mod!le type and storage format .pll - pl?s&l library mod!le binary 1'1. What are the +oordination 0roperties in a !aster38etail relationship? The coordination properties are 2eferred A!to-4!ery These +roperties determine when the pop!lation phase of bloc' coordination 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 displayed at the bottom of the window to which it is assigned.To specify that the console sho!ld be displayed, set the console window form property to the name of any window in the form. To incl!de the console, set console 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<b!tton<pressedSystem.mo!se<b!tton<shift 1'#. What are the types of calculated columns a/ailable? S!mmary, Borm!la, +laceholder col!mn. 1''. $plain about stac2ed can/as /ie"s? Stac'ed canvas view is displayed in a window on top of, or 7stac'ed7 on the content canvas view assigned to that same window. Stac'ed canvas views obsc!re some part of the !nderlying content canvas view, and or often shown and hidden programmatically. 1'(. >o" does one do o,3line database bac2ups? Ffor 81B Sh!t down the database from s&lpl!s or server manager. ,ac'!p all fles to secondary storage (eg. tapes*. "ns!re that yo! bac'!p all data fles, all control fles and all log fles. /hen completed, restart yo!r database. 2o the following &!eries to get a list of all fles that needs to be bac'ed !pA select name from sys.v<>datafleF select member from sys.v<>logfleF select name from sys.v<>controlfleF Page 21 of 153 Sometimes Oracle ta'es forever to sh!tdown with the 7immediate7 option. As wor'aro!nd to this problem, sh!tdown !sing these commandsA alter system chec'pointF sh!tdown abort start!p restrict sh!tdown immediate 3ote that if yo! database is in A.)501"LO= mode, one can still !se archived log fles to roll forward from an o6-line bac'!p. 0f yo! cannot ta'e yo!r database down for a cold (o6-line* bac'!p at a convenient time, 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>OWD89TO4 and 89TDTMT9T!? Show editor is the generic b!ilt-in which accepts any editor name and ta'es some inp!t string and ret!rns modifed o!tp!t string. /hereas the edit<te%titem b!ilt-in needs the inp!t foc!s to be in the te%t item before the b!ilt-in is e%ec!ted. 1'-. What are the built3ins that are used to Bttach an 5O7 programmatically to an item? set<item<property get<item<property (by setting the LO1<3A$" property* 1(.. >o" does one do on3line database bac2ups? Ffor 81B "ach tablespace that needs to be bac'ed-!p m!st be switched into bac'!p mode before copying the fles o!t to secondary storage (tapes*. Loo' at this simple e%ample. ALT". TA,L"S+A)" %y8 ,"=03 ,A):+F Y cp %yfBileE ?bac'!p2ir? ALT". TA,L"S+A)" %y8 "32 ,A):+F 0t is better to bac'!p tablespace for tablespace than to p!t all tablespaces in bac'!p mode. ,ac'ing them !p separately inc!rs less overhead. /hen done, remember to bac'!p yo!r control fles. Loo' at this e%ampleA ALT". S#ST"$ S/0T)5 LO=B0L"F -- Borce log switch to !pdate control fle headers ALT". 2ATA,AS" ,A):+ )O3T.OLB0L" TO '?bac'!p2ir?control.dbf'F 3OT"A 2o not r!n on-line bac'!ps d!ring pea' processing periods. Oracle will write complete database bloc's instead of the normal deltas to redo log fles while in bac'!p mode. This will lead to e%cessive database archiving and even database free8es. 1(1. >o" does one bac2up a database using 4!B;? Ffor 81B The biggest advantage of .$A3 is that it only bac'!p !sed space in the database. .man doesn't p!t tablespaces in bac'!p mode, saving Page 22 of 153 on redo generation overhead. .$A3 will re-read database bloc's !ntil it gets a consistent image of it. Loo' at this simple bac'!p e%ample. rman target sys?QQQ nocatalog r!n Z allocate channel tE type dis'F bac'!p format '?app?oracle?db<bac'!p?Vd<tVt<sVs<pVp' ( database *F release channel tEF [ "%ample .$A3 restoreA rman target sys?QQQ nocatalog r!n Z allocate channel tE type dis'F L set !ntil time 'A!g DJ GDDD AOE'F restore tablespace !sersF recover tablespace !sersF release channel tEF [ The e%amples above are e%tremely simplistic and only !sef!l for ill!strating basic concepts. ,y defa!lt Oracle !ses the database controlfles to store information abo!t bac'!ps. 3ormally one wo!ld rather set!p a .$A3 catalog database to store .$A3 metadata in. .ead the Oracle ,ac'!p and .ecovery =!ide before implementing any .$A3 bac'!ps. 3oteA .$A3 cannot write image copies directly to tape. One needs to !se a third-party media manager that integrates with .$A3 to bac'!p directly to tape. Alternatively one can bac'!p to dis' and then man!ally copy the bac'!ps to tape. 1(2. What are the di,erent &le e$tensions that are created by oracle reports? .ep fle and .df fle. 1(3. What is strip sources generate options? .emoves the so!rce code from the library fle and generates a library fles that contains only pcode. The res!lting fle can be !sed for fnal deployment, b!t can not be s!bse&!ently edited in the designer.e%. fMOgen mod!leCold<lib.pll !seridCscott?tiger strip<so!rce #"S o!tp!t<fle 1(3. >o" does one put a database into B4+>975O: mode? Ffor 81B The main reason for r!nning in archivelog mode is that one can provide GM-ho!r availability and g!arantee complete data recoverability. 0t is also necessary to enable A.)501"LO= mode before one can start to !se on-line database bac'!ps. To enable A.)501"LO= mode, simply change yo!r database start!p command script, and bo!nce the Page 23 of 153 databaseA S4L+LSK connect sys as sysdba S4L+LSK start!p mo!nt e%cl!siveF S4L+LSK alter database archivelogF S4L+LSK archive log startF S4L+LSK alter database openF 3OT"EA .emember to ta'e a baseline database bac'!p right after enabling archivelog mode. /itho!t it one wo!ld not be able to recover. Also, implement an archivelog bac'!p to prevent the archive log directory from flling-!p. 3OT"GA A.)501"LO= mode was introd!ced with Oracle 1P, and is essential for database point-in-time recovery. Archiving can be !sed in combination with on-line and o6-line database bac'!ps. 3OT"HA #o! may want to set the following 030T.O.A parameters when enabling A.)501"LO= modeA log<archive<startCT.", log<archive<destC... and log<archive<formatC... 3OT"MA #o! can change the archive log destination of a database on- line with the A.)501" LO= STA.T TO 'directory'F statement. This statement is often !sed to switch archiving between a set of directories. 3OT"OA /hen r!nning Oracle .eal Application Server (.A)*, yo! need to sh!t down all nodes before changing the database to A.)501"LO= mode. 1(4. What is the basic data structure that is re=uired for creating an 5O7? .ecord =ro!p. 1(#. >o" does one bac2up archi/ed log &les? Ffor 81B One can bac'!p archived log fles !sing .$A3 or any operating system bac'!p !tility. .emember to delete fles after bac'ing them !p to prevent the archive log directory from flling !p. 0f the archive log directory becomes f!ll, yo!r database will hangY Loo' at this simple .$A3 bac'!p scriptA .$A3K r!n Z GK allocate channel devE type dis'F HK bac'!p MK format '?app?oracle?arch<bac'!p?log<tVt<sVs<pVp' OK (archivelog all delete inp!t*F PK release channel devEF JK [ 1('. 8oes Oracle "rite to data &les in beginJhot bac2up mode? Ffor 81B Oracle will stop !pdating fle headers, b!t will contin!e to write data to the database fles even if a tablespace is in bac'!p mode. 0n bac'!p mode, Oracle will write o!t complete changed bloc's to the redo log fles. 3ormally only deltas (changes* are logged to the redo Page 24 of 153 logs. This is done to enable reconstr!ction of a bloc' if only half of it was bac'ed !p (split bloc's*. ,eca!se of this, one sho!ld notice increased log activity and archiving d!ring on-line bac'!ps. 1((. What is the !a$imum allo"ed length of 4ecord group +olumn? .ecord gro!p col!mn names cannot e%ceed HD characters. 1(*. Which parameter can be used to set read le/el consistency across multiple =ueries? .ead only 1(-. What are the di,erent types of 4ecord :roups? 4!ery .ecord =ro!ps 3on4!ery .ecord =ro!ps State .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 and post3form commit? +ost-form commit fres once d!ring the post and commit transactions process, after the database commit occ!rs. The post-form-commit trigger fres after inserts, !pdates and deletes have been posted to the database b!t before the transactions have been fnali8ed in the iss!ing the command. The post-database-commit trigger fres after oracle forms iss!es the commit to fnali8ed transactions. 1*2. What are the di,erent display styles of list items? +op<listTe%t<list)ombo bo% 1*3. Which of the abo/e methods is the faster method? performing the calc!lation in the &!ery is faster. 1*4. With "hich function of summary item is the compute at options re=uired? percentage of total f!nctions. 1*#. What are parameters? +arameters provide a simple mechanism for defning and setting the val!esof inp!ts that are re&!ired by a form at start!p. Borm parameters are variables of type char,n!mber,date that yo! defne at design time. 1*'. What are the three types of user e$its a/ailable ? Oracle +recompiler e%its, Oracle call interface, 3onOracle !ser e%its. Page 25 of 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! cannot change the console assignment at r!ntime. 1**. What is an administrati/e Fpri/ilegedG user? Ffor 81B Oracle 2,As and operators typically !se administrative acco!nts to manage the database and database instance. An administrative acco!nt is a !ser that is granted S#SO+". or S#S2,A privileges. S#S2,A and S#SO+". allow access to a database instance even if it is not r!nning. )ontrol of these privileges is managed o!tside of the database via password fles and special operating system gro!ps. This password fle is created with the orapwd !tility. 1*-.What are the t"o repeating frame al"ays associated "ith matri$ ob)ect? One down repeating frame below one across repeating frame. 1-.. What are the master3detail triggers?N On-)hec'<delete<masterOn<clear<detailsOn<pop!late<details 1-1. >o" does one connect to an administrati/e user? Ffor 81B 0f an administrative !ser belongs to the 7dba7 gro!p on ni%, or the 7O.A<2,A7 (O.A<sid<2,A* gro!p on 3T, he?she can connect li'e thisA connect ? as sysdba 3o password is re&!ired. This is e&!ivalent to the des!pported 7connect internal7 method. A password is re&!ired for 7non-sec!re7 administrative access. These passwords are stored in password fles. .emote connections via 3etI are classifed as non-sec!re. Loo' at this e%ampleA connect sys?password as sysdba 1-2. >o" does one create a pass"ord &le? Ffor 81B The Oracle +assword Bile (>O.A)L"<5O$"?dbs?orapw or orapwS02* stores passwords for !sers with administrative privileges. One needs to create a password fles before remote administrators (li'e O"$* will be allowed to connect. Bollow this proced!re to create a new password fleA . Log in as the Oracle software owner . .!ncommandA orapwd fleC>O.A)L"<5O$"?dbs?orapw>O.A)L"<S02 passwordCmypasswd . Sh!tdown the database (S4L+LSK S5T2O/3 0$$"20AT"* . "dit the 030T.O.A fle and ens!re ."$OT"<LO=03<+ASS/O.2B0L"Ce%cl!sive is set. . Start!p the database (S4L+LSK STA.T+* 3OT"A The orapwd !tility presents a sec!rity ris' in that it receives a password from the command line. This password is visible in the process table of many systems. Administrators needs to be aware of thisY Page 26 of 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 editor a,ect the grouping done in the data model editor? 3o. 1-#. >o" does one add users to a pass"ord &le? Ffor 81B One can select from the S#S.1<>+/B0L"<S".S view to see which !sers are listed in the password fle. 3ew !sers can be added to the password fle by granting them S#S2,A or S#SO+". privileges, or by !sing the orapwd !tility. =.A3T S#S2,A TO scottF 1-'. 9f a brea2 order is set on a column "ould it a,ect columns "hich are under the column? 3o 1-(. Why are O0SI accounts a security ris2 in a clientJser/er en/ironment? Ffor 81B 0f yo! allow people to log in with O+S> acco!nts from /indows /or'stations, yo! cannot be s!re who they really are. /ith terminals, yo! can rely on operating system passwords, with /indows, yo! cannot. 0f yo! set ."$OT"<OS<AT5"3TCT." in yo!r init.ora fle, Oracle ass!mes that the remote OS has a!thenticated the !ser. 0f ."$OT"<OS<AT5"3T is set to BALS" (recommended*, remote !sers will be !nable to connect witho!t a password. 02"3T0B0"2 "RT".3ALL# will only be in e6ect from the local host. Also, if yo! are !sing 7O+S>7 as yo!r pref%, yo! will be able to log on locally with or witho!t a password, regardless of whether yo! have identifed yo!r 02 with a password or defned it to be 02"3T0B0"2 "RT".3ALL#. 1-*. 8o user parameters appear in the data modal editor in 2.#? 3o 1--. +an you pass data parameters to forms? 3o 2... 9s it possible to lin2 t"o groups inside a cross products after the cross products group has been created? no 2.1. What are the di,erent modals of "indo"s? $odalless windows $odal windows 2.2. What are modal "indo"s? Page 27 of 153 $odal windows are !s!ally !sed as dialogs, and have restricted f!nctionality compared to modelless windows. On some platforms for e%ample operators cannot resi8e, scroll or iconify a modal window. 2.3. What are the di,erent default triggers created "hen !aster 8eletes 0roperty is set to ;on3isolated? $aster 2eletes +roperty .es!lting Triggers ---------------------------------------------------- 3on-0solated(the defa!lt* On-)hec'-2elete-$aster On-)lear-2etails On-+op!late-2etails 2.4. 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-2etails On-+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.O parameter form. 2.(. What are the di,erence bet"een lo/ O list item? Lov is a property where as list item is an item. A list item can have only one 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 a library, 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 which yo! have attach the library. /hen a library attaches another library, program !nits in the frst library can reference program !nits in the attached library. Library s!pport dynamic loading-that is library program !nits are loaded into an application only when needed. This can signifcantly red!ce the r!n-time memory re&!irements of applications. 2.-. What is le$ical reference? >o" can it be created? Page 28 of 153 Le%ical reference is place<holder for te%t that can be embedded in a s&l statements. A le%ical reference can be created !sing X before the col!mn or parameter name. 21.. What is system.coordinationDoperation? 0t represents the coordination ca!sing event that occ!r on the master bloc' in master-detail relation. 211. What is synchroni?e? 0t is a terminal screen with the internal state of the form. 0t !pdates the screen display to reSect the information that oracle forms has in its internal representation of the screen. 212. What use of command line parameter cmd &le? 0t is a command line arg!ment that allows yo! to specify a fle that contain a set of arg!ments for rGDr!n. 213. What is a Te$tDio 0ac2age? 0t allows yo! to read and write information to a fle in the fle system. 214. What is formsD885? 0ss!es dynamic S&l statements at r!n time, incl!ding server side pl?S4l and 22L 21#. >o" is lin2 tool operation di,erent bet. reports 2 O 2.#? 0n .eports G.D the lin' tool has to be selected and then two felds to be lin'ed are selected and the lin' is a!tomatically created. 0n G.O the frst feld is selected and the lin' tool is then !sed to lin' the frst feld to the second feld. 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%. "%. +A.A$"T". name C '' or Abloc'.item C +A.A$"T". +arameter name 21*. What is the di,erence bet"een ob)ect embedding O lin2ing in Oracle forms? 0n Oracle forms, "mbedded objects become part of the form mod!le, and lin'ed objects are references from a form mod!le to a lin'ed so!rce fle. 21-. ;ame of the functions used to getJset can/as properties? =et<view<property, Set<view<property 22.. What are the built3ins that are used for setting the 5O7 properties at runtime? Page 29 of 153 get<lov<property set<lov<property 221. What are the built3ins used for processing ro"s? =et<gro!p<row<co!nt(f!nction* =et<gro!p<selection<co!nt(f!nction* =et<gro!p<selection(f!nction* .eset<gro!p<selection(proced!re* Set<gro!p<selection(proced!re* nset<gro!p<selection(proced!re* 222. What are built3ins used for 0rocessing ro"s? ="T<=.O+<.O/<)O3T(f!nction* ="T<=.O+<S"L")T0O3<)O3T(f!nction* ="T<=.O+<S"L")T0O3(f!nction* ."S"T<=.O+<S"L")T0O3(proced!re* S"T<=.O+<S"L")T0O3(proced!re* 3S"T<=.O+<S"L")T0O3(proced!re* 223. What are the built3in used for getting cell /alues? =et<gro!p<char<cell(f!nction* =et<gro!pcell(f!nction* =et<gro!p<n!mber<cell(f!nction* 224. What are the built3ins used for :etting cell /alues? ="T<=.O+<)5A.<)"LL (f!nction* ="T<=.O+)"LL(f!nction* ="T<=.O+<3$,"T<)"LL(f!nction* 22#. Btleast ho" many set of data must a data model ha/e before a data model can be base on it? Bo!r 22'. To e$ecute ro" from being displayed that still use column in the ro" "hich property can be used? Bormat trigger. 22(. What are di,erent types of modules a/ailable in oracle form? Borm mod!le - a collection of objects and code ro!tines $en! mod!les - a collection of men!s and men! item commands that together ma'e !p an application men! library mod!le - a collection of !ser named proced!res, f!nctions and pac'ages that can be called from other mod!les in the application 22*. What is the remo/e on e$it property? Bor a modelless window, it determines whether oracle forms hides the window a!tomatically when the operators navigates to an item in the another window. Page 30 of 153 22-. What is W>;38atabase3record trigger? Bires when oracle forms frst mar's a record as an insert or an !pdate. The trigger fres as soon as oracle forms determines thro!gh validation that the record sho!ld be processed by the ne%t post or commit as an insert or !pdate. c generally occ!rs only when the operators modifes the frst item in the record, and after the operator attempts to navigate o!t of the item. 23.. What is a di,erence bet"een pre3select and pre3=uery? Bires d!ring the e%ec!te &!ery and co!nt &!ery processing after oracle forms constr!cts the select statement to be iss!ed, b!t before the statement is act!ally iss!ed. The pre-&!ery trigger fres j!st before oracle forms iss!es the select statement to the database after the operator as defne the e%ample records by entering the &!ery criteria in enter &!ery mode.+re-&!ery trigger fres before pre-select trigger. 231. What are built3ins associated "ith timers? fnd<timercreate<timerdelete<timer 232. What are the built3ins used for &nding ob)ect 98 functions? Bind<gro!p(f!nction* Bind<col!mn(f!nction* 233. What are the built3ins used for &nding Ob)ect 98 function? B032<=.O+(f!nction* B032<)OL$3(f!nction* 234. Bny attempt to na/igate programmatically to disabled form in a callDform stac2 is allo"ed? Balse 23#. @se the BddDgroupDro" procedure to add a ro" to a static record group 1. true or false? Balse 23'. What third party tools can be used "ith Oracle 1@J 4!B;? Ffor 81B The following $edia $anagement Software 1endors have integrated their media management software pac'ages with Oracle .ecovery $anager and OracleJ "nterprise ,ac'!p tility. The $edia $anagement 1endors will provide frst line technical s!pport for the integrated bac'!p?recover sol!tions. 1eritas 3et,ac'!p "$) 2ata $anager ("2$* 5+ O$30,ac' 00 0,$'s Tivoli Storage $anager - formerly A2S$ Legato 3etwor'er Page 31 of 153 $anage0T ,ac'!p and .ecovery Sterling Software's SA$SAAle%andria - formerly from Spectralogic S!n Solstice ,ac'!p 23(. Why and "hen should one tune? Ffor 81B One of the biggest responsibilities of a 2,A is to ens!re that the Oracle database is t!ned properly. The Oracle .2,$S is highly t!nable and allows the database to be monitored and adj!sted to increase its performance. One sho!ld do performance t!ning for the following reasonsA The speed of comp!ting might be wasting val!able h!man time (!sers waiting for response*F "nable yo!r system to 'eep-!p with the speed b!siness is cond!ctedF and Optimi8e hardware !sage to save money (companies are spending millions on hardware*. Altho!gh this BA4 is not overly concerned with hardware iss!es, one needs to remember than yo! cannot t!ne a ,!ic' into a Berrari. 23*. >o" can a brea2 order be created on a column in an e$isting group? What are the /arious sub e/ents a mouse double clic2 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 clic2 e/ent in/ol/es? A placeholder col!mn is !sed to hold calc!lated val!es at a specifed place rather than allowing is to appear in the act!al row where it has to appear. 24.. What is the use of hidden column? What are the /arious sub e/ents a mouse double clic2 e/ent in/ol/es? A hidden col!mn is !sed to when a col!mn has to embed into boilerplate te%t. 241. What database aspects should be monitored? Ffor 81B One sho!ld implement a monitoring system to constantly monitor the following aspects of a database. /riting c!stom scripts, implementing Oracle's "nterprise $anager, or b!ying a third-party monitoring prod!ct can achieve this. 0f an alarm is triggered, the system sho!ld a!tomatically notify the 2,A (e-mail, page, etc.* to ta'e appropriate action. 0nfrastr!ct!re availabilityA . 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 to re&!ests . Are the /eb Listeners !p and responding to re&!ests Things that can ca!se service o!tagesA Page 32 of 153 . 0s the archive log destination flling !p\ . Objects getting close to their ma% e%tents . ser and process limits reached Things that can ca!se bad performanceA See &!estion 7/hat t!ning indicators can one !se\7. 242. Where should the tuning e,ort be directed? Ffor 81B )onsider the following areas for t!ning. The order in which steps are listed needs to be maintained to prevent t!ning side e6ects. Bor e%ample, it is no good increasing the b!6er cache if yo! can red!ce 0?O by rewriting a S4L statement. 2atabase 2esign (if it's not too late*A +oor system performance !s!ally res!lts from a poor database design. One sho!ld generally normali8e to the H3B. Selective denormali8ation can provide val!able performance improvements. /hen designing, always 'eep the 7data access path7 in mind. Also loo' at proper data partitioning, data replication, aggregation tables for decision s!pport systems, etc. Application T!ningA "%perience showed that appro%imately IDV of all Oracle system performance problems are resolved by coding optimal S4L. Also consider proper sched!ling of batch tas's after pea' wor'ing ho!rs. $emory T!ningA +roperly si8e yo!r database b!6ers (shared pool, b!6er cache, log b!6er, etc* by loo'ing at yo!r b!6er hit ratios. +in large objects into memory to prevent fre&!ent reloads. 2is' 0?O T!ningA 2atabase fles 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 )ontentionA St!dy database loc's, latches and wait events caref!lly and eliminate where possible. T!ne the Operating SystemA $onitor and t!ne operating system )+, 0?O and memory !tili8ation. Bor more information, read the related Oracle BA4 dealing with yo!r specifc operating system. 243. What are the /arious sub e/ents a mouse double clic2 e/ent in/ol/es? What are the /arious sub e/ents a mouse double clic2 e/ent in/ol/es? 2o!ble clic'ing 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 in the parameter screen? What are the /arious sub e/ents a mouse double clic2 e/ent in/ol/es? 2estype and 2esname. Page 33 of 153 24'. What are the built3ins used for +reating and deleting groups? )."AT"-=.O+ (f!nction* )."AT"<=.O+<B.O$<4".#(f!nction* 2"L"T"<=.O+(proced!re* 24(. What are di,erent types of can/as /ie"s? )ontent canvas views Stac'ed canvas views 5ori8ontal toolbar vertical toolbar. 24*. What are the di,erent types of 8elete details "e can establish in !aster38etails? )ascade 0solate 3on-isolate 24-. What is relation bet"een the "indo" and can/as /ie"s? )anvas views are the bac' gro!nd objects on which yo! place the interface items (Te%t items*, chec' bo%es, radio gro!ps etc.,* and boilerplate objects (bo%es, lines, images etc.,* that operators interact with !s they r!n yo!r form . "ach canvas views displayed in a window. 2#.. What is a @serDe$it? )alls the !ser e%it named in the !ser<e%it<string. 0nvo'es a H=l program by name which has been properly lin'ed into yo!r c!rrent oracle forms e%ec!table. 2#1. >o" is it possible to select generate a select set for the =uery in the =uery property sheet? ,y !sing the tables?col!mns b!tton and then specifying the table and the col!mn names. 2#2. >o" can /alues be passed bet. precompiler e$its O Oracle call 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 creating in the report "riter? ,y !sing the lin' fle 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 (Continued on next part...) 2#'. 8oes one need to dropJ truncate ob)ects before importing? Ffor 81B ,efore one import rows into already pop!lated tables, one needs to tr!ncate or drop these tables to get rid of the old data. 0f not, the new data will be appended to the e%isting tables. One m!st always 2.O+ e%isting Se&!ences before re-importing. 0f the se&!ences are not dropped, they will generate n!mbers inconsistent with the rest of the database. 3oteA 0t is also advisable to drop inde%es before importing to speed !p the import process. 0nde%es can easily be recreated after the data was s!ccessf!lly imported. 2#(. >o" can a button be used in a report to gi/e a drill do"n facility? ,y setting the action associated with b!tton to "%ec!te pl?s&l option and !sing the S./..!n<report f!nction. 2#*. +an one importJe$port bet"een di,erent /ersions of Oracle? Ffor 81B 2i6erent versions of the import !tility is !pwards compatible. This means that one can ta'e an e%port fle created from an old e%port version, and import it !sing a later version of the import !tility. This is &!ite an e6ective way of !pgrading a database from one release of Oracle to the ne%t. Oracle also ships some previo!s cate%pR.s&l scripts that can be e%ec!ted as !ser S#S enabling older imp?e%p versions to wor' (for bac'wards compatibility*. Bor e%ample, one can r!n >O.A)L"<5O$"?rdbms?admin?cate%pJ.s&l on an Oracle I database to allow the Oracle J.H e%p?imp !tilities to r!n against an Oracle I database. 2#-. What are di,erent types of images? ,oiler plate images0mage 0tems 2'.. +an one e$port to multiple &les?J +an one beat the @ni$ 2 :ig limit? Ffor 81B Brom OracleIi, the e%port !tility s!pports m!ltiple o!tp!t fles. This feat!re enables large e%ports to be divided into fles whose si8es will not e%ceed any operating system limits (B0L"S0;"C parameter*. /hen importing from m!lti-fle e%port yo! m!st provide the same flenames in the same se&!ence in the B0L"C parameter. Loo' at this e%ampleA e%p S)OTT?T0=". B0L"C2A]BE.dmp,"A]BG.dmp B0L"S0;"CEDm LO=Cscott.log se the following techni&!e if yo! !se an Oracle version prior to IiA )reate a compressed e%port on the Sy. 2epending on the type of data, yo! probably can e%port !p to ED gigabytes to a single fle. This e%ample !ses g8ip. 0t o6ers the best compression 0 'now of, b!t yo! can also s!bstit!te it with 8ip, compress or whatever. Page 35 of 153 L create a named pipe m'nod e%p.pipe p L read the pipe - o!tp!t to 8ip fle in the bac'gro!nd g8ip ^ e%p.pipe K scott.e%p.g8 X L feed the pipe e%p !seridCscott?tiger fleCe%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&l statements a bind reference can be created !sing a (A* before a col!mn or a parameter name. 2'2. >o" can one impro/e 9mportJ $port performance? Ffor 81B "R+O.TA . Set the ,BB". parameter to a high val!e (e.g. G$* . Set the .")O.2L"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 di6erent physical dis's. . 2O 3OT e%port to an 3BS mo!nted flesystem. 0t will ta'e forever. 0$+O.TA . )reate an inde%fle so that yo! can create inde%es ABT". yo! have imported data. 2o this by setting 032"RB0L" to a flename and then import. 3o data will be imported b!t a fle containing inde% defnitions will be created. #o! m!st edit this fle afterwards and s!pply the passwords for the schemas on all )O33")T statements. . +lace the fle to be imported on a separate physical dis' from the oracle data fles . 0ncrease 2,<)A)5"<S0;" (2,<,LO):<,BB".S prior to @i* considerably in the init>S02.ora fle . Set the LO=<,BB". to a big val!e and restart oracle. . Stop redo log archiving if it is r!nning (ALT". 2ATA,AS" 3OA.)501"LO=F* . )reate a ,0= tablespace with a ,0= rollbac' segment inside. Set all other rollbac' segments o_ine (e%cept the S#ST"$ rollbac' segment of co!rse*. The rollbac' segment m!st be as big as yo!r biggest table (0 thin'\* . se )O$$0TC3 in the import parameter fle if yo! can a6ord it . se A3AL#;"C3 in the import parameter fle to avoid time cons!ming A3AL#;" statements . .emember to r!n the inde%fle previo!sly created 2'3. :i/e the se=uence of e$ecution of the /arious report triggers? ,efore form , After form , ,efore report, ,etween page, After report. Page 36 of 153 2'4. What are the common 9mportJ $port problems? Ffor 81B O.A-DDDDEA ni&!e constraint (...* violated - #o! are importing d!plicate rows. se 0=3O."C3O to s'ip tables that already e%ist (imp will give an error if the object is re-created*. O.A-DEOOOA Snapshot too old - As' yo!r !sers to STO+ wor'ing while yo! are e%porting or !se parameter )O3S0ST"3TC3O O.A-DEOPGA Bailed to e%tend rollbac' segment - )reate bigger rollbac' segments or set parameter )O$$0TC# while importing 0$+-DDDEOA Statement failed ... object already e%ists... - se the 0=3O."C# import parameter to ignore these errors, b!t be caref!l as yo! might end !p with d!plicate rows. 2'#. Why is it preferable to create a fe"er no. of =ueries in the data model? ,eca!se for each &!ery, report has to open a separate c!rsor and has to rebind, e%ec!te and fetch data. 2''. Where is the e$ternal =uery e$ecuted at the client or the ser/er? At the server. 2'(. Where is a procedure return in an e$ternal plJs=l library e$ecuted at the client or at the ser/er? At the client. 2'*. What is coordination /ent? Any event that ma'es a di6erent record in the master bloc' the c!rrent record is a coordination ca!sing event. 2'-. What is the di,erence bet"een O5 Ser/er O Ole +ontainer? An Ole server application creates ole Objects that are embedded or lin'ed in ole )ontainers e%. Ole servers are ms<word X ms<e%cel. OL" containers provide a place to store, display and manip!late objects that are created by ole server applications. "%. oracle forms is an e%ample of an ole )ontainer. 2(.. What is an ob)ect group? An object gro!p is a container for a gro!p of objectsF yo! defne an object gro!p when yo! want to pac'age related objects, so that yo! copy or reference them in other mod!les. 2(1. What is an 5O7? An LO1 is a scrollable pop!p window that provides the operator with either a single or m!lti col!mn selection list. 2(2. Bt "hat point of report e$ecution is the before 4eport trigger &red? Page 37 of 153 After the &!ery is e%ec!ted b!t before the report is e%ec!ted and the records are displayed. 2(3. What are the built 3ins used for !odifying a groups structure? A22-=.O+<)OL$3 (f!nction* A22<=.O+<.O/ (proced!re* 2"L"T"<=.O+<.O/(proced!re* 2(4. What is an user e$it used for? A way in which to pass control (and possibly arg!ments * form Oracle report to another Oracle prod!cts of H =L and then ret!rn control ( and * bac' to Oracle reports. 2(#. What is the @ser3;amed ditor? A !ser named editor has the same te%t editing f!nctionality as the defa!lt editor, b!t, beca!se it is a named object, yo! can specify editor attrib!tes s!ch as windows display si8e, position, and title. 2('. !y database "as terminated "hile in 1B+<@0 !O8% do 9 need to reco/er? Ffor 81B 0f a database was terminated while one of its tablespaces was in ,A):+ $O2" (ALT". TA,L"S+A)" %y8 ,"=03 ,A):+F*, it will tell yo! that media recovery is re&!ired when yo! try to restart the database. The 2,A is then re&!ired to recover the database and apply all archived logs to the database. 5owever, from OracleJ.G, yo! can simply ta'e the individ!al datafles o!t of bac'!p mode and restart the database. ALT". 2ATA,AS" 2ATAB0L" '?path?flename' "32 ,A):+F One can select from 1>,A):+ to see which datafles are in bac'!p mode. This normally saves a signifcant amo!nt of database down time. Thir! 1adivel! contrib!ted the followingA Brom Oracle@i onwards, the following command can be !sed to ta'e all of the datafles o!t of hot bac'!p modeA ALT". 2ATA,AS" "32 ,A):+F The above commands need to be iss!ed when the database is mo!nted. 2((. What is a Static 4ecord :roup? A static record gro!p is not associated with a &!ery, rather, yo! defne its str!ct!re and row val!es at design time, and they remain f%ed at r!ntime. 2(*. What is a record group? A record gro!p is an internal Oracle Borms that str!ct!re that has a col!mn?row framewor' similar to a database table. 5owever, !nli'e database tables, record gro!ps are separate objects that belong to the form mod!le which they are defned. Page 38 of 153 2(-. !y database is do"n and 9 cannot restore. What no"? Ffor 81B .ecovery 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 the data fles and !nloads it into S4LQLoader or e%port d!mp fles. 2L does not care abo!t rollbac' segments, corr!pted bloc's, etc, and can th!s not g!arantee that the data is not logically corr!pt. 0t is intended as an absol!te last resort and will most li'ely cost yo!r company a lot of moneyYYY 2*.. 9H/e lost my 48O5O: &les% ho" can 9 get my 81 bac2? Ffor 81B The following 030T.O.A parameter may be re&!ired if yo!r c!rrent redo logs are corr!pted or blown away. )a!tion is advised when enabling this parameter as yo! might end-!p losing yo!r entire database. +lease contact Oracle S!pport before !sing it. <allow<resetlogs<corr!ption C tr!e 2*1. What is a property clause? A property cla!se is a named object that contains a list of properties and their settings. Once yo! create a property cla!se yo! can base other object on it. An object based on a property can inherit the setting of any property in the cla!se that ma'es sense for that object. 2*2. What is a physical page ? O What is a logical page ? A physical page is a si8e of a page. That is o!tp!t by the printer. The logical page is the si8e of one page of the act!al report as seen in the +reviewer. 2*3. 9H/e lost some 4ollbac2 Segments% ho" can 9 get my 81 bac2? Ffor 81B .e-start yo!r database with the following 030T.O.A parameter if one of yo!r rollbac' segments is corr!pted. #o! can then drop the corr!pted rollbac' segments and create it from scratch. )a!tion is advised when enabling this parameter, as !ncommitted transactions will be mar'ed as committed. One can very well end !p with lost or inconsistent dataYYY +lease contact Oracle S!pport before !sing it. <)orr!pted<rollbac'<segments C (rbsDE, rbsDE, rbsDH, rbsDM* 2*4. What are the di,erences bet"een 1@ and 4!B;? Ffor 81B "nterprise ,ac'!p tility (",* is a f!nctionally rich, high performance interface for bac'ing !p OracleJ databases. 0t is sometimes referred to as O", for Oracle "nterprise ,ac'!p tility. The Oracle .ecovery $anager (.$A3* !tility that ships with OracleI and above is similar to OracleJ's ", !tility. 5owever, there is no direct !pgrade path from ", to .$A3. Page 39 of 153 2*#. >o" does one create a 4!B; reco/ery catalog? Ffor 81B Start by creating a database schema (!s!ally called rman*. Assign an appropriate tablespace to it and grant it the recovery<catalog<owner role. Loo' at this e%ampleA s&lpl!s sys S4LKcreate !ser rman identifed by rmanF S4LK alter !ser rman defa!lt tablespace tools temporary tablespace tempF S4LK alter !ser rman &!ota !nlimited on toolsF S4LK grant connect, reso!rce, recovery<catalog<owner to rmanF S4LK e%itF 3e%t, log in to rman and create the catalog schema. +rior to Oracle Ii this was done by r!nning the catrman.s&l script. rman catalog rman?rman .$A3Kcreate catalog tablespace toolsF .$A3K e%itF #o! can now contin!e by registering yo!r databases in the catalog. Loo' at this e%ampleA rman catalog rman?rman target bac'dba?bac'dba .$A3K register databaseF 2*'. >o" can a group in a cross products be /isually distinguished from a group that does not form a cross product? A gro!p that forms part of a cross prod!ct will have a thic'er border. 2*(. What is the frame O repeating frame? A frame is a holder for a gro!p of felds. A repeating frame is !sed to display a set of records when the no. of records that are to displayed is not 'nown before. 2**. What is a combo bo$? A combo bo% style list item combines the feat!res fo!nd in list and te%t item. nli'e the pop list or the te%t list style list items, the combo bo% style list item will both display f%ed val!es and accept one operator entered val!e. 2*-. What are three panes that appear in the run time plJs=l interpreter? E. So!rce pane. G. interpreter pane. H. 3avigator pane. 2-.. What are the t"o panes that Bppear in the design time plJs=l interpreter? E. So!rce pane. G. 0nterpreter pane Page 40 of 153 2-1. What are the t"o "ays by "hich data can be generated for a parameters list of /alues? E. sing static val!es. G. /riting select statement. 2-2. What are the /arious methods of performing a calculation in 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 by menu module? .mmb, .mm% 2-4. What are the default e$tensions of the &les created by forms 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 O logical page no. or O of physical page no.? X physical page no. 2-'. 9t is possible to use ra" de/ices as data &les and "hat is the ad/antages o/er &le. system &les ? #es. The advantages over fle system fles. 0?O will be improved beca!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!lly reliable* The tar command cannot be !sed for physical fle bac'!p, instead we can !se dd command which is less Se%ible and has limited recoveries. 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 are re&!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 events when a large transaction that e%ceeds beyond its optimal val!e when an entry wraps and ca!ses the rollbac' segment toe%pand into anotion )ompletes. e. will be written. Page 41 of 153 3... What is the use of 695 option in 9!0 command ? The name of the fle from which import sho!ld be performed. 3.1. What is a Shared SA5 pool? The data dictionary cache is stored in an area in S=A called the Shared S4L +ool. This will allow sharing of parsed S4L statements among conc!rrent !sers. 3.2. What is hot bac2up and ho" it can be ta2en? Ta'ing bac'!p of archive log fles when database is open. Bor this the A.)501"LO= mode sho!ld be enabled. The following fles need to be bac'ed !p. All data fles. All Archive log, redo log fles. All control fles. 3.3. 5ist the Optional 6le$ible Brchitecture FO6BG of Oracle database? or >o" can "e organi?e the tablespaces in Oracle database to ha/e ma$imum performance ? S#ST"$ - 2ata dictionary tables. 2ATA - Standard operational tables. 2ATAG- Static tables !sed for standard operations 032"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 tablespace T"$+<S". - Temporary tablespace for !sers. S".S - ser tablespace. 3.4. >o" to implement the multiple control &les for an e$isting database ? Sh!tdown the database )opy one of the e%isting control fle to new location "dit )onfg ora fle by adding new control fle. name .estart the database. 3.#. What is ad/antage of ha/ing dis2 shado"ingJ !irroring ? Shadow set of dis's save as a bac'!p in the event of dis' fail!re. 0n most Operating System if any dis' fail!re occ!rs it a!tomatically switchover to place of failed dis'. 0mproved performance beca!se most OS s!pport vol!me shadowing can direct fle 0?O re&!est to !se the shadow set of fles instead of the main set of fles. This red!ces 0?O load on the main set of dis's. 3.'. >o" "ill you force database to use particular rollbac2 segment ? S"T T.A3SA)T0O3 S" .OLL,A): S"=$"3T rbs<name. 3.(. Why =uery fails sometimes ? Page 42 of 153 .ollbac' segment dynamically e%tent to handle larger transactions entry loads. A single transaction may wipeo!t all available free space in the .ollbac' Segment Tablespace. This prevents other !ser !sing .ollbac' segments. 3.*. What is the use of 4+O48 5;:T> option in M0 command ? .ecord length in bytes. 3.-. >o" "ill you monitor rollbac2 segment status ? 4!erying the 2,A<.OLL,A):<S"=S view 03 S" - .ollbac' Segment is on-line. A1A0LA,L" - .ollbac' Segment available b!t not on-line. OBB-L03" - .ollbac' Segment o6-line 031AL02 - .ollbac' Segment 2ropped. 3""2S .")O1".# - )ontains data b!t need recovery or cor!pted. +A.TL# A1A0LA,L" - )ontains data from an !nresolved transaction involving a distrib!ted database. 31.. What is meant by 4edo 5og &le mirroring ? >o" it can be achie/ed? +rocess of having a copy of redo log fles is called mirroring. This can be achieved by creating gro!p of log fles together, so that L=/. will a!tomatically writes them to all the members of the c!rrent on-line redo log gro!p. 0f any one gro!p fails then database a!tomatically switch over to ne%t gro!p. 0t degrades performance. 311. Which parameter in Storage clause "ill reduce no. of ro"s per bloc2? +)TB."" parameter .ow si8e also red!ces no of rows per bloc'. 312. What is meant by recursi/e hints ? 3!mber of times processes repeatedly &!ery the dictionary table is called rec!rsive hints. 0t is d!e to the data dictionary cache is too small. ,y increasing the S5A."2<+OOL<S0;" parameter we can optimi8e the si8e of 2ata 2ictionary )ache. 313. What is the use of 0B4695 option in M0 command ? 3ame of the parameter fle to be passed for e%port. 314. What is the di,erence bet"een loc2s% latches% en=ueues and semaphores? Ffor 81B A latch is an internal Oracle mechanism !sed to protect data str!ct!res in the S=A from sim!ltaneo!s access. Atomic hardware instr!ctions li'e T"ST-A32-S"T is !sed to implement latches. Latches are more restrictive than loc's in that they are always e%cl!sive. Latches are never &!e!ed, b!t will spin or sleep !ntil they obtain a reso!rce, or time o!t. Page 43 of 153 "n&!e!es and loc's are di6erent names for the same thing. ,oth s!pport &!e!ing and conc!rrency. They are &!e!ed and serviced in a frst-in-frst-o!t (B0BO* order. Semaphores are an operating system facility !sed to control waiting. Semaphores are controlled by the following ni% parametersA semmni, semmns and semmsl. Typical settings areA semmns 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!slyF semmsl C semmns 31#. What is a logical bac2up? Logical bac'!p involves reading a set of database records and writing them into a fle. "%port !tility is !sed for ta'ing 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 81B Oracle initiali8ation or 030T.O.A parameters with an !nderscore in front are hidden or !ns!pported parameters. One can get a list of all hidden parameters by e%ec!ting this &!eryA select Q from S#S.R>:S++0 where s!bstr(:S++03$,E,E* C '<'F The following &!ery displays parameter names with their c!rrent val!eA select a.'sppinm 7+arameter7, b.'sppstvl 7Session 1al!e7, c.'sppstvl 70nstance 1al!e7 from %>'sppi a, %>'sppcv b, %>'sppsv c where a.ind% C b.ind% and a.ind% C c.ind% and s!bstr('sppinm,E,E*C'<' order by a.'sppinmF .ememberA Tho! shall not play with !ndoc!mented parametersY 31(. What is a database 7;T and ho" does one set it? Ffor 81B Oracle trace events are !sef!l for deb!gging the Oracle database server. The following two e%amples are simply to demonstrate synta%. .efer to later notes on this page for an e%planation of what these partic!lar events do. "ither adding them to the 030T.O.A parameter fle can activate events. ".g. eventC'EMDE trace name errorstac', level EG' ... or, by iss!ing an ALT". S"SS0O3 S"T "1"3TS commandA ".g. alter session set events 'EDDMP trace name conte%t forever, level M'F The alter session method only a6ects the !ser's c!rrent session, whereas changes to the 030T.O.A fle will a6ect all sessions once the database has been restarted. Page 44 of 153 31*. What is a 4ollbac2 segment entry ? 0t is the set of before image data bloc's that contain rows that are modifed by a transaction. "ach .ollbac' Segment entry m!st be completed within one rollbac' segment. A single rollbac' segment can have m!ltiple rollbac' segment entries. 31-. What database e/ents can be set? Ffor 81B The following events are fre&!ently !sed by 2,As and Oracle S!pport to diagnose problemsA 7 EDDMP trace name conte%t forever, level M Trace S4L statements and show bind variables in trace o!tp!t. 7 EDDMP trace name conte%t forever, level I This shows wait events in the S4L trace fles 7 EDDMP trace name conte%t forever, level EG This shows both bind variable names and wait events in the S4L trace fles 7 EMDE trace name errorstac', level EG EMDE trace name errorstac', level M EMDE trace name processstate 2!mps o!t trace information if an O.A-EMDE 7inserted val!e too large for col!mn7 error occ!rs. The EMDE 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 Oracle gets a deadloc' (O.A-PD*, and may help to diagnose the problem. The following lists of events are e%amples only. They might be version specifc, so please call Oracle before !sing themA 7 EDGED trace name conte%t forever, level ED EDGEE trace name conte%t forever, level ED EDGHE trace name conte%t forever, level ED These events prevent database bloc' corr!ptions 7 EDDM@ trace name conte%t forever, level G $emory protect c!rsor 7 EDGED trace name conte%t forever, level G 2ata bloc' chec' 7 EDGEE trace name conte%t forever, level G 0nde% bloc' chec' 7 EDGHO trace name conte%t forever, level E $emory heap chec' 7 EDGPG trace name conte%t forever, level HDD Allow HDD bytes memory lea' for connections 3oteA #o! can !se the ni% oerr command to get the description of an event. On ni%, yo! can type 7oerr ora EDDOH7 from the command prompt to get event details. 32.. >o" can one dump internal database structures? Ffor 81B The following (mostly !ndoc!mented* commands can be !sed to obtain information abo!t internal database str!ct!res. o 2!mp control fle contents alter session set events 'immediate trace name )O3T.OLB level ED' ? o 2!mp fle headers alter session set events 'immediate trace name B0L"<52.S level ED' ? o 2!mp redo log headers Page 45 of 153 alter session set events 'immediate trace name ."2O52. level ED' ? o 2!mp the system state 3OT"A Ta'e H s!ccessive S#ST"$STAT" d!mps, with ED-min!te intervals alter session set events 'immediate trace name S#ST"$STAT" level ED' ? o 2!mp the process state alter session set events 'immediate trace name +.O)"SSSTAT" level ED' ? o 2!mp Library )ache details alter session set events 'immediate trace name library cache level ED' ? o 2!mp optimi8er statistics whenever a S4L statement is parsed (hintA change statement or S!sh pool* alter session set events 'EDDOH trace name conte%t forever, level E' ? o 2!mp a database bloc' (Bile? ,loc' m!st be converted to 2,A address* )onvert fle and bloc' n!mber to a 2,A (database bloc' address*. "gA variable % varcharGF e%ec A% AC dbms<!tility.ma'e<data<bloc'<address(E,EG*F print % alter session set events 'immediate trace name bloc'd!mp level ODHPDI@M' ? 321. What are the di,erent 2ind of e$port bac2ups? B!ll bac' - )omplete database 0ncremental - Only a6ected tables from last incremental date?f!ll bac'!p date. )!m!lative bac'!p - Only a6ected table from the last c!m!lative date?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%tent in 1er J.D 323. What is the use of 4+O48 option in M0 command? Bor 0ncremental e%ports, the Sag indirects whether a record will be stores data dictionary tables recording the e%port. 324. What is the use of 4OWS option in M0 command ? Blag to indicate whether table rows sho!ld be e%ported. 0f '3' only 22L statements for the database objects will be created. 32#. What is the use of +O!04SS option in M0 command ? Page 46 of 153 Blag to indicate whether e%port sho!ld compress fragmented segments into single e%tents. 32'. >o" "ill you s"ap ob)ects into a di,erent table space for an e$isting database ? "%port the !ser +erform import !sing the command imp system?manager fleCe%port.dmp inde%fleCnewrite.s&l. This will create all defnitions into newfle.s&l. 2rop necessary objects. .!n the script newfle.s&l after altering the tablespaces. 0mport from the bac'!p for the necessary objects. 32(. >o" does Space allocation table place "ithin a bloc2 ? "ach bloc' contains entries as follows Bi%ed bloc' header 1ariable bloc' header .ow 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 SA5 statements in S:B? 2!e to ins!Ncient Shared S4L pool si8e. $onitor the ratio of the reloads ta'es place while e%ec!ting S4L statements. 0f the ratio is greater than E then increase the S5A."2<+OOL<S0;". LO=0)AL X +5#S0)AL A.)50T")T." OB 2ATA,AS". 32-. What is dictionary cache ? 2ictionary cache is information abo!t the databse objects stored in a data dictionary table. 33.. What is a +ontrol &le ? 2atabase overall physical architect!re is maintained in a fle called control fle. 0t will be !sed to maintain internal consistency and g!ide recovery operations. $!ltiple copies of control fles are advisable. 331. What is 8atabase 1u,ers ? 2atabase b!6ers are cache in the S=A !sed to hold the data bloc's that are read from the data segments in the database s!ch as tables, inde%es and cl!sters 2,<,LO):<,BB".S parameter in 030T.O.A decides the si8e. 332. >o" "ill you create multiple rollbac2 segments in a database ? )reate a database which implicitly creates a S#ST"$ .ollbac' Segment in a S#ST"$ tablespace. )reate a Second .ollbac' Segment name .D in the S#ST"$ tablespace. $a'e new rollbac' segment available (After sh!tdown, modify init.ora fle and Start database* )reate other Page 47 of 153 tablespaces (.,S* for rollbac' segments. 2eactivate .ollbac' Segment .D and activate the newly created rollbac' segments. 333. What is cold bac2up? What are the elements of it? )old bac'!p is ta'ing bac'!p of all physical fles after normal sh!tdown of database. /e need to ta'e. - All 2ata fles. - All )ontrol fles. - All on-line redo log fles. - The init.ora fle (Optional* 334. What is meant by redo log bu,er ? )hanges made to entries are written to the on-line redo log fles. So that they can be !sed in roll forward operations d!ring database recoveries. ,efore writing them into the redo log fles, they will frst bro!ght to redo log b!6ers in S=A and L=/. will write into fles fre&!ently. LO=<,BB". parameter will decide the si8e. 33#. >o" "ill you estimate the space re=uired by a non3 clustered tables? )alc!late the total header si8e )alc!late the available dataspace per data bloc' )alc!late the combined col!mn lengths of the average row )alc!late the total average row si8e. )alc!late the average n!mber rows that can ft in a bloc' )alc!late the n!mber of bloc's and bytes re&!ired for the table. After arriving the calc!lation, add ED V additional space to calc!late the initial e%tent si8e for a wor'ing table. 33'. >o" "ill you monitor the space allocation ? ,y &!erying 2,A<S"=$"3T table?view. 33(. What is meant by free e$tent ? A free e%tent is a collection of contin!o!s free bloc's in tablespace. /hen a segment is dropped its e%tents are reallocated and are mar'ed as free. 33*. What is the use of 9:;O4 option in 9!0 command ? A Sag to indicate whether the import sho!ld ignore errors enco!nter when iss!ing )."AT" commands. 33-. What is the use of B;B5YS F 7er (G option in M0 command ? A Sag to indicate whether statistical information abo!t the e%ported objects sho!ld be written to e%port d!mp fle. 34.. What is the use of 4OWS option in 9!0 command ? A Sag to indicate whether rows sho!ld be imported. 0f this is set to '3' then only 22L for database objects will be e%ec!ted. Page 48 of 153 341. What is the use of 9;8MS option in M0 command ? A Sag 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 Sag to indicate whether import sho!ld import inde% on tables or not. 343. What is the use of :4B;T option in M0 command? A Sag to indicate whether grants on databse objects will be e%ported or not. 1al!e is '#' or '3'. 344. What is the use of :4B;T option in 9!0 command ? A Sag to indicate whether grants on database objects will be imported. 34#. What is the use of 6@55 option in M0 command ? A Sag 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 Sag to indicate whether fle content sho!ld be displayed or not. 34(. What is the use of +O;ST4B9;TS option in M0 command ? A Sag to indicate whether constraints on table need to be e%ported. 34*. What is the use of +O;S9ST;T F7er (G option in M0 command ? A Sag to indicate whether a read consistent version of all the e%ported objects sho!ld be maintained. 34-. What are the di,erent methods of bac2ing up oracle database ? - Logical ,ac'!ps - )old ,ac'!ps - 5ot ,ac'!ps (Archive log* 3#.. What is the di,erence bet"een O;37B598BT36958 trigger and a 0OST3+>B;: trigger ? /hen yo! changes the "%isting val!e to n!ll, the On-validate feld trigger will fre post change trigger will not fre. At the time of e%ec!te- &!ery post-change trigger will fre, on-validate feld trigger will not fre. 3#1. When is 043A@4Y trigger e$ecuted ? /hen "%ec!te-&!ery or co!nt-&!ery +ac'age proced!res are invo'ed. 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 3#4. While specifying masterJdetail relationship bet"een t"o bloc2s specifying the )oin condition is a must ? True or 6alse. ? Tr!e 3##. M9TD6O4! is a restricted pac2age procedure ?a. True b. 6alse Tr!e 3#'. What is the usage of an O;39;S4T%O;385T and O;3 @08BT T49::4S ? These triggers are e%ec!tes when inserting, deleting and !pdating operations are performed and can be !sed to change the defa!lt f!nction of insert, delete or !pdate respectively. Bor "g, instead of inserting a row in a table an e%isting row can be !pdated in the same table. 3#(. What are the types of 0op3up "indo" ? the pop-!p feld editor pop-!p list of val!es pop-!p pages. Alert A 3#*. What is an SA5 K6O4!S ? S4L Qforms is M=L tool for developing and e%ec!tingF Oracle based interactive application. 3#-. >o" do you control the constraints in forms ? Select the !se constraint property is O3 ,loc' defnition screen. ,LO): 3'.. What is the di,erence bet"een restricted and unrestricted pac2age procedure ? .estricted pac'age proced!re that a6ects the basic f!nctions of S4L Q Borms. 0t cannot !sed in all triggers e%cept 'ey triggers. nrestricted pac'age proced!re that does not interfere with the basic f!nctions of S4L Q Borms it can be !sed in any triggers. 3'1. B =uery fetched 1. records >o" many times does a 043 A@4Y Trigger and 0OST3A@4Y Trigger "ill get e$ecuted ? +."-4".# fres once. +OST-4".# fres ED times. 3'2. :i/e the se=uence in "hich triggers &red during insert operations% "hen the follo"ing 3 triggers are de&ned at the same bloc2 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 +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 pac2age 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 and graphics 3''. What are the type of @ser $its ? O.A)L" +recompliers !ser e%its O)0 (O.A)L" )all 0nterface* 3on-O.A)"L !ser e%its. +age A 3'(. What is the di,erence bet"een an O;37B598BT36958 trigger and a trigger ? On-validate-feld trigger fres, when the feld 1alidation stat!s 3ew or changed. +ost-feld-trigger whenever the control leaving form the feld, it will fre. 3'*. +an "e use a restricted pac2age procedure in O;3 7B598BT36958 Trigger ? 3o 3'-. 9s a <ey startup trigger &res as result of a operator pressing a 2ey e$plicitly ? 3o 3(.. +an "e use :O315O+< pac2age in a pre3&eld trigger ? 3o 3(1. +an "e create t"o bloc2s "ith the same name in form 3.. ? 3o 3(2. What is 0ost31loc2 is a. ??? a. 3avigational Trigger. b. :ey trigger c. Transaction Trigger. 3(3. What does an on3clear3bloc2 Trigger &re? 0t fres j!st before S4L Q forms the c!rrent bloc'. 3(4. ;ame the t"o &les that are created "hen you generate the form gi/e the &le$ e$tension ? 03+ (So!rce Bile* B.$ ("%ec!table Bile* Page 51 of 153 3(#. What pac2age procedure used for in/o2e s=l Kplus from s=l Kforms ? 5ost (".g. 5ost (s&lpl!s** 3('. What is the signi&cance of 0B: . in forms 3.. ? 5ide the felds for internal calc!lation. 3((. What are the di,erent types of 2ey triggers ? B!nction :ey :ey-f!nction :ey-others :ey-start!p 3(*. What is the di,erence bet"een a 6unction <ey Trigger and <ey 6unction Trigger ? B!nction 'ey triggers are associated with individ!al S4LQBO.$S f!nction 'eys #o! can attach :ey f!nction triggers to ED 'eys or 'ey se&!ences that normally do not perform any S4L Q BO.$S operations. These 'eys referred as 'ey BD thro!gh 'ey B@. 3(-. +ommitted bloc2 sometimes refer to a 1BS TB15 ? Balse 3*.. rrorD+ode is a pac2age proecdure ? a. Tr!e b. false Balse 3*1. When is cost based optimi?ation triggered? Ffor 81B 0t's important to have statistics on all tables for the ),O ()ost ,ased Optimi8er* to wor' correctly. 0f one table involved in a statement does not have statistics, Oracle has to revert to r!le-based optimi8ation for that statement. So yo! really want for all tables to have statistics right awayF it won't help m!ch to j!st have the larger tables analy8ed. =enerally, the ),O can change the e%ec!tion plan when yo!A E. )hange statistics of objects by doing an A3AL#;"F G. )hange some initiali8ation parameters (for e%ampleA hash<join<enabled, sort<area<si8e, db<fle<m!ltibloc'<read<co!nt*. 3*2. >o" can one optimi?e PMYEP =ueries? Ffor 81B 0t is possible to improve VR#;V &!eries by forcing the optimi8er to scan all the entries from the inde% instead of the table. This can be done by specifying hints. 0f the inde% is physically smaller than the table (which is !s!ally the case* it will ta'e less time to scan the entire inde% than to scan the entire table. 3*3. What nter pac2age procedure does ? "nter 1alidate-data in the c!rrent validation !nit. Page 52 of 153 3*4. Where can one &nd 9JO statistics per table? Ffor 81B The TL"STAT report shows 0?O per tablespace b!t one cannot see what tables in the tablespace has the most 0?O. The >O.A)L"<5O$"?rdbms?admin?catio.s&l script creates a sample<io proced!re and table to gather the re&!ired information. After e%ec!ting the proced!re, one can do a simple S"L")T Q B.O$ io<per<objectF to e%tract the re&!ired information. Bor more details, loo' at the header comments in the >O.A)L"<5O$"?rdbms?admin?catio.s&l script. 3*#. !y =uery "as &ne last "ee2 and no" it is slo". Why? Ffor 81B The li'ely ca!se of this is beca!se the e%ec!tion plan has changed. =enerate a c!rrent e%plain plan of the o6ending &!ery and compare it to a previo!s one that was ta'en when the &!ery was performing well. s!ally the previo!s plan is not available. Some factors that can ca!se a plan to change areA . /hich tables are c!rrently analy8ed\ /ere they previo!sly analy8ed\ (ie. /as the &!ery !sing .,O and now ),O\* . 5as O+T0$0;".<$O2" been changed in 030T.O.A\ . 5as the 2"=."" of parallelism been defned?changed on any table\ . 5ave the tables been re-analy8ed\ /ere the tables analy8ed !sing estimate or comp!te\ 0f estimate, what percentage was !sed\ . 5ave the statistics changed\ . 5as the 030T.O.A parameter 2,<B0L"<$LT0,LO):<."A2<)O3T been changed\ . 5as the 030T.O.A parameter SO.T<A."A<S0;" been changed\ . 5ave any other 030T.O.A parameters been changed\ . /hat do yo! thin' the plan sho!ld be\ .!n the &!ery with hints to see if this prod!ces the re&!ired performance. 3*'. Why is Oracle not using the damn inde$? Ffor 81B This problem normally only arises when the &!ery plan is being generated by the )ost ,ased Optimi8er. The !s!al ca!se is beca!se the ),O calc!lates that e%ec!ting a B!ll Table Scan wo!ld be faster than accessing the table via the inde%. B!ndamental things that can be chec'ed areA . S".<TA,<)OL$3S.3$<20ST03)T - This col!mn defnes the n!mber of distinct val!es the col!mn holds. . S".<TA,L"S.3$<.O/S - 0f 3$<20ST03)T C 3$<.O/S then !sing an inde% wo!ld be preferable to doing a BLL TA,L" S)A3. As the 3$<20ST03)T decreases, the cost of !sing an inde% increase thereby is ma'ing the inde% less desirable. . S".<032"R"S.)LST".03=<BA)TO. - This defnes how ordered the rows are in the inde%. 0f )LST".03=<BA)TO. approaches the n!mber of bloc's in the table, the rows are ordered. 0f it approaches the n!mber of rows in the table, the rows are randomly ordered. 0n s!ch a case, it is !nli'ely that inde% entries in the same leaf bloc' will point to rows in the same data bloc's. Page 53 of 153 . 2ecrease the 030T.O.A parameter 2,<B0L"<$LT0,LO):<."A2<)O3T - A higher val!e will ma'e the cost of a BLL TA,L" S)A3 cheaper. . .emember that yo! $ST s!pply the leading col!mn of an inde%, for the inde% to be !sed (!nless yo! !se a BAST BLL S)A3 or S:0+ S)A3303=*. . There are many other factors that a6ect the cost, b!t sometimes the above can help to show why an inde% is not being !sed by the ),O. 0f from chec'ing the above yo! still feel that the &!ery sho!ld be !sing an inde%, try specifying an inde% hint. Obtain an e%plain plan of the &!ery either !sing T:+.OB with T0$"2<STAT0ST0)S, so that one can see the )+ !tili8ation, or with ATOT.A)" to see the statistics. )ompare this to the e%plain plan when not !sing an inde%. 3-(. When should one rebuild an inde$? Ffor 81B #o! can r!n the 'A3AL#;" 032"R 1AL02AT" ST.)T."' command on the a6ected inde%es - each invocation of this command creates a single row in the 032"R<STATS view. This row is overwritten by the ne%t A3AL#;" 032"R command, so copy the contents of the view into a local table after each A3AL#;". The 'badness' of the inde% can then be j!dged by the ratio of '2"L<LB<.O/S' to 'LB<.O/S'. 3**. What are the unrestricted procedures used to change the popup screen position during run time ? Anchor-view .esi8e -1iew $ove-1iew. 3*-. What is an Blert ? An alert is window that appears in the middle of the screen overlaying a portion of the c!rrent display. 3-.. 8eleting a page remo/es information about all the &elds in that page ? a. True. b. 6alse? a. Tr!e. 3-1. T"o popup pages can appear on the screen at a time ?T"o popup pages can appear on the screen at a time ? a. True. b. 6alse? a. Tr!e. 3-2. +lassify the restricted and unrestricted procedure from the follo"ing. a. +all b. @ser3$it c. +all3Auery d. @p e. $ecute3Auery f. !essage g. $it36rom Page 54 of 153 h. 0ost i. 1rea2? a. )all - !nrestricted b. ser "%it - nrestricted c. )all<&!ery - nrestricted d. p - .estricted e. "%ec!te 4!ery - .estricted f. $essage - .estricted g. "%it<form - .estricted h. +ost - .estricted i. ,rea' - nrestricted. 3-3. What is an @ser $its ? A !ser e%it is a s!bro!tine which are written in programming lang!ages !sing proQ) pro Q)obol , etc., that lin' into the S4L Q forms e%ec!table. 3-4. What is a Trigger ? A piece of logic that is e%ec!ted at or triggered by a S4L Qforms event. 3-#. What is a 0ac2age 0rocedure ? A +ac'age proced!re is b!ilt in +L?S4L proced!re. 3-*. What is the ma$imum si?e of a form ? GOO character width and GOO characters Length. 3--. What is the di,erence bet"een system.currentD&eld and system.cursorD&eld ? E. System.c!rrent<feld gives name of the feld. G. System.c!rsor<feld gives name of the feld with bloc' name. 4... 5ist the system /ariables related in 1loc2 and 6ield? E. System.bloc'<stat!s G. System.c!rrent<bloc' H. System.c!rrent<feld M. System.c!rrent<val!e O. System.c!rsor<bloc' P. System.c!rsor<feld J. System.feld<stat!s. 4.1. What are the di,erent types of 0ac2age 0rocedure ? E. .estricted pac'age proced!re. G. nrestricted pac'age proced!re. 4.2. What are the types of T49::4S ? E. 3avigational Triggers. G. Transaction Triggers. 4.3. 9dentify pac2age function from the follo"ing ? 1. rror3 +ode Page 55 of 153 2. 1rea2 3. +all 4. rror3te$t #. 6orm3failure '. 6orm3fatal (. $ecute3=uery *. Bnchor 7ie" -. !essageDcode? E. "rror<)ode G. "rror<Te%t H. Borm<Bail!re M. Borm<Batal O. $essage<)ode 4.3. +an you attach an lo/ to a &eld at run3time? if yes% gi/e the build3in name.? #es. Set<item<proprety 4.4. 9s it possible to attach same library to more than one form? #es 4.#. +an you attach an lo/ to a &eld at design time? #es 4.'. 5ist the "indo"s e/ent triggers a/ailable in 6orms 4..? /hen-window-activated, when-window-closed, when-window-deactivated, when-window-resi8ed 4.(. What are the triggers associated "ith the image item? /hen-0mage-activated(Bires when the operator do!ble clic's on an image 0tems* /hen-image-pressed(fres when the operator selects or deselects the image item* 4.*. What is a /isual attribute? 1is!al Attrib!tes are the font, color and pattern characteristics of objects that operators see and intract with in o!r application. 4.-. >o" many ma$imum number of radio buttons can you assign to a radio group? nlimited no of radio b!ttons can be assigned to a radio gro!p 411. What is a 5ayout ditor? The Layo!t "ditor is a graphical design facility for creating and arranging items and boilerplate te%t and graphics objects in yo!r application's interface. Page 56 of 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 not a/ailable in forms 3..? System.cordination<operation System 2ate<threshold System.e6ective<2ate System.event<window System.s!ppress<wor'ing 414. What are the display styles of an alert? Stop, )a!tion, note 41#. What built3in is used for sho"ing the alert during run3 time? Show<alert. 41'. What built3in is used for changing the properties of the "indo" dynamically? Set<window<property )anvas-1iew 41(. What are the di,erent types of "indo"s? .oot window, secondary window. 41*. What is a prede&ned e$ception a/ailable in forms 4..? .aise form<trigger<fail!re 41-. What is a radio :roup? .adio gro!ps display a f%ed no of options that are m!t!ally "%cl!sive. ser can select one o!t of n n!mber of options. 41-. What are the di,erent type of a record group? 4!ery record gro!p Static record gro!p 3on &!ery record gro!p 42.. What are the menu items that oracle forms 4.. supports? +lain, )hec',.adio, Separator, $agic Page 57 of 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!p 1is!al Attrib!tes. 423. What are the triggers associated "ith a chec2 bo$? Only /hen-chec'bo%-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 built3in routines used to manipulate images in imageDitem? 0mage<add 0mage<and 0mage<s!btract 0mage<%or 0mage<8oom 42*. +an you change the alert messages at run3time? 0f yes, give the name of the b!ilt-in to change the alert messages at r!n-time. #es. Set<alert<property. 42-. What is the built3in used to get and set lo/ properties during run3time? =et<lov<property Set<lov<property .ecord =ro!p 43.. What is the built3in routine used to count the no of ro"s in a group? =et<gro!p <row<co!nt System 1ariables 431. :i/e the Types of modules in a form? Borm $en! Library Page 58 of 153 432. Write the Bbbre/iation for the follo"ing 6ile $tension 1. 6!1 2. !!1 3. 055? B$, ----- Borm $od!le ,inary. $$, ----- $en! $od!le ,inary. +LL ------ +L?S4L Library $od!le ,inary. 433. 5ist the built3in routine for controlling "indo" during run3 time? Bind<window, get<window<property, hide<window, move<window, resi8e<window, set<window<property, show<1iew 434. 5ist the built3in routine for controlling "indo" during run3 time? Bind<canvas =et-)anvas<property =et<view<property 5ide<1iew .eplace<content<view Scroll<view Set<canvas<property Set<view<property Show<view Alert 43#. What is the built3in function used for &nding the alert? Bind<alert "ditors 43'. 5ist the editors a/ailables in forms 4..? 2efa!lt editor ser<defned editors system editors. 43(. What buil3in routines are used to display editor dynamicaly? "dit<te%t item show<editor LO1 43*. What is an 5o/? A list of val!es is a single or m!lti col!mn selection list displayed in a pop-!p window 43-. What is a record :roup? Page 59 of 153 A record gro!p is an internal oracle forms data str!ct!re that has a similar col!mn?row frame wor' to a database table 44.. :i/e built3in routine related to a record groups? )reate<gro!p (B!nction* )reate<gro!p<from<&!ery(B!nction* 2elete<gro!p(+roced!re* Add<gro!p<col!mn(B!nction* Add<gro!p<row(+roced!re* 2elete<gro!p<row(+roced!re* +op!late<gro!p(B!nction* +op!late<gro!p<with<&!ery(B!nction* Set<gro!p<)har<cell(proced!re* 441. 5ist the built3in routines for the controlling can/as /ie"s during run3time? Bind<canvas =et-)anvas<property =et<view<property 5ide<1iew .eplace<content<view Scroll<view Set<canvas<property Set<view<property Show<view Alert 442. System.e,ecti/eDdate system /ariable is read only TrueJ6alse? Balse 443. What are the builtDin used to trapping errors in forms 4? "rror<type ret!rn character "rror<code ret!rn n!mber "rror<te%t ret!rn char 2bms<error<code ret!rn no. 2bms<error<te%t ret!rn char 444. What is Oracle 6inancials? Ffor 81B Oracle Binancials prod!cts provide organi8ations with sol!tions to a wide range of long- and short-term acco!nting system iss!es. .egardless of the si8e of the b!siness, Oracle Binancials can meet acco!nting management demands withA Oracle AssetsA "ns!res that an organi8ation's property and e&!ipment investment is acc!rate and that the correct asset ta% acco!nting strategies are chosen. Oracle =eneral LedgerA O6ers a complete sol!tion to jo!rnal entry, b!dgeting, allocations, consolidation, and fnancial reporting needs. Page 60 of 153 Oracle 0nventoryA 5elps an organi8ation ma'e better inventory decisions by minimi8ing stoc' and ma%imi8ing cash Sow. Oracle Order "ntryA +rovides organi8ations with a sophisticated order entry system for managing c!stomer commitments. Oracle +ayablesA Lets an organi8ation process more invoices with fewer sta6 members and tighter controls. 5elps save money thro!gh ma%im!m disco!nts, ban' Soat, and prevention of d!plicate payment. Oracle +ersonnelA 0mproves the management of employee- related iss!es by retaining and ma'ing available every form of personnel data. Oracle +!rchasingA 0mproves b!ying power, helps negotiate bigger disco!nts, eliminates paper Sow, increases fnancial controls, and increases prod!ctivity. Oracle .eceivablesA. 0mproves cash Sow by letting an organi8ation process more payments faster, witho!t o6-line research. 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 Se%ible commissions reporting. Oracle Sales AnalysisA 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 81B The =eneral Ledger (=L* mod!le is the basis for all other Oracle Binancial mod!les. All other mod!les provide information to it. 0f yo! implement Oracle Binancials, yo! sho!ld switch yo!r c!rrent =L system frst.=L is relatively easy to implement. #o! sho!ld go live with it frst to give yo!r implementation team a chance to be familiar with Oracle Binancials. 44(. What are the types of can/as3/ie"s? )ontent 1iew, Stac'ed 1iew. 44*. What is the !ultiOrg and "hat is it used for? Ffor 81B $!ltiOrg or $!ltiple Organi8ations Architect!re allows m!ltiple operating !nits and their relationships to be defned within a single Page 61 of 153 installation of Oracle Applications. This 'eeps each operating !nit's transaction data separate and sec!re. se the following &!ery to determine if $!liOrg is intalledA select m!lti<org<Sag from fnd<prod!ct<gro!psF 44-. What is the di,erence bet"een 6ields and 6le$6ields? Ffor 81B A feld is a position on a form that one !ses to enter, view, !pdate, or delete information. A feld prompt describes each feld by telling what 'ind of information appears in the feld, or alternatively, what 'ind of information sho!ld be entered in the feld. A Se%feld is an Oracle Applications feld made !p of segments. "ach segment has an assigned name and a set of valid val!es. Oracle Applications !ses Se%felds to capt!re information abo!t yo!r organi8ation. There are two types of Se%feldsA 'ey Se%felds and descriptive Se%felds. 4#.. $plain types of 1loc2 in forms4..? ,ase table ,loc's. )ontrol ,loc's. E. A base table bloc' is one that is associated with a specifc database table or view. G. A control bloc' is a bloc' that is not associated with a database table. 0T"$S 4#1. What is an Blert? An alert is a modal window that displays a message notifes the operator of some application condition 4##. What are the built3in routines is a/ailable in forms 4.. to create and manipulate a parameter list? Add<parameter )reate<+arameter<list 2elete<parameter 2estroy<parameter<list =et<parameter<attr =et<parameter<list set<parameter<attr 4#' .What is a record :roup? A record gro!p is an internal oracle forms data str!ct!re that has a similar col!mn?row frame wor' to a database table 4#( What is a ;a/igable item? A navigable item is one that operators can navigate to with the 'eyboard d!ring defa!lt navigation, or that Oracle forms can navigate to by e%ec!ting a navigational b!ilt-in proced!re. 4#*. What is a library in 6orms 4..? Page 62 of 153 A library is a collection of +l?S4L program !nits, incl!ding !ser named proced!res, f!nctions X pac'ages 4'.. >o" imageDitems can be populate to &eld in forms 4..? A fetch from a long raw database col!mn +L?S&l assignment to e%ec!ting the read<image<fle b!ilt<in proced!re to get an image from the fle system. 4'1. What is the content /ie" and stac2ed /ie"? A content view is the 7,ase7 view that occ!pies the entire content pane of the window in which it is displayed. A stac'ed view di6ers from a content canvas view in that it is not the base view for the window to which it is assigned 4'2. What is a +hec2 1o$? A )hec' ,o% is a two state control that indicates whether a certain condition or val!e is on or o6, tr!e or false. The display state of a chec' bo% is always either 7chec'ed7 or 7!nchec'ed7. 4'3. What is a can/as3/ie"? A canvas-view is the bac'gro!nd object on which yo! layo!t the interface items (te%t-items, chec' bo%es, radio gro!ps, and so on.* and boilerplate objects that operators see and interact with as they r!n yo!r form. At r!n-time, operators can see only those items that have been assigned to a specifc canvas. "ach canvas, in term, m!st be displayed in a specifc window. 4'4. $plain the follo"ing &le e$tension related to library? .pll,.lib,.pld The library pll fles is a portable design fle comparable to an fmb form fle The library lib fle is a plat form specifc, generated library fle comparable to a fm% form fle The pld fle is T%t format fle and can be !sed for so!rce controlling yo!r library fles +arameter 4'#. $plain the usage of W>4 +@44;T O6 clause in cursors ? /5"." ).."3T OB cla!se in an +2AT",2"L"T" statement refers to the latest row fetched from a c!rsor. 2atabase Triggers 4''. ;ame the tables "here characteristics of 0ac2age% procedure and functions are stored ? ser<objects, ser<So!rce and ser<error. 4'(. $plain the t"o type of +ursors ? There are two types of c!rsors, 0mplicit )!rsor and "%plicit )!rsor. +L?S4L !ses 0mplicit )!rsors for &!eries. ser defned c!rsors are called "%plicit )!rsors. They can be declared and !sed. Page 63 of 153 4'*. What are t"o parts of pac2age ? The two parts of pac'age are +A):A=" S+")0B0)AT0O3 X +A):A=" ,O2#. +ac'age Specifcation contains declarations that are global to the pac'ages and local to the schema. +ac'age ,ody contains act!al proced!res and local declaration of the proced!res and c!rsor declarations. 4'-. What are t"o /irtual tables a/ailable during database trigger e$ecution ? The table col!mns are referred as OL2.col!mn<name and 3"/.col!mn<name. Bor triggers related to 03S".T only 3"/.col!mn<name val!es only available. Bor triggers related to +2AT" only OL2.col!mn<name 3"/.col!mn<name val!es only available. Bor triggers related to 2"L"T" only OL2.col!mn<name val!es only available. 4(.. What is 6ine :rained Buditing? Ffor 81B Bine =rained A!diting (2,$S<B=A* allows a!diting records to be generated when certain rows are selected from a table. A list of defned policies can be obtained from 2,A<A20T<+OL0)0"S. A!dit records are stored in 2,A<B=A<A20T<T.A0L. Loo' at this e%ampleA o Add policy on table with a!titing condition... e%ec!te dbms<fga.add<policy('5.', '"$+', 'policyE', 'deptno K ED'*F o $!st A3AL#;", this feat!re wor's with ),O ()ost ,ased Optimi8er* analy8e table "$+ comp!te statisticsF select Q from "$+ where cE C EEF -- /ill trigger a!diting select Q from "$+ where cE C D@F -- 3o a!diting o 3ow we can see the statments that triggered the a!diting condition... select s<e%t from sys.fga<log>F delete from sys.fga<log>F 4(1. What is a pac2age ? What are the ad/antages of pac2ages ? What is 0ragma M+0T9O;D9;9T ? $plain the usage ? The +.A=$A "R")+T0O3<030T tells the complier to associate an e%ception with an oracle error. To get an error message of a specifc oracle error. e.g. +.A=$A "R)"+T0O3<030T (e%ception name, oracle error n!mber* 4(2. What is 6ine :rained Bccess +ontrol? Ffor 81B See &!estion 7/hat is a 1irt!al +rivate 2atabase7. 4(3. What is a 7irtual 0ri/ate 8atabase? Ffor 81B Oracle Ii introd!ced the notion of a 1irt!al +rivate 2atabase (1+2*. A 1+2 o6ers Bine-=rained Access )ontrol (B=A)* for sec!re separation of data. This ens!res that !sers only have access to data that pertains to them. sing this option, one co!ld even store m!ltiple companies' data Page 64 of 153 within the same schema, witho!t them 'nowing abo!t it. 1+2 confg!ration is done via the 2,$S<.LS (.ow Level Sec!rity* pac'age. Select from S#S.1>1+2<+OL0)# to see e%isting 1+2 confg!ration. 4(4. What is 4aiseDapplicationDerror ? .aise<application<error is a proced!re of pac'age 2,$S<STA32A.2 which allows to iss!e an !ser<defned error messages from stored s!b- program or database trigger. 4(#. What is Oracle 5abel Security? Ffor 81B Oracle Label Sec!rity (formerly called Tr!sted Oracle $LS .2,$S* !ses the 1+2 (1irt!al +rivate 2atabase* feat!re of OracleIi to implement row level sec!rity. Access to rows are restricted according to a !ser's sec!rity sensitivity tag or label. Oracle Label Sec!rity is confg!red, controlled and managed from the +olicy $anager, an "nterprise $anager-based =0 !tility. 4('. :i/e the structure of the procedure ? +.O)"2." name (parameter list.....* is local variable declarations ,"=03 "%ec!table statements. "%ception. e%ception handlers endF 4((. What is O! FOracle nterprise !anagerG? Ffor 81B O"$ is a set of systems management tools provided by Oracle )orporation for managing the Oracle environment. 0t provides tools to monitor the Oracle environment and a!tomate tas's (both one-time and repetitive in nat!re* to ta'e database administration a step closer to 7Lights O!t7 management. 4(*. Auestion What is 05JSA5 ? +L?S4L is a proced!ral lang!age that has both interactive S4L and proced!ral programming lang!age constr!cts s!ch as iteration, conditional branching. 4(-. What are the components of O!? Ffor 81B Oracle "nterprise $anager (O"$* has the following componentsA . $anagement Server (O$S*A $iddle tier server that handles comm!nication with the intelligent agents. The O"$ )onsole connects to the management server to monitor and confg!re the Oracle enterprise. . )onsoleA This is a graphical interface from where one can sched!le jobs, events, and monitor the database. The console can be opened from a /indows wor'station, ni% RTerm (oemapp command* or /eb Page 65 of 153 browser session (oem<webstage*. . 0ntelligent Agent (O0A*A The O0A r!ns on the target database and ta'es care of the e%ec!tion of jobs and events sched!led thro!gh the )onsole. 4*1. 9s it possible to use Transaction control Statements such a 4O551B+< or +O!!9T in 8atabase Trigger ? Why ? 0t is not possible. As triggers are defned for each table, if yo! !se )O$$0T of .OLL,A): in a trigger, it a6ects logical transaction processing. 4*2. >o" many types of database triggers can be speci&ed on a table ? What are they ? 0nsert pdate 2elete ,efore .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 specifed, then the trigger for each .ow a6ected by the statement. 0f /5"3 cla!se is specifed, the trigger fres according to the ret!rned ,oolean val!e. 4*3. What are the modes of parameters that can be passed to a procedure ? 03,OT,03-OT parameters. 4*4. Where the 0reDde&nedDe$ceptions are stored ? 0n the standard pac'age. +roced!res, B!nctions X +ac'ages F 4*#. Write the order of precedence for /alidation of a column in 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 is local variable declarations ,egin e%ec!table statements "%ception e%ec!tion handlers "ndF 4*(. $plain ho" procedures and functions are called in a 05JSA5 bloc2 ? Page 66 of 153 B!nction is called as part of an e%pression. sal AC calc!late<sal ('aIGG'*F proced!re is called as a +L?S4L statement calc!late<bon!s ('AIGG'*F 4**. What are ad/antages fo Stored 0rocedures? "%tensibility,$od!larity, .e!sability, $aintainability and one time compilation. 4*-. What is an $ception ? What are types of $ception ? "%ception is the error handling part of +L?S4L bloc'. The types are +redefned and !ser defned. Some of +redefned e%ceptions are. ).SO.<AL."A2#<O+"3 2+<1AL<O3<032"R 3O<2ATA<BO32 TOO<$A3#<.O/S 031AL02<).SO. 031AL02<3$,". LO=O3<2"30"2 3OT<LO=="2<O3 +.O=.A$-"..O. STO.A="<"..O. T0$"OT<O3<."SO.)" 1AL"<"..O. ;".O<20102" OT5".S. 4-.. What are the 05JSA5 Statements used in cursor processing ? 2")LA." ).SO. c!rsor name, O+"3 c!rsor name, B"T)5 c!rsor name 03TO or .ecord types, )LOS" c!rsor name. 4-1. What are the components of a 05JSA5 1loc2 ? 2eclarative part, "%ec!table part and "%ception part. 2atatypes +L?S4L 4-2. What is a database trigger ? ;ame some usages of database trigger ? 2atabase trigger is stored +L?S4L program !nit associated with a specifc database table. sages are A!dit data modifcations, Log events transparently, "nforce comple% b!siness r!les 2erive col!mn val!es a!tomatically, 0mplement comple% sec!rity a!thori8ations. $aintain replicate tables. 4-3. What is a cursor ? Why +ursor is re=uired ? )!rsor is a named private S4L area from where information can be accessed. )!rsors are re&!ired to process rows individ!ally for &!eries ret!rning m!ltiple rows. Page 67 of 153 4-4. What is a cursor for loop ? )!rsor for loop implicitly declares V.O/T#+" as loop inde%,opens a c!rsor, fetches rows of val!es from active set into felds in the record and closes when all the records have been processed. eg. BO. emp<rec 03 )E LOO+ salary<total AC salary<total Wemp<rec salF "32 LOO+F 4-#. What "ill happen after commit statement ? )!rsor )E is Select empno, ename from empF ,egin open )EF loop Betch )E into eno.enameF "%it /hen )E Vnotfo!ndF----- commitF end loopF endF The c!rsor having &!ery as S"L")T .... BO. +2AT" gets closed after )O$$0T?.OLL,A):. The c!rsor having &!ery as S"L")T.... does not get closed even after )O$$0T?.OLL,A):. 4-'. >o" pac2aged procedures and functions are called from the follo"ing? a. Stored procedure or anonymous bloc2 b. an application program such a 04+ K+% 04OK +O1O5 c. SA5 K05@S?? a. +A):A=" 3A$".+.O)"2." 3A$" (parameters*F variable AC +A):A=" 3A$".B3)T0O3 3A$" (arg!ments*F "R") S4L "R")T" b.,"=03 +A):A=" 3A$".+.O)"2." 3A$" (parameters* variable AC +A):A=" 3A$".B3)T0O3 3A$" (arg!ments*F "32F "32 "R")F c. "R")T" +A):A=" 3A$".+.O)"2." if the proced!res does not have any o!t?in-o!t parameters. A f!nction can not be called. 4-(. What is a stored procedure ? A stored proced!re is a se&!ence of statements that perform specifc f!nction. 4-*. What are the components of a 05JSA5 bloc2 ? A set of related declarations and proced!ral statements is called bloc'. Page 68 of 153 4--. What is di,erence bet"een a 04O+8@4 O 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 or may not ret!rn at all. #... What is di,erence bet"een a +ursor declared in a procedure and +ursor declared in a pac2age speci&cation ? A c!rsor declared in a pac'age specifcation is global and can be accessed by other proced!res or proced!res in a pac'age. A c!rsor declared in a proced!re is local to the proced!re that can not be accessed by other proced!res. #.1. What are the cursor attributes used in 05JSA5 ? V0SO+"3 - to chec' whether c!rsor is open or not V .O/)O3T - n!mber of rows fetched?!pdated?deleted. V BO32 - to chec' whether c!rsor has fetched any row. Tr!e if rows are fetched. V 3OT BO32 - to chec' whether c!rsor has fetched any row. Tr!e if no 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 4OWTY0 ? What are the ad/antages of using these o/er datatypes? V T#+" provides the data type of a variable or a database col!mn to that variable. V .O/T#+" provides the record type that represents a entire row of a table or view or col!mns selected in the c!rsor. The advantages are A 0. 3eed not 'now abo!t variable's data type ii. 0f the database defnition of a col!mn in a table changes, the data type of a variable changes accordingly. #.3. What is di,erence bet"een P 4OWTY0 and TY0 4+O48 ? V .O/T#+" is to be !sed whenever &!ery ret!rns a entire row of a table or view. T#+" rec .")O.2 is to be !sed whenever &!ery ret!rns col!mns of di6erent table or views and variables. ".g. T#+" r<emp is .")O.2 (eno emp.empnoV type,ename emp ename Vtype *F e<rec empV .O/T#+" c!rsor cE is select empno,deptno from empF e<rec cE V.O/T#+". #.4. What are the di,erent types of 05JSA5 program units that can be de&ned and stored in O4B+5 database ? +roced!res and B!nctions,+ac'ages and 2atabase Triggers. Page 69 of 153 #.#. What are the ad/antages of ha/ing a 0ac2age ? 0ncreased f!nctionality (for e%ample,global pac'age variables can be declared and !sed by any proecd!re in the pac'age* and performance (for e%ample all objects of the pac'age are parsed compiled, and loaded into memory once* #.'. What are the uses of 8atabase Trigger ? 2atabase triggers can be !sed to a!tomatic data generation, a!dit data modifcations, enforce comple% 0ntegrity constraints, and c!stomi8e comple% sec!rity a!thori8ations. #.(. What is a 0rocedure ? A +roced!re consist of a set of S4L and +L?S4L statements that are gro!ped together as a !nit to solve a specifc problem or perform a set of related tas's. #.*. What is a 0ac2age ? A +ac'age is a collection of related proced!res, f!nctions, variables and other pac'age 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, or delete from a table. #11. +an the default /alues be assigned to actual parameters? #es #12. +an a primary 2ey contain more than one columns? #es #13. What is an @T5D695.What are di,erent procedures and functions associated "ith it? TL<B0L" is a pac'age that adds the ability to read and write to operating system fles. +roced!res associated with it are B)LOS", B)LOS"<ALL and O proced!res to o!tp!t data to a fle +T, +T<L03", 3"/<L03", +TB, BBLS5.+T, BBLS5.+T<L03",BBLS5.3"/<L03". B!nctions associated with it are BO+"3, 0SO+"3. #14. What are O4B+5 04+O!0954S? sing O.A)L" +.")O$+0L".S, S4L statements and +L?S4L bloc's can be contained inside H=L programs written in ),)WW,)O,OL,+AS)AL, BO.T.A3,+L?E A32 A2A. The +recompilers are 'nown as +roQ),+roQ)obol,... This form of +L?S4L is 'nown as embedded pl?s&l,the lang!age in which pl?s&l is embedded is 'nown as the host Page 70 of 153 lang!age. The prcompiler translates the embedded S4L and pl?s&l ststements into calls to the precompiler r!ntime library.The o!tp!t m!st be compiled and lin'ed with this library to creater an e%ec!table. #1#. 8i,erentiate bet"een T4@;+BT and 85T? T.3)AT" deletes m!ch faster than 2"L"T" T.3)AT" 2"L"T" 0t is a 22L statement 0t is a 2$L statement 0t is a one way trip,cannot .OLL,A): One can .ollbac' 2oesn't have selective feat!res (where cla!se* 5as 2oesn't fre database triggers 2oes 0t re&!ires disabling of referential constraints. #1'. What is di,erence bet"een a formal and an actual parameter? The variables declared in the proced!re and which are passed, as arg!ments are called act!al, the parameters in the proced!re declaration. Act!al parameters contain the val!es that are passed to a proced!re and receive res!lts. Bormal parameters are the placeholders for 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-defned or V.O/T#+" can be !sed. eg T#+" t<st!dentsref 0S ."B ).SO. ."T.3 st!dentsV.O/T#+" #1*. What are di,erent Oracle database ob)ects? -TA,L"S -10"/S -032"R"S -S#3O3#$S -S"4"3)"S -TA,L"S+A)"S etc #1-. What is di,erence bet"een S@1ST4 and 9;ST4? S,ST. ret!rns a specifed portion of a string eg S,ST.(',)2"B',M* o!tp!t ,)2" 03ST. provides character position in which a pattern is fo!nd in a string. eg 03ST.('A,)-2)-B','-',G* o!tp!t J (Gnd occ!rence of '-'* #2.. 8isplay the number /alue in Words? S4LK select sal, (to<char(to<date(sal,'j'*, 'jsp'** from empF Page 71 of 153 the o!tp!t li'e, SAL (TO<)5A.(TO<2AT"(SAL,'T'*,'TS+'** --------- ---------------------------------------- IDD eight h!ndred EPDD one tho!sand si% h!ndred EGOD one tho!sand two h!ndred ffty 0f yo! want to add some te%t li'e, .s. Three Tho!sand only. S4LK select sal 7Salary 7, (' .s. 'UU (to<char(to<date(sal,'j'*, 'Tsp'**UU ' only.'** 7Sal in /ords7 from emp ? Salary Sal in /ords ------- ----------------------------------------------- IDD .s. "ight 5!ndred only. EPDD .s. One Tho!sand Si% 5!ndred only. EGOD .s. One Tho!sand Two 5!ndred Bifty only. #21. What is di,erence bet"een SA5 and SA5K05@S? S4LQ+LS is a command line tool where as S4L and +L?S4L lang!age interface and reporting tool. 0ts a command line tool that allows !ser to type S4L commands to be e%ec!ted directly against an Oracle database. S4L is a lang!age !sed to &!ery the relational database(2$L,2)L,22L*. S4LQ+LS commands are !sed to format &!ery res!lt, Set options, "dit S4L commands and +L?S4L. #22. What are /arious )oins used "hile "riting S@1A@49S? Self join-0ts a join foreign 'ey of a table references the same table. O!ter Toin--0ts a join condition !sed where One can &!ery all the rows of one of the tables in the join condition even tho!gh they don't satisfy the join condition. "&!i-join--0ts a join condition that retrieves rows from one or more tables in which one or more col!mns in one table are e&!al to one or more col!mns in the second table. #23. What a S5+T 6O4 @08BT cursor represent.? S"L")T......B.O$......BO.......+2AT"`OB col!mn-referencea`3O/A0Ta The processing done in a fetch loop modifes the rows that have been retrieved by the c!rsor. A convenient way of modifying the rows is done by a method with two partsA the BO. +2AT" cla!se in the c!rsor declaration, /5"." ).."3T OB )LAS" in an +2AT" or declaration statement. #24. What are /arious pri/ileges that a user can grant to another user? -S"L")T -)O33")T -."SO.)"S Page 72 of 153 #2#. 8isplay the records bet"een t"o range? select rown!m, empno, ename from emp where rowid in (select rowid from emp where rown!m ^CX!pto min!s select rowid from emp where rown!m^XStart*F #2'. min/alue.s=l Select the ;th lo"est /alue from a table? select level, min('col<name'* from my<table where level C 'Xn' connect by prior ('col<name'* ^ 'col<name'* gro!p by levelF "%ampleA =iven a table called emp with the following col!mnsA -- id n!mber -- name varcharG(GD* -- sal n!mber -- -- Bor the second lowest salaryA -- select level, min(sal* from emp -- where levelCG -- connect by prior sal ^ sal -- gro!p by level #2(. What is di,erence bet"een 4ename and Blias? .ename is a permanent name given to a table or col!mn whereas Alias is a temporary name given to a table or col!mn which do not e%ist once the S4L statement is e%ec!ted. #2*. 8i,erence bet"een an implicit O an e$plicit cursor.? only one row. 5owever,&!eries that ret!rn more than one row yo! m!st declare an e%plicit c!rsor or !se a c!rsor BO. loop. "%plicit c!rsor is a c!rsor in which the c!rsor name is e%plicitly assigned to a S"L")T statement via the ).SO....0S statement. An implicit c!rsor is !sed for all S4L statements 2eclare, Open, Betch, )lose. An e%plicit c!rsors are !sed to process m!ltirow S"L")T statements An implicit c!rsor is !sed to process 03S".T, +2AT", 2"L"T" and single row S"L")T. .03TO statements. #2-. What is a O@T4 QO9;? O!ter Toin--0ts a join condition !sed where yo! can &!ery all the rows of one of the tables in the join condition even tho!gh they don9t satisfy the join condition. #3.. What is a cursor? Oracle !ses wor' area to e%ec!te S4L statements and store processing information +L?S4L constr!ct called a c!rsor lets yo! name a wor' area and access its stored information A c!rsor is a mechanism !sed to fetch more than one row in a +l?S4l bloc'. #31. What is the purpose of a cluster? Page 73 of 153 Oracle does not allow a !ser to specifcally locate tables, since that is a part of the f!nction of the .2,$S. 5owever, for the p!rpose of increasing performance, oracle allows a developer to create a )LST".. A )LST". provides a means for storing data from di6erent tables together for faster retrieval than if the table placement were left to the .2,$S. #32. What is O+9. What are its uses? Oracle )all 0nterface is a method of accesing database from a H=L program. ses--3o precompiler is re&!ired,+L?S4L bloc's are e%ec!ted li'e 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 is re=uired? O+"3 c!rsor variable BO. S"L")T...Statement )LOS" c!rsor variable 0n order to associate a c!rsor variable with a partic!lar S"L")T statement O+"3 synta% is !sed. 0n order to free the reso!rces !sed for the &!ery )LOS" statement is !sed. #34. 8isplay OddJ /en number of records? Odd n!mber of recordsA select Q from emp where (rowid,E* in (select rowid, mod(rown!m,G* from emp*F O!tp!tA- E H O "ven n!mber of recordsA select Q from emp where (rowid,D* in (select rowid, mod(rown!m,G* from emp* O!tp!tA- G M 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 yes ho". 9f not "hy? Page 74 of 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....03TO statements when the where cla!se of the &!erydoes not match any rows. /hen the where cla!se of the e%plicit c!rsor does not match any rows the V3OTBO32 attrib!te is set to T." instead. #3*. +an you use a commit statement "ithin a database trigger? 3o #3-. What W>4 +@44;T O6 clause does in a cursor? LOO+ S"L")T n!m<credits 03TO v<n!mcredits B.O$ classes /5"." deptCEGH and co!rseCEDEF +2AT" st!dents B5:OFFFFFFFFFS"T c!rrent<creditsCc!rrent<creditsWv<n!mcredits /5"." ).."3T OB RF #4.. There is a string 12.... 12 . .12# % ho" you "ill &nd the position of the decimal place? 03ST.('EGDDDD EG D .EGO',E,'.'* o!tp!t EH #41. What are di,erent modes of parameters used in functions and procedures? -03 -OT -03OT #42. >o" you "ere passing cursor /ariables in 05JSA5 2.2? 0n +L?S4L G.G c!rsor variables cannot be declared in a pac'age.This is beca!se the storage for a c!rsor variable has to be allocated !sing +roQ) or O)0 with version G.G, the only means of passing a c!rsor variable to a +L?S4L bloc' is via bind variable or a proced!re parameter. #43. When do you use W>4 clause and "hen do you use >B79;: clause? 5A103= cla!se is !sed when yo! want to specify a condition for a gro!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, single row 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 bloc's that ret!rn a val!e and can be called with arg!ments proced!re a named bloc' that can be called with Page 75 of 153 parameter. A proced!re all is a +L?S4L statement by itself, while a B!nction call is called as part of an e%pression. #4#. Which is more faster 3 9; or M9STS? "R0STS is more faster than 03 beca!se "R0STS ret!rns a ,oolean val!e whereas 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<name 2rop B!nction f!nction<name #4(. >o" "ill you delete duplicating ro"s from a base table? delete from table<name where rowid not in (select ma%(rowid* from table gro!p by d!plicate<val!es<feld<name*F or delete d!plicate<val!es<feld<name dv from table<name ta where rowid ^(select min(rowid* from table<name tb where ta.dvCtb.dv*F #4*. 8i,erence bet"een database triggers and form triggers? -2ata base trigger(2,T* fres when a 2$L operation is performed on a data base table. Borm trigger(BT* Bires when !ser presses a 'ey or navigates between felds on the screen -)an be row level or statement level 3o distinction between row level and statement level. -)an manip!late data stored in Oracle tables via S4L )an manip!late data in Oracle tables as well as variables in forms. -)an be fred from any session e%ec!ting the triggering 2$L statements. )an be fred only from the form that defne the trigger. -)an ca!se other database triggers to fre.)an ca!se other database triggers to fre, b!t not other form triggers. #4-. What is a cursor for loop? )!rsor Bor Loop is a loop where oracle implicitly declares a loop variable, the loop inde% that of the same record type as the c!rsor's record. ##.. >o" you "ill a/oid duplicating records in a =uery? ,y !sing 20ST03)T ##1. What is a /ie" ? A view is stored proced!re based on one or more tables, it9s a virt!al table. ##2. What is di,erence bet"een @;9A@ and 049!B4Y <Y constraints? A table can have only one +.0$A.# :"# whereas there can be any n!mber of 304" 'eys. The col!mns that compose +: are a!tomatically defne 3OT 3LL, whereas a col!mn that compose a Page 76 of 153 304" is not a!tomatically defned to be mandatory m!st also specify the 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 be associated with one r!n time &!ery. A c!rsor variable is reference type (li'e a pointer in )*. 2eclaring a c!rsor variableA T#+" type<name 0S ."B ).SO. ."T.3 ret!rn<type type<name is the name of the reference type,ret!rn<type is a record type indicating the types of the select list that will event!ally be ret!rned by the c!rsor variable. ##4. >o" do you &nd the numbert of ro"s in a Table ? A bad answer is co!nt them (S"L")T )O3T(Q* B.O$ table<name* A good answer is A- ',y generating S4L to A3AL#;" TA,L" table<name )O3T STAT0ST0)S by &!erying Oracle System )atalog!es (e.g. S".<TA,L"S or ALL<TA,L"S*. The best answer is to refer to the !tility which Oracle released which ma'es it !nnecessary to do A3AL#;" TA,L" for each Table individ!ally. ###. What is the ma$imum bu,er si?e that can be speci&ed using the 81!SDO@T0@T.;B15 function? E,DDD,DD ##'. What are cursor attributes? -V.O/)O3T -V3OTBO32 -VBO32 -V0SO+"3 ##(. There is a P sign in one &eld of a column. What "ill be the =uery to &nd it? '' Sho!ld be !sed before 'V'. ##*. What is O; 85T +BS+B8 ? /hen O3 2"L"T" )AS)A2" is specifed O.A)L" maintains referential integrity by a!tomatically removing dependent foreign 'ey val!es if a referenced primary or !ni&!e 'ey val!e is removed. ##-. What is the fastest "ay of accessing a ro" in a table ? sing .O/02.)O3ST.A03TS #'.. What is di,erence bet"een T4@;+BT O 85T ? T.3)AT" commits after deleting entire table i.e., can not be rolled bac'. 2atabase triggers do not fre on T.3)AT"2"L"T" allows the Page 77 of 153 fltered deletion. 2eleted records can be rolled bac' or committed.2atabase triggers fre on 2"L"T". #'1. What is a transaction ? Transaction is logical !nit between two commits and commit and rollbac'. #'2. What are the ad/antages of 79W ? To protect some of the col!mns of a table from other !sers.To hide comple%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". TA,L" "3A,L" constraint?20SA,L" constraint. #'4. Where the integrity constraints are stored in 8ata 8ictionary ? The integrity constraints are stored in S".<)O3ST.A03TS. #'#. What is the Sub=uery ? S!b &!ery is a &!ery whose ret!rn val!es are !sed in fltering conditions of the main &!ery. #''. >o" to access the current /alue and ne$t /alue from a se=uence ? 9s it possible to access the current /alue in a session before accessing ne$t /alue ? Se&!ence name )..1AL, Se&!ence name 3"RT1AL.0t is not possible. Only if yo! access ne%t val!e in the session, c!rrent val!e can be accessed. #'(. What are the usage of SB70O9;TS ?/alue in a session before accessing ne$t /alue ? SA1"+O03TS are !sed to s!bdivide a transaction into smaller parts. 0t enables rolling bac' part of a transaction. $a%im!m of fve save points are allowed. #'*. What is 4OW98 ?in a session before accessing ne$t /alue ? .O/02 is a pse!do col!mn attached to each row of a table. 0t is EI character long, bloc'no, rown!mber are the components of .O/02. #'-. $plain +onnect by 0rior ?in a session before accessing ne$t /alue ? .etrieves rows in hierarchical order.e.g. select empno, ename from emp where. #(.. >o" many 5O;: columns are allo"ed in a table ? 9s it possible to use 5O;: columns in W>4 clause or O484 1Y ? Only one LO3= col!mns is allowed. 0t is not possible to !se LO3= col!mn in /5"." or O.2". ,# cla!se. Page 78 of 153 #(1. What is 4eferential 9ntegrity ? $aintaining data integrity thro!gh a set of r!les that restrict the val!es of one or more col!mns of the tables based on the val!es of primary 'ey or !ni&!e 'ey of the referenced table. #(2. What is a )oin ? $plain the di,erent types of )oins ? Toin is a &!ery which retrieves related col!mns or rows from m!ltiple tables.Self Toin - Toining the table with itself."&!i Toin - Toining two tables by e&!ating two common col!mns.3on-"&!i Toin - Toining two tables by e&!ating two common col!mns.O!ter Toin - Toining two tables in s!ch a way that &!ery can also retrieve rows that do not have corresponding join val!e in the other table. #(3. 9f an uni=ue 2ey 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 81B se the following command se&!ence to stop and start the O$S (Oracle $anagement Server*A oemctl start oms oemctl stat!s oms sysman?oem<temp oemctl stop oms sysman?oem<temp /indows 3T?GDDD !sers can j!st stop and start the re&!ired services. The defa!lt O"$ administrator is 7sysman7 with a password of 7oem<temp7. 3OT"A se command oemctrl instead of oemctl for Oracle Ii and below. #(#. What is an 9ntegrity +onstraint ? 0ntegrity constraint is a r!le that restricts val!es to a col!mn in a table. #('. >o" does one create a repository? Ffor 81B Bor O"$ vG and above, start the Oracle "nterprise $anager )onfg!ration Assistant (emca on ni%* to create and confg!re the management server and repository. .emember to set!p a bac'!p for the repository database after creating it. #((. 9f a 7ie" on a single base table is manipulated "ill the changes be reRected on the base table ? 0f changes are made to the tables which are base tables of a view will the changes be reference on the view. #(*. The follo"ing describes means to create a O! 71.$ F/ery oldSSSG repository on Windo"s;TT . )reate a tablespace that wo!ld hold the repository data. A si8e between GDD- GOD $, wo!ld be ideal. Let !s call it 2!mmy<Space. . )reate an Oracle !ser who wo!ld own this repository. Assign 2,A, S3$+Agent, "%p<B!ll<database, 0mp<B!ll<database roles to this !ser. Page 79 of 153 Lets call this !ser 2!mmy<!ser. Assign 2!mmy<Space as the defa!lt tablespace. . )reate an operating system !ser with the same name as the Oracle !sername. 0.e. 2!mmy<ser. Add 'Log on as a batch job' !nder advanced rights in ser manager. . Bire !p "nterprise manager and log in as 2!mmy<ser and enter the password. This wo!ld trigger the creation of the repository. Brom now on, "nterprise manager is ready to accept jobs. #(-. What is a database lin2 ? 2atabase Lin' is a named path thro!gh which a remote database can be accessed. #*.. >o" does one list oneHs databases in the O! +onsole? Ffor 81B Bollow these steps to discover databases and other services from the O"$ )onsoleA E. "ns!re the =LO,AL<2,3A$" parameter is set for all databases in yo!r L0ST"3"..O.A fle (optional*. These names will be listed in the O"$ )onsole. +lease note that names entered are case sensitive. A portion of a listener.ora fleA (S02<2"S) C (=LO,AL<2,3A$" C 2,<name<for<O"$* (S02<3A$" C ... G. Start the Oracle 0ntelligent Agent on the machine yo! want to discover. See section 75ow does one start the Oracle 0ntelligent Agent\7. H. Start the O"$ )onsole, navigate to men! 73avigator? 2iscover 3odes7. The O"$ 2iscovery /i8ard will g!ide yo! thro!gh the process of discovering yo!r databases and other services. #*1. What is +Y+5J;O +Y+5 in a Se=uence ? )#)L" specifes that the se&!ence contin!es to generate val!es after reaching either ma%im!m or minim!m val!e. After pan ascending se&!ence reaches its ma%im!m val!e, it generates its minim!m val!e. After a descending se&!ence reaches its minim!m, it generates its ma%im!m.3O )#)L" specifes that the se&!ence cannot generate more val!es after reaching its ma%im!m or minim!m val!e. #*2. What is correlated sub3=uery ? )orrelated s!b &!ery is a s!b &!ery which has reference to the main &!ery. #*3. What are the data types allo"ed in a table ? )5A.,1A.)5A.G,3$,".,2AT",.A/,LO3= and LO3= .A/. #*4. What is di,erence bet"een +>B4 and 7B4+>B42 ? What is the ma$imum S9E allo"ed for each type ? Page 80 of 153 )5A. pads blan' spaces to the ma%im!m length. 1A.)5A.G does not pad blan' spaces. Bor )5A. it is GOO and GDDD for 1A.)5A.G. #*#. +an a /ie" be updatedJinsertedJdeleted? 9f Yes under "hat conditions ? A 1iew can be !pdated?deleted?inserted if it has only one base table if the 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 bloc2? +O+LAT"<=.O+(f!nction* +O+LAT"<=.O+</0T5<4".#(f!nction* S"T<=.O+<)5A.<)"LL(proced!re* S"T<=.O+)"LL(proced!re* S"T<=.O+<3$,".<)"LL(proced!re* #*(. @se the B88D:4O@0D+O5@!; function to add a column to a record group that "as created at design time? 9G T4@ 99G6B5S 00* BALS" #**. @se the B88D:4O@0D4OW procedure to add a ro" to a static record group? 9G T4@ 99G6B5S 0* BALS" #*-. ma$/alue.s=l Select the ;th >ighest /alue from a table? select level, ma%('col<name'* from my<table where level C 'Xn' connect by prior ('col<name'* K 'col<name'* gro!p by levelF "%ampleA =iven a table called emp with the following col!mnsA -- id n!mber -- name varcharG(GD* -- sal n!mber -- -- Bor the second highest salaryA -- select level, ma%(sal* from emp -- where levelCG -- connect by prior sal K sal -- gro!p by level #-.. 6ind out nth highest salary from emp table? S"L")T 20ST03)T (a.sal* B.O$ "$+ A /5"." X3 C (S"L")T )O3T (20ST03)T (b.sal** B.O$ "$+ , /5"." a.sal^Cb.sal*F Bor "gA- "nter val!e for nA G SAL Page 81 of 153 --------- HJDD #-1. Suppose a customer table is ha/ing di,erent columns li2e customer no% payments.What "ill be the =uery to select top three ma$ payments? S"L")T c!stomer<no, payments from c!stomer )E /5"." H^C(S"L")T )O3T(Q* from c!stomer )G /5"." )E.payment ^C )G.payment* #-2. >o" you "ill a/oid your =uery from using inde$es? S"L")T Q B.O$ emp /here emp<noW' 'CEGHMOF i.e yo! have to concatenate the col!mn name with space within codes in the where condition. S"L")T ?QW BLL(a* Q? ename, emp<no from emp where emp<noCEGHMF i.e !sing 503TS #-3. What utility is used to create a physical bac2up? "ither rman or alter tablespace begin bac'!p will do.. #-4. What are the 1ac2 ground processes in Oracle and "hat are they. This is one of the most fre&!ently as'ed &!estion.There are basically @ +rocesses b!t in a general system we need to mention the frst fve bac'gro!nd processes.They do the ho!se 'eeping activities for the Oracle and are common in any system. The vario!s bac'gro!nd processes in oracle are a* 2ata ,ase /riter(2,/.* AA 2ata ,ase /riter /rites $odifed bloc's from 2atabase b!6er cache to 2ata Biles.This is re&!ired since the data is not written whenever a transaction is commited. b*Log/riter(L=/.* AA Log/riter writes the redo log entries to dis'. .edo Log data is generated in redo log b!6er of S=A. As transaction commits and log b!6er flls, L=/. writes log entries into a online redo log fle. c* System $onitor(S$O3* AA The System $onitor performs instance recovery at instance start!p.This is !sef!l for recovery from system fail!re d*+rocess $onitor(+$O3* AA The +rocess $onitor peforms process recovery when !ser +rocess fails. +mon )lears and Brees reso!rces that process was !sing. e* )hec'+oint():+T* AA At Specifed times, all modifed database b!6ers in S=A are written to data fles by 2,/. at )hec'points and pdating all data fles and control fles of database to indicate the most recent chec'point f*Archieves(A.)5* AA The Archiver copies online redo log fles to archival storal when they are b!sy. g* .ecoveror(.")O* AA The .ecoveror is !sed to resolve the distrib!ted Page 82 of 153 transaction in networ' h* 2ispatcher (2nnn* AA The 2ispatcher is !sef!l in $!lti Threaded Architect!re i* Lc'n AA /e can have !pto ED loc' processes for inter instance loc'ing in parallel s&l. #-#. >o" many types of S=l Statements are there in Oracle There are basically P types of s&l statments.They are a* 2ata 2efnation Lang!age(22L* AA The 22L statments defne and maintain objects and drop objects. b* 2ata $anip!lation Lang!age(2$L* AA The 2$L statments manip!late database data. c* Transaction )ontrol Statements AA $anage change by 2$L d* Session )ontrol AA sed to control the properties of c!rrent session enabling and disabling roles and changing .e.g AA Alter Statements,Set .ole e* System )ontrol Statements AA )hange +roperties of Oracle 0nstance .e.gAA Alter System f* "mbedded S&l AA 0ncorporate 22L,2$L and T.).S in +rogramming Lang!age.e.gAA sing the S&l Statements in lang!ages s!ch as ')', Open,Betch, e%ec!te and close #-'. What is a Transaction in Oracle A transaction is a Logical !nit of wor' that compromises one or more S4L Statements e%ec!ted by a single ser. According to A3S0, a transaction begins with frst e%ec!table statment and ends when it is e%plicitly commited or rolled bac'. #-(. <ey Words @sed in Oracle The :ey words that are !sed in Oracle are AA a* )ommiting AA A transaction is said to be commited when the transaction ma'es permanent changes res!lting from the S4L statements. b* .ollbac' AA A transaction that retracts any of the changes res!lting from S4L statements in Transaction. c* Save+oint AA Bor long transactions that contain many S4L statements, intermediate mar'ers or savepoints are declared. Savepoints can be !sed to divide a transactino into smaller points. d* .olling Borward AA +rocess of applying redo log d!ring recovery is called rolling forward. e* )!rsor AA A c!rsor is a handle ( name or a pointer* for the memory associated with a specifc stament. A c!rsor is basically an area allocated by Oracle for e%ec!ting the S&l Statement. Oracle !ses an implicit c!rsor statement for Single row &!ery and ses "%plcit c!rsor for a m!lti row &!ery. f* System =lobal Area(S=A* AA The S=A is a shared memory region allocated by the Oracle that contains 2ata and control information for one Oracle 0nstance.0t consists of 2atabase ,!6er )ache and .edo log Page 83 of 153 ,!6er. g* +rogram =lobal Area (+=A* AA The +=A is a memory b!6er that contains data and control information for server process. g* 2atabase ,!6er )ache AA 2atabese ,!6er of S=A stores the most recently !sed bloc's of datatbase data.The set of database b!6ers in an instance is called 2atabase ,!6er )ache. h* .edo log ,!6er AA .edo log ,!6er of S=A stores all the redo log entries. i* .edo Log Biles AA .edo log fles are set of fles that protect altered database data in memory that has not been written to 2ata Biles. They are basically !sed for bac'!p when a database crashes. j* +rocess AA A +rocess is a 'thread of control' or mechansim in Operating System that e%ec!tes series of steps. #-*. What are 0rocedure%functions and 0ac2ages +roced!res and f!nctions consist of set of +L?S4L statements that are gro!ped together as a !nit to solve a specifc problem or perform set of related tas's. +roced!res do not .et!rn val!es while B!nctions ret!rn one One 1al!e +ac'ages AA +ac'ages +rovide a method of encaps!lating and storing related proced!res, f!nctions, variables and other +ac'age )ontents #--. What are 8atabase Triggers and Stored 0rocedures 2atabase Triggers AA 2atabase Triggers are +roced!res that are a!tomatically e%ec!ted as a res!lt of insert in, !pdate to, or delete from table. 2atabase triggers have the val!es old and new to denote the old val!e in the table before it is deleted and the new indicated the new val!e that 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 have the trigger as ,efore trigger or After Trigger and at Statement or .ow level. e.gAA operations insert,!pdate ,delete H before ,after HQG A total of P combinatons At 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 the restriction of !sage of EG triggers has been lifted from Oracle J.H Onwards. Stored +roced!res AA Stored +roced!res are +roced!res that are stored in )ompiled form in the database.The advantage of !sing the stored proced!res is that many !sers can !se the same proced!re in compiled and ready to !se format. '... >o" many 9ntegrity 4ules are there and "hat are they There are Three 0ntegrity .!les. They are as follows AA a* "ntity 0ntegrity .!le AA The "ntity 0ntegrity .!le enforces that the +rimary 'ey cannot be 3!ll b* Boreign :ey 0ntegrity .!le AA The B:0. denotes that the relationship between the foreign 'ey and the primary 'ey has to be enforced./hen there is data in )hild Tables the $aster tables cannot be deleted. Page 84 of 153 c* ,!siness 0ntegrity .!les AA The Third 0ntigrity r!le is abo!t the comple% b!siness processes which cannot be implemented by the above G r!les. '.1. What are the 7arious !aster and 8etail 4elation ships. The vario!s $aster and 2etail .elationship are a* 3on0solated AA The $aster cannot be deleted when a child is e%isiting b* 0solated AA The $aster can be deleted when the child is e%isiting c* )ascading AA The child gets deleted when the $aster is deleted. '.2. What are the 7arious 1loc2 +oordination 0roperties The vario!s ,loc' )oordination +roperties are a* 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 detail records !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 81B The following list attempts to describe some %> tables. The list may not be complete or acc!rate, b!t represents an attempt to fg!re o!t what information they contain. One sho!ld generally not write &!eries against these tables as they are internal to Oracle, and Oracle may change them witho!t any prior notifcation. R>:G=T"G :ernel G +hase )ommit =lobal Transaction "ntry Bi%ed Table R>:G=T" :ernel G +hase )ommit =lobal Transaction "ntry Bi%ed Table R>,5 ,!6er headers contain information describing the c!rrent contents of a piece of the b!6er cache R>:),),5 )ache ,!6er )!rrent ,!6er 5eader Bi%ed Table. 0t can predict the potential loss of decreasing the n!mber of database b!6ers. The db<bloc'<lr!<statistics parameter has to be set to tr!e to gather information in this table. R>:)1B5 Bile 5eader Bi%ed Table R>:23)" S=A )ache "ntry Bi%ed Table R>:23ST Se&!ence )ache Statistics Bi%ed Table R>:2R5S 5istogram str!ct!re Bi%ed Table R>:2RST Statistics collection Bi%ed Table R>:=5L One-row s!mmary of L. statistics for the shared pool R>:=L,O2# 2erived from R>:=LO, (col 'glhdnsp C G* R>:=L)LST". 2erived from R>:=LO, (col 'glhdnsp C O* Page 85 of 153 R>:=L032"R 2erived from R>:=LO, (col 'glhdnsp C M* R>:=LL) Latch )lean-!p state for library cache objects Bi%ed Table R>:=L+3 Library cache pin Bi%ed Table R>:=LTA,L" 2erived from R>:=LO, (col 'glhdnsp C E* R>:=LT. Library )ache Translation Table entry Bi%ed Table R>:=LT.0==". 2erived from R>:=LO, (col 'glhdnsp C H* R>:=LRS Library )ache Access Table R>::$$2 Bi%ed table to loo' at what databases are mo!nted and their stat!s R>::S,1 )!rsor )ache ,ind 1ariables R>:S$S+ "ach row represents a piece of memory in the shared pool R>:S423 =lobal database name R>:S4ST "n&!e!e statistics by type R>:S)B )ost f!nction for each :ernel +rofle (join to R>:S+L* R>:S+L .eso!rce Limit for each :ernel +rofle R>:S. .eso!rce sage for each :ernel +rofle (join with R>:S+L* R>:S4ST =ets and waits for di6erent types of en&!e!es R>:TT1S 0ndicate tablespace that has valid save !ndo segments R>:100 0nternal instance parameters set at instance initiali8ation R>:10S Oracle 2ata ,loc' (si8e<t type* variables R>:10T 0nstance internal Sags, variables and parameters that can change d!ring the life of an instance R>:RB+)2S )lient 2e&!e!e Statistics R>:RB+)$S )lient $essages Statistics R>:;2OS .epresent an os role as defned by the operating system R>:;S.O Sec!rity state .oleA List of enabled roles R>L" Loc' "lementA each +)$ loc' that is !sed by the b!6er cache (gc<db<loc's* R>$"SSA="S 2isplays all the di6erent messages that can be sent to the ,ac'gro!nd processes R>3LS<+A.A$"T".S 3LS database parameters Page 86 of 153 5andy R>table &!eries Some handy &!eries based on the R> memory tablesA . Largest L bloc's yo! can write at any given timeA select 'viival write<batch<si8e from %>'vii where 'viitag C ''cbswc'F . See the gets and waits for di6erent types of en&!e!esA select Q from %>'s&st where 's&stget K DF Oracle :ernel S!bsystems Listed below are some of the important s!bsystems in the Oracle 'ernel. This table might help yo! to read those dreaded trace fles and internal messages. Bor e%ample, if yo! see messages li'e this, yo! will at least 'now where they come fromA O+0.0+A nca!ght error MMJ. "rror stac'A :)BA write?open error bloc'CD%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 :T 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=ues The 1ario!s Optimisation techni&!es are a* "%ec!te +lan AA we can see the plan of the &!ery and change it accordingly based on the inde%es b* Optimi8er<hint AA set<item<property('2ept,loc'',O+T0$0;".<503T,'B0.ST<.O/S'*F Page 87 of 153 Select ?QW Birst<.ows Q? 2eptno,2name,Loc,.owid from dept where (2eptno K GO* c* Optimi8e<S&l AA ,y setting the Optimi8e<S&l C 3o, Oracle Borms assigns a single c!rsor for all S4L statements.This slow downs the processing beca!se for evertime the S4L m!st be parsed whenver they are e%ec!ted. fMOr!n mod!le C my<frstform !serid C scott?tiger optimi8e<s&l C 3o d* Optimi8e<Tp AA ,y setting the Optimi8e<TpC 3o, Oracle Borms assigns seperate c!rsor only for each &!ery S"L")T statement. All other S4L statements re!se the c!rsor. fMOr!n mod!le C my<frstform !serid C scott?tiger optimi8e<Tp C 3o '.#. >o" does one change an Oracle userHs pass"ord?Ffor 81B 0ss!e the following S4L commandA ALT". S". ^!sernameK 02"3T0B0"2 ,# ^new<passwordKF Brom OracleI yo! can j!st type 7password7 from S4LQ+l!s, or if yo! need to change another !ser's password, type 7password !ser<name7. Loo' at this e%ampleA S4LK password )hanging password for S)OTT Old passwordA 3ew passwordA .etype new passwordA '.'. >o" does one create and drop database users? Loo' at these e%amplesA )."AT" S". scott 02"3T0B0"2 ,# tiger -- Assign password 2"BALT TA,L"SA)" tools -- Assign space for table and inde% segments T"$+O.A.# TA,L"S+A)" tempF -- Assign sort space 2.O+ S". scott )AS)A2"F -- .emove !ser After creating a new !ser, assign the re&!ired privilegesA =.A3T )O33")T, ."SO.)" TO scottF =.A3T 2,A TO scottF -- $a'e !ser a 2, Administrator .emember to give the !ser some space &!ota on its tablespacesA ALT". S". scott 4OTA 3L0$0T"2 O3 toolsF '.(. Who created all these users in my database?J +an 9 drop this user? Ffor 81B Oracle creates a n!mber of defa!lt database !sers or schemas when a new database is created. ,elow are a few of themA S#S?)5A3="<O3<03STALL or 03T".3AL Oracle 2ata 2ictionary? )atalog )reated byA \?rdbms?admin?s&l.bs& and vario!s catQ.s&l scripts )an password be changedA #es (2o so right after the database was created* )an !ser be droppedA 3O Page 88 of 153 S#ST"$?$A3A=". The defa!lt 2,A !ser name (please do not !se S#S* )reated byA \?rdbms?admin?s&l.bs& )an password be changedA #es (2o so right after the database was created* )an !ser be droppedA 3O OTL3?OTL3 Stored o!tlines for optimi8er plan stability )reated byA \?rdbms?admin?s&l.bs& )an password be changedA #es (2o so right after the database was created* )an !ser be droppedA 3O S)OTT?T0="., A2A$S?/OO2, TO3"S?ST""L, )LA.:?)LOT5 and ,LA:"?+A+".. Training? demonstration !sers containing the pop!lar "$+ and 2"+T tables )reated byA \?rdbms?admin?!tlsampl.s&l )an password be changedA #es )an !ser be droppedA #"S - 2rop !sers cascade from all prod!ction environments 5.?5. (5!man .eso!rces*, O"?O" (Order "ntry*, S5?S5 (Sales 5istory*. Training? demonstration !sers containing the pop!lar "$+LO#""S and 2"+A.T$"3TS tables )reated byA \?demo?schema?m'sample.s&l )an password be changedA #es )an !ser be droppedA #"S - 2rop !sers cascade from all prod!ction environments )TRS#S?)TRS#S Oracle inter$edia ()onTe%t )artridge* administrator !ser )reated byA \?ct%?admin?drDcsys.s&l T.A)"S1.?T.A)" Oracle Trace server )reated byA \?rdbms?admin?otrcsvr.s&l 2,S3$+?2,S3$+ Oracle 0ntelligent agent )reated byA \?rdbms?admin?catsnmp.s&l, called from catalog.s&l )an password be changedA #es - p!t the new password in snmp<rw.ora fle )an !ser be droppedA #"S - Only if yo! do not !se the 0ntelligent Agents O.2+L=03S?O.2+L=03S Object .elational 2ata (O.2* ser !sed by Time Series, etc. )reated byA \?ord?admin?ordinst.s&l O.2S#S?O.2S#S Object .elational 2ata (O.2* ser !sed by Time Series, etc )reated byA \?ord?admin?ordinst.s&l 2SS#S?2SS#S Oracle 2ynamic Services and Syndication Server Page 89 of 153 )reated byA \?ds?s&l?dssys<init.s&l $2S#S?$2S#S Oracle Spatial administrator !ser )reated byA \?ord?admin?ordinst.s&l A.O.A>O.,>3AT5"3T0)AT"2?031AL02 sed for !sers who do not a!thenticate in A!rora?O., )reated byA \?javavm?install?init<orb.s&l called from \?javavm?install?initjvm.s&l +".BSTAT?+".BSTAT Oracle Statistics +ac'age (STATS+A):* that s!persedes TL,STAT?TL"STAT )reated byA \?rdbms?admin?statscre.s&l .emember to change the passwords for the S#S and S#ST"$ !sers immediately after installationY "%cept for the !ser S#S, there sho!ld be no problem altering these !sers to !se a di6erent defa!lt and temporary tablespace. '.*. >o" does one enforce strict pass"ord control? Ffor 81B ,y defa!lt Oracle's sec!rity is not e%tremely good. Bor e%ample, Oracle will allow !sers to choose single character passwords and passwords that match their names and !serids. Also, passwords don't ever e%pire. This means that one can hac' an acco!nt for years witho!t ever loc'ing the !ser. Brom OracleI one can manage passwords thro!gh profles. Some of the things that one can restrictA . BA0L"2<LO=03<ATT"$+TS - failed login attempts before the acco!nt is loc'ed . +ASS/O.2<L0B"<T0$" - limits the n!mber of days the same password can be !sed for a!thentication . +ASS/O.2<."S"<T0$" - n!mber of days before a password can be re!sed . +ASS/O.2<."S"<$AR - n!mber of password changes re&!ired before the c!rrent password can be re!sed . +ASS/O.2<LO):<T0$" - n!mber of days an acco!nt will be loc'ed after ma%im!m failed login attempts . +ASS/O.2<=.A)"<T0$" - n!mber of days after the grace period begins d!ring which a warning is iss!ed and login is allowed . +ASS/O.2<1".0B#<B3)T0O3 - password comple%ity verifcation script Loo' at this simple e%ampleA )."AT" +.OB0L" my<profle L0$0T +ASS/O.2<L0B"<T0$" HDF ALT". S". scott +.OB0L" my<profleF '.-. >o" does one s"itch to another user in Oracle? Ffor 81B sers normally !se the 7connect7 statement to connect from one database !ser to another. 5owever, 2,As can switch from one !ser to another witho!t a password. Of co!rse it is not advisable to bridge Page 90 of 153 Oracle's sec!rity, b!t loo' at this e%ampleA S4LK select password from dba<!sers where !sernameC'S)OTT'F +ASS/O.2 BI@MIMM)HMMDG,PJ S4LK alter !ser scott identifed by lionF ser altered. S4LK connect scott?lion )onnected. ."$ 2o whatever yo! li'e... S4LK connect system?manager )onnected. S4LK alter !ser scott identifed by val!es 'BI@MIMM)HMMDG,PJ'F ser altered. S4LK connect scott?tiger )onnected. 3oteA Also see the s!.s&l script in the sef!l Scripts and Sample +rograms +age. '1.. What are snap shots and /ie"s Snapshots are mirror or replicas of tables. 1iews are b!ilt !sing the col!mns from one or more tables. The Single Table 1iew can be !pdated b!t the view with m!lti table cannot be !pdated '11. What are the OO0S concepts in Oracle. Oracle does implement the OO+S concepts. The best e%ample is the +roperty )lasses. /e can categorise the properties by setting the vis!al attrib!tes and then attach the property classes for the objects. OO+S s!pports the concepts of objects and classes and we can consider the peroperty classes as classes and the items as objects '12. What is the di,erence bet"een candidate 2ey% uni=ue 2ey and primary 2ey )andidate 'eys are the col!mns in the table that co!ld be the primary 'eys and the primary 'ey is the 'ey that has been selected to identify the rows. ni&!e 'ey is also !sef!l for identifying the distinct rows in the table.* '13. What is concurrency )!nc!rrency is allowing sim!ltaneo!s access of same data by di6erent !sers. Loc's !sef!l for accesing the database are a* "%cl!sive The e%cl!sive loc' is !sef!l for loc'ing the row when an insert,!pdate or delete is being done.This loc' sho!ld not be applied when we do only select from the row. b* Share loc' Page 91 of 153 /e can do the table as Share<Loc' as many share<loc's can be p!t on the same reso!rce. '14. 0re/ileges and :rants +revileges are the right to e%ec!te a partic!lare type of S4L statements. e.g AA .ight to )onnect, .ight to create, .ight to reso!rce =rants are given to the objects so that the object might be accessed accordingly.The grant has to be given by the owner of the object. '1#. Table Space%8ata 6iles%0arameter 6ile% +ontrol 6iles Table Space AA The table space is !sef!l for storing the data in the database./hen a database is created two table spaces are created. a* System Table space AA This data fle stores all the tables related to the system and dba tables b* ser Table space AA This data fle stores all the !ser related tables /e sho!ld have seperate table spaces for storing the tables and inde%es so that the access is fast. 2ata Biles AA "very Oracle 2ata ,ase has one or more physical data fles.They store the data for the database."very datafle is associated with only one database.Once the 2ata fle is created the si8e cannot change.To increase the si8e of the database to store more data we have to add data fle. +arameter Biles AA +arameter fle is needed to start an instance.A parameter fle contains the list of instance confg!ration parameters e.g.AA db<bloc'<b!6ers C ODD db<name C O.AJ db<domain C !.s.acme lang )ontrol Biles AA )ontrol fles record the physical str!ct!re of the data fles and redo log fles They contain the 2b name, name and location of dbs, data fles ,redo log fles and time stamp. '1'. 0hysical Storage of the 8ata The fnest level of gran!larity of the data base are the data bloc's. 2ata ,loc' AA One 2ata ,loc' correspond to specifc n!mber of physical database space "%tent AA "%tent is the n!mber of specifc n!mber of contigio!s data bloc's. Segments AA Set of "%tents allocated for "%tents. There are three types of Segments a* 2ata Segment AA 3on )l!stered Table has data segment data of every table is stored in cl!ster data segment b* 0nde% Segment AA "ach 0nde% has inde% segment that stores data c* .oll ,ac' Segment AA Temporarily store '!ndo' information '1(. What are the 0ct 6ree and 0ct @sed +ct Bree is !sed to denote the percentage of the free space that is to be left when creating a table. Similarly +ct sed is !sed to denote the Page 92 of 153 percentage of the !sed space that is to be !sed when creating a table eg.AA +ctfree GD, +ct!sed MD '1*. What is 4o" +haining The data of a row in a table may not be able to ft the same data bloc'.2ata for row is stored in a chain of data bloc's . '1-. What is a 2 0hase +ommit Two +hase commit is !sed in distrib!ted data base systems. This is !sef!l to maintain the integrity of the database so that all the !sers see the same val!es. 0t contains 2$L statements or .emote +roced!ral calls that reference a remote object. There are basically G phases in a G phase commit. a* +repare +hase AA =lobal coordinator as's participants to prepare b* )ommit +hase AA )ommit all participants to coordinator to +repared, .ead only or abort .eply '2.. What is the di,erence bet"een deleting and truncating of tables 2eleting a table will not remove the rows from the table b!t entry is there in the database dictionary and it can be retrieved ,!t tr!ncating a table deletes it completely and it cannot be retrieved. '21. What are mutating tables /hen a table is in state of transition it is said to be m!tating. eg AA 0f a row has been deleted then the table is said to be m!tating and no operations can be done on the table e%cept select. '22. What are +odd 4ules )odd .!les describe the ideal nat!re of a .2,$S. 3o .2,$S satisfes all the EG codd r!les and Oracle Satisfes EE of the EG r!les and is the only .dbms to satisfy the ma%im!m n!mber of r!les. '23. What is ;ormalisation 3ormalisation is the process of organising the tables to remove the red!ndancy.There are mainly O 3ormalisation r!les. a* E 3ormal Borm AA A table is said to be in Est 3ormal Borm when the attrib!tes are atomic b* G 3ormal Borm AA A table is said to be in Gnd 3ormal Borm when all the candidate 'eys are dependant on the primary 'ey c* Hrd 3ormal Borm AA A table is said to be third 3ormal form when it is not dependant transitively '24. What is the 8i,erence bet"een a post =uery and a pre =uery A post &!ery will fre for every row that is fetched b!t the pre &!ery will fre only once. '2#. 8eleting the 8uplicate ro"s in the table Page 93 of 153 /e can delete the d!plicate rows in the table by !sing the .owid '2'. +an @ disable database trigger? >o"? #es. /ith respect to table ALT". TA,L" TA,L" `` 20SA,L" all<trigger aa '2(. What is pseudo columns ? ;ame them? A pse!docol!mn behaves li'e a table col!mn, b!t is not act!ally stored in the table. #o! can select from pse!docol!mns, b!t yo! cannot insert, !pdate, or delete their val!es. This section describes these pse!docol!mnsA Q )..1AL Q 3"RT1AL Q L"1"L Q .O/02 Q .O/3$ '2*. >o" many columns can table ha/e? The n!mber of col!mns in a table can range from E to GOM. '2-. 9s space ac=uired in bloc2s or e$tents ? 0n e%tents . '3.. "hat is clustered inde$? 0n an inde%ed cl!ster, rows are stored together based on their cl!ster 'ey val!es . )an not applied for 5AS5. '31. "hat are the datatypes supported 1y oracle F9;T4;B5G? 1archarG, 3!mber,)har , $LSLA,"L. '32. What are attributes of cursor? VBO32 , V3OTBO32 , V0SO+"3,V.O/)O3T '33. +an you use select in 64O! clause of SA5 select ? #es. '34. Which trigger are created "hen master 3detail rela? master delete property Q 3O3-0SOLAT"2 (defa!lt* a* on chec' delete master b* on clear details c* on pop!late details Q 0SOLAT"2 a* on clear details b* on pop!late details Q )AS)A2" a* per-delete b* on clear details c* on pop!late details Page 94 of 153 '3#. "hich system /ariables can be set by users? S#ST"$.$"SSA="<L"1"L S#ST"$.2AT"<T5."S5OL2 S#ST"$."BB")T01"<2AT" S#ST"$.S++."SS</O.:03= '3'. What are ob)ect group? An object gro!p is a container for a gro!p of objects. #o! defne an object gro!p when yo! want to pac'age related objects so yo! can copy or reference them in another mod!le. '3(. What are referenced ob)ects? .eferencing allows yo! to create objects that inherit their f!nctionality and appearance from other objects. .eferencing an object is similar to copying an object, e%cept that the res!lting reference object maintains a lin' to its so!rce object. A reference object a!tomatically inherits any changes that have been made to the so!rce object when yo! open or regenerate the mod!le that contains the reference object. '3*. +an you store ob)ects in library? .eferencing allows yo! to create objects that inherit their f!nctionality and appearance from other objects. .eferencing an object is similar to copying an object, e%cept that the res!lting reference object maintains a lin' to its so!rce object. A reference object a!tomatically inherits any changes that have been made to the so!rce object when yo! open or regenerate the mod!le that contains the reference object. '3-. 9s forms 4.# ob)ect oriented tool ? "hy? yes , partially. E* +.O+".T# )LASS - inheritance property G* O1".LOA203= A proced!res and f!nctions. '4.. +an you issue 885 in forms? yes, b!t yo! have to !se BO.$S<22L. .eferencing allows yo! to create objects that inherit their f!nctionality and appearance from other objects. .eferencing an object is similar to copying an object, e%cept that the res!lting reference object maintains a lin' to its so!rce object. A reference object a!tomatically inherits any changes that have been made to the so!rce object when yo! open or regenerate the mod!le that contains the reference object. Any string e%pression !p to HG:A - a literal - an e%pression or a variable representing the te%t of a bloc' of dynamically created +L?S4L code - a 2$L statement or - a 22L statement .estrictionsA The statement yo! pass to BO.$S<22L may not contain bind variable Page 95 of 153 references in the string, b!t the val!es of bind variables can be concatenated into the string before passing the res!lt to BO.$S<22L. '41. What is S+@4 property? - 5ides characters that the operator types into the te%t item. This setting is typically !sed for password protection. '42. What are the types of triggers and ho" the se=uence of &ring in te$t item Triggers can be classifed as :ey Triggers, $o!se Triggers ,3avigational Triggers. :ey Triggers AA :ey Triggers are fred as a res!lt of :ey action.e.g AA :ey- ne%t-feld, :ey-!p,:ey-2own $o!se Triggers AA $o!se Triggers are fred as a res!lt of the mo!se navigation.e.g. /hen-mo!se-b!tton-presed,when-mo!se- do!bleclic'ed,etc 3avigational Triggers AA These Triggers are fred as a res!lt of 3avigation. ".g A +ost-Te%t-item,+re-te%t-item. /e also have event triggers li'e when \new-form-instance and when- new-bloc'-instance. /e cannot call restricted proced!res li'e go<to(\my<bloc'.frst<item\* in the 3avigational triggers ,!t can !se them in the :ey-ne%t-item. The 2i6erence between :ey-ne%t and +ost-Te%t is an very important &!estion. The 'ey-ne%t is fred as a res!lt of the 'ey action while the post te%t is fred as a res!lt of the mo!se movement. :ey ne%t will not fre !nless there is a 'ey event. The se&!ence of fring in a te%t item are as follows AA a* pre - te%t b* when new item c* 'ey-ne%t d* when validate e* post te%t '43. +an you store pictures in database? >o"? #es , in long .aw datatype. '44. What are property classes ? +an property classes ha/e trigger? +roperty class inheritance is a powerf!l feat!re that allows yo! to &!ic'ly defne objects that conform to yo!r own interface and f!nctionality standards. +roperty classes also allow yo! to ma'e global changes to applications &!ic'ly. ,y simply changing the defnition of a property class, yo! can change the defnition of all objects that inherit properties from that class. #es . All type of triggers . '4#. 9f you ha/e property class attached to an item and you ha/e same trigger "ritten for the item . Which "ill &re &rst? Page 96 of 153 0tem level trigger fres , 0f item level trigger fres, property level trigger won't fre. Triggers at the lowest level are always given the frst preference. The item level trigger fres frst and then the bloc' and then the Borm level trigger. '4'. What are record groups ? K +an record groups created at run3time? A record gro!p is an internal Oracle Borms data str!ct!re that has a col!mn?row framewor' similar to a database table. 5owever, !nli'e database tables, record gro!ps are separate objects that belong to the form mod!le in which they are defned. A record gro!p can have an !nlimited n!mber of col!mns of type )5A., LO3=, 3$,"., or 2AT" provided that the total n!mber of col!mns does not e%ceed PM:. .ecord gro!p col!mn names cannot e%ceed HD characters. +rogrammatically, record gro!ps can be !sed whenever the f!nctionality o6ered by a two-dimensional array of m!ltiple data types is desirable. T#+"S OB .")O.2 =.O+A 4!ery .ecord =ro!p A &!ery record gro!p is a record gro!p that has an associated S"L")T statement. The col!mns in a &!ery record gro!p derive their defa!lt names, data types, and lengths from the database col!mns referenced in the S"L")T statement. The records in a &!ery record gro!p are the rows retrieved by the &!ery associated with that record gro!p. 3on-&!ery .ecord =ro!p A non-&!ery record gro!p is a gro!p that does not have an associated &!ery, b!t whose str!ct!re and val!es can be modifed programmatically at r!ntime. Static .ecord =ro!p A static record gro!p is not associated with a &!eryF rather, yo! defne its str!ct!re and row val!es at design time, and they remain f%ed at r!ntime. '4(. What are B54T? An AL".T is a modal window that displays a message notifying operator of some application condition. '4*. +an a button ha/e icon and lable at the same time ? -3O '4-. What is mouse na/igate property of button? /hen $o!se 3avigate is Tr!e (the defa!lt*, Oracle Borms performs standard navigation to move the foc!s to the item when the operator activates the item with the mo!se. /hen $o!se 3avigate is set to Balse, Oracle Borms does not perform navigation (and the res!lting validation* to move to the item when an operator activates the item with the mo!se. '#.. What is 6O4!SD!89DW9;8OW? Page 97 of 153 forms r!n inside the $20 application window. This property is !sef!l for calling a form from another one. '#1. What are timers ? "hen "hen3timer3e$pired does not &re? The /hen-Timer-"%pired trigger can not fre d!ring trigger, navigation, or transaction processing. '#2. +an ob)ect group ha/e a bloc2? #es , object gro!p can have bloc' as well as program !nits. '#3. >o" many types of can/ases are there. There are G types of canvases called as )ontent and Stac' )anvas. )ontent canvas is the defa!lt and the one that is !sed mostly for giving the base e6ect. 0ts li'e a plate on which we add items and stac'ed canvas is !sed for giving H dimensional e6ect. '#4. What are user3e$its? 0t invo'es H=L programs. '##. +an you pass /alues to3and3fro from foreign function ? ho" ? #es . #o! obtain a ret!rn val!e from a foreign f!nction by assigning the ret!rn val!e to an Oracle Borms variable or item. $a'e s!re that the Oracle Borms variable or item is the same data type as the ret!rn val!e from the foreign f!nction. After assigning an Oracle Borms variable or item val!e to a +L?S4L variable, pass the +L?S4L variable as a parameter val!e in the +L?S4L interface of the foreign f!nction. The +L?S4L variable that is passed as a parameter m!st be a valid +L?S4L data typeF it m!st also be the appropriate parameter type as defned in the +L?S4L interface. '#'. What is 9B0MT1 structure ? The entries of +ro Q ) and !ser e%its and the form which sim!late the proc or !ser<e%it are stored in 0A+RT, table in d?b. '#(. +an you call W9;3S8< thruoH user e$its? #"S. '#*. 8oes user e$its supports 855 on !SW9;8OWS ? #"S . '#-. What is path setting for 855? $a'e s!re yo! incl!de the name of the 2LL in the BO.$SMO<S"."R0T variable of the O.A)L".030 fle, or rename the 2LL to BMORT,.2LL. 0f yo! rename the 2LL to BMORT,.2LL, replace the e%isting BMORT,.2LL in the O.A/03,03 directory with the new BMORT,.2LL. ''.. >o" is mapping of name of 855 and function done? The dll can be created !sing the 1is!al )WW ? 1is!al ,asic Tools and then the dll is p!t in the path that is defned the registery. Page 98 of 153 ''1. "hat is precompiler? 0t is similar to ) precompiler directives. ''2. +an you connect to non 3 oracle datasource ? >o"? #es . ''3. "hat are 2ey3mode and loc2ing mode properties? le/el ? :ey $ode A Specifes how oracle forms !ni&!ely identifes rows in the database.This is property incl!des for application that will r!n against 3O3-O.A)L" dataso!rces . :ey setting !ni&!e (defa!lt.* dateable n-!pdateable. Loc'ing mode A Specifes when Oracle Borms sho!ld attempt to obtain database loc's on rows that correspond to &!eried records in the form. a* immediate b* delayed ''4. What are sa/epoint mode and cursor mode properties ? le/el? Specifes whether Oracle Borms sho!ld iss!e savepoints d!ring a session. This property is incl!ded primarily for applications that will r!n against non-O.A)L" data so!rces. Bor applications that will r!n against O.A)L", !se the defa!lt setting. )!rsor mode - defne c!rs!r state across transaction Open?close. ''#. +an you replace default form processing ? >o" ? '''. What is transactional trigger property? 0dentifes a bloc' as transactional control bloc'. i.e. non - database bloc' that oracle forms sho!ld manage as transactional bloc'.(3O3- O.A)L" dataso!rce* defa!lt - BALS". ''(. What is O5 automation ? OL" a!tomation allows an OL" server application to e%pose a set of commands and f!nctions that can be invo'ed from an OL" container application. OL" a!tomation provides a way for an OL" container application to !se the feat!res of an OL" server application to manip!late an OL" object from the OL" container environment. (BO.$S<OL"* ''*. What does in/o2e built3in do? This proced!re invo'es a method. Synta%A +.O)"2." OL"G.031O:" (object obj<type, method 1A.)5A.G, Page 99 of 153 list list<type AC D*F +arametersA object 0s an OL"G A!tomation Object. method 0s a method (proced!re* of the OL"G object. list 0s the name of an arg!ment list assigned to the OL"G.)."AT"<A.=L0ST f!nction. ''-. What are O0;D6O4!%+B55D6O4!%;WD6O4!? di,? )ALL<BO.$ A 0t calls the other form. b!t parent remains active, when called form completes the operation , it releases loc' and control goes bac' to the calling form. /hen yo! call a form, Oracle Borms iss!es a savepoint for the called form. 0f the )L"A.<BO.$ f!nction ca!ses a rollbac' when the called form is c!rrent, Oracle Borms rolls bac' !ncommitted changes to this savepoint. O+"3<BO.$ A /hen yo! call a form, Oracle Borms iss!es a savepoint for the called form. 0f the )L"A.<BO.$ f!nction ca!ses a rollbac' when the called form is c!rrent, Oracle Borms rolls bac' !ncommitted changes to this savepoint. 3"/<BO.$ A "%its the c!rrent form and enters the indicated form. The calling form is terminated as the parent form. 0f the calling form had been called by a higher form, Oracle Borms 'eeps the higher call active and treats it as a call to the new form. Oracle Borms releases memory (s!ch as database c!rsors* that the terminated form was !sing. Oracle Borms r!ns the new form with the same .!nform options as the parent form. 0f the parent form was a called form, Oracle Borms r!ns the new form with the same options as the parent form. '(.. What is call form stac2? /hen s!ccessive forms are loaded via the )ALL<BO.$ proced!re, the res!lting mod!le hierarchy is 'nown as the call form stac'. '(1. +an u port applictions across the platforms? ho"? #es we can port applications across platforms.)onsider the form developed in a windows system.The form wo!ld be generated in !ni% system by !sing fMOgen my<form.fmb scott?tiger '(2. What is a /isual attribute? 1is!al attrib!tes are the font, color, and pattern properties that yo! set for form and men! objects that appear in yo!r application's interface. '(3. 8i,. bet"een 7BT and 0roperty +lass? imp 3amed vis!al attrib!tes defne only font, color, and pattern attrib!tesF property classes can contain these and any other properties. #o! can change the appearance of objects at r!ntime by changing the named vis!al attrib!te programmaticallyF property class assignment cannot be changed programmatically. /hen an object is inheriting from both a property class and a named vis!al attrib!te, the named vis!al Page 100 of 153 attrib!te settings ta'e precedence, and any vis!al attrib!te properties in the class are ignored. '(3. Which trigger related to mouse? /hen-$o!se-)lic' /hen-$o!se-2o!ble)lic' /hen-$o!se-2own /hen-$o!se-"nter /hen-$o!se-Leave /hen-$o!se-$ove /hen-$o!se-p '(4. What is +urrent record attribute property? Specifes the named vis!al attrib!te !sed when an item is part of the c!rrent record. )!rrent .ecord Attrib!te is fre&!ently !sed at the bloc' level to display the c!rrent row in a m!lti-record 0f yo! defne an item- level )!rrent .ecord Attrib!te, yo! can display a pre-determined item in a special color when it is part of the c!rrent record, b!t yo! cannot dynamically highlight the c!rrent item, as the inp!t foc!s changes. '(#. +an u change 7BT at run time? #es. #o! can programmatically change an object's named vis!al attrib!te setting to change the font, color, and pattern of the object at r!ntime. '('. +an u set default font in forms? #es. )hange windows registry(regedit*. Set formMO<font to the desired font. <brea' '((. What is 5og S"itch ? The point at which O.A)L" ends writing to one online redo log fle and begins writing to another is called a log switch. '(*. What is On3line 4edo 5og? The On-line .edo Log is a set of tow or more on-line redo fles that record all committed changes made to the database. /henever a transaction is committed, the corresponding redo entries temporarily stores in redo log b!6ers of the S=A are written to an on-line redo log fle by the bac'gro!nd process L=/.. The on-line redo log fles are !sed in cyclical fashion. '(-. Which parameter speci&ed in the 86B@5T STO4B: clause of +4BT TB15S0B+ cannot be altered after creating the tablespace? All the defa!lt storage parameters defned for the tablespace can be changed !sing the ALT". TA,L"S+A)" command. /hen objects are created their 030T0AL and $03"RT"3S val!es cannot be changed. Page 101 of 153 '*.. What are the steps in/ol/ed in 8atabase Startup ? Start an instance, $o!nt the 2atabase and Open the 2atabase. .olling forward to recover data that has not been recorded in data fles, yet has been recorded in the on-line redo log, incl!ding the contents of rollbac' segments. .olling bac' transactions that have been e%plicitly rolled bac' or have not been committed as indicated by the rollbac' segments regenerated in step a. .eleasing any reso!rces (loc's* held by transactions in process at the time of the fail!re. .esolving any pending distrib!ted transactions !ndergoing a two-phase commit at the time of the instance fail!re. '*2. +an 6ull 1ac2up be performed "hen the database is open ? 3o. '*3. What are the di,erent modes of mounting a 8atabase "ith the 0arallel Ser/er ? "%cl!sive $ode 0f the frst instance that mo!nts a database does so in e%cl!sive mode, only that 0nstance can mo!nt the database. +arallel $ode 0f the frst instance that mo!nts a database is started in parallel mode, other instances that are started in parallel mode can also mo!nt the database. '*4. What are the ad/antages of operating a database in B4+>975O: mode o/er operating it in ;O B4+>975O: mode ? )omplete database recovery from dis' fail!re is possible only in A.)501"LO= mode. Online database bac'!p is possible only in A.)501"LO= mode. '*#. What are the steps in/ol/ed in 8atabase Shutdo"n ? )lose the 2atabase, 2ismo!nt the 2atabase and Sh!tdown the 0nstance. '*'. What is Brchi/ed 4edo 5og ? Archived .edo Log consists of .edo Log fles that have archived before being re!sed. '*(. What is 4estricted !ode of 9nstance Startup ? An instance can be started in (or later altered to be in* restricted mode so that when the database is open connections are limited only to those whose !ser acco!nts have been granted the ."ST.0)T"2 S"SS0O3 system privilege. '((. +an u ha/e O5 ob)ects in forms? #es. '(*. +an u ha/e 71M and O+M controls in forms ? #es. Page 102 of 153 '(-. What r the types of "indo"s FWindo" styleG? Specifes whether the window is a 2oc!ment window or a 2ialog window. '*.. What is O5 Bcti/ation style property? Specifes the event that will activate the OL" containing item. '*1. +an u change the mouse pointer ? >o"? #es. Specifes the mo!se c!rsor style. se this property to dynamically change the shape of the c!rsor. '*2. >o" many types of columns are there and "hat are they Borm!la col!mns AA Bor doing mathematical calc!lations and ret!rning one val!e S!mmary )ol!mns AA Bor doing s!mmary calc!lations s!ch as s!mmations etc. +lace holder )ol!mns AA These col!mns are !sef!l for storing the val!e in a variable '*3. +an u ha/e more than one layout in report 0t is possible to have more than one layo!t in a report by !sing the additional layo!t option in the layo!t editor. '*4. +an u run the report "ith out a parameter form #es it is possible to r!n the report witho!t parameter form by setting the +A.A$ val!e to 3!ll '*#. What is the loc2 option in reports layout ,y !sing the loc' option we cannot move the felds in the layo!t editor o!tside the frame. This is !sef!l for maintaining the felds . '*'. What is 6le$ Ble% is the property of moving the related felds together by setting the Se% property on '*(. What are the minimum number of groups re=uired for a matri$ report The minim!m of gro!ps re&!ired for a matri% report are M e ----- '**.. What is a Synonym ? A synonym is an alias for a table, view, se&!ence or program !nit. '*-. What is a Se=uence ? A se&!ence generates a serial list of !ni&!e n!mbers for n!merical col!mns of a database's tables. '-.. What is a Segment ? A segment is a set of e%tents allocated for a certain logical str!ct!re. '-1. What is schema? Page 103 of 153 A schema is collection of database objects of a ser. '-2. 8escribe 4eferential 9ntegrity ? A r!le defned on a col!mn (or set of col!mns* in one table that allows the insert or !pdate of a row only if the val!e for the col!mn or set of col!mns (the dependent val!e* matches a val!e in a col!mn of a related table (the referenced val!e*. 0t also specifes the type of data manip!lation allowed on referenced data and the action to be performed on dependent data as a res!lt of any action on referenced data. '-3. What is >ash +luster ? A row is stored in a hash cl!ster based on the res!lt of applying a hash f!nction to the row's cl!ster 'ey val!e. All rows with the same hash 'ey val!e are stores together on dis'. '-4. What is a 0ri/ate Synonyms ? A +rivate Synonyms can be accessed only by the owner. '-#. What is 8atabase 5in2 ? A database lin' is a named object that describes a 7path7 from one database to another. '-'. What is inde$ cluster? A cl!ster with an inde% on the cl!ster 'ey. '-(.What is hash cluster? A row is stored in a hash cl!ster based on the res!lt of applying a hash f!nction to the row's cl!ster 'ey val!e. All rows with the same hash 'ey val!e are stores together on dis'. '-*.When can hash cluster used? 5ash cl!sters are better choice when a table is often &!eried with e&!ality &!eries. Bor s!ch &!eries the specifed cl!ster 'ey val!e is hashed. The res!lting hash 'ey val!e points directly to the area on dis' that stores the specifed rows. '--.When can hash cluster used? 5ash cl!sters are better choice when a table is often &!eried with e&!ality &!eries. Bor s!ch &!eries the specifed cl!ster 'ey val!e is hashed. The res!lting hash 'ey val!e points directly to the area on dis' that stores the specifed rows. (... What are the types of database lin2s? +rivate database lin', p!blic database lin' X networ' database lin'. (.1. What is pri/ate database lin2? +rivate database lin' is created on behalf of a specifc !ser. A private database lin' can be !sed only when the owner of the lin' specifes a Page 104 of 153 global object name in a S4L statement or in the defnition of the owner's views or proced!res. (.2. What is public database lin2? +!blic database lin' is created for the special !ser gro!p +,L0). A p!blic database lin' can be !sed when any !ser in the associated database specifes a global object name in a S4L statement or object defnition. (.3. What is net"or2 database lin2? 3etwor' database lin' is created and managed by a networ' domain service. A networ' database lin' can be !sed when any !ser of any database in the networ' specifes a global object name in a S4L statement or object defnition. (.4. What is data bloc2? Oracle database's data is stored in data bloc's. One data bloc' corresponds to a specifc n!mber of bytes of physical database space on dis'. (.#. >o" to de&ne data bloc2 si?e? A data bloc' si8e is specifed for each Oracle database when the database is created. A database !sers and allocated free database space in Oracle data bloc's. ,loc' si8e is specifed in init.ora fle and cannot be changed latter. (.'. What is ro" chaining? 0n circ!mstances, all of the data for a row in a table may not be able to ft in the same data bloc'. /hen this occ!rs, the data for the row is stored in a chain of data bloc' (one or more* reserved for that segment. (.(. What is an e$tent? An e%tent is a specifc n!mber of contig!o!s data bloc's, obtained in a single allocation and !sed to store a specifc type of information. (.*. What are the di,erent types of segments? 2ata segment, inde% segment, rollbac' segment and temporary segment. (.-. What is a data segment? "ach non-cl!stered table has a data segment. All of the table's data is stored in the e%tents of its data segment. "ach cl!ster has a data segment. The data of every table in the cl!ster is stored in the cl!ster's data segment. (.-. What is an inde$ segment? "ach inde% has an inde% segment that stores all of its data. Page 105 of 153 (1.. What is rollbac2 segment? A database contains one or more rollbac' segments to temporarily store 7!ndo7 information. (11. What are the uses of rollbac2 segment? To generate read-consistent database information d!ring database recovery and to rollbac' !ncommitted transactions by the !sers. (12. What is a temporary segment? Temporary segments are created by Oracle when a S4L statement needs a temporary wor' area to complete e%ec!tion. /hen the statement fnishes e%ec!tion, the temporary segment e%tents are released to the system for f!t!re !se. (13. What is a data&le? "very Oracle database has one or more physical data fles. A database's data fles contain all the database data. The data of logical database str!ct!res s!ch as tables and inde%es is physically stored in the data fles allocated for a database. (14. What are the characteristics of data &les? A data fle can be associated with only one database. Once created a data fle can't change si8e. One or more data fles form a logical !nit of database storage called a tablespace. (1#. What is a redo log? The set of redo log fles for a database is collectively 'nown as the database redo log. (1'. What is the function of redo log? The primary f!nction of the redo log is to record all changes made to data. (1(. What is the use of redo log information? The information in a redo log fle is !sed only to recover the database from a system or media fail!re prevents database data from being written to a database's data fles. (1*. What does a control &le contains? - 2atabase name - 3ames and locations of a database's fles and redolog fles. - Time stamp of database creation. (1-. What is the use of control &le? /hen an instance of an Oracle database is started, its control fle is !sed to identify the database and redo log fles that m!st be opened for database operation to proceed. 0t is also !sed in database recovery. Page 106 of 153 (2.. 9s it possible to split the print re/ie"er into more than one region? #es (21. 9s it possible to center an ob)ect hori?ontally in a repeating frame that has a /ariable hori?ontal si?e? #es (22. 6or a &eld in a repeating frame% can the source come from the column "hich does not e$ist in the data group "hich forms the base for the frame? #es (23. +an a &eld be used in a report "ithout it appearing in any data group? #es (24. The )oin de&ned by the default data lin2 is an outer )oin yes or no? #es (2#. +an a formula column referred to columns in higher group? #es (2'. +an a formula column be obtained through a select statement? #es (2(. 9s it possible to insert comments into s=l statements return in the data model editor? #es (2*. 9s it possible to disable the parameter from "hile running the report? #es (2-. When a form is in/o2ed "ith callDform% 8oes oracle forms issues a sa/e point? #es (3.. $plain the di,erence bet"een a hot bac2up and a cold bac2up and the bene&ts associated "ith each. A hot bac'!p is basically ta'ing a bac'!p of the database while it is still !p and r!nning and it m!st be in archive log mode. A cold bac'!p is ta'ing a bac'!p of the database while it is sh!t down and does not re&!ire being in archive log mode. The beneft of ta'ing a hot bac'!p is that the database is still available for !se while the bac'!p is occ!rring and yo! can recover the database to any point in time. The beneft of Page 107 of 153 ta'ing a cold bac'!p is that it is typically easier to administer the bac'!p and recovery process. 0n addition, since yo! are ta'ing cold bac'!ps the database does not re&!ire being in archive log mode and th!s there will be a slight performance gain as the database is not c!tting archive logs to dis'. (31. You ha/e )ust had to restore from bac2up and do not ha/e any control &les. >o" "ould you go about bringing up this database? 0 wo!ld create a te%t based bac'!p control fle, stip!lating where on dis' all the data fles where and then iss!e the recover command with the !sing bac'!p control fle cla!se. (32. >o" do you s"itch from an init.ora &le to a sp&le? 0ss!e the create spfle from pfle command. (32. $plain the di,erence bet"een a data bloc2% an e$tent and a segment. A data bloc' is the smallest !nit of logical storage for a database object. As objects grow they ta'e ch!n's of additional storage that are composed of contig!o!s data bloc's. These gro!pings of contig!o!s data bloc's are called e%tents. All the e%tents that an object ta'es when gro!ped together are considered the segment of the database object. (33. :i/e t"o e$amples of ho" you might determine the structure of the table 80T. se the describe command or !se the dbms<metadata.get<ddl pac'age. (34. Where "ould you loo2 for errors from the database engine? 0n the alert log. (3#. +ompare and contrast T4@;+BT and 85T for a table. ,oth the tr!ncate and delete command have the desired o!tcome of getting rid of all the rows in a table. The di6erence between the two is that the tr!ncate command is a 22L operation and j!st moves the high water mar' and prod!ces a now rollbac'. The delete command, on the other hand, is a 2$L operation, which will prod!ce a rollbac' and th!s ta'e longer to complete. (3'. :i/e the reasoning behind using an inde$. Baster access to data bloc's in a table. (3(. :i/e the t"o types of tables in/ol/ed in producing a star schema and the type of data they hold. Page 108 of 153 Bact tables and dimension tables. A fact table contains meas!rements while dimension tables will contain data that will help describe the fact tables. (3*. What type of inde$ should you use on a fact table? A ,itmap inde%. (3-. :i/e t"o e$amples of referential integrity constraints. A primary 'ey and a foreign 'ey. (4.. B table is classi&ed as a parent table and you "ant to drop and re3create it. >o" "ould you do this "ithout a,ecting the children tables? 2isable the foreign 'ey constraint to the parent, drop the table, re- create the table, enable the foreign 'ey constraint. (41. $plain the di,erence bet"een B4+>975O: mode and ;OB4+>975O: mode and the bene&ts and disad/antages to each. A.)501"LO= mode is a mode that yo! can p!t the database in for creating a bac'!p of all transactions that have occ!rred in the database so that yo! can recover to any point in time. 3OA.)501"LO= mode is basically the absence of A.)501"LO= mode and has the disadvantage of not being able to recover to any point in time. 3OA.)501"LO= mode does have the advantage of not having to write transactions to an archive log and th!s increases the performance of the database slightly. (42. What command "ould you use to create a bac2up control &le? Alter database bac'!p control fle to trace. (43. :i/e the stages of instance startup to a usable state "here normal users may access it. STA.T+ 3O$O3T - 0nstance start!p STA.T+ $O3T - The database is mo!nted STA.T+ O+"3 - The database is opened (44. What column di,erentiates the 7I /ie"s to the :7I /ie"s and ho"? The 03ST<02 col!mn which indicates the instance in a .A) environment the information came from. (4#. >o" "ould you go about generating an M05B9; plan? )reate a plan table with !tl%plan.s&l. se the e%plain plan set statement<id C 'tstE' into plan<table for a S4L statement Loo' at the e%plain plan with !tl%plp.s&l or !tl%pls.s&l Page 109 of 153 (4'. >o" "ould you go about increasing the bu,er cache hit ratio? se the b!6er cache advisory over a given wor'load and then &!ery the v>db<cache<advice table. 0f a change was necessary then 0 wo!ld !se the alter system set db<cache<si8e command. (4(. $plain an O4B3.1### #o! get this error when yo! get a snapshot too old within rollbac'. 0t can !s!ally be solved by increasing the !ndo retention or increasing the si8e of rollbac's. #o! sho!ld also loo' at the logic involved in the application getting the error message. (4*. $plain the di,erence bet"een IO4B+5D>O! and IO4B+5D1BS. O.A)L"<,AS" is the root directory for oracle. O.A)L"<5O$" located beneath O.A)L"<,AS" is where the oracle prod!cts reside. (4-. >o" "ould you determine the time ?one under "hich a database "as operating? select 2,T0$";O3" from d!alF (#.. $plain the use of setting :5O1B5D;B!S e=ual to T4@. Setting =LO,AL<3A$"S dictates how yo! might connect to a database. This variable is either T." or BALS" and if it is set to T." it enforces database lin's to have the same name as the remote database to which they are lin'ing. (#1. What command "ould you use to encrypt a 05JSA5 application? /.A+ (#2. $plain the di,erence bet"een a 6@;+T9O;% 04O+8@4 and 0B+<B:. A f!nction and proced!re are the same in that they are intended to be a collection of +L?S4L code that carries a single tas'. /hile a proced!re does not have to ret!rn any val!es to the calling application, a f!nction will ret!rn a single val!e. A pac'age on the other hand is a collection of f!nctions and proced!res that are gro!ped together based on their commonality to a b!siness f!nction or application. (#3. $plain the use of table functions. Table f!nctions are designed to ret!rn a set of rows thro!gh +L?S4L logic b!t are intended to be !sed as a normal table or view in a S4L statement. They are also !sed to pipeline information in an "TL process. (#4. ;ame three ad/isory statistics you can collect. ,!6er )ache Advice, Segment Level Statistics, X Timed Statistics Page 110 of 153 (##. Where in the Oracle directory tree structure are audit traces placed? 0n !ni% >O.A)L"<5O$"?rdbms?a!dit, in /indows the event viewer (#'. $plain materiali?ed /ie"s and ho" they are used. $ateriali8ed views are objects that are red!ced sets of information that have been s!mmari8ed, gro!ped, or aggregated from base tables. They are typically !sed in data wareho!se or decision s!pport systems. (#(. When a user process fails% "hat bac2ground process cleans up after it? +$O3 (#*. What bac2ground process refreshes materiali?ed /ie"s? The Tob 4!e!e +rocesses. (#-. >o" "ould you determine "hat sessions are connected and "hat resources they are "aiting for? se of 1>S"SS0O3 and 1>S"SS0O3</A0T ('.. 8escribe "hat redo logs are. .edo logs are logical and physical str!ct!res that are designed to hold all the changes made to a database and are intended to aid in the recovery of a database. ('1. >o" "ould you force a log s"itch? ALT". S#ST"$ S/0T)5 LO=B0L"F ('2. :i/e t"o methods you could use to determine "hat 885 changes ha/e been made. #o! co!ld !se Logminer or Streams ('3. What does coalescing a tablespace do? )oalescing is only valid for dictionary-managed tablespaces and de- fragments space by combining neighboring free e%tents into large single e%tents. ('4. What is the di,erence bet"een a T!0O4B4Y tablespace and a 04!B;;T tablespace? A temporary tablespace is !sed for temporary objects s!ch as sort str!ct!res while permanent tablespaces are !sed to store those objects meant to be !sed as the tr!e objects of the database. ('#. ;ame a tablespace automatically created "hen you create a database. The S#ST"$ tablespace. (''. When creating a user% "hat permissions must you grant to allo" them to connect to the database? Page 111 of 153 =rant the )O33")T to the !ser. ('(. >o" do you add a data &le to a tablespace ALT". TA,L"S+A)" ^tablespace<nameK A22 2ATAB0L" ^datafle<nameK S0;" ('*. >o" do you resi?e a data &le? ALT". 2ATA,AS" 2ATAB0L" ^datafle<nameK ."S0;" ^new<si8eKF ('-. What /ie" "ould you use to loo2 at the si?e of a data &le? 2,A<2ATA<B0L"S ((.. What /ie" "ould you use to determine free space in a tablespace? 2,A<B.""<S+A)" ((1. >o" "ould you determine "ho has added a ro" to a table? T!rn on fne grain a!diting for the table. ((2. >o" can you rebuild an inde$? ALT". 032"R ^inde%<nameK .",0L2F ((3. $plain "hat partitioning is and "hat its bene&t is. +artitioning is a method of ta'ing large tables and inde%es and splitting them into smaller, more manageable pieces. ((4. You ha/e )ust compiled a 05JSA5 pac2age but got errors% ho" "ould you /ie" the errors? S5O/ "..O.S ((#. >o" can you gather statistics on a table? The A3AL#;" command. (('. >o" can you enable a trace for a session? se the 2,$S<S"SS0O3.S"T<S4L<T.A)" or se ALT". S"SS0O3 S"T S4L<T.A)" C T."F (((. What is the di,erence bet"een the SA5K5oader and 9!0O4T utilities? These two Oracle !tilities are !sed for loading data into the database. The di6erence is that the import !tility relies on the data being prod!ced by another Oracle !tility "R+O.T while the S4LQLoader !tility allows data to be loaded that has been prod!ced by other !tilities from di6erent data so!rces j!st so long as it conforms to AS)00 formatted or delimited fles. Page 112 of 153 ((*. ;ame t"o &les used for net"or2 connection to a database. T3S3A$"S.O.A and S4L3"T.O.A ((-. What is the function of Optimi?er ? The goal of the optimi8er is to choose the most eNcient way to e%ec!te a S4L statement. (*.. What is $ecution 0lan ? The combinations of the steps the optimi8er chooses to e%ec!te a statement is called an e%ec!tion plan. (*1. +an one resi?e tablespaces and data &les? Ffor 81BG One can man!ally increase or decrease the si8e of a datafle from Oracle J.G !sing the command. ALT". 2ATA,AS" 2ATAB0L" 'flenameG' ."S0;" EDD$F ,eca!se yo! can change the si8es of datafles, yo! can add more space to yo!r database witho!t adding more datafles. This is benefcial if yo! are concerned abo!t reaching the ma%im!m n!mber of datafles allowed in yo!r database. $an!ally red!cing the si8es of datafles allows yo! to reclaim !n!sed space in the database. This is !sef!l for correcting errors in estimations of space re&!irements. Also, datafles can be allowed to a!tomatically e%tend if more space is re&!ired. Loo' at the following commandA )."AT" TA,L"S+A)" pcs<data<ts 2ATAB0L" 'cA]ora<apps]pcs]pcsdataE.dbf' S0;" H$ ATO"RT"32 O3 3"RT E$ $ARS0;" 3L0$0T"2 2"BALT STO.A=" (030T0AL EDGMD 3"RT EDGMD $03"RT"3TS E $AR"RT"3TS 3L0$0T"2 +)T03)."AS" D* O3L03" +".$A3"3TF (*2. What is SB7 0O9;T ? Bor long transactions that contain many S4L statements, intermediate mar'ers or savepoints can be declared which can be !sed to divide a transaction into smaller parts. This allows the option of later rolling bac' all wor' performed from the c!rrent point in the transaction to a declared savepoint within the transaction. (*3. What are the /alues that can be speci&ed for O0T9!9E4 !O8 0arameter ? )OST and .L". (*4. +an one rename a tablespace? Ffor 81BG Page 113 of 153 3o, this is listed as "nhancement .e&!est EMIJMG. /or'aro!ndA "%port all of the objects from the tablespace 2rop the tablespace incl!ding contents .ecreate the tablespace 0mport the objects (*#. What is 4@53based approach to optimi?ation ? )hoosing an e%ec!ting planbased on the access paths available and the ran's of these access paths. (*'. What are the /alues that can be speci&ed for O0T9!9E4D:OB5 parameter of the B5T4 SSS9O; +ommand ? G )5OOS",ALL<.O/S,B0.ST<.O/S and .L". (*(. >o" does one create a standby database? Ffor 81BG /hile yo!r prod!ction database is r!nning, ta'e an (image copy* bac'!p and restore it on d!plicate hardware. 3ote that an e%port will not wor'YYY On yo!r standby database, iss!e the following commandsA ALT". 2ATA,AS" )."AT" STA32,# )O3T.OLB0L" AS 'flename'F ALT". 2ATA,AS" $O3T STA32,# 2ATA,AS"F .")O1". STA32,# 2ATA,AS"F On systems prior to Oracle Ii, write a job to copy archived redo log fles from the primary database to the standby system, and apply the redo log fles to the standby database (pipe it*. .emember the database is recovering and will prompt yo! for the ne%t log fle to apply. Oracle Ii onwards provide an 7A!tomated Standby 2atabase7 feat!re, which will send archived, log fles to the remote site via 3"TI, and apply then to the standby database. /hen one needs to activate the standby database, stop the recovery process and activate itA ALT". 2ATA,AS" A)T01AT" STA32,# 2ATA,AS"F (**.>o" does one gi/e de/elopers access to trace &les Fre=uired as input to t2profG? Ffor 81BG The 7alter session set s&l<traceCtr!e7 command generates trace fles in S".<2$+<2"ST that can be !sed by developers as inp!t to t'prof. On ni% the defa!lt fle mas' for these fles are 7rw% r-- ---7. There is an !ndoc!mented 030T.O.A parameter that will allow everyone to read (rw% r-r--* these trace flesA <trace<fles<p!blic C tr!e 0ncl!de this in yo!r 030T.O.A fle and bo!nce yo!r database for it to ta'e e6ect. (*-. What are the responsibilities of a 8atabase Bdministrator ? Page 114 of 153 0nstalling and !pgrading the Oracle Server and application tools. Allocating system storage and planning f!t!re storage re&!irements for the database system. $anaging primary database str!ct!res (tablespaces* $anaging primary objects (table,views,inde%es* "nrolling !sers and maintaining system sec!rity. "ns!ring compliance with Oralce license agreement )ontrolling and monitoring !ser access to the database. $onitoring and optimi8ing the performance of the database. +lanning for bac'!p and recovery of database information. $aintain archived data on tape ,ac'ing !p and restoring the database. )ontacting Oracle )orporation for technical s!pport. (-.. What is a trace &le and ho" is it created ? "ach server and bac'gro!nd process can write an associated trace fle. /hen an internal error is detected by a process or !ser process, it d!mps information abo!t the error to its trace. This can be !sed for t!ning the database. (-1. What are the roles and user accounts created automatically "ith the database? 2,A - role )ontains all database system privileges. S#S !ser acco!nt - The 2,A role will be assigned to this acco!nt. All of the base tables and views for the database's dictionary are store in this schema and are manip!lated only by O.A)L". S#ST"$ !ser acco!nt - 0t has all the system privileges for the database and additional tables and views that display administrative information and internal tables and views !sed by oracle tools are created !sing this !sername. (-2. What are the minimum parameters should e$ist in the parameter &le Finit.oraG ? 2, 3A$" - $!st set to a te%t string of no more than I characters and it will be stored inside the datafles, redo log fles and control fles and control fle while database creation. 2,<2O$A03 - 0t is string that specifes the networ' domain where the database is created. The global database name is identifed by setting these parameters (2,<3A$" X 2,<2O$A03* )O3TO.L B0L"S - List of control flenames of the database. 0f name is not mentioned then defa!lt name will be !sed. 2,<,LO):<,BB".S - To determine the no of b!6ers in the b!6er cache in S=A. +.O)"SS"S - To determine n!mber of operating system processes that can be connected to O.A)L" conc!rrently. The val!e sho!ld be O (bac'gro!nd process* and additional E for each !ser. .OLL,A):<S"=$"3TS - List of rollbac' segments an O.A)L" instance ac&!ires at database start!p. Also optionally L0)"3S"<$AR<S"SS0O3S,L0)"3S"<S"SS0O3</A.303= and L0)"3S"<$AR<S".S. (-3. Why and "hen should 9 bac2up my database? Ffor 81B Page 115 of 153 ,ac'!p and recovery is one of the most important aspects of a 2,As job. 0f yo! lose yo!r company's data, yo! co!ld very well lose yo!r job. 5ardware and software can always be replaced, b!t yo!r data may be irreplaceableY 3ormally one wo!ld sched!le a hierarchy of daily, wee'ly and monthly bac'!ps, however cons!lt with yo!r !sers before deciding on a bac'!p sched!le. ,ac'!p fre&!ency normally depends on the following factorsA . .ate of data change? transaction rate . 2atabase availability? )an yo! sh!tdown for cold bac'!ps\ . )riticality of the data? 1al!e of the data to the company . .ead-only tablespace needs bac'ing !p j!st once right after yo! ma'e it read-only . 0f yo! are r!nning in archivelog mode yo! can bac'!p parts of a database over an e%tended cycle of days . 0f archive logging is enabled one needs to bac'!p archived log fles timeo!sly to prevent database free8es . "tc. )aref!lly plan bac'!p retention periods. "ns!re eno!gh bac'!p media (tapes* are available and that old bac'!ps are e%pired in-time to ma'e media available for new bac'!ps. O6-site va!lting is also highly recommended. Bre&!ently test yo!r ability to recover and doc!ment all possible scenarios. .emember, it's the little things that will get yo!. $ost failed recoveries are a res!lt of organi8ational errors and miscomm!nications. (-4. What strategies are a/ailable for bac2ing3up an Oracle database? Ffor 81B The following methods are valid for bac'ing-!p an Oracle databaseA "%port?0mport - "%ports are 7logical7 database bac'!ps in that they e%tract logical defnitions and data from the database to a fle. )old or O6-line ,ac'!ps - Sh!t the database down and bac'!p !p ALL data, log, and control fles. 5ot or On-line ,ac'!ps - 0f the databases are available and in A.)501"LO= mode, set the tablespaces into bac'!p mode and bac'!p their fles. Also remember to bac'!p the control fles and archived redo log fles. .$A3 ,ac'!ps - /hile the database is o6-line or on-line, !se the 7rman7 !tility to bac'!p the database. 0t is advisable to !se more than one of these methods to bac'!p yo!r database. Bor e%ample, if yo! choose to do on-line database bac'!ps, also cover yo!rself by doing database e%ports. Also test ALL bac'!p and recovery scenarios caref!lly. 0t is better to be save than sorry. .egardless of yo!r strategy, also remember to bac'!p all re&!ired software libraries, parameter fles, password fles, etc. 0f yo!r database is in A.)=01"LO= mode, yo! also need to bac'!p archived log fles. Page 116 of 153 (-#. What is the di,erence bet"een online and oUine bac2ups? Ffor 81B A hot bac'!p is a bac'!p performed while the database is online and available for read?write. "%cept for Oracle e%ports, one can only do on- line bac'!ps when r!nning in A.)501"LO= mode. A cold bac'!p is a bac'!p performed while the database is o6-line and !navailable to its !sers. (-'. What is the di,erence bet"een restoring and reco/ering? Ffor 81B .estoring involves copying bac'!p fles from secondary storage (bac'!p media* to dis'. This can be done to replace damaged fles or to copy?move a database to a new location. .ecovery is the process of applying redo logs to the database to roll it forward. One can roll-forward !ntil a specifc point-in-time (before the disaster occ!rred*, or roll-forward !ntil the last transaction recorded in the log fles. S&lK connect S#S as S#S2,A S&lK .")O1". 2ATA,AS" 3T0L T0$" 'GDDE-DH-DPAEPADDADD' S03= ,A):+ )O3T.OLB0L"F (-(. >o" does one bac2up a database using the e$port utility? Ffor 81B Oracle e%ports are 7logical7 database bac'!ps (not physical* as they e%tract data and logical defnitions from the database into a fle. Other bac'!p strategies normally bac'-!p the physical data fles. One of the advantages of e%ports is that one can selectively re-import tables, however one cannot roll-forward from an restored e%port fle. To completely restore a database from an e%port fle one practically needs to recreate the entire database. Always do f!ll system level e%ports (BLLC#"S*. B!ll e%ports incl!de more information abo!t the database in the e%port fle than !ser level e%ports. (-*. What are the builtDins used the display the 5O7? Show<lov List<val!es (--. >o" do you call other Oracle 0roducts from Oracle 6orms? .!n<prod!ct is a b!ilt-in, sed to invo'e one of the s!pported oracle tools prod!cts and specifes the name of the doc!ment or mod!le to be r!n. 0f the called prod!ct is !navailable at the time of the call, Oracle Borms ret!rns a message to the operator. *... What is the main di,. bet. 4eports 2.. O 4eports 2.#? .eport G.O is object oriented. *.1. What are the 1uilt3ins to display the user3named editor? Page 117 of 153 A !ser named editor can be displayed programmatically with the b!ilt in proced!re S5O/-"20TO., "20T<T"T0T"$ independent of any partic!lar te%t item. *.3. >o" many number of columns a record group can ha/e? A record gro!p can have an !nlimited n!mber of col!mns of type )5A., LO3=, 3$,"., or 2AT" provided that the total n!mber of col!mn does not e%ceed PM:. *.4. What is a Auery 4ecord :roup? A &!ery record gro!p is a record gro!p that has an associated S"L")T statement. The col!mns in a &!ery record gro!p derive their defa!lt names, data types, had lengths from the database col!mns referenced in the S"L")T statement. The records in &!ery record gro!p are the rows retrieved by the &!ery associated with that record gro!p. /hat is a 3on 4!ery .ecord =ro!p\ *.#. What does the term panel refer to "ith regard to pages? A panel is the no. of physical pages needed to print one logical page. *.'. What is a master detail relationship? A master detail relationship is an association between two base table bloc's- a master bloc' and a detail bloc'. The relationship between the bloc's reSects a primary 'ey to foreign 'ey relationship between the tables on which the bloc's are based. *.(.What is a library? A library is a collection of s!bprograms incl!ding !ser named proced!res, f!nctions and pac'ages. *.*. What is an anchoring ob)ect O "hat is its use? What are the /arious sub e/ents a mouse double clic2 e/ent in/ol/es? An anchoring object is a print condition object which !sed to e%plicitly or implicitly anchor other objects to itself. *.-. @se the addDgroupDcolumn function to add a column to record group that "as created at a design time? Balse *1.. What are the /arious sub e/ents a mouse double clic2 e/ent in/ol/es? What are the /arious sub e/ents a mouse double clic2 e/ent in/ol/es? 2o!ble clic'ing the mo!se consists of the mo!se down, mo!se !p, mo!se clic', mo!se down X mo!se !p events. *11. What is the use of brea2 group? What are the /arious sub e/ents a mouse double clic2 e/ent in/ol/es? A brea' gro!p is !sed to display one record for one gro!p ones. /hile m!ltiple related records in other gro!p can be displayed. Page 118 of 153 *12. What tuning indicators can one use? Ffor 81B The following high-level t!ning indicators can be !sed to establish if a database is performing optimally or notA . ,!6er )ache 5it .atio Borm!laA 5it .atio C (Logical .eads - +hysical .eads* ? Logical .eads ActionA 0ncrease 2,<)A)5"<S0;" (2,<,LO):<,BB".S prior to @i* to increase hit ratio . Library )ache 5it .atio ActionA 0ncrease the S5A."2<+OOL<S0;" to increase hit ratio *13. What toolsJutilities does Oracle pro/ide to assist "ith performance tuning? Ffor 81B Oracle provide the following tools? !tilities to assist with performance monitoring and t!ningA . T:+rof . TL,STAT.S4L and TL"STAT.S4L - ,egin and end stats monitoring . Statspac' . Oracle "nterprise $anager - T!ning +ac' *14. What is STBTS0B+< and ho" does one use it? Ffor 81B Statspac' is a set of performance monitoring and reporting !tilities provided by Oracle from OracleIi and above. Statspac' provides improved ,STAT?"STAT f!nctionality, tho!gh the old ,STAT?"STAT scripts are still available. Bor more information abo!t STATS+A):, read the doc!mentation in fle >O.A)L"<5O$"?rdbms?admin?spdoc.t%t. 0nstall Statspac'A cd >O.A)L"<5O$"?rdbms?admin s&lpl!s 7? as sysdba7 bspdrop.s&l -- 0nstall Statspac' - s&lpl!s 7? as sysdba7 bspcreate.s&l-- "nter tablespace names when prompted se Statspac'A s&lpl!s perfstat?perfstat e%ec statspac'.snapF -- Ta'e a performance snapshots e%ec statspac'.snapF o =et a list of snapshots select S3A+<02, S3A+<T0$" from STATS>S3A+S5OTF bspreport.s&l -- "nter two snapshot id's for di6erence report Other Statspac' ScriptsA . spp!rge.s&l - +!rge a range of Snapshot 0d's between the specifed begin and end Snap 0d's . spa!to.s&l - Sched!le a dbms<job to a!tomate the collection of STAT+A): statistics . spcreate.s&l - 0nstalls the STATS+A): !ser, tables and pac'age on a database (.!n as S#S*. . spdrop.s&l - 2einstall STATS+A): from database (.!n as S#S* . spp!rge.s&l - 2elete a range of Snapshot 0d's from the database . spreport.s&l - .eport on di6erences between val!es recorded in two Page 119 of 153 snapshots . sptr!nc.s&l - Tr!ncates all data in Statspac' tables *1#. What are the common 4!B; errors F"ith solutionsG? Ffor 81B Some of the common .$A3 errors areA .$A3-GDGMGA Specifcation does not match any archivelog in the recovery catalog. Add to .$A3 scriptA s&l 'alter system archive log c!rrent'F .$A3-DPDI@A archived log %y8 not fo!nd or o!t of sync with catalog "%ec!te from .$A3A change archivelog all validateF *1'. >o" can you e$ecute the user de&ned triggers in forms 3.. ? "%ec!te Trigger (trigger-name* *1(. What 4BS pac2age procedure does ? "rase removes an indicated global variable. *1*. What is the di,erence bet"een ;B!D9; and +O0Y ? )opy is pac'age proced!re and writes val!es into a feld. 3ame in is a pac'age f!nction and ret!rns the contents of the variable to which yo! apply. *1-. What pac2age procedure is used for calling another form ? )all (".g. )all(formname* *2.. When the form is running in 81@: mode% 9f you "ant to e$amine the /alues of global /ariables and other form /ariables% What pac2age procedure command you "ould use in your trigger te$t ? ,rea'. S#ST"$ 1A.0A,L"S *21. The /alue recorded in system.lastDrecord /ariable is of type a. ;umber b. 1oolean c. +haracter. ? b. ,oolean. *22. What is mean by 0rogram :lobal Brea F0:BG ? 0t is area in memory that is !sed by a Single Oracle ser +rocess. *23. What is hit ratio ? 0t is a meas!re of well the data cache b!6er is handling re&!ests for data. 5it .atio C (Logical .eads - +hysical .eads - 5its $isses*? Logical .eads. Page 120 of 153 *24. >o" do u implement the 9f statement in the Select Statement /e can implement the if statement in the select statement by !sing the 2ecode statement. e.g select 2")O2" ("$+<)AT,'E','Birst','G','Second'3!ll*F 5ere the 3!ll is the else statement where n!ll is done . *2#. >o" many types of $ceptions are there There are G types of e%ceptions. They are a* System "%ceptions e.g. /hen no<data<fo!nd, /hen too<many<rows b* ser 2efned "%ceptions e.g. $y<e%ception e%ception /hen $y<e%ception then *2'. What are the inline and the precompiler directi/es The inline and precompiler directives detect the val!es directly *2(. >o" do you use the same lo/ for 2 columns /e can !se the same lov for G col!mns by passing the ret!rn val!es in global val!es and !sing the global val!es in the code *2*. >o" many minimum groups are re=uired for a matri$ report The minim!m n!mber of gro!ps in matri% report are M *2-. What is the di,erence bet"een static and dynamic lo/ The static lov contains the predetermined val!es while the dynamic lov contains val!es that come at r!n time *3.. >o" does one manage Oracle database users? Ffor 81B Oracle !ser acco!nts can be loc'ed, !nloc'ed, forced to choose new passwords, etc. Bor e%ample, all acco!nts e%cept S#S and S#ST"$ will be loc'ed after creating an Oracle@i2, database !sing the 2, )onfg!ration Assistant (dbca*. 2,A's m!st !nloc' these acco!nts to ma'e them available to !sers. Loo' at these e%amplesA ALT". S". scott A))O3T LO): -- loc' a !ser acco!nt ALT". S". scott A))O3T 3LO):F -- !nloc's a loc'ed !sers acco!nt ALT". S". scott +ASS/O.2 "R+0."F -- Borce !ser to choose a new password *31. >o" does one tune Oracle Wait e/ents? Ffor 81B Some wait events from 1>S"SS0O3</A0T and 1>S#ST"$<"1"3T viewsA "vent 3ameA T!ning .ecommendationA db fle se&!ential T!ne S4L to do less 0?O. $a'e s!re all objects are analy8ed. .edistrib!te 0?O across dis's. Page 121 of 153 read b!6er b!sy waits 0ncrease 2,<)A)5"<S0;" (2,<,LO):<,BB".S prior to @i*? Analy8e contention from S#S.1>,5 log b!6er spaces 0ncrease LO=<,BB". parameter or move log fles to faster dis's *32. What is the di,erence bet"een 816ile Se=uential and Scattered 4eads?Ffor 81B ,oth 7db fle se&!ential read7 and 7db fle scattered read7 events signify time waited for 0?O read re&!ests to complete. Time is reported in EDD's of a second for Oracle Ii releases and below, and EDDD's of a second for Oracle @i and above. $ost people conf!se these events with each other as they thin' of how data is read from dis'. 0nstead they sho!ld thin' of how data is read into the S=A b!6er cache. db fle se&!ential readA A se&!ential read operation reads data into contig!o!s memory (!s!ally a single-bloc' read with pHCE, b!t can be m!ltiple bloc's*. Single bloc' 0?Os are !s!ally the res!lt of !sing inde%es. This event is also !sed for reb!ilding the controlfle and reading datafle headers (+GCE*. 0n general, this event is indicative of dis' contention on inde% reads. db fle scattered readA Similar to db fle se&!ential reads, e%cept that the session is reading m!ltiple data bloc's and scatters them into di6erent discontin!o!s b!6ers in the S=A. This statistic is 3O.$ALL# indicating dis' contention on f!ll table scans. .arely, data from f!ll table scans co!ld be ftted into a contig!o!s b!6er area, these waits wo!ld then show !p as se&!ential reads instead of scattered reads. The following &!ery shows average wait time for se&!ential vers!s scattered readsA prompt 7A1".A=" /A0T T0$" BO. ."A2 ."4"STS7 select a.average<wait 7S"4 ."A27, b.average<wait 7S)AT ."A27 from sys.v<>system<event a, sys.v<>system<event b where a.event C 'db fle se&!ential read' and b.event C 'db fle scattered read'F *33. What is the use of 0B4695 option in M0 command ? 3ame of the parameter fle to be passed for e%port. *34. What is the use of TB15S option in M0 command ? List of tables sho!ld be e%ported.8e* *3#. What is the O0T9!B5 parameter? 0t is !sed to set the optimal length of a rollbac' segment. *3'. >o" does one use O4B81@: from Ser/er !anagerJ SA5K0lus? Ffor 81B Page 122 of 153 "%ec!te the 7O.A2",= 5"L+7 command from svrmgrl or s&lpl!s to obtain a list of valid O.A2",= commands. Loo' at these e%amplesA S4L+LSK ."$ Trace S4L statements with bind variables S4L+LSK oradeb!g setospid EDEGE Oracle pidA @E, ni% process pidA EDEGE, imageA oracleorcl S4L+LSK oradeb!g "1"3T EDDMP trace name conte%t forever, level EG Statement processed. S4L+LSK Y vi ?app?oracle?admin?orcl?bd!mp?ora<EDEGE.trc S4L+LSK ."$ Trace +rocess Statistics S4L+LSK oradeb!g setorapid G ni% process pidA EMHP, imageA ora<pmon<orcl S4L+LSK oradeb!g procstat Statement processed. S4L+LSKK oradeb!g T.A)"B0L"<3A$" ?app?oracle?admin?orcl?bd!mp?pmon<EMHP.trc S4L+LSK ."$ List semaphores and shared memory segments in !se S4L+LSK oradeb!g ipc S4L+LSK ."$ 2!mp "rror Stac' S4L+LSK oradeb!g setospid ^pidK S4L+LSK oradeb!g event immediate trace name errorstac' level H S4L+LSK ."$ 2!mp +arallel Server 2L$ loc's S4L+LSK oradeb!g l'deb!g -a convloc' S4L+LSK oradeb!g l'deb!g -a convres S4L+LSK oradeb!g l'deb!g -r ^reso!rce handleK (i.e D%IDPPdHHI from convres d!mp* *3(. Bre there any undocumented commands in Oracle? Ffor 81B S!re there are, b!t it is hard to fnd them. Loo' at these e%amplesA Brom Server $anager (OracleJ.H and above*A O.A2",= 5"L+ 0t loo's li'e one can change memory locations with the O.A2",= +O:" command. Anyone brave eno!gh to test this one for !s\ +revio!sly this f!nctionality was available with O.A2,R (ls -l >O.A)L"<5O$"?rdbms?lib?oradb%.oF ma'e -f oracle.m' oradb%* S4LQ+l!sA ALT". S"SS0O3 S"T ).."3T<S)5"$A C S#SF *3*. 9f the ma$imum record retrie/ed property of the =uery is set to 1. then a summary /alue "ill be calculated? Only for ED records. *3-. What are the di,erent ob)ects that you cannot copy or reference in ob)ect groups? Objects of di6erent mod!les Another object gro!ps 0ndivid!al bloc' dependent items +rogram !nits. *4.. What is an O5? Page 123 of 153 Object Lin'ing X "mbedding provides yo! with the capability to integrate objects from many $s-/indows applications into a single compo!nd doc!ment creating integrated applications enables yo! to !se the feat!res form . *41. +an a repeating frame be created "ithout a data group as a base? 3o *42. 9s it possible to set a <er condition in a cross product group in matri$ reports? 3o *43. What is O/erloading of procedures ? The Same proced!re name is repeated with parameters of di6erent datatypes and parameters in di6erent positions, varying n!mber of parameters is called overloading of proced!res. e.g. 2,$S<OT+T p!t<line *44. What are the return /alues of functions SA5+O8 and SA544! ? What is 0ragma M+0T9O;D9;9T ? $plain the usage ? S4L)O2" ret!rns the latest code of the error that has occ!rred. S4L"..$ ret!rns the relevant error message of the S4L)O2". *4#. What are the datatypes a a/ailable in 05JSA5 ? Some scalar data types s!ch as 3$,"., 1A.)5A.G, 2AT", )5A., LO3=, ,OOL"A3. Some composite data types s!ch as .")O.2 X TA,L". *4'. What are the t"o parts of a procedure ? +roced!re Specifcation and +roced!re ,ody. *4(. What is the basic structure of 05JSA5 ? +L?S4L !ses bloc' str!ct!re as its basic str!ct!re. Anonymo!s bloc's or nested bloc's can be !sed in +L?S4L. *4-. W>BT 9S 4!B; ? Ffor 81B .ecovery $anager is a tool thatA manages the process of creating bac'!ps and also manages the process of restoring and recovering from them. *#.. W>Y @S 4!B; ? Ffor 81B 3o e%tra costs c0ts available free \.$A3 introd!ced in Oracle I it has become simpler with newer versions and easier than !ser managed bac'!ps \+roper sec!rity \#o! are EDDV s!re yo!r database has been bac'ed !p. Page 124 of 153 \0ts contains detail of the bac'!ps ta'en etc in its central repository Bacility for testing validity of bac'!ps also commands li'e crosschec' to chec' the stat!s of bac'!p. Baster bac'!ps and restores compared to bac'!ps witho!t .$A3 .$A3 is the only bac'!p tool which s!pports incremental bac'!ps. Oracle EDg has got f!rther optimi8ed incremental bac'!p which has res!lted in improvement of performance d!ring bac'!p and recovery time +arallel operations are s!pported ,etter &!erying facility for 'nowing di6erent details of bac'!p 3o e%tra redo generated when bac'!p is ta'en..compared to online bac'!p witho!t .$A3 which res!lts in saving of space in hard dis' .$A3 an intelligent tool $aintains repository of bac'!p metadata .emembers bac'!p set location :nows what need to bac'ed !p :nows what is re&!ired for recovery :nows what bac'!ps are red!ndant @;84STB;89;: T> 4!B; B4+>9T+T@4 An oracle 4!B; comprises of 4!B; M+@TB15 This co!ld be present and fred even thro!gh client side TB4:T 8BTB1BS This is the database which needs to be bac'ed !p . 4+O74Y +BTB5O: .ecovery catalog is optional otherwise bac'!p details are stored in target database controlfle . 0t is a repository of information &!eried and !pdated by .ecovery $anager 0t is a schema or !ser stored in Oracle database. One schema can s!pport many databases 0t contains information abo!t physical schema of target database datafle and archive log ,bac'!p sets and pieces .ecovery catalog is a m!st in following scenarios . 0n order to store scripts . Bor tablespace point in time recovery $edia $anagement Software $edia $anagement software is a m!st if yo! are !sing .$A3 for storing bac'!p in tape drive directly. ,ac'!ps in 4!B; Oracle bac'!ps in 4!B; are of the following type .$A3 complete bac'!p O. 4!B; incremental bac'!p Page 125 of 153 These bac'!ps are of 4!B; proprietary nat!re 9!B: +O0Y The advantage of !ing 0mage copy is its not in .$A3 proprietary format.. ,ac'!p Bormat .$A3 bac'!p is not in oracle format b!t in .$A3 format. Oracle bac'!p comprises of bac'!p sets and it consists of bac'!p pieces. ,ac'!p sets are logical entity 0n oracle @i it gets stored in a defa!lt location There are two type of bac'!p sets 2atafle bac'!p sets, Archivelog bac'!p sets One more important point of data fle bac'!p sets is it do not incl!de empty bloc's. A bac'!p set wo!ld contain many bac'!p pieces. A single bac'!p piece consists of physical fles which are in .$A3 proprietary format. "%ample of ta'ing bac'!p !sing .$A3 Ta'ing .$A3 ,ac'!p 0n non archive mode in dos prompt type .$A3 #o! get the .$A3 prompt .$A3 K )onnect Target )onnect to target database A $agic !sing target database controlfle instead of recovery catalog Lets ta'e a simple bac'!p of database in non archive mode sh!tdown immediate F - - Sh!tdowns the database start!p mo!nt bac'!p database F- its start bac'ing the database alter database openF /e can fre the same command in archive log mode And whole of datafles will be bac'ed ,ac'!p database pl!s archivelogF .estoring database .estoring database has been made very simple in @i . 0t is j!st .estore database.. .$A3 has become intelligent to identify which datafles has to be restored and the location of bac'!ped !p fle. Oracle "nhancement for .$A3 in ED = Blash .ecovery Area .ight now the price of hard dis' is falling. $any dba are ta'ing oracle database bac'!p inside the hard dis' itself since it res!lts in lesser Page 126 of 153 mean time between recoverability. The new parameter introd!ced is 2,<.")O1".#<B0L"<2"ST C ?oracle?Sash<recovery<area ,y confg!ring the .$A3 ."T"3T0O3 +OL0)# the Sash recovery area will a!tomatically delete obsolete bac'!ps and archive logs that are no longer re&!ired based on that confg!ration Oracle has introd!ced new feat!res in incremental bac'!p )hange Trac'ing Bile Oracle EDg has the facility to deliver faster incrementals with the implementation of changed trac'ing fle feat!re.This will res!lts in faster bac'!ps lesser space cons!mption and also red!ces the time needed for daily bac'!ps 0ncrementally pdated ,ac'!ps Oracle database EDg 0ncrementally pdates ,ac'!p feat!res merges the image copy of a datafle with .$A3 incremental bac'!p. The res!lting image copy is now !pdated with bloc' changes capt!red by incremental bac'!ps.The merging of the image copy and incremental bac'!p is initiated with .$A3 recover command. This res!lts in faster recovery. ,inary compression techni&!e red!ces bac'!p space !sage by OD- JOV. /ith the new 2.AT0O3 option for the .$A3 ,A):+ command, 2,As can weigh bac'!p performance against system service level re&!irements. ,y specifying a d!ration, .$A3 will a!tomatically calc!late the appropriate bac'!p rateF in addition, 2,As can optionally specify whether bac'!ps sho!ld minimi8e time or system load. 3ew Beat!res in Oem to identify .$A3 related bac'!p li'e bac'!p pieces, bac'!p sets and image copy Oracle @i 3ew feat!res +ersistent .$A3 )onfg!ration A new confg!re command has been introd!ced in Oracle @i , that lets yo! confg!re vario!s feat!res incl!ding a!tomatic channels, parallelism ,bac'!p options, etc. These a!tomatic allocations and options can be overridden by commands in a .$A3 command fle. )ontrolfle A!to bac'!ps Thro!gh this new feat!re .$A3 will a!tomatically perform a controlfle a!to bac'!p. after every bac'!p or copy command. ,loc' $edia .ecovery 0f we can restore a few bloc's rather than an entire fle we only need few bloc's. Page 127 of 153 /e even dont need to bring the data fle o_ine. Synta% for it as follows ,loc' .ecover datafle I bloc' GGF )onfg!re ,ac'!p Optimi8ation +rior to @i whenever we bac'ed !p database !sing .$A3 o!r bac'!p also !sed ta'e bac'!p of read only table spaces which had already been bac'ed !p and also the same with archive log too. 3ow with @i bac'!p optimi8ation parameter we can prevent repeat bac'!p of read only tablespace and archive log. The command for this is as follows )onfg!re bac'!p optimi8ation on Archive Log failover 0f .$A3 cannot read a bloc' in an archived log from a destination. .$A3 a!tomatically attempts to read from an alternate location this is called as archive log failover There are additional commands li'e bac'!p database not bac'ed !p since time 'HE-jan-GDDG EMADDADD' 2o not bac'!p previo!sly bac'ed !p fles (say a previo!s bac'!p failed and yo! want to restart from where it left o6*. Similar synta% is s!pported for restores bac'!p device sbt bac'!p set all )opy a dis' bac'!p to tape (bac'ing !p a bac'!p Additionally it s!pports . ,ac'!p of server parameter fle . +arallel operation s!pported . "%tensive reporting available . Scripting . 2!ple% bac'!p sets . )orr!pt bloc' detection . ,ac'!p archive logs +itfalls of !sing .$A3 +revio!s to version Oracle @i bac'!ps were not that easy which means yo! had to allocate a channel comp!lsorily to ta'e bac'!p #o! had to give a r!n etc . The synta% was a bit comple% c.$A3 has now become very simple and easy to !se.. 0f yo! changed the location of bac'!p set it is comp!lsory for yo! to register it !sing .$A3 or while yo! are trying to restore bac'!p 0t res!lted in hanging sit!ations There is no method to 'now whether d!ring recovery database restore is going to fail beca!se of missing archive log fle. )omp!lsory $edia $anagement only if !sing tape bac'!p 0ncremental bac'!ps tho!gh !sed to cons!me less space !sed to be slower since it !sed to read the entire database to fnd the changed bloc's and also They have diNc!lt time streaming the tape device. . Page 128 of 153 )onsiderable improvement has been made in EDg to optimi8e the algorithm to handle changed bloc'. Observation 0ntrod!ced in Oracle I it has become more powerf!l and simpler with newer version of Oracle @ and ED g. So if yo! really don't want to miss something critical please start !sing .$A3. *#1. $plain @;9O;%!9;@S%@;9O; B55% 9;T4S+T ? 03T".S")T ret!rns all distinct rows selected by both &!eries.$03S - ret!rns all distinct rows selected by the frst &!ery b!t not by the second.30O3 - ret!rns all distinct rows selected by either &!ery30O3 ALL - ret!rns all rows selected by either &!ery, incl!ding all d!plicates. *#2. Should the O! +onsole be displayed at all times F"hen there are scheduled )obsG? Ffor 81B /hen a job is s!bmitted the agent will confrm the stat!s of the job. /hen the stat!s shows !p as sched!led, yo! can close down the O"$ console. The processing of the job is managed by the O0A (Oracle 0ntelligent Agent*. The O0A maintains a .jo! fle in the agent's s!bdirectory. /hen the console is la!nched comm!nication with the Agent is established and the contents of the .jo! fle (binary* are reported to the console job s!bsystem. 3ote that O"$ will not be able to send e-mail and paging notifcations when the )onsole is not started. *#3. 8i,erence bet"een S@1ST4 and 9;ST4 ? 03ST. (StringE,StringG(n,(m**,03ST. ret!rns the position of the mth occ!rrence of the string G instringE. The search begins from nth position of stringE.S,ST. (StringE n,m*S,ST. ret!rns a character string of si8e m in stringE, starting from nth position of stringE. *#4. What 2ind of )obs can one schedule "ith O!? Ffor 81B O"$ comes with pre-defned jobs li'e "%port, 0mport, r!n OS commands, r!n s&l scripts, S4LQ+l!s commands etc. 0t also gives yo! the Se%ibility of sched!ling c!stom jobs written with the T)L lang!age. *##. What are the pre re=uisites ? 0. to modify data type of a col!mn \ ii. to add a col!mn with 3OT 3LL constraint \ To $odify the datatype of a col!mn the col!mn m!st be empty. to add a col!mn with 3OT 3LL constrain, the table m!st be empty. *#'. >o" does one bac2out e/ents and )obs during maintenance slots? Ffor 81B $anagemnet and data collection activity can be s!spended by imposing a blac'o!t. Loo' at these e%amplesA agentctl start blac'o!t L ,lac'o!t the entrire agent Page 129 of 153 agentctl stop blac'o!t L .es!me normal monitoring and management agentctl start blac'o!t O.)L L ,lac'o!t database O.)L agentctl stop blac'o!t O.)L L .es!me normal monitoring and management agentctl start blac'o!t -s jobs -d DDAGD L ,lac'o!t jobs for GD min!tes *#(. What are the types of SA5 Statement ? 2ata 2efnition Lang!age A )."AT",ALT".,2.O+,T.3)AT",."1O:",3O A20T X )O$$0T. 2ata $anip!lation Lang!ageA 03S".T,+2AT",2"L"T",LO): TA,L","R+LA03 +LA3 X S"L")T.Transactional )ontrolA )O$$0T X .OLL,A):Session )ontrolA ALT".S"SS0O3 X S"T .OL"System )ontrol A ALT". S#ST"$. *#*. What is the Oracle 9ntelligent Bgent? Ffor 81B The Oracle 0ntelligent Agent (O0A* is an a!tonomo!s process that needs to r!n on a remote node in the networ' to ma'e the node O"$ manageable. The Oracle 0ntelligent Agent is responsible forA . 2iscovering targets that can be managed (2atabase Servers, 3etI Listeners, etc.*F . $onitoring of events registered in "nterprise $anagerF and . "%ec!ting tas's associated with jobs s!bmitted to "nterprise $anager. *#-. >o" does one start the Oracle 9ntelligent Bgent? Ffor 81B One needs to start an O0A (Oracle 0ntelligent Agent* process on all machines that will to be managed via O"$. Bor O"$ @i and aboveA agentctl start agent agentctl stop agent Bor O"$ G.E and belowA lsnrctl dbsnmp<start lsnrctl dbsnmp<stat!s On /indows 3T, start the 7OracleAgent7 Service. 0f the agent doesn't want to start, ens!re yo!r environment variables are set correctly and delete the following fles before trying againA E* 0n >O.A)L"<5O$"?networ'?adminA snmp<ro.ora and snmp<rw.ora. G* Also delete ALL fles in >O.A)L"<5O$"?networ'?agent?. )an one write scripts to send alert messages to the console\ Page 130 of 153 Start the O"$ console and create a new event. Select option 7"nable nsolicited "vent7. Select test 7nsolicited "vent7. /hen entering the parameters, enter val!es similar to theseA "vent 3ameA ?oracle?script?myalert ObjectA Q SeverityA Q $essageA Q One can now write the script and invo'e the oemevent command to send alerts to the console. Loo' at this e%ampleA oemevent ?oracle?script?myalert 2"ST03AT0O3 alert 7$y c!stom error message7 where 2"ST03AT0O3 is the same val!e as entered in the 7$onitored 2estinations7 feld when yo!'ve registered the event in the O"$ )onsole. *'.. Where can one get more information about T+5? Ffor 81B One can write c!stom event chec'ing ro!tines for O"$ !sing the T)L (Tool )ommand Lang!age* lang!age. )hec' the following sites for more information abo!t T)LA . The Tcl 2eveloper Rchange - download and learn abo!t T)L . OraT)L at So!rceforge - 2ownload the OraT)L pac'age . Tom +oinde%ter's Tcl +age - Oratcl was originally written by Tom +oinde%ter *'1. Bre there any troubleshooting tips for O!? Ffor 81B . )reate the O"$ repository with a !ser (which will manage the O"$* and store it in a tablespace that does not share any data with other database !sers. 0t is a bad practice to create the repository with S#S and System. . 0f yo! are !nable to la!nch the console or there is a comm!nication problem with the intelligent agent (daemon*. "ns!re O)R fles are registered. Type the following in the 2OS prompt (the c!rrent directory sho!ld be >O.A)L"<5O$"],03A )A]Orawin@O],inK .egSvrHG mmd%HG.O)R )A]Orawin@O],inK .egSvrHG vojt.O)R . 0f yo! have a problem starting the Oracle Agent Sol!tion AA ,ac'!p the Q.4 fles and 2elete all the Q.4 Biles (>Oracle<home?networ'?agent folder* ,ac'!p and delete S3$+<.O.ora, S3$+<./.ora, dbsnmp.ver and services.ora fles (>Oracle<5ome?networ'?admin folder* Start the Oracle Agent service. Sol!tion ,A #o!r version of 0ntelligent Agent co!ld be b!ggy. )hec' with Oracle for any available patches. Bor e%ample, the 0ntelligent Agent that comes with Oracle I.D.M is b!ggy. Sometimes yo! get a Bailed stat!s for the job that was e%ec!ted s!ccessf!lly. )hec' the log to see the res!lts of the e%ec!tion rather than relying on this stat!s. *'2. What is importJe$port and "hy does one need it? Ffor 81B Page 131 of 153 The Oracle e%port ("R+* and import (0$+* !tilities are !sed to perform logical database bac'!p and recovery. They are also !sed to move Oracle data from one machine, database or schema to another. The imp?e%p !tilities !se an Oracle proprietary binary fle format and can th!s only be !sed between Oracle databases. One cannot e%port data and e%pect to import it into a non-Oracle database. Bor more information on how to load and !nload data from fles, read the S4LQLoader BA4. The e%port?import !tilities are also commonly !sed to perform the following tas'sA . ,ac'!p and recovery (small databases only* . .eorgani8ation of data? "liminate database fragmentation . 2etect database corr!ption. "ns!re that all the data can be read. . Transporting tablespaces between databases . "tc. *'3. "hat is a display item? 2isplay items are similar to te%t items b!t store only fetched or assigned val!es. Operators cannot navigate to a display item or edit the val!e it contains. *'(. >o" does one use the importJe$port utilities? Ffor 81B Loo' for the 7imp7 and 7e%p7 e%ec!tables in yo!r >O.A)L"<5O$"?bin directory. One can r!n them interactively, !sing command line parameters, or !sing parameter fles. Loo' at the imp?e%p parameters before starting. These parameters can be listed by e%ec!ting the following commandsA 7e%p helpCyes7 or 7imp helpCyes7. The following e%amples demonstrate how the imp?e%p !tilities can be !sedA e%p scott?tiger fleCemp.dmp logCemp.log tablesCemp rowsCyes inde%esCno e%p scott?tiger fleCemp.dmp tablesC(emp,dept* imp scott?tiger fleCemp.dmp f!llCyes imp scott?tiger fleCemp.dmp from!serCscott to!serCscott tablesCdept e%p !seridCscott?tigerborcl parfleCe%port.t%t ... where e%port.t%t containsA ,BB".CEDDDDD B0L"Cacco!nt.dmp BLLCn O/3".Cscott =.A3TSCy )O$+."SSCy 3OT"A 0f yo! do not li'e command line !tilities, yo! can import and e%port data with the 7Schema $anager7 =0 that ships with Oracle "nterprise $anager (O"$*. *'*. What are the types of /isual attribute settings? Page 132 of 153 )!stom 1is!al attrib!tes 2efa!lt vis!al attrib!tes 3amed 1is!al attrib!tes. /indow *'-. +an one e$port a subset of a table? Ffor 81B Brom OracleIi one can !se the 4".#C e%port parameter to selectively !nload a s!bset of the data from a table. Loo' at this e%ampleA e%p scott?tiger tablesCemp &!eryC]7where deptnoCED]7 *(.. What are the t"o "ays to incorporate images into a oracle forms application? ,oilerplate 0mages 0mage<items *(1. +an one monitor ho" fast a table is imported? Ffor 81B 0f yo! need to monitor how fast rows are imported from a r!nning import job, try one of the following methodsA $ethod EA select s!bstr(s&l<te%t,instr(s&l<te%t,'03TO 7'*,HD* table<name, rows<processed, ro!nd((sysdate-to<date(frst<load<time,'yyyy-mm-dd hhGMAmiAss'**QGMQPD,E* min!tes, tr!nc(rows<processed?((sysdate-to<date(frst<load<time,'yyyy-mm-dd hhGMAmiAss'**QGMQPD** rows<per<min from sys.v<>s&larea where s&l<te%t li'e '03S".T V03TO 7V' and command<type C G and open<versions K DF Bor this to wor' one needs to be on Oracle J.H or higher (J.G might also be O:*. 0f the import has more than one table, this statement will only show information abo!t the c!rrent table being imported. )ontrib!ted by Osvaldo Ancarola, ,s. As. Argentina. $ethod GA se the B""2,A):Cn import parameter. This command will tell 0$+ to display a dot for every 3 rows imported. *(2. +an one import tables to a di,erent tablespace? Ffor 81B Oracle o6ers no parameter to specify a di6erent tablespace to import data into. Objects will be re-created in the tablespace they were originally e%ported from. One can alter this behavio!r by following one of these proced!resA +re-create the table(s* in the correct tablespaceA . 0mport the d!mp fle !sing the 032"RB0L"C option . "dit the inde%fle. .emove remar's and specify the correct tablespaces. . .!n this inde%fle against yo!r database, this will create the re&!ired tables in the appropriate tablespaces . 0mport the table(s* with the 0=3O."C# option. )hange the defa!lt tablespace for the !serA Page 133 of 153 . .evo'e the 73L0$0T"2 TA,L"S+A)"7 privilege from the !ser . .evo'e the !ser's &!ota from the tablespace from where the object was e%ported. This forces the import !tility to create tables in the !ser's defa!lt tablespace. . $a'e the tablespace to which yo! want to import the defa!lt tablespace for the !ser . 0mport the table *(3. What do you mean by a bloc2 in forms4..? ,loc' is a single mechanism for gro!ping related items into a f!nctional !nit for storing, displaying and manip!lating records. *(4. >o" is possible to restrict the user to a list of /alues "hile entering /alues for parameters? ,y setting the .estrict To List property to tr!e in the parameter property sheet. *(#. What is SA5K5oader and "hat is it used for? Ffor 81B S4LQLoader is a b!l' loader !tility !sed for moving data from e%ternal fles into the Oracle database. 0ts synta% is similar to that of the 2,G Load !tility, b!t comes with more options. S4LQLoader s!pports vario!s load formats, selective loading, and m!lti-table loads. *('. >o" does one use the SA5K5oader utility? Ffor 81B One can load data into an Oracle database by !sing the s&lldr (s&lload on some platforms* !tility. 0nvo'e the !tility witho!t arg!ments to get a list of available parameters. Loo' at the following e%ampleA s&lldr scott?tiger controlCloader.ctl This sample control fle (loader.ctl* will load an e%ternal data fle containing delimited dataA load data infle 'cA]data]mydata.csv' into table emp felds terminated by 7,7 optionally enclosed by '7' ( empno, empname, sal, deptno * The mydata.csv fle may loo' li'e thisA EDDDE,7Scott Tiger7, EDDD, MD EDDDG,7Bran' 3a!de7, ODD, GD Another Sample control fle with in-line data formatted as f% length records. The tric' is to specify 7Q7 as the name of the data fle, and !se ,"=032ATA to start the data section in the control fle. load data infle Q replace into table departments ( dept position (DGADO* char(M*, deptname position (DIAGJ* char(GD* * begindata Page 134 of 153 )OS) )O$+T". S)0"3)" "3=L "3=L0S5 L0T".AT." $AT5 $AT5"$AT0)S +OL# +OL0T0)AL S)0"3)" *((. >o" can a cross product be created? ,y selecting the cross prod!cts tool and drawing a new gro!p s!rro!nding the base gro!p of the cross prod!cts. *(*. 9s there a SA5K@nloader to do"nload data to a Rat &le? Ffor 81B Oracle does not s!pply any data !nload !tilities. 5owever, yo! can !se S4LQ+l!s to select and format yo!r data and then spool it to a fleA set echo o6 newpage D space D pagesi8e D feed o6 head o6 trimspool on spool oradata.t%t select colE UU ',' UU colG UU ',' UU colH from tabE where colG C 'R#;'F spool o6 Alternatively !se the TL<B0L" +L?S4L pac'ageA rem .emember to !pdate initS02.ora, !tl<fle<dirC'cA]oradata' parameter declare fp !tl<fle.fle<typeF begin fp AC !tl<fle.fopen('cA]oradata','tabE.t%t','w'*F !tl<fle.p!tf(fp, 'Vs, Vs]n', 'Te%tBield', OO*F !tl<fle.fclose(fp*F endF ? #o! might also want to investigate third party tools li'e S4L/ays from 0spirer Systems, TOA2 from 4!est, or $anage0T Bast nloader from )A to help yo! !nload data from Oracle. *(-. +an one load /ariable and &$ length data records? Ffor 81B #es, loo' at the following control fle e%amples. 0n the frst we will load delimited data (variable length*A LOA2 2ATA 03B0L" Q 03TO TA,L" load<delimited<data B0"L2S T".$03AT"2 ,# 7,7 O+T0O3ALL# "3)LOS"2 ,# '7' T.A0L03= 3LL)OLS ( dataE, dataG * ,"=032ATA Page 135 of 153 EEEEE,AAAAAAAAAA GGGGG,7A,,,),2,7 0f yo! need to load positional data (f%ed length*, loo' at the following control fle e%ampleA LOA2 2ATA 03B0L" Q 03TO TA,L" load<positional<data ( dataE +OS0T0O3(EAO*, dataG +OS0T0O3(PAEO* * ,"=032ATA EEEEEAAAAAAAAAA GGGGG,,,,,,,,,, )an one s'ip header records load while loading\ se the 7S:0+ n7 'eyword, where n C n!mber of logical rows to s'ip. Loo' at this e%ampleA LOA2 2ATA 03B0L" Q 03TO TA,L" load<positional<data S:0+ O ( dataE +OS0T0O3(EAO*, dataG +OS0T0O3(PAEO* * ,"=032ATA EEEEEAAAAAAAAAA GGGGG,,,,,,,,,, **.. +an one modify data as it loads into the database? Ffor 81B 2ata can be modifed as it loads into the Oracle 2atabase. 3ote that this only applies for the conventional load path and not for direct path loads. LOA2 2ATA 03B0L" Q 03TO TA,L" modifed<data ( rec<no 7my<db<se&!ence.ne%tval7, region )O3STA3T 'HE', time<loaded 7to<char(S#S2AT", '55GMA$0'*7, dataE +OS0T0O3(EAO* 7AdataE?EDD7, dataG +OS0T0O3(PAEO* 7!pper(AdataG*7, dataH +OS0T0O3(EPAGG*7to<date(AdataH, '##$$22'*7 * ,"=032ATA EEEEEAAAAAAAAAA@@EGDE GGGGG,,,,,,,,,,@@DEEG LOA2 2ATA 03B0L" 'mail<orders.t%t' ,A2B0L" 'bad<orders.t%t' Page 136 of 153 A++"32 03TO TA,L" mailing<list B0"L2S T".$03AT"2 ,# 7,7 ( addr, city, state, 8ipcode, mailing<addr 7decode(Amailing<addr, n!ll, Aaddr, Amailing<addr*7, mailing<city 7decode(Amailing<city, n!ll, Acity, Amailing<city*7, mailing<state * **1.+an one load data into multiple tables at once? Ffor 81B Loo' at the following control fleA LOA2 2ATA 03B0L" Q ."+LA)" 03TO TA,L" emp /5"3 empno YC ' ' ( empno +OS0T0O3(EAM* 03T"=". "RT".3AL, ename +OS0T0O3(PAEO* )5A., deptno +OS0T0O3(EJAEI* )5A., mgr +OS0T0O3(GDAGH* 03T"=". "RT".3AL * 03TO TA,L" proj /5"3 projno YC ' ' ( projno +OS0T0O3(GOAGJ* 03T"=". "RT".3AL, empno +OS0T0O3(EAM* 03T"=". "RT".3AL * **2. What is the di,erence bet"een boiler plat images and image items? ,oiler plate 0mages are static images ("ither vector or bit map* that yo! import from the fle system or database to !se a graphical elements in yo!r form, s!ch as company logos and maps. 0mage items are special types of interface controls that store and display either vector or bitmap images. Li'e other items that store val!es, image items can be either base table items(items that relate directly to database col!mns* or control items. The defnition of an image item is stored as part of the form mod!le B$, and B$R fles, b!t no image fle is act!ally associated with an image item !ntil the item is pop!late at r!n time. **3. What are the triggers a/ailable in the reports? ,efore report, ,efore form, After form , ,etween page, After report. **4. Why is a Where clause faster than a group <er or a format trigger? ,eca!se, in a where cla!se the condition is applied d!ring data retrievalthan after retrieving the data. Page 137 of 153 **#. +an one selecti/ely load only the records that one need? Ffor 81B Loo' at this e%ample, (DE* is the frst character, (HDAHJ* are characters HD to HJA LOA2 2ATA 03B0L" 'mydata.dat' ,A2B0L" 'mydata.bad' 20S)A.2B0L" 'mydata.dis' A++"32 03TO TA,L" my<selective<table /5"3 (DE* ^K '5' and (DE* ^K 'T' and (HDAHJ* C 'E@@@EGEJ' ( region )O3STA3T 'HE', service<'ey +OS0T0O3(DEAEE* 03T"=". "RT".3AL, call<b<no +OS0T0O3(EGAG@* )5A. * **'. +an one s2ip certain columns "hile loading data? Ffor 81B One cannot !se +OST0O3(%Ay* with delimited data. L!c'ily, from Oracle Ii one can specify B0LL". col!mns. B0LL". col!mns are !sed to s'ip col!mns?felds in the load fle, ignoring felds that one does not want. Loo' at this e%ampleA -- One cannot !se +OST0O3(%Ay* as it is stream data, there are no positional felds-the ne%t feld begins after some delimiter, not in col!mn R. --K LOA2 2ATA T.3)AT" 03TO TA,L" TE B0"L2S T".$03AT"2 ,# ',' ( feldE, feldG B0LL"., feldH * **(. >o" does one load multi3line records? Ffor 81B One can create one logical record from m!ltiple physical records !sing one of the following two cla!sesA . )O3)AT"3AT"A - !se when S4LQLoader sho!ld combine the same n!mber of physical records together to form one logical record. . )O3T03"0B - !se if a condition indicates that m!ltiple records sho!ld be treated as one. "g. by having a 'L' character in col!mn E. **-. >o" can get SA5K5oader to +O!!9T only at the end of the load &le? Ffor 81B One cannot, b!t by setting the .O/SC parameter to a large val!e, committing can be red!ced. $a'e s!re yo! have big rollbac' segments ready when yo! !se a high val!e for .O/SC. *-.. +an one impro/e the performance of SA5K5oader? Ffor 81B Page 138 of 153 A very simple b!t easily overloo'ed hint is not to have any inde%es and?or constraints (primary 'ey* on yo!r load tables d!ring the load process. This will signifcantly slow down load times even with .O/SC set to a high val!e. Add the following option in the command lineA 20.")TCT.". This will e6ectively bypass most of the .2,$S processing. 5owever, there are cases when yo! can't !se direct load. .efer to chapter I on Oracle server tilities man!al. T!rn o6 database logging by specifying the 3.")O1".A,L" option. This option can only be !sed with direct data loads. .!n m!ltiple load jobs conc!rrently. *-1. >o" does one use SA5K5oader to load images% sound clips and documents? Ffor 81B S4LQLoader can load data from a 7primary data fle7, S2B (Secondary 2ata fle - for loading nested tables and 1A..A#s* or LO=B0L". The LO,B0L" method provides and easy way to load doc!ments, images and a!dio clips into ,LO, and )LO, col!mns. Loo' at this e%ampleA =iven the following tableA )."AT" TA,L" image<table ( image<id 3$,".(O*, fle<name 1A.)5A.G(HD*, image<data ,LO,*F )ontrol BileA LOA2 2ATA 03B0L" Q 03TO TA,L" image<table ."+LA)" B0"L2S T".$03AT"2 ,# ',' ( image<id 03T"=".(O*, fle<name )5A.(HD*, image<data LO,B0L" (fle<name* T".$03AT"2 ,# "OB * ,"=032ATA DDE,imageE.gif DDG,imageG.jpg *-2. What is the di,erence bet"een the con/entional and direct path loader? Ffor 81B The conventional path loader essentially loads the data by !sing standard 03S".T statements. The direct path loader (20.")TCT."* bypasses m!ch of the logic involved with that, and loads directly into the Oracle data fles. $ore information abo!t the restrictions of direct path loading can be obtained from the tilities sers =!ide. :;4B5 9;T479W A@ST9O;S F1G 1.What are the /arious types of $ceptions ? ser defned and +redefned "%ceptions. Page 139 of 153 2.+an "e de&ne e$ceptions t"ice in same bloc2 ? 3o. 3.What is the di,erence bet"een a procedure and a function ? B!nctions ret!rn a single variable by val!e whereas proced!res do not ret!rn any variable by val!e. .ather they ret!rn m!ltiple variables by passing variables by reference thro!gh their OT parameter. 4.+an you ha/e t"o functions "ith the same name in a 05JSA5 bloc2 ? #es. #.+an you ha/e t"o stored functions "ith the same name ? #es. '.+an you call a stored function in the constraint of a table ? 3o. (.What are the /arious types of parameter modes in a procedure ? 03, OT A32 03OT. *.What is O/er 5oading and "hat are its restrictions ? OverLoading means an object performing di6erent f!nctions depending !pon the no. of parameters or the data type of the parameters passed to it. -.+an functions be o/erloaded ? #es. 1..+an 2 functions ha/e same name O input parameters but di,er only by return datatype 3o. 11.What are the constructs of a procedure% function or a pac2age ? The constr!cts of a proced!re, f!nction or a pac'age are A variables and constants c!rsors e%ceptions 12.Why +reate or 4eplace and not 8rop and recreate procedures ? So that =rants are not dropped. 13.+an you pass parameters in pac2ages ? >o" ? #es. #o! can pass parameters to proced!res or f!nctions in a pac'age. Page 140 of 153 14.What are the parts of a database trigger ? The parts of a trigger areA A triggering event or statement A trigger restriction A trigger action 1#.What are the /arious types of database triggers ? There are EG types of triggers, they are combination of A 0nsert, 2elete and pdate Triggers. ,efore and After Triggers. .ow and Statement Triggers. (HQGQGCEG* 1'.What is the ad/antage of a stored procedure o/er a database trigger ? /e have control over the fring of a stored proced!re b!t we have no control over the fring of a trigger. 1(.What is the ma$imum no. of statements that can be speci&ed in a trigger statement ? One. 1*.+an /ie"s be speci&ed in a trigger statement ? 3o 1-.What are the /alues of Tne" and Told in 9nsertJ8eleteJ@pdate Triggers ? 03S".T A new C new val!e, old C 3LL 2"L"T" A new C 3LL, old C old val!e +2AT" A new C new val!e, old C old val!e 2..What are cascading triggers? What is the ma$imum no of cascading triggers at a time? /hen a statement in a trigger body ca!ses another trigger to be fred, the triggers are said to be cascading. $a% C HG. 21.What are mutating triggers ? A trigger giving a S"L")T on the table on which the trigger is written. 22.What are constraining triggers ? A trigger giving an 0nsert?pdat e on a table having referential integrity constraint on the triggering table. 23.8escribe Oracle databaseHs physical and logical structure ? +hysical A 2ata fles, .edo Log fles, )ontrol fle. Logical A Tables, 1iews, Tablespaces, etc. 24.+an you increase the si?e of a tablespace ? >o" ? Page 141 of 153 #es, by adding datafles to it. 2'.What is the use of +ontrol &les ? )ontains pointers to locations of vario!s data fles, redo log fles, etc. 2(.What is the use of 8ata 8ictionary ? sed by Oracle to store information abo!t vario!s physical and logical Oracle str!ct!res e.g. Tables, Tablespaces, datafles, etc 2*.What are the ad/antages of clusters ? Access time red!ced for joins. 2-.What are the disad/antages of clusters ? The time for 0nsert increases. 3..+an 5ongJ5ong 4BW be clustered ? 3o. 31.+an null 2eys be entered in cluster inde$% normal inde$ ? #es. 32.+an +hec2 constraint be used for self referential integrity ? >o" ? #es. 0n the )5"): condition for a col!mn of a table, we can reference some other col!mn of the same table and th!s enforce self referential integrity. 33.What are the min. e$tents allocated to a rollbac2 e$tent ? Two 34.What are the states of a rollbac2 segment ? What is the di,erence bet"een partly a/ailable and needs reco/ery ? The vario!s states of a rollbac' segment are A O3L03", OBBL03", +A.TL# A1A0LA,L", 3""2S .")O1".# and 031AL02. 3#.What is the di,erence bet"een uni=ue 2ey and primary 2ey ? ni&!e 'ey can be n!llF +rimary 'ey cannot be n!ll. 3'.Bn insert statement follo"ed by a create table statement follo"ed by rollbac2 ? Will the ro"s be inserted ? 3o. 3(.+an you de&ne multiple sa/epoints ? #es. 3*.+an you 4ollbac2 to any sa/epoint ? #es. Page 142 of 153 4..What is the ma$imum no. of columns a table can ha/e ? GOM. 41.What is the signi&cance of the O and OO operators in 05 SA5 ? The X operator means that the +L S4L bloc' re&!ires !ser inp!t for a variable. The XX operator means that the val!e of this variable sho!ld be the same as inp!tted by the !ser previo!sly for this same variable. 0f a transaction is very large, and the rollbac' segment is not able to hold the rollbac' information, then will the transaction span across di6erent rollbac' segments or will it terminate \ 0t will terminate (+lease chec' *. 42.+an you pass a parameter to a cursor ? "%plicit c!rsors can ta'e parameters, as the e%ample below shows. A c!rsor parameter can appear in a &!ery wherever a constant can appear. ).SO. cE (median 03 3$,".* 0S S"L")T job, ename B.O$ emp /5"." sal K medianF 43.What are the /arious types of 4oll1ac2 Segments ? +!blic Available to all instances +rivate Available to specifc instance 44.+an you use P4o"+ount as a parameter to a cursor ? #es 4#.9s the =uery belo" allo"ed T Select sal% ename 9nto $ 6rom emp Where ename V H<9;:H FWhere $ is a record of ;umberF4G and +harF1#GG #es 4'.9s the assignment gi/en belo" allo"ed T B1+ V 0A4 FWhere B1+ and 0A4 are recordsG #es 4(.9s this for loop allo"ed T 6or $ in OStart..Ond 5oop #es 4*.>o" many ro"s "ill the follo"ing SA5 return T Select K from emp Where ro"num W 1.X @ rows 4-.>o" many ro"s "ill the follo"ing SA5 return T Select K from emp Where ro"num V 1.X 3o rows #..Which symbol preceeds the path to the table in the remote database ? Page 143 of 153 b #1.Bre /ie"s automatically updated "hen base tables are updated ? #es #2.+an a trigger "ritten for a /ie" ? 3o #3.9f all the /alues from a cursor ha/e been fetched and another fetch is issued% the output "ill be T error% last record or &rst record ? Last .ecord #4.B table has the follo"ing data T YY#% ;ull% 1.ZZ. What "ill the a/erage function return ? J.O ##.9s Sysdate a system /ariable or a system function? System B!nction #'.+onsider a se=uence "hose curr/al is 1 and gets incremented by 1 by using the ne$t/al reference "e get the ne$t number 2. Suppose at this point "e issue an rollbac2 and again issue a ne$t/al. What "ill the output be ? H #'.8e&nition of relational 8ata1ase by 8r. +odd F91!G? A .elational 2atabase is a database where all data visible to the !ser is organi8ed strictly as tables of data val!es and where all database operations wor' on these tables. #(.What is !ulti Threaded Ser/er F!TBG ? 0n a Single Threaded Architect!re (or a dedicated server confg!ration* the database manager creates a separate process for each database !ser. ,!t in $TA the database manager can assign m!ltiple !sers (m!ltiple !ser processes* to a single dispatcher (server process*, a controlling process that &!e!es re&!est for wor' th!s red!cing the databases memory re&!irement and reso!rces. #*.Which are initial 481!S% >ierarchical O ;J" database ? .2,$S - . system 5ierarchical - 0$S 3?/ - 2,T= '..What is 6unctional 8ependency Page 144 of 153 =iven a relation ., attrib!te # of . is f!nctionally dependent on attrib!te R of . if and only if each R-val!e has associated with it precisely one -# val!e in . '1.What is Buditing ? The database has the ability to a!dit all actions that ta'e place within it. a* Login attempts, b* Object Accesss, c* 2atabase Action .es!lt of =reatest(E,3LL* or Least(E,3LL* 3LL '2.While designing in clientJser/er "hat are the 2 imp. things to be considered ? 3etwor' Overhead (traNc*, Speed and Load of client server '4.When to create inde$es ? To be created when table is &!eried for less than GV or MV to GOV of the table rows. '#.>o" can you a/oid inde$es ? TO ma'e inde% access path !navailable - se BLL hint to optimi8er for f!ll table scan - se 032"R or A32-"4AL hint to optimi8er to !se one inde% or set to inde%es instead of another. - se an e%pression in the /here )la!se of the S4L. ''.What is the result of the follo"ing SA5 T Select 1 from dual @;9O; Select HBH from dualX "rror '(.+an database trigger "ritten on synonym of a table and if it can be then "hat "ould be the e,ect if original table is accessed. #es, database trigger wo!ld fre. '*.+an you alter synonym of /ie" or /ie" ? 3o '-.+an you create inde$ on /ie" 3o (..What is the di,erence bet"een a /ie" and a synonym ? Synonym is j!st a second name of table !sed for m!ltiple lin' of database. 1iew can be created with many tables, and with virt!al col!mns and with conditions. ,!t synonym can be on view. (1.What is the di,erence bet"een alias and synonym ? Alias is temporary and !sed with one &!ery. Synonym is permanent and not !sed as alias. Page 145 of 153 (2.What is the e,ect of synonym and table name used in same Select statement ? 1alid (3.WhatHs the length of SA5 integer ? HG bit length (4.What is the di,erence bet"een foreign 2ey and reference 2ey ? Boreign 'ey is the 'ey i.e. attrib!te which refers to another table primary 'ey. .eference 'ey is the primary 'ey of table referred by another table. (#.+an dual table be deleted% dropped or altered or updated or inserted ? #es ('.9f content of dual is updated to some /alue computation ta2es place or not ? #es ((.9f any other table same as dual is created "ould it act similar to dual? #es (*.6or "hich relational operators in "here clause% inde$ is not used ? ^K , li'e 'V ...' is 3OT f!nctions, feld Wconstant, feld UU '' (-.Bssume that there are multiple databases running on one machine. >o" can you s"itch from one to another ? )hanging the O.A)L"<S02 *..What are the ad/antages of Oracle ? +ortability A Oracle is ported to more platforms than any of its competitors, r!nning on more than EDD hardware platforms and GD networ'ing protocols. $ar'et +resence A Oracle is by far the largest .2,$S vendor and spends more on . X 2 than most of its competitors earn in total reven!e. This mar'et clo!t means that yo! are !nli'ely to be left in the l!rch by Oracle and there are always lots of third party interfaces available. ,ac'!p and .ecovery A Oracle provides ind!strial strength s!pport for on-line bac'!p and recovery and good software fa!lt tolerence to dis' fail!re. #o! can also do point-in-time recovery. +erformance A Speed of a 't!ned' Oracle 2atabase and application is &!ite good, even with large databases. Oracle can manage K EDD=, Page 146 of 153 databases. $!ltiple database s!pport A Oracle has a s!perior ability to manage m!ltiple databases within the same transaction !sing a two-phase commit protocol. *1.What is a for"ard declaration ? What is its use ? +L?S4L re&!ires that yo! declare an identifer before !sing it. Therefore, yo! m!st declare a s!bprogram before calling it. This declaration at the start of a s!bprogram is called forward declaration. A forward declaration consists of a s!bprogram specifcation terminated by a semicolon. *2.What are actual and formal parameters ? Act!al +arameters A S!bprograms pass information !sing parameters. The variables or e%pressions referenced in the parameter list of a s!bprogram call are act!al parameters. Bor e%ample, the following proced!re call lists two act!al parameters named emp<n!m and amo!ntA "g. raise<salary(emp<n!m, amo!nt*F Bormal +arameters A The variables declared in a s!bprogram specifcation and referenced in the s!bprogram body are formal parameters. Bor e%ample, the following proced!re declares two formal parameters named emp<id and increaseA "g. +.O)"2." raise<salary (emp<id 03T"="., increase ."AL* 0S c!rrent<salary ."ALF *3.What are the types of ;otation ? +osition, 3amed, $i%ed and .estrictions. *4.What all important parameters of the init.ora are supposed to be increased if you "ant to increase the S:B si?e ? 0n o!r case, db<bloc'<b!6ers was changed from PD to EDDD (std val!es are PD, OOD X HODD* shared<pool<si8e was changed from H.O$, to @$, (std val!es are H.O, O X @$,* open<c!rsors was changed from GDD to HDD (std val!es are GDD X HDD* db<bloc'<si8e was changed from GDMI (G:* to MD@P (M:* Zat the time of database creation[. The initial S=A was aro!nd M$, when the server .A$ was HG$, and The new S=A was aro!nd EH$, when the server .A$ was increased to EGI$,. *#.9f 9 ha/e an e$ecute pri/ilege on a procedure in another users schema% can 9 e$ecute his procedure e/en though 9 do not ha/e pri/ileges on the tables "ithin the procedure ? #es *'.What are /arious types of )oins ? "&!ijoins, 3on-e&!ijoins, self join, o!ter join *(.What is a pac2age cursor ? Page 147 of 153 A pac'age c!rsor is a c!rsor which yo! declare in the pac'age specifcation witho!t an S4L statement. The S4L statement for the c!rsor is attached dynamically at r!ntime from calling proced!res. **.9f you insert a ro" in a table% then create another table and then say 4ollbac2. 9n this case "ill the ro" be inserted ? #es. ,eca!se )reate table is a 22L which commits a!tomatically as soon as it is e%ec!ted. The 22L commits the transaction even if the create statement fails internally (eg table already e%ists error* and not syntactically. *-.What are the /arious types of =ueries ?? 3ormal 4!eries S!b 4!eries )o-related &!eries 3ested &!eries )ompo!nd &!eries -..What is a transaction ? A transaction is a set of S4L statements between any two )O$$0T and .OLL,A): statements. -1.What is implicit cursor and ho" is it used by Oracle ? An implicit c!rsor is a c!rsor which is internally created by Oracle. 0t is created by Oracle for each individ!al S4L. -2.Which of the follo"ing is not a schema ob)ect T 9nde$es% tables% public synonyms% triggers and pac2ages ? +!blic synonyms -4.What is 05JSA5? +L?S4L is Oracle's +roced!ral Lang!age e%tension to S4L. The lang!age incl!des object oriented programming techni&!es s!ch as encaps!lation, f!nction overloading, information hiding (all b!t inheritance*, and so, brings state-of-the-art programming to the Oracle database server and a variety of Oracle tools. -#.9s there a 05JSA5 ngine in SA5K0lus? 3o. nli'e Oracle Borms, S4LQ+l!s does not have a +L?S4L engine. Th!s, all yo!r +L?S4L are send directly to the database engine for e%ec!tion. This ma'es it m!ch more eNcient as S4L statements are not stripped o6 and send to the database individ!ally. -'.9s there a limit on the si?e of a 05JSA5 bloc2? )!rrently, the ma%im!m parsed?compiled si8e of a +L?S4L bloc' is PM: and the ma%im!m code si8e is EDD:. #o! can r!n the following select statement to &!ery the si8e of an e%isting pac'age or proced!re. S4LK select Q from dba<object<si8e where name C 'proced!re<name' Page 148 of 153 -(.+an one readJ"rite &les from 05JSA5? 0ncl!ded in Oracle J.H is a TL<B0L" pac'age that can read and write fles. The directory yo! intend writing to has to be in yo!r 030T.O.A fle (see TL<B0L"<20.C... parameter*. ,efore Oracle J.H the only means of writing a fle was to !se 2,$S<OT+T with the S4LQ+l!s S+OOL command. 2")LA." fle5andler TL<B0L".B0L"<T#+"F ,"=03 fle5andler AC TL<B0L".BO+"3('?home?oracle?tmp', 'myo!tp!t','/'*F TL<B0L".+TB(fle5andler, '1al!e of f!ncE is Vsn', f!ncE(E**F TL<B0L".B)LOS"(fle5andler*F "32F -*.>o" can 9 protect my 05JSA5 source code? +L?S4L 1G.G, available with OracleJ.G, implements a binary wrapper for +L?S4L programs to protect the so!rce code. This is done via a standalone !tility that transforms the +L?S4L so!rce code into portable binary object code (somewhat larger than the original*. This way yo! can distrib!te software witho!t having to worry abo!t e%posing yo!r proprietary algorithms and methods. S4LQ+l!s and S4LQ2,A will still !nderstand and 'now how to e%ec!te s!ch scripts. T!st be caref!l, there is no 7decode7 command available. The synta% isA wrap inameCmyscript.s&l onameC%%%%.yyy --.+an one use dynamic SA5 "ithin 05JSA5? O4 +an you use a 885 in a procedure ? >o" ? Brom +L?S4L 1G.E one can !se the 2,$S<S4L pac'age to e%ec!te dynamic S4L statements. "gA )."AT" O. ."+LA)" +.O)"2." 2#3S4L AS c!r integerF rc integerF ,"=03 c!r AC 2,$S<S4L.O+"3<).SO.F 2,$S<S4L.+A.S"(c!r,')."AT" TA,L" R (# 2AT"*', 2,$S<S4L.3AT01"*F rc AC 2,$S<S4L."R")T"(c!r*F 2,$S<S4L.)LOS"<).SO.(c!r*F "32F Oracel 9nter/ie" Auestion Only F1G /hat is .eferential 0ntegrity r!le\ 2i6erentiate between 2elete X Tr!ncate command. 0mplicit )!rsor X "%plicit )!rsor. .ef. 'ey X Boreign 'ey. /here X 5aving )la!se. /hat are vario!s 'inds of 0ntegrity )onstraints in Oracle\ Page 149 of 153 /hat are vario!s 'ind of joins\ /hat is .aise<Application<"rror\ /hat are vario!s 'inds of e%ceptions in Oracle\ 3ormal Borms /hat is meant by Scrollable c!rsor\ The !se of 5A103= , /5"." and =.O+,# in one S4L\ /hat is meant by SO.T03= and =.O+03=\ /hat are the di6erent types of OT". TO03S\ "%plain the 30O3 operation in S4L . /hat is meant by OT". TO03\ /hat is a 3on- corelated s!b&!ery\ /hat is a corelated s!b&!ery\ /hat do yo! 'now abo!t s!b&!eries\ /hat is the theory behind the TO03 statement in 2,G\ /hat are the di6erent types of S4L\ 5ow to drop the col!mn in a table\ 5ow to drop the inde%\ /hat are the di6erent tablespaces in database\ /hat is the ma%im!m n!mber of triggers, can apply to a single table\ /hat is the o!tp!t of S0=3 f!nction\ /hat are the more common pse!do-col!mns\ Other way to replace &!ery res!lt n!ll val!e with a te%t\ /hat are +L?S4L )!rsor "%ceptions\ Any three +L?S4L "%ceptions\ Any three +L?S4L "%ceptions\ /hich date f!nction ret!rns n!mber val!e\ 2isplay Odd? "ven n!mber of records\ 2isplay the n!mber val!e in /ords\ To view installed Oracle version information\ Bind o!t nth highest salary from emp table\ 0mplicit )!rsor attrib!tes\ "%plicit )!rsor attrib!tes\ 2isplay the records between two range 0 'now the nvl f!nction only allows the same data type(ie. n!mber or char or date 3vl(comm, D**, if commission is n!ll then the te%t 3ot Applicable want to display, instead of blan' space. 5ow do 0 write the &!ery\\\ 5ow do 0 display row n!mber with records\ 5ow do 0 eliminate the d!plicate rows\ 0f a view on a single base table is manip!lated will the changes be reSected on the base table\ 0f #es - !nder what conditions\ )an a view be !pdated?inserted?deleted\ /hat are the advantages of 10"/\
/hat is )#)L"?3O )#)L" in a Se&!ence\
Page 150 of 153 0s it possible to access the c!rrent val!e in a session before accessing ne%t val!e\ 5ow to access the c!rrent val!e and ne%t val!e from a se&!ence\ /hat is a database lin'\ 0f !ni&!e 'ey constraint on 2AT" col!mn is created, will it validate the rows that are inserted with S#S2AT"\ 5ow will yo! activate?deactivate integrity constraints\ /here the integrity constraints are stored in data dictionary\ /hat are the pre-re&!isites to modify datatype of a col!mn and to add a col!mn with 3OT 3LL constraint\ 0s it possible to !se LO3= col!mns in /5"." cla!se or O.2". ,#\ 5ow many LO3= col!mns are allowed in a table\ /hat is the ma%im!m S0;" allowed for each type\ /hat is di6erence between )5A. and 1A.)5A.G\ /hat are the data types allowed in a table\ /hat is O3 2"L"T" )AS)A2"\ /hat is the !sage of SA1"+O03TS\ /hat is referential integrity constraint\ /hat is an integrity constraint\ /hat is the fastest way of accessing a row in a table\ /hat is .O/02\ "%plain 30O3, $03S, 30O3 ALL and 03T".S")T\ 2i6erence between S,ST. and 03ST.\ "%plain )O33")T ,# +.0O.\ /hat is correlated s!b-&!ery\ /hat is the s!b-&!ery\ "%plain the di6erent types of joins\ /hat is a join\ /hat is di6erence between T.3)AT" X 2"L"T"\ /hat is a transaction\ /hat are the types of S4L statement\ /hich datatype is !sed for storing graphics and images\ LO3= .A/ data type is !sed for storing ,LO,'s (binary large objects*.\ /hat is a pse!do col!mn. =ive some e%amples\ 0t is a col!mn that is not an act!al col!mn in the table\ eg S"., 02, S#S2AT", .O/3$, .O/02, 3LL, A32 L"1"L.\ /hat are the di6erences yo! have seen while installing Oracle on 3T and ni% platform\ /hat !tility is !sed to create a logical bac'!p\ e%port /hat are the di6erences between database designing and database modeling\ 0f the large table contains tho!sands of records and the application is accessing HOV of the table which method to !seA inde% searching or f!ll table scan\ Page 151 of 153 0n which sit!ation whether pea' time or o6 pea' time yo! will e%ec!te the A3AL#;" TA,L" command. /hy\ 5ow to chec' to memory gap once the S=A is started in .estricted mode\ All the !sers are complaining that their application is hanging. 5ow yo! will resolve this sit!ation in OLT+\ 0f the S4L Q +l!s hangs for a long time, what is the reason\ Shall we create proced!res to fetch more than one record\ 5ow do yo! increase the performance of VL0:" operator\ #o! are reg!larly changing the pac'age body part. 5ow will yo! create or what will yo! do before creating that pac'age\ 5ow can yo! see the so!rce code of the pac'age\ 2!al table e%plain. 0s any data internally storing in d!al table. Lot of !sers are accessing select sysdate from d!al and they getting some millisecond di6erences. 0f we e%ec!te S"L")T S#S2AT" B.O$ "$+F what error will we get. /hy\ 0n e%ception handling we have some 3OT<BO32 and OT5".S. 0n inner layer we have some 3OT<BO32 and OT5".S. /hile e%ec!ting which one whether o!ter layer or inner layer will chec' frst\ /hat is m!tated trigger, is it the problem of loc's. 0n single !ser mode we got m!tated error, as a 2,A how yo! will resolve it\ Schema A has some objects and created one proced!re and granted to Schema ,. Schema , has the same objects li'e schema A. Schema , e%ec!ted the proced!re li'e inserting some records. 0n this case where the data will be stored whether in Schema A or Schema ,\ /hat is b!l' S4L\ 5ow to do the sched!led tas'?jobs in ni% platform\ 0f the entire dis' is corr!pted how will yo! and what are the steps to recover the database\ 5ow will yo! monitor rollbac' segment stat!s\ List the se&!ence of events when a large transaction that e%ceeds beyond its optimal val!e when an entry wraps and ca!ses the rollbac' segment to e%pand into another e%tend\ /hat is redo log fle mirroring\ 5ow can we plan storage for very large tables /hen will be a segment released \ /hat are disadvantages of having raw devices\ List the factors that can a6ect the acc!racy of the estima\ /hat is the di6erence between >>2AT">> X >>2,2AT">>> >2,2AT">> retrieves the c!rrent database date>>date>> retrieves the c!rrent operating system 5ow to prevent !na!thori8ed !se of privileges granted to a .ole \ /hat is a deadloc' and "%plain\ /hat are the basic element of base confg!ration of an Oracle database\ Page 152 of 153 /hat is an inde% and 5ow it is implemented in Oracle database\ /hat is the !se of redo log information\ /hat is a schema\ /hat is +arallel Server\ /hat is a database instance and "%plain\ /hat is a datafle\ /hat is a temporary segment\ /hat are the !ses of rollbac' segment Page 153 of 153