Sei sulla pagina 1di 153

1. What are the components of physical database structure of Oracle database? Oracle database is comprised of three types of files.

One or more datafiles, two are more redo log files, and one or more control files. 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 Unit 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 file. !ach databases logically divided into one or more tablespaces one or more data files 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 different tablespaces? "es. +. *an a tablespace hold ob(ects from different 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 identifies the col mns and rows of the table's) the view ses.) 11. What is .artial /ac0up ? 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 on1line 2edo 3og ? A mirrored on,line redo log consists of copies of on,line redo log files physically located on separate dis&s, changes made to one member of the gro p are made to all members. 13. What is 4ull /ac0up ? A f ll bac& p is an operating system bac& p of all data files, on,line redo log files and control file that constit te O-A(L! database and the parameter. 14. *an a 5ie" based on another 5ie" ? "es. 1#. *an a Tablespace hold ob(ects from different Schemes ? "es. 1&. *an ob(ects of the same Schema reside in different tablespaces.? "es. 1'. What is the use of *ontrol 4ile ? .hen an instance of an O-A(L! database is started, its control file is sed to identify the database and redo log files that m st be opened for database operation to proceed. /t is also sed in database recovery. 1). 6o 5ie" contain 6ata ? 0iews do not contain or store data. 1+. What are the 2eferential actions supported by 4O2 789 : Y integrity constraint ? U*1AT! and 1!L!T! -estrict , A referential integrity r le that disallows the pdate or deletion of referenced data. 1!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 2edo 3og ? The set of -edo Log files "S1AT!,U/1,US!- or US!-!20 S3L f nctions, or the pse do col mns L!0!L or -O.2U#. 22. What is an 7nde$ Segment ? Page 2 of 153

!ach /nde$ has an /nde$ segment that stores all of its data. 23. $plain the relationship among 6atabase% Tablespace and 6ata file.? !ach databases logically divided into one or more tablespaces one or more data files are e$plicitly created for each tablespace 24. What are the different type of Segments ? 1ata Segment, /nde$ 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 7ntegrity *onstrains ? An integrity constraint is a declarative way to define a b siness r le for a col mn of a table. 2'. What is an 7nde$ ? An /nde$ 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. /nde$ can be created on one or more col mns of a table. 2). What is an $tent ? An !$tent is a specific n mber of contig o s data bloc&s, obtained in a single allocation, and sed to store a specific type of information. 2+. What is a 5ie" ? A view is a virt al table. !very view has a 3 ery attached to it. 'The 3 ery is a S!L!(T statement that identifies 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. , 4ide data comple$ity. , Simplify commands for the ser. , *resent the data in a different 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 S3L 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. /nde$ can be created on one or more col mns of a table. 4,. <o" are the inde$ updates? /nde$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 Unit called tablespaces. A tablespace is sed to gro ped related logical str ct res together 42. What is 2ollbac0 Segment ? A 1atabase contains one or more -ollbac& Segments to temporarily store 5 ndo5 information. 43. What are the *haracteristics of 6ata 4iles ? A data file can be associated with only one database. Once created a data file can't change si6e. One or more data files form a logical nit of database storage called a tablespace. 44. <o" to define 6ata /loc0 si=e ? A data bloc& si6e is specified 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& si6e is specified in /2/T.O-A file and can7t be changed latter. 4#. What does a *ontrol file *ontain ? A (ontrol file records the physical str ct re of the database. /t contains the following information. 1atabase 2ame 2ames and locations of a database's files and redolog files. Time stamp of database creation. 4&.What is difference bet"een >97?> constraint and .27!@2Y : Y constraint ? A col mn defined as U2/3U! can contain 2 lls while a col mn defined as *-/#A-" 8!" can't contain 2 lls. 4'.What is 7nde$ *luster ? A (l ster with an inde$ on the (l ster 8ey 4).When does a Transaction end ? .hen it is committed or -ollbac&ed. 4+. What is the effect of setting the -alue A@33B2OWSA for O.T7!7C 2B8O@3 parameter of the @3T 2 S SS7O9 command ? What are the factors that affect O.T7!7C 2 in choosing an Optimi=ation approach ? Answer The O*T/#/9!-:#O1! initiali6ation parameter Statistics in the 1ata 1ictionary the O*T/#/9!-:;OAL parameter of the ALT!- S!SS/O2 command hints in the statement. #,. What is the effect of setting the -alue A*<OOS A for O.T7!7C 2B8O@3% parameter of the @3T 2 S SS7O9 *ommand ? The Optimi6er chooses (ost:based approach and optimi6es with the goal of best thro ghp t if statistics for atleast one of the tables accessed by the S3L statement e$ist in the data dictionary. Otherwise the O*T/#/9!- chooses -UL!:based approach. #1. <o" does one create a ne" database? Dfor 6/@E One can create and modify Oracle databases sing the Oracle 5dbca5 '1atabase (onfig ration Assistant) tility. The dbca tility is located in the <O-A(L!:4O#!=bin directory. The Oracle Universal /nstaller '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 database? (O22!(T S"S AS S"S1+A ALT!- S"ST!# S!T 1+:(-!AT!:@/L!:1!STA'= BC=oradata='D ALT!- S"ST!# S!T 1+:(-!AT!:O2L/2!:LO;:1!ST:CA'= BE=oradata='D

Page 5 of 153

ALT!- S"ST!# S!T 1+:(-!AT!:O2L/2!:LO;:1!ST:EA'= BF=oradata='D (-!AT! 1ATA+AS!D #2. What database bloc0 si=e should 7 use? Dfor 6/@E Oracle recommends that yo r database bloc& si6e match, or be m ltiples of yo r operating system bloc& si6e. One can se smaller bloc& si6es, b t the performance cost is significant. "o r choice sho ld depend on the type of application yo are r nning. /f yo have many small transactions as with OLT*, se a smaller bloc& si6e. .ith fewer b t larger transactions, as with a 1SS application, se a larger bloc& si6e. /f yo are sing a vol me manager, consider yo r 5operating system bloc& si6e5 to be G8. This is beca se vol me manager prod cts se G8 bloc&s 'and this is not config rable). #3. What are the different approaches used by Optimi=er in choosing an e$ecution plan ? - le,based and (ost,based. #4. What does 2O33/@*: do ? -OLL+A(8 retracts any of the changes res lting from the S3L statements in the transaction. <o" does one coalesce free space?Dfor 6/@E S#O2 coalesces free space 'e$tents) into larger, contig o s e$tents every E ho rs and even then, only for a short period of time. S#O2 will not coalesce free space if a tablespace's defa lt storage parameter 5pctincrease5 is set to B. .ith Oracle H.F one can man ally coalesce a tablespace sing the ALT!- TA+L!S*A(! ... (OAL!S(!D command, ntil then se? S3LI alter session set events 'immediate trace name coalesce level n'D .here 'n' is the tablespace n mber yo get from S!L!(T TSJ, 2A#! @-O# S"S.TS<D "o can get stat s information abo t this process by selecting from the S"S.1+A:@-!!:S*A(!:(OAL!S(!1 dictionary view. ##. <o" does one pre-ent tablespace fragmentation? Dfor 6/@E Always set *(T/2(-!AS! to B or CBB. +i6arre val es for *(T/2(-!AS! will contrib te to fragmentation. @or e$ample if yo set *(T/2(-!AS! to C yo will see that yo r e$tents are going to have weird and wac&y si6es? CBB8, CBB8, CBC8, CBE8, etc. S ch e$tents of bi6arre si6e are rarely re, sed in their entirety. *(T/2(-!AS! of B or CBB gives yo nice ro nd e$tent si6es that can easily be re sed. !g. CBB8, CBB8, EBB8, KBB8, etc. Thir 0adivel contrib ted the following? Use the same e$tent si6e for all the segments in a given tablespace. Locally #anaged tablespaces 'available from Gi onwards) with niform e$tent si6es virt ally eliminates any tablespace fragmentation. 2ote that the n mber of e$tents per segment does not ca se any Page 6 of 153

performance iss e anymore, nless they r n into tho sands and tho sands where additional /=O may be re% ired to fetch the additional bloc&s where e$tent maps of the segment are stored. #&. Where can one find the high "ater mar0 for a table? Dfor 6/@E There is no single system table, which contains the high water mar& '4.#) for a table. A table's 4.# can be calc lated sing the res lts from the following S3L statements? S!L!(T +LO(8S @-O# 1+A:S!;#!2TS .4!-! O.2!-AU**!-'owner) A21 S!;#!2T:2A#! A U**!-'table)D A2AL"9! TA+L! owner.table !ST/#AT! STAT/ST/(SD S!L!(T !#*T":+LO(8S @-O# 1+A:TA+L!S .4!-! O.2!-AU**!-'owner) A21 S!;#!2T:2A#! A U**!-'table)D Th s, the tables' 4.# A '% ery res lt C) , '% ery res lt E) , C 2OT!? "o can also se the 1+#S:S*A(! pac&age and calc late the 4.# A TOTAL:+LO(8S , U2US!1:+LO(8S , C. #'. What is *OST1based approach to optimi=ation ? (onsidering available access paths and determining the most efficient 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!!7T do ? (O##/T ma&es permanent the changes res lting from all S3L statements in the transaction. The changes made by the S3L 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? Dfor 6/@E OracleG and above ro nds off e$tents to a m ltiple of L bloc&s when more than L bloc&s are re% ested. /f one re% ests CM8 or E bloc&s 'ass ming a G8 bloc& si6e), Oracle doesn't ro nd it p to L bloc&s, b t it allocates E bloc&s or CM8 as re% ested. /f one as&s for G bloc&s, Oracle will ro nd it p to CB bloc&s. Space allocation also depends pon the si6e of contig o s free space available. /f one as&s for G bloc&s and Oracle finds a contig o s free space that is e$actly G bloc&s, it wo ld give it yo . /f 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 L bloc&s. The e$ception to this r le is locally managed tablespaces. /f a tablespace is created with local e$tent management and the e$tent si6e is MK8, then Oracle allocates MK8 or G bloc&s ass ming G8,bloc& si6e. Oracle doesn't ro nd it p to the m ltiple of L when a tablespace is locally managed.

Page 7 of 153

&,. *an one rename a database user DschemaE? Dfor 6/@E 2o, this is listed as !nhancement -e% est CLGLBG. .or&aro nd? 1o a ser,level e$port of ser A create new ser + /mport system=manager from serAA to serA+ 1rop ser A &1. 6efine Transaction ? A Transaction is a logical nit of wor& that comprises one or more S3L statements e$ec ted by a single ser. &2. What is 2ead1Only 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 deadloc0 ? $plain . Two processes wating to pdate the rows of a table which are loc&ed by the other process then deadloc& arises. /n 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 .arallel Ser-er ? # ltiple instances accessing the same database 'Only /n # lti,(*U environments) &'. What are the basic element of /ase configuration of an oracle 6atabase ? /t consists of one or more data files. one or more control files. two or more redo log files. The 1atabase contains m ltiple sers=schemas one or more rollbac& segments one or more tablespaces 1ata dictionary tables Page 8 of 153

User objects 'table,inde$es,views etc.,) The server that access the database consists of S;A '1atabase b ffer, 1ictionary (ache + ffers, -edo log b ffers, Shared S3L pool) S#O2 'System #O2ito) *#O2 '*rocess #O2itor) L;.- 'Lo; .rite) 1+.- '1ata +ase .rite) A-(4 'A-(4iver) (8*T '(hec& *oint) -!(O 1ispatcher User *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 7nde$ ? <o" it is implemented in Oracle 6atabase ? 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 specified in create table comman '0er H.B) ',. What is a 6atabase 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 files. 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 /=O performed against data file. '1. WWhat is the use of @9@3YC command ? To perform one of these f nction on an inde$,table, or cl ster? , To collect statistics abo t object sed by the optimi6er 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 .rofile ?

Page 9 of 153

The n mber of conc rrent sessions the ser can establish the (*U processing time available to the ser's session the (*U processing time available to a single call to O-A(L! made by a S3L statement the amo nt of logical /=O available to the ser's session the amo t of logical /=O available to a single call to O-A(L! made by a S3L 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 ?uota ? The collective amo nt of dis& space available to the objects in a schema on a partic lar tablespace. '&. What are the different 3e-els of @uditing ? Statement A diting, *rivilege A diting and Object A diting. ''. What is Statement @uditing ? Statement a diting is the a diting of the powerf l system privileges witho t regard to specifically named objects. '). What are the database administrators utilities a-aliable ? S3L N 1+A , This allows 1+A to monitor and control an O-A(L! database. S3L N Loader , /t loads data from standard operating system files '@lat files) into O-A(L! database tables. !$port '!O*) and /mport '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=/ncl de LO;:A-(4/0!:STA-T:T-U! in init.ora file. 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 different 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 2oles ? -oles are named gro ps of related privileges that are granted to sers or other roles. )2. What are the use of 2oles ? -!1U(!1 ;-A2T/2; O@ *-/0/L!;!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. 1"2A#/( *-/0/L!;! #A2A;!#!2T , .hen the privileges of a gro p m st change, only the privileges of the role need to be modified. The Page 10 of 153

sec rity domains of all sers granted the gro p's role a tomatically reflect the changes made to the role. S!L!(T/0! A0A/LA+/L/T" O@ *-/0/L!;!S , The roles granted to a ser can be selectively enable 'available for se) or disabled 'not available for se). This allows specific control of a ser's privileges in any given sit ation. A**L/(AT/O2 A.A-!2!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 .ri-ilege @uditing ? *rivilege a diting is the a diting of the se of powerf l system privileges witho t regard to specifically named objects. )4. What is Ob(ect @uditing ? Object a diting is the a diting of accesses to specific schema objects witho t regard to ser. )#. What is @uditing ? #onitoring of ser access to aid in the investigation of database se. )#. <o" does one see the uptime for a database? Dfor 6/@ Loo& at the following S3L % ery? S!L!(T to:char 'start p:time,'11,#O2,"""" 44EK? #/? SS') 51+ Start p Time5 @-O# sys.v:<instanceD #arco +ergman provided the following alternative sol tion? S!L!(T to:char 'logon:time,'1y dd #on 44EK? #/? SS') 51+ Start p Time5 @-O# sys.v:<session .4!-! SidAC =N this is pmon N= = Users still r nning on Oracle H can try one of the following % eries? (ol mn STA-T!1 format aCG head 'STA-TU* T/#!' Select (./2STA2(!, to:date 'PUL.0ALU!, 'P') QQ to:char 'floor 'S!(.0ALU!=FMBB), 'B>') QQ '?' ,, QQ S bstr 'to:char 'mod 'S!(.0ALU!=MB, MB), 'B>'), E, E) QQ S bstr 'to:char 'floor 'mod 'S!(.0ALU!=MB, MB)), 'B>'), E, E) QQ '.' QQ S bstr 'to:char 'mod 'S!(.0ALU!, MB), 'B>'), E, E) STA-T!1 from S"S.0:</2STA2(! PUL, S"S.0:</2STA2(! S!(, S"S.0:<T4-!A1 ( .here PUL.8!" li&e 'RPUL/A2R' and S!(.8!" li&e 'RS!(O21R'D Select to:date 'PUL.0ALU!, 'P') QQ to:char 'to:date 'S!(.0ALU!, 'SSSSS'), ' 44EK?#/?SS') STA-T!1 Page 11 of 153

from S"S.0:</2STA2(! PUL, S"S.0:</2STA2(! S!( where PUL.8!" li&e 'RPUL/A2R' and S!(.8!" li&e 'RS!(O21R'D select to:char 'to:date 'PUL.0ALU!, 'P') S 'S!(.0ALU!=GMKBB), ,-et rn a 1AT! '11,#O2,"" 44EK?#/?SS') STA-T!1 from 0</2STA2(! PUL, 0</2STA2(! S!( where PUL.8!" li&e 'RPUL/A2R' and S!(.8!" li&e 'RS!(O21R'D )&. Where are my T !.473 S% 7 donFt see them in 5G6@T@473 or 6/@B6@T@B473 ? Dfor 6/@ Tempfiles, nli&e normal datafiles, are not listed in v<datafile or dba:data:files. /nstead % ery v<tempfile or dba:temp:files? S!L!(T N @-O# v<tempfileD S!L!(T N @-O# dba:temp:filesD )'. <o" do 7 find usedHfree space in a T !.O2@2Y tablespace? Dfor 6/@ Unli&e normal tablespaces, tr e temporary tablespace information is not listed in 1+A:@-!!:S*A(!. /nstead se the 0<T!#*:S*A(!:4!A1!- view? S!L!(T tablespace:name, SU# 'bytes sed), SU# 'bytes free) @-O# 0<temp:space:header ;-OU* +" tablespace:nameD )). What is a profile ? !ach database ser is assigned a *rofile that specifies limitations on vario s system reso rces available to the ser. )+. <o" "ill you enforce security using stored procedures? 1on't grant ser access directly to tables within the application. /nstead 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. Users cannot access tables e$cept via the proced re. +,. <o" can one see "ho is using a temporary segment? Dfor 6/@ @or every ser sing temporary space, there is an entry in S"S.0<:LO(8 with type 'TS'. All temporary segments are named 'ffff.bbbb' where 'ffff' is the file it is in and 'bbbb' is first bloc& of the segment. /f yo r temporary tablespace is set to T!#*O-A-", all sorts are done in one large temporary segment. @or sage stats, see S"S.0:<SO-T:S!;#!2T @rom Oracle G.B, one can j st % ery S"S.v<sort: sage. Loo& at these Page 12 of 153

e$amples? select s. sername, .5US!-5, .tablespace, .contents, .e$tents, .bloc&s from sys.v:<session s, sys.v:<sort: sage where s.addr A .session:addr = select s.os ser, s.process, s. sername, s.serialJ, S m ' .bloc&s)Nvp.val e=CBEK sort:si6e from sys.v:<session s, sys.v:<sort: sage , sys.v:<parameter 0* where s.saddr A .session:addr and vp.name A 'db:bloc&:si6e' and s.os ser li&e 'TC' gro p by s.os ser, s.process, s. sername, s.serialJ, vp.val e = +1. <o" does one get the -ie" definition of fi$ed -ie"sHtables? 3 ery v<fi$ed:view:definition. !$ample? S!L!(T N @-O# v<fi$ed:view:definition .4!-! view:nameA'0<S!SS/O2'D +2. What are the dictionary tables used to monitor a database spaces ? 1+A:@-!!:S*A(! 1+A:S!;#!2TS 1+A:1ATA:@/L!S. +3. <o" can "e specify the @rchi-ed log file name format and destination? +y setting the following val es in init.ora file. LO;:A-(4/0!:@O-#AT A arch RS=s=T=tarc 'RS , Log se% ence n mber and is 6ero left paded, Rs , Log se% ence n mber not padded. RT , Thread n mber lef,6ero, paded and Rt , Thread n mber not padded). The file name created is arch BBBC are if RS is sed. LO;:A-(4/0!:1!ST A path. +4. What is user @ccount in Oracle database? An ser acco nt is not a physical str ct re in 1atabase 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 EF characters. 'The table name created will be #LO;S:tablename, and trigger name will be TLO;S name). +&. What dynamic data replication?

Page 13 of 153

Updating or /nserting records in remote database thro gh database triggers. /t may fail if remote database is having any problem. +'. What is T"o1.hase *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. /t has two phase, a *repare *hase and a (ommit *hase. +). <o" can you nforce 2eferential 7ntegrity 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 S?3 I 9 T? S3L N2!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. /t is sed in (lint, Server and Server,Server comm nications. 1,,. What is a S9@.S<OT ? Snapshots are read,only copies of a master table located on a remote node which is periodically refreshed to reflect changes made to the master table. 1,1. What is the mechanism pro-ided by O2@*3 replication ? Snapshots and S2A*S4OT LO;s for table

1,2. What is snapshots? Snapshot is an object sed to dynamically replicate data between distrib te database at specified time intervals. /n ver H.B they are read only. 1,3. What are the -arious type of snapshots? Simple and (omple$. 1,4. 6escribe t"o phases of T"o1phase 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 , /f 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 ? Page 14 of 153

/t is a table that maintains a record of modifications to the master table in a snapshot. /t is stored in the same database as master table and is only available for simple snapshots. /t sho ld be created before creating snapshots. 1,&. What are the benefits of distributed options in databases? 1atabase on other servers can be pdated and those transactions can be gro ped together with others in a logical nit. 1atabase 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. @AST , /f simple snapshot sed then a snapshot log can be sed to send the changes to the snapshot tables. @O-(! , 1efa lt val e. /f possible it performs a @AST refreshD Otherwise it will perform a complete refresh. 1,). What is a S9@.S<OT 3O8 ? 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 6istributed 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 modified. 11,. <o" can "e reduce the net"or0 traffic? , -eplication of data in distrib ted environment. , Using snapshots to replicate data. , Using remote proced re calls. 111. 6ifferentiate simple and comple$% snapshots ? , A simple snapshot is based on a % ery that does not contains ;-OU* +" cla ses, (O22!(T +" cla ses, PO/2s, s b,% ery or snashot of operations. , A comple$ snapshots contain atleast any one of the above. 112. What are the /uilt1ins used for sending .arameters to forms? "o can pass parameter val es to a form when an application e$ec tes the call:form, 2ew:form, Open:form or - n:prod ct. 113. *an you ha-e more than one content can-as -ie" attached "ith a "indo"? Page 15 of 153

"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 content canvas view. At r n time only one of the content canvas views assign to a window is displayed at a time. 114. 7s the @fter report trigger fired if the report e$ecution fails? "es. 11#. 6oes a /efore form trigger fire "hen the parameter form is suppressed? "es. 11&. What is S8@? The System ;lobal Area in an Oracle database is the area in memory to facilitate the transfer of information between sers. /t holds the most recently re% ested str ct ral information between sers. /t holds the most recently re% ested str ct ral information abo t the database. The str ct re is database b ffers, dictionary cache, redo log b ffer 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 S3L statements among conc rrent sers. 11). What is mean by .rogram 8lobal @rea D.8@E? /t is area in memory that is sed by a single Oracle ser process. 11+. What is a data segment? 1ata 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 S?3 statements in S8@? 1 e to ins fficient shared pool si6e. #onitor the ratio of the reloads ta&es place while e$ec ting S3L statements. /f the ratio is greater than C then increase the S4A-!1:*OOL:S/9!. 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 0ey? The related col mns of the tables in a cl ster are called the cl ster &ey. 123. 6o a -ie" contain data? 0iews do not contain or store data. Page 16 of 153

124. What is user @ccount in Oracle database? 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? 1on't grant ser access directly to tables within the application. /nstead 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. Users cannot access tables e$cept via the proced re. 12&. What are the dictionary tables used to monitor a database space? 1+A:@-!!:S*A(! 1+A:S!;#!2TS 1+A:1ATA:@/L!S. 12'. *an a property clause itself be based on a property clause? "es 12). 7f a parameter is used in a ;uery "ithout being pre-iously defined% "hat diff. e$ist bet". report 2., and 2.# "hen the ;uery is applied? .hile both reports E.B and E.L create the parameter, report E.L gives a message that a bind parameter has been created. 12+. What are the s;l clauses supported in the lin0 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 fires when the operators do ble clic&s on an image itemwhen,image,pressed fires when an operator clic&s or do ble clic&s on an image item 132. What are the different "indo"s e-ents acti-ated at runtimes? .hen:window:activated .hen:window:closed .hen:window:deactivated .hen:window:resi6ed .ithin this triggers, yo can e$amine the b ilt in system variable

Page 17 of 153

system. event:window to determine the name of the window for which the trigger fired. 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 defined in the c rrent form. 1ata 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 difference bet"een openBform and callBform? when one form invo&es another form by e$ec ting open:form the first 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 first e$it the called form. 13#. What is ne"Bform built1in? .hen one form invo&es another form by e$ec ting new:form oracle form e$its the first form and releases its memory before loading the new form calling new form completely replace the first with the second. /f there are changes pending in the first form, the operator will be prompted to save them before the new form is loaded. 13&. What is the A3O5 of 5alidationA .roperty of an item? What is the use of it? .hen LO0 for 0alidation is set to Tr e, Oracle @orms compares the c rrent val e of the te$t item to the val es in the first col mn displayed in the LO0. .henever the validation event occ rs. /f the val e in the te$t item matches one of the val es in the first col mn of the LO0, validation s cceeds, the LO0 is not displayed, and processing contin es normally. /f the val e in the te$t item does not match one of the val es in the first col mn of the LO0, Oracle @orms displays the LO0 and ses the te$t item val e as the search criteria to a tomatically red ce the list. 13'. What is the diff. "hen 4le$ mode is mode on and "hen it is off? .hen fle$ mode is on, reports a tomatically resi6es the parent when the child is resi6ed. 13). What is the diff. "hen confine mode is on and "hen it is off? .hen confine mode is on, an object cannot be moved o tside its parent in the layo t. 13+. What are -isual attributes? 0is al attrib tes are the font, color, pattern proprieties that yo set for form and men objects that appear in yo r application interface. Page 18 of 153

14,. Which of the t"o -ie"s should ob(ects according to possession? view by str ct re. 141. What are the t"o types of -ie"s a-ailable in the ob(ect na-igatorDspecific to report 2.#E? 0iew by str ct re and view by type . 142. What are the -b$ controls? 0b$ 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? Using 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? Using 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=@alse 14#. What are the "ays to monitor the performance of the report? Use reports profile e$ec table statement. Use S3L trace facility. 14&. 7f t"o groups are not lin0ed 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'. @n open form can not be e$ecute the callBform procedure if you chain of called forms has been initiated by another open form? Tr e 14). $plain about hori=ontal% 5ertical tool bar can-as -ie"s? Tool bar canvas views are sed to create tool bars for individ al windows. 4ori6ontal tool bars are display at the top of a window, j st nder its men bar. 0ertical 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. Page 19 of 153

1#,. What is the use of imageB=oom built1in? To manip late images in image items. 1#1. <o" do you reference a parameter indirectly? To indirectly reference a parameter se the 2A#! /2, (O*" 'b ilt,ins to indirectly set and reference the parameters val e' !$ample name:in ''capital parameter my param'), (opy ''SU-!S4','*arameter my:param') 1#2. What is a timer? Timer is an 5internal time cloc&5 that yo can programmatically create to perform an action each time the times. 1#3. What are the t"o phases of bloc0 coordination? There are two phases of bloc& coordination? the clear phase and the pop lation phase. 1 ring, the clear phase, Oracle @orms navigates internally to the detail bloc& and fl shes the obsolete detail records. 1 ring the pop lation phase, Oracle @orms 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$ master1detail relationships? There are three most common types of comple$ master,detail relationships? 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 fi$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 definition file that describes the terminal form which yo are sing rEBr n. 1#'. What is use of term? The term file 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 field 'similar to a te$t item field). .hen the operator selects the list icon, a list of available choices appears.

Page 20 of 153

1#+. What is the ma$imum no of chars the parameter can store? The ma$im m no of chars the parameter can store is only valid for char parameters, which can be pto MK8. 2o parameters defa lt to EF+ytes and 1ate parameter defa lt to H+ytes. 1&,. What are the default e$tensions of the files created by library module? The defa lt file 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 .roperties in a !aster16etail relationship? The coordination properties are 1eferred A to,3 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 2 ll. 1&3. What are the different .arameter types? Te$t *arameters1ata *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, @orm la, *laceholder col mn. 1&&. $plain about stac0ed can-as -ie"s? Stac&ed canvas view is displayed in a window on top of, or 5stac&ed5 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 off1line database bac0ups? Dfor 6/@ Sh t down the database from s%lpl s or server manager. +ac& p all files to secondary storage 'eg. tapes). !ns re that yo bac& p all data files, all control files and all log files. .hen completed, restart yo r database. 1o the following % eries to get a list of all files that needs to be bac&ed p? select name from sys.v:<datafileD Page 21 of 153

select member from sys.v:<logfileD select name from sys.v:<controlfileD Sometimes Oracle ta&es forever to sh tdown with the 5immediate5 option. As wor&aro nd to this problem, sh tdown sing these commands? alter system chec&pointD sh tdown abort start p restrict sh tdown immediate 2ote that if yo database is in A-(4/0!LO; mode, one can still se archived log files to roll forward from an off,line bac& p. /f yo cannot ta&e yo r database down for a cold 'off,line) bac& p at a convenient time, switch yo r database into A-(4/0!LO; mode and perform hot 'on,line) bac& ps. 1&). What is the difference bet"een S<OWB 67TO2 and 67TBT JT7T !? Show editor is the generic b ilt,in which accepts any editor name and ta&es some inp t string and ret rns modified 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 built1ins that are used to @ttach an 3O5 programmatically to an item? set:item:property get:item:property 'by setting the LO0:2A#! property) 1',. <o" does one do on1line database bac0ups? Dfor 6/@ !ach tablespace that needs to be bac&ed, p m st be switched into bac& p mode before copying the files o t to secondary storage 'tapes). Loo& at this simple e$ample. ALT!- TA+L!S*A(! $y6 +!;/2 +A(8U*D U cp $yf@ileC =bac& p1ir= ALT!- TA+L!S*A(! $y6 !21 +A(8U*D /t 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 files. Loo& at this e$ample? ALT!- S"ST!# S./T(4 LO;@/L!D ,, @orce log switch to pdate control file headers ALT!- 1ATA+AS! +A(8U* (O2T-OL@/L! TO '=bac& p1ir=control.dbf'D 2OT!? 1o 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 files while in bac& p mode. This will lead to e$cessive database archiving and even database free6es. 1'1. <o" does one bac0up a database using 2!@9? Dfor 6/@ Page 22 of 153

The biggest advantage of -#A2 is that it only bac& p sed space in the database. -man doesn't p t tablespaces in bac& p mode, saving on redo generation overhead. -#A2 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=NNN nocatalog r nV allocate channel tC type dis&D bac& p format '=app=oracle=db:bac& p=Rd:tRt:sRs:pRp' ' database )D release channel tCD W !$ample -#A2 restore? rman target sys=NNN nocatalog r nV allocate channel tC type dis&D J set ntil time 'A g BH EBBB ?LC'D restore tablespace sersD recover tablespace sersD release channel tCD W The e$amples above are e$tremely simplistic and only sef l for ill strating basic concepts. +y defa lt Oracle ses the database controlfiles to store information abo t bac& ps. 2ormally one wo ld rather set p a -#A2 catalog database to store -#A2 metadata in. -ead the Oracle +ac& p and -ecovery ; ide before implementing any -#A2 bac& ps. 2ote? -#A2 cannot write image copies directly to tape. One needs to se a third,party media manager that integrates with -#A2 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 different file e$tensions that are created by oracle reports? -ep file and -df file. 1'3. What is strip sources generate options? -emoves the so rce code from the library file and generates a library files that contains only pcode. The res lting file can be sed for final deployment, b t can not be s bse% ently edited in the designer.e$. fKLgen mod leAold:lib.pll seridAscott=tiger strip:so rce "!S o tp t:file 1'3. <o" does one put a database into @2*<75 3O8 mode? Dfor 6/@ The main reason for r nning in archivelog mode is that one can provide EK,ho r availability and g arantee complete data recoverability. /t is also necessary to enable A-(4/0!LO; mode before Page 23 of 153

one can start to se on,line database bac& ps. To enable A-(4/0!LO; mode, simply change yo r database start p command script, and bo nce the database? S3L*LUSI connect sys as sysdba S3L*LUSI start p mo nt e$cl siveD S3L*LUSI alter database archivelogD S3L*LUSI archive log startD S3L*LUSI alter database openD 2OT!C? -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 filling, p. 2OT!E? A-(4/0!LO; mode was introd ced with Oracle 0M, and is essential for database point,in,time recovery. Archiving can be sed in combination with on,line and off,line database bac& ps. 2OT!F? "o may want to set the following /2/T.O-A parameters when enabling A-(4/0!LO; mode? log:archive:startAT-U!, log:archive:destA... and log:archive:formatA... 2OT!K? "o can change the archive log destination of a database on, line with the A-(4/0! LO; STA-T TO 'directory'D statement. This statement is often sed to switch archiving between a set of directories. 2OT!L? .hen r nning Oracle -eal Application Server '-A(), yo need to sh t down all nodes before changing the database to A-(4/0!LO; mode. 1'4. What is the basic data structure that is re;uired for creating an 3O5? -ecord ;ro p. 1'#. <o" does one bac0up archi-ed log files? Dfor 6/@ One can bac& p archived log files sing -#A2 or any operating system bac& p tility. -emember to delete files after bac&ing them p to prevent the archive log directory from filling p. /f the archive log directory becomes f ll, yo r database will hangU Loo& at this simple -#A2 bac& p script? -#A2I r n V EI allocate channel devC type dis&D FI bac& p KI format '=app=oracle=arch:bac& p=log:tRt:sRs:pRp' LI 'archivelog all delete inp t)D MI release channel devCD HI W 1'&. 6oes Oracle "rite to data files in beginHhot bac0up mode? Dfor 6/@ Oracle will stop pdating file headers, b t will contin e to write data to the database files even if a tablespace is in bac& p mode. Page 24 of 153

/n bac& p mode, Oracle will write o t complete changed bloc&s to the redo log files. 2ormally only deltas 'changes) are logged to the redo 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 2ecord group *olumn? -ecord gro p col mn names cannot e$ceed FB characters. 1'). Which parameter can be used to set read le-el consistency across multiple ;ueries? -ead only 1'+. What are the different types of 2ecord 8roups? 3 ery -ecord ;ro ps 2on3 ery -ecord ;ro ps State -ecord ;ro ps 1),. 4rom "hich designation is it preferred to send the output to the printed? *reviewer 1)1. "hat are difference bet"een post database commit and post1form commit? *ost,form commit fires once d ring the post and commit transactions process, after the database commit occ rs. The post,form,commit trigger fires after inserts, pdates and deletes have been posted to the database b t before the transactions have been finali6ed in the iss ing the command. The post,database,commit trigger fires after oracle forms iss es the commit to finali6ed transactions. 1)2. What are the different 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 defining and setting the val esof inp ts that are re% ired by a form at start p. @orm parameters are variables of type char,n mber,date that yo define at design time. 1)&. What are the three types of user e$its a-ailable ? Page 25 of 153

Oracle *recompiler e$its, Oracle call interface, 2onOracle ser e$its. 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 Dpri-ilegedE user? Dfor 6/@ Oracle 1+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"S1+A privileges. S"S1+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 files and special operating system gro ps. This password file 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 master1detail triggers?K On,(hec&:delete:masterOn:clear:detailsOn:pop late:details 1+1. <o" does one connect to an administrati-e user? Dfor 6/@ /f an administrative ser belongs to the 5dba5 gro p on Uni$, or the 5O-A:1+A5 'O-A:sid:1+A) gro p on 2T, he=she can connect li&e this? connect = as sysdba 2o password is re% ired. This is e% ivalent to the des pported 5connect internal5 method. A password is re% ired for 5non,sec re5 administrative access. These passwords are stored in password files. -emote connections via 2etG are classified as non,sec re. Loo& at this e$ample? connect sys=password as sysdba 1+2. <o" does one create a pass"ord file? Dfor 6/@ The Oracle *assword @ile '<O-A(L!:4O#!=dbs=orapw or orapwS/1) stores passwords for sers with administrative privileges. One needs to create a password files before remote administrators 'li&e O!#) will be allowed to connect. @ollow this proced re to create a new password file? . Log in as the Oracle software owner . - ncommand? orapwd fileA<O-A(L!:4O#!=dbs=orapw<O-A(L!:S/1 passwordAmypasswd . Sh tdown the database 'S3L*LUSI S4UT1O.2 /##!1/AT!) . !dit the /2/T.O-A file and ens re -!#OT!:LO;/2:*ASS.O-1@/L!Ae$cl sive is set. . Start p the database 'S3L*LUSI STA-TU*) 2OT!? The orapwd tility presents a sec rity ris& in that it receives a password from the command line. This password is visible in the

Page 26 of 153

process table of many systems. Administrators needs to be aware of thisU 1+3. 7s it possible to modify an e$ternal ;uery in a report "hich contains it? 2o. 1+4. 6oes a grouping done for ob(ects in the layout editor affect the grouping done in the data model editor? 2o. 1+#. <o" does one add users to a pass"ord file? Dfor 6/@ One can select from the S"S.0:<*.@/L!:US!-S view to see which sers are listed in the password file. 2ew sers can be added to the password file by granting them S"S1+A or S"SO*!- privileges, or by sing the orapwd tility. ;-A2T S"S1+A TO scottD 1+&. 7f a brea0 order is set on a column "ould it affect columns "hich are under the column? 2o 1+'. Why are O.SG accounts a security ris0 in a clientHser-er en-ironment? Dfor 6/@ /f 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. /f yo set -!#OT!:OS:AUT4!2TAT-U! in yo r init.ora file, Oracle ass mes that the remote OS has a thenticated the ser. /f -!#OT!:OS:AUT4!2T is set to @ALS! 'recommended), remote sers will be nable to connect witho t a password. /1!2T/@/!1 !OT!-2ALL" will only be in effect from the local host. Also, if yo are sing 5O*S<5 as yo r prefi$, yo will be able to log on locally with or witho t a password, regardless of whether yo have identified yo r /1 with a password or defined it to be /1!2T/@/!1 !OT!-2ALL". 1+). 6o user parameters appear in the data modal editor in 2.#? 2o 1++. *an you pass data parameters to forms? 2o 2,,. 7s it possible to lin0 t"o groups inside a cross products after the cross products group has been created? no 2,1. What are the different modals of "indo"s?

Page 27 of 153

#odalless windows #odal windows 2,2. What are modal "indo"s? #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 resi6e, scroll or iconify a modal window. 2,3. What are the different default triggers created "hen !aster 6eletes .roperty is set to 9on1isolated? #aster 1eletes *roperty -es lting Triggers ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 2on,/solated'the defa lt) On,(hec&,1elete,#aster On,(lear,1etails On,*op late,1etails 2,4. What are the different default triggers created "hen !aster 6eletes .roperty is set to isolated? #aster 1eletes *roperty -es lting Triggers ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, /solated On,(lear,1etails On,*op late,1etails 2,#. What are the different default triggers created "hen !aster 6eletes .roperty is set to *ascade? #aster 1eletes *roperty -es lting Triggers ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, (ascading On,(lear,1etails On,*op late,1etails *re,delete 2,&. What is the diff. bet. setting up of parameters in reports 2., reports2.#? LO0s can be attached to parameters in the reports E.L parameter form. 2,'. What are the difference bet"een lo- L 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 first library can reference program nits in the attached library. Library s pport dynamic loading,that is library Page 28 of 153

program nits are loaded into an application only when needed. This can significantly red ce the r n,time memory re% irements of applications. 2,+. What is le$ical reference? <o" can it be created? 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 T before the col mn or parameter name. 21,. What is system.coordinationBoperation? /t represents the coordination ca sing event that occ r on the master bloc& in master,detail relation. 211. What is synchroni=e? /t is a terminal screen with the internal state of the form. /t pdates the screen display to reflect the information that oracle forms has in its internal representation of the screen. 212. What use of command line parameter cmd file? /t is a command line arg ment that allows yo to specify a file that contain a set of arg ments for rEBr n. 213. What is a Te$tBio .ac0age? /t allows yo to read and write information to a file in the file system. 214. What is formsB663? /ss es dynamic S%l statements at r n time, incl ding server side pl=S3l and 11L 21#. <o" is lin0 tool operation different bet. reports 2 L 2.#? /n -eports E.B the lin& tool has to be selected and then two fields to be lin&ed are selected and the lin& is a tomatically created. /n E.L the first field is selected and the lin& tool is then sed to lin& the first field to the second field. 21&. What are the different styles of acti-ation of ole Ob(ects? /n place activation!$ternal activation 21'. <o" do you reference a .arameter? /n *l=S%l, "o can reference and set the val es of form parameters sing bind variables synta$. !$. *A-A#!T!- name A '' or ?bloc&.item A *A-A#!T!- *arameter name 21). What is the difference bet"een ob(ect embedding L lin0ing in Oracle forms? /n 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 file.

Page 29 of 153

21+. 9ame of the functions used to getHset can-as properties? ;et:view:property, Set:view:property 22,. What are the built1ins that are used for setting the 3O5 properties at runtime? get:lov:property set:lov:property 221. What are the built1ins 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) Unset:gro p:selection'proced re) 222. What are built1ins used for .rocessing ro"s? ;!T:;-OU*:-O.:(OU2T'f nction) ;!T:;-OU*:S!L!(T/O2:(OU2T'f nction) ;!T:;-OU*:S!L!(T/O2'f nction) -!S!T:;-OU*:S!L!(T/O2'proced re) S!T:;-OU*:S!L!(T/O2'proced re) U2S!T:;-OU*:S!L!(T/O2'proced re) 223. What are the built1in 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 built1ins used for 8etting cell -alues? ;!T:;-OU*:(4A-:(!LL 'f nction) ;!T:;-OU*(!LL'f nction) ;!T:;-OU*:2U#+!T:(!LL'f nction) 22#. @tleast ho" many set of data must a data model ha-e before a data model can be base on it? @o r 22&. To e$ecute ro" from being displayed that still use column in the ro" "hich property can be used? @ormat trigger. 22'. What are different types of modules a-ailable in oracle form? @orm 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 Page 30 of 153

22). What is the remo-e on e$it property? @or a modelless window, it determines whether oracle forms hides the window a tomatically when the operators navigates to an item in the another window. 22+. What is W< 916atabase1record trigger? @ires when oracle forms first mar&s a record as an insert or an pdate. The trigger fires 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 modifies the first item in the record, and after the operator attempts to navigate o t of the item. 23,. What is a difference bet"een pre1select and pre1;uery? @ires 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 fires j st before oracle forms iss es the select statement to the database after the operator as define the e$ample records by entering the % ery criteria in enter % ery mode.*re,% ery trigger fires before pre,select trigger. 231. What are built1ins associated "ith timers? find:timercreate:timerdelete:timer 232. What are the built1ins used for finding ob(ect 76 functions? @ind:gro p'f nction) @ind:col mn'f nction) 233. What are the built1ins used for finding Ob(ect 76 function? @/21:;-OU*'f nction) @/21:(OLU#2'f nction) 234. @ny attempt to na-igate programmatically to disabled form in a callBform stac0 is allo"ed? @alse 23#. >se the @ddBgroupBro" procedure to add a ro" to a static record group 1. true or false? @alse 23&. What third party tools can be used "ith Oracle />H 2!@9? Dfor 6/@ The following #edia #anagement Software 0endors have integrated their media management software pac&ages with Oracle -ecovery #anager and OracleH !nterprise +ac& p Utility. The #edia #anagement 0endors will provide first line technical s pport for the integrated bac& p=recover sol tions. Page 31 of 153

0eritas 2et+ac& p !#( 1ata #anager '!1#) 4* O#2/+ac& // /+#'s Tivoli Storage #anager , formerly A1S# Legato 2etwor&er #anage/T +ac& p and -ecovery Sterling Software's SA#S?Ale$andria , formerly from Spectralogic S n Solstice +ac& p 23'. Why and "hen should one tune? Dfor 6/@ One of the biggest responsibilities of a 1+A is to ens re that the Oracle database is t ned properly. The Oracle -1+#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 reasons? The speed of comp ting might be wasting val able h man time ' sers waiting for response)D !nable yo r system to &eep, p with the speed b siness is cond ctedD and Optimi6e hardware sage to save money 'companies are spending millions on hardware). Altho gh this @A3 is not overly concerned with hardware iss es, one needs to remember than yo cannot t ne a + ic& into a @errari. 23). <o" can a brea0 order be created on a column in an e$isting group? What are the -arious sub e-ents a mouse double clic0 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 clic0 e-ent in-ol-es? A placeholder col mn is sed to hold calc lated val es at a specified 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 clic0 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? Dfor 6/@ 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. /f an alarm is triggered, the system sho ld a tomatically notify the 1+A 'e,mail, page, etc.) to ta&e appropriate action. /nfrastr ct re availability? . /s the database p and responding to re% ests . Are the listeners p and responding to re% ests Page 32 of 153

. Are the Oracle 2ames and L1A* Servers p and responding to re% ests . Are the .eb Listeners p and responding to re% ests Things that can ca se service o tages? . /s the archive log destination filling pX . Objects getting close to their ma$ e$tents . User and process limits reached Things that can ca se bad performance? See % estion 5.hat t ning indicators can one seX5. 242. Where should the tuning effort be directed? Dfor 6/@ (onsider the following areas for t ning. The order in which steps are listed needs to be maintained to prevent t ning side effects. @or e$ample, it is no good increasing the b ffer cache if yo can red ce /=O by rewriting a S3L statement. 1atabase 1esign 'if it's not too late)? *oor system performance s ally res lts from a poor database design. One sho ld generally normali6e to the F2@. Selective denormali6ation can provide val able performance improvements. .hen designing, always &eep the 5data access path5 in mind. Also loo& at proper data partitioning, data replication, aggregation tables for decision s pport systems, etc. Application T ning? !$perience showed that appro$imately GBR of all Oracle system performance problems are resolved by coding optimal S3L. Also consider proper sched ling of batch tas&s after pea& wor&ing ho rs. #emory T ning? *roperly si6e yo r database b ffers 'shared pool, b ffer cache, log b ffer, etc) by loo&ing at yo r b ffer hit ratios. *in large objects into memory to prevent fre% ent reloads. 1is& /=O T ning? 1atabase files needs to be properly si6ed 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 1atabase (ontention? St dy database loc&s, latches and wait events caref lly and eliminate where possible. T ne the Operating System? #onitor and t ne operating system (*U, /=O and memory tili6ation. @or more information, read the related Oracle @A3 dealing with yo r specific operating system. 243. What are the -arious sub e-ents a mouse double clic0 e-ent in-ol-es? What are the -arious sub e-ents a mouse double clic0 e-ent in-ol-es? 1o ble clic&ing the mo se consists of the mo se down, mo se p, mo se clic&, mo se down T mo se p events.

Page 33 of 153

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 clic0 e-ent in-ol-es? 1estype and 1esname. 24&. What are the built1ins used for *reating and deleting groups? (-!AT!,;-OU* 'f nction) (-!AT!:;-OU*:@-O#:3U!-"'f nction) 1!L!T!:;-OU*'proced re) 24'. What are different types of can-as -ie"s? (ontent canvas views Stac&ed canvas views 4ori6ontal toolbar vertical toolbar. 24). What are the different types of 6elete details "e can establish in !aster16etails? (ascade /solate 2on,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 >serBe$it? (alls the ser e$it named in the ser:e$it:string. /nvo&es a F;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 L Oracle call interface? +y sing the statement !O!(/A@;!T T !O!(/A@*UT. 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 file be attached to a report "hile creating in the report "riter? Page 34 of 153

+y sing the lin& file property in the layo t boiler plate property sheet. 2##. <o" can 7 message to passed to the user from reports? +y sing S-..#!SSA;! f nction. (Continued on next part...) 2#&. 6oes one need to dropH truncate ob(ects before importing? Dfor 6/@ +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. /f not, the new data will be appended to the e$isting tables. One m st always 1-O* e$isting Se% ences before re,importing. /f the se% ences are not dropped, they will generate n mbers inconsistent with the rest of the database. 2ote? /t is also advisable to drop inde$es before importing to speed p the import process. /nde$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 importHe$port bet"een different -ersions of Oracle? Dfor 6/@ 1ifferent versions of the import tility is pwards compatible. This means that one can ta&e an e$port file created from an old e$port version, and import it sing a later version of the import tility. This is % ite an effective way of pgrading a database from one release of Oracle to the ne$t. Oracle also ships some previo s cate$pO.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). @or e$ample, one can r n <O-A(L!:4O#!=rdbms=admin=cate$pH.s%l on an Oracle G database to allow the Oracle H.F e$p=imp tilities to r n against an Oracle G database. 2#+. What are different types of images? +oiler plate images/mage /tems 2&,. *an one e$port to multiple files?H *an one beat the >ni$ 2 8ig limit? Dfor 6/@ @rom OracleGi, the e$port tility s pports m ltiple o tp t files. This feat re enables large e$ports to be divided into files whose si6es will not e$ceed any operating system limits '@/L!S/9!A parameter). .hen importing from m lti,file e$port yo m st provide the same filenames in the same se% ence in the @/L!A parameter. Loo& at this e$ample? e$p S(OTT=T/;!- @/L!A1?Y@C.dmp,!?Y@E.dmp @/L!S/9!ACBm LO;Ascott.log Use the following techni% e if yo se an Oracle version prior to Gi? Page 35 of 153

(reate a compressed e$port on the fly. 1epending on the type of data, yo probably can e$port p to CB gigabytes to a single file. This e$ample ses g6ip. /t offers the best compression / &now of, b t yo can also s bstit te it with 6ip, compress or whatever. J create a named pipe m&nod e$p.pipe p J read the pipe , o tp t to 6ip file in the bac&gro nd g6ip Z e$p.pipe I scott.e$p.g6 T J feed the pipe e$p seridAscott=tiger fileAe$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 '?) before a col mn or a parameter name. 2&2. <o" can one impro-e 7mportH 6/@ !O*O-T? $port performance? Dfor

. Set the +U@@!- parameter to a high val e 'e.g. E#) . Set the -!(O-1L!2;T4 parameter to a high val e 'e.g. MK8) . Stop nnecessary applications to free, p reso rces for yo r job. . /f yo r n m ltiple e$port sessions, ens re they write to different physical dis&s. . 1O 2OT e$port to an 2@S mo nted filesystem. /t will ta&e forever. /#*O-T? . (reate an inde$file so that yo can create inde$es A@T!- yo have imported data. 1o this by setting /21!O@/L! to a filename and then import. 2o data will be imported b t a file containing inde$ definitions will be created. "o m st edit this file afterwards and s pply the passwords for the schemas on all (O22!(T statements. . *lace the file to be imported on a separate physical dis& from the oracle data files . /ncrease 1+:(A(4!:S/9! '1+:+LO(8:+U@@!-S prior to >i) considerably in the init<S/1.ora file . Set the LO;:+U@@!- to a big val e and restart oracle. . Stop redo log archiving if it is r nning 'ALT!- 1ATA+AS! 2OA-(4/0!LO;D) . (reate a +/; tablespace with a +/; rollbac& segment inside. Set all other rollbac& segments offline 'e$cept the S"ST!# rollbac& segment of co rse). The rollbac& segment m st be as big as yo r biggest table '/ thin&X) . Use (O##/TA2 in the import parameter file if yo can afford it . Use A2AL"9!A2 in the import parameter file to avoid time cons ming A2AL"9! statements . -emember to r n the inde$file previo sly created Page 36 of 153

2&3. 8i-e the se;uence of e$ecution of the -arious report triggers? +efore form , After form , +efore report, +etween page, After report. 2&4. What are the common 7mportH $port problems? Dfor 6/@ O-A,BBBBC? Uni% e constraint '...) violated , "o are importing d plicate rows. Use /;2O-!A2O to s&ip tables that already e$ist 'imp will give an error if the object is re,created). O-A,BCLLL? Snapshot too old , As& yo r sers to STO* wor&ing while yo are e$porting or se parameter (O2S/ST!2TA2O O-A,BCLME? @ailed to e$tend rollbac& segment , (reate bigger rollbac& segments or set parameter (O##/TA" while importing /#*,BBBCL? Statement failed ... object already e$ists... , Use the /;2O-!A" 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 plHs;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 different record in the master bloc& the c rrent record is a coordination ca sing event. 2&+. What is the difference bet"een O3 Ser-er L Ole *ontainer? An Ole server application creates ole Objects that are embedded or lin&ed in ole (ontainers e$. Ole servers are ms:word T 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 objectsD yo define 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 3O5?

Page 37 of 153

An LO0 is a scrollable pop p window that provides the operator with either a single or m lti col mn selection list. 2'2. @t "hat point of report e$ecution is the before 2eport trigger fired? 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 1ins used for !odifying a groups structure? A11,;-OU*:(OLU#2 'f nction) A11:;-OU*:-O. 'proced re) 1!L!T!:;-OU*:-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 F ;L and then ret rn control ' and ) bac& to Oracle reports. 2'#. What is the >ser19amed 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 si6e, position, and title. 2'&. !y database "as terminated "hile in /@*:>. !O6 % do 7 need to reco-er? Dfor 6/@ /f a database was terminated while one of its tablespaces was in +A(8U* #O1! 'ALT!- TA+L!S*A(! $y6 +!;/2 +A(8U*D), it will tell yo that media recovery is re% ired when yo try to restart the database. The 1+A is then re% ired to recover the database and apply all archived logs to the database. 4owever, from OracleH.E, yo can simply ta&e the individ al datafiles o t of bac& p mode and restart the database. ALT!- 1ATA+AS! 1ATA@/L! '=path=filename' !21 +A(8U*D One can select from 0<+A(8U* to see which datafiles are in bac& p mode. This normally saves a significant amo nt of database down time. Thir 0adivel contrib ted the following? @rom Oracle>i onwards, the following command can be sed to ta&e all of the datafiles o t of hot bac& p mode? ALT!- 1ATA+AS! !21 +A(8U*D The above commands need to be iss ed when the database is mo nted. 2''. What is a Static 2ecord 8roup? A static record gro p is not associated with a % ery, rather, yo define its str ct re and row val es at design time, and they remain fi$ed at r ntime.

Page 38 of 153

2'). What is a record group? A record gro p is an internal Oracle @orms that str ct re that has a col mn=row framewor& similar to a database table. 4owever, nli&e database tables, record gro ps are separate objects that belong to the form mod le which they are defined. 2'+. !y database is do"n and 7 cannot restore. What no"? Dfor 6/@ -ecovery witho t any bac& p is normally not s pported, however, Oracle (ons lting can sometimes e$tract data from an offline database sing a tility called 1UL '1is& UnLoad). This tility reads data in the data files and nloads it into S3LNLoader or e$port d mp files. 1UL 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. /t is intended as an absol te last resort and will most li&ely cost yo r company a lot of moneyUUU 2),. 7F-e lost my 2 6O3O8 files% ho" can 7 get my 6/ bac0? Dfor 6/@ The following /2/T.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 A 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 ? L What is a logical page ? A physical page is a si6e of a page. That is o tp t by the printer. The logical page is the si6e of one page of the act al report as seen in the *reviewer. 2)3. 7F-e lost some 2ollbac0 Segments% ho" can 7 get my 6/ bac0? Dfor 6/@ -e,start yo r database with the following /2/T.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 dataUUU *lease contact Oracle S pport before sing it. :(orr pted:rollbac&:segments A 'rbsBC, rbsBC, rbsBF, rbsBK) 2)4. What are the differences bet"een 6/@ /> and 2!@9? Dfor

Page 39 of 153

!nterprise +ac& p Utility '!+U) is a f nctionally rich, high performance interface for bac&ing p OracleH databases. /t is sometimes referred to as O!+U for Oracle !nterprise +ac& p Utility. The Oracle -ecovery #anager '-#A2) tility that ships with OracleG and above is similar to OracleH's !+U tility. 4owever, there is no direct pgrade path from !+U to -#A2. 2)#. <o" does one create a 2!@9 reco-ery catalog? Dfor 6/@ 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$ample? s%lpl s sys S3LIcreate ser rman identified by rmanD S3LI alter ser rman defa lt tablespace tools temporary tablespace tempD S3LI alter ser rman % ota nlimited on toolsD S3LI grant connect, reso rce, recovery:catalog:owner to rmanD S3LI e$itD 2e$t, log in to rman and create the catalog schema. *rior to Oracle Gi this was done by r nning the catrman.s%l script. rman catalog rman=rman -#A2Icreate catalog tablespace toolsD -#A2I e$itD "o can now contin e by registering yo r databases in the catalog. Loo& at this e$ample? rman catalog rman=rman target bac&dba=bac&dba -#A2I register databaseD 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 L repeating frame? A frame is a holder for a gro p of fields. 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. Unli&e the pop list or the te$t list style list items, the combo bo$ style list item will both display fi$ed val es and accept one operator entered val e. 2)+. What are three panes that appear in the run time plHs;l interpreter? C. So rce pane. E. interpreter pane. F. 2avigator pane.

Page 40 of 153

2+,. What are the t"o panes that @ppear in the design time plHs;l interpreter? C. So rce pane. E. /nterpreter pane 2+1. What are the t"o "ays by "hich data can be generated for a parameters list of -alues? C. Using static val es. E. .riting select statement. 2+2. What are the -arious methods of performing a calculation in a report ? C. *erform the calc lation in the S3L statements itself. E. Use a calc lated = s mmary col mn in the data model. 2+3. What are the default e$tensions of the files created by menu module? .mmb, .mm$ 2+4. What are the default e$tensions of the files 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 L logical page no. or L of physical page no.? T physical page no. 2+&. 7t is possible to use ra" de-ices as data files and "hat is the ad-antages o-er file. system files ? "es. The advantages over file system files. /=O will be improved beca se Oracle is bye,passing the &ernnel which writing into dis&. 1is& (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 file bac& p, instead we can se dd command which is less fle$ible and has limited recoveries. 2+). What is the significance 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 R sho ld leave free for managing row pdations etc., 2++. What is the use of 79*TY. option in J. command ?

Page 41 of 153

Type e$port sho ld be performed (O#*L!T!,(U#ULAT/0!,/2(-!#!2TAL. 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. 3,,. What is the use of 473 option in 7!. command ? The name of the file from which import sho ld be performed. 3,1. What is a Shared S?3 pool? The data dictionary cache is stored in an area in S;A called the Shared S3L *ool. This will allow sharing of parsed S3L statements among conc rrent sers. 3,2. What is hot bac0up and ho" it can be ta0en? Ta&ing bac& p of archive log files when database is open. @or this the A-(4/0!LO; mode sho ld be enabled. The following files need to be bac&ed p. All data files. All Archive log, redo log files. All control files. 3,3. 3ist the Optional 4le$ible @rchitecture DO4@E of Oracle database? or <o" can "e organi=e the tablespaces in Oracle database to ha-e ma$imum performance ? S"ST!# , 1ata dictionary tables. 1ATA , Standard operational tables. 1ATAE, Static tables sed for standard operations /21!O!S , /nde$es for Standard operational tables. /21!O!SC , /nde$es of static tables sed for standard operations. TOOLS , Tools table. TOOLSC , /nde$es for tools table. -+S , Standard Operations -ollbac& Segments, -+SC,-+SE , Additional=Special -ollbac& segments. T!#* , Temporary p rpose tablespace T!#*:US!- , Temporary tablespace for sers. US!-S , User tablespace. 3,4. <o" to implement the multiple control files for an e$isting database ? Sh tdown the database (opy one of the e$isting control file to new location !dit (onfig ora file by adding new control file. name -estart the database. 3,#. What is ad-antage of ha-ing dis0 shado"ingH !irroring ? Shadow set of dis&s save as a bac& p in the event of dis& fail re. /n most Operating System if any dis& fail re occ rs it a tomatically switchover to place of failed dis&. /mproved performance beca se most OS s pport vol me shadowing can direct file /=O re% est to se the shadow set of files instead of the main set of files. This red ces /=O load on the main set of dis&s.

Page 42 of 153

3,&. <o" "ill you force database to use particular rollbac0 segment ? S!T T-A2SA(T/O2 US! -OLL+A(8 S!;#!2T rbs:name. 3,'. Why ;uery fails sometimes ? -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 2 *O26 3 98T< option in command ? -ecord length in bytes. J.

3,+. <o" "ill you monitor rollbac0 segment status ? 3 erying the 1+A:-OLL+A(8:S!;S view /2 US! , -ollbac& Segment is on,line. A0A/LA+L! , -ollbac& Segment available b t not on,line. O@@,L/2! , -ollbac& Segment off,line /20AL/1 , -ollbac& Segment 1ropped. 2!!1S -!(O0!-" , (ontains data b t need recovery or cor pted. *A-TL" A0A/LA+L! , (ontains data from an nresolved transaction involving a distrib ted database. 31,. What is meant by 2edo 3og file mirroring ? <o" it can be achie-ed? *rocess of having a copy of redo log files is called mirroring. This can be achieved by creating gro p of log files together, so that L;.- will a tomatically writes them to all the members of the c rrent on,line redo log gro p. /f any one gro p fails then database a tomatically switch over to ne$t gro p. /t degrades performance. 311. Which parameter in Storage clause "ill reduce no. of ro"s per bloc0? *(T@-!! parameter -ow si6e also red ces no of rows per bloc&. 312. What is meant by recursi-e hints ? 2 mber of times processes repeatedly % ery the dictionary table is called rec rsive hints. /t is d e to the data dictionary cache is too small. +y increasing the S4A-!1:*OOL:S/9! parameter we can optimi6e the si6e of 1ata 1ictionary (ache. 313. What is the use of .@2473 option in J. command ? 2ame of the parameter file to be passed for e$port. 314. What is the difference bet"een loc0s% latches% en;ueues and semaphores? Dfor 6/@

Page 43 of 153

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,A21,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. !n% e es and loc&s are different names for the same thing. +oth s pport % e ing and conc rrency. They are % e ed and serviced in a first,in,first,o t '@/@O) order. Semaphores are an operating system facility sed to control waiting. Semaphores are controlled by the following Uni$ parameters? semmni, semmns and semmsl. Typical settings are? semmns A s m of the 5processes5 parameter for each instance 'see initZinstanceI.ora for each instance) semmni A n mber of instances r nning sim ltaneo slyD semmsl A semmns 31#. What is a logical bac0up? Logical bac& p involves reading a set of database records and writing them into a file. !$port tility is sed for ta&ing bac& p and /mport tility is sed to recover from bac& p. 31&. Where can one get a list of all hidden Oracle parameters? Dfor 6/@ Oracle initiali6ation or /2/T.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 % ery? select N from S"S.O<8S**/ where s bstr'8S**/2#,C,C) A ':'D The following % ery displays parameter names with their c rrent val e? select a.&sppinm 5*arameter5, b.&sppstvl 5Session 0al e5, c.&sppstvl 5/nstance 0al e5 from $<&sppi a, $<&sppcv b, $<&sppsv c where a.ind$ A b.ind$ and a.ind$ A c.ind$ and s bstr'&sppinm,C,C)A':' order by a.&sppinmD -emember? Tho shall not play with ndoc mented parametersU 31'. What is a database 5 9T and ho" does one set it? Dfor 6/@ 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 /2/T.O-A parameter file can activate events. !.g. Page 44 of 153

eventA'CKBC trace name errorstac&, level CE' ... or, by iss ing an ALT!- S!SS/O2 S!T !0!2TS command? !.g. alter session set events 'CBBKM trace name conte$t forever, level K'D The alter session method only affects the ser's c rrent session, whereas changes to the /2/T.O-A file will affect all sessions once the database has been restarted. 31). What is a 2ollbac0 segment entry ? /t is the set of before image data bloc&s that contain rows that are modified 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? Dfor 6/@ The following events are fre% ently sed by 1+As and Oracle S pport to diagnose problems? 5 CBBKM trace name conte$t forever, level K Trace S3L statements and show bind variables in trace o tp t. 5 CBBKM trace name conte$t forever, level G This shows wait events in the S3L trace files 5 CBBKM trace name conte$t forever, level CE This shows both bind variable names and wait events in the S3L trace files 5 CKBC trace name errorstac&, level CE CKBC trace name errorstac&, level K CKBC trace name processstate 1 mps o t trace information if an O-A,CKBC 5inserted val e too large for col mn5 error occ rs. The CKBC can be replaced by any other Oracle Server error code that yo want to trace. 5 MB trace name errorstac& level CB Show where in the code Oracle gets a deadloc& 'O-A,MB), and may help to diagnose the problem. The following lists of events are e$amples only. They might be version specific, so please call Oracle before sing them? 5 CBECB trace name conte$t forever, level CB CBECC trace name conte$t forever, level CB CBEFC trace name conte$t forever, level CB These events prevent database bloc& corr ptions 5 CBBK> trace name conte$t forever, level E #emory protect c rsor 5 CBECB trace name conte$t forever, level E 1ata bloc& chec& 5 CBECC trace name conte$t forever, level E /nde$ bloc& chec& 5 CBEFL trace name conte$t forever, level C #emory heap chec& 5 CBEME trace name conte$t forever, level FBB Allow FBB bytes memory lea& for connections 2ote? "o can se the Uni$ oerr command to get the description of an event. On Uni$, yo can type 5oerr ora CBBLF5 from the command prompt to get event details. 32,. <o" can one dump internal database structures? Dfor 6/@ The following 'mostly ndoc mented) commands can be sed to obtain information abo t internal database str ct res. o 1 mp control file contents Page 45 of 153

alter session set events 'immediate trace name (O2T-OL@ level CB' = o 1 mp file headers alter session set events 'immediate trace name @/L!:41-S level CB' = o 1 mp redo log headers alter session set events 'immediate trace name -!1O41- level CB' = o 1 mp the system state 2OT!? Ta&e F s ccessive S"ST!#STAT! d mps, with CB,min te intervals alter session set events 'immediate trace name S"ST!#STAT! level CB' = o 1 mp the process state alter session set events 'immediate trace name *-O(!SSSTAT! level CB' = o 1 mp Library (ache details alter session set events 'immediate trace name library cache level CB' = o 1 mp optimi6er statistics whenever a S3L statement is parsed 'hint? change statement or fl sh pool) alter session set events 'CBBLF trace name conte$t forever, level C' = o 1 mp a database bloc& '@ile= +loc& m st be converted to 1+A address) (onvert file and bloc& n mber to a 1+A 'database bloc& address). !g? variable $ varcharED e$ec ?$ ?A dbms: tility.ma&e:data:bloc&:address'C,CE)D print $ alter session set events 'immediate trace name bloc&d mp level LBFMBG>K' = 321. What are the different 0ind of e$port bac0ups? @ ll bac& , (omplete database /ncremental , Only affected tables from last incremental date=f ll bac& p date. ( m lative bac& p , Only affected table from the last c m lative date=f ll bac& p date. 322. <o" free e$tents are managed in 5er &., and 5er '., ? @ree e$tents cannot be merged together in 0er M.B. @ree e$tents are periodically coalesces with the neighboring free e$tent in 0er H.B 323. What is the use of 2 *O26 option in J. command?

Page 46 of 153

@or /ncremental e$ports, the flag indirects whether a record will be stores data dictionary tables recording the e$port. 324. What is the use of 2OWS option in J. command ? @lag to indicate whether table rows sho ld be e$ported. /f '2' only 11L statements for the database objects will be created. 32#. What is the use of *O!.2 SS option in J. command ? @lag to indicate whether e$port sho ld compress fragmented segments into single e$tents. 32&. <o" "ill you s"ap ob(ects into a different table space for an e$isting database ? !$port the ser *erform import sing the command imp system=manager fileAe$port.dmp inde$fileAnewrite.s%l. This will create all definitions into newfile.s%l. 1rop necessary objects. - n the script newfile.s%l after altering the tablespaces. /mport from the bac& p for the necessary objects. 32'. <o" does Space allocation table place "ithin a bloc0 ? !ach bloc& contains entries as follows @i$ed bloc& header 0ariable bloc& header -ow 4eader,row date 'm ltiple rows may e$ists) *(T!-!! 'R of free space for row pdation in f t re) 32). What are the factors causing the reparsing of S?3 statements in S8@? 1 e to ins fficient Shared S3L pool si6e. #onitor the ratio of the reloads ta&es place while e$ec ting S3L statements. /f the ratio is greater than C then increase the S4A-!1:*OOL:S/9!. LO;/(AL T *4"S/(AL A-(4/T!(TU-! O@ 1ATA+AS!. 32+. What is dictionary cache ? 1ictionary cache is information abo t the databse objects stored in a data dictionary table. 33,. What is a *ontrol file ? 1atabase overall physical architect re is maintained in a file called control file. /t will be sed to maintain internal consistency and g ide recovery operations. # ltiple copies of control files are advisable. 331. What is 6atabase /uffers ? 1atabase b ffers 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 1+:+LO(8:+U@@!-S parameter in /2/T.O-A decides the si6e.

Page 47 of 153

332. <o" "ill you create multiple rollbac0 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 -B in the S"ST!# tablespace. #a&e new rollbac& segment available 'After sh tdown, modify init.ora file and Start database) (reate other tablespaces '-+S) for rollbac& segments. 1eactivate -ollbac& Segment -B and activate the newly created rollbac& segments. 333. What is cold bac0up? What are the elements of it? (old bac& p is ta&ing bac& p of all physical files after normal sh tdown of database. .e need to ta&e. , All 1ata files. , All (ontrol files. , All on,line redo log files. , The init.ora file 'Optional) 334. What is meant by redo log buffer ? (hanges made to entries are written to the on,line redo log files. So that they can be sed in roll forward operations d ring database recoveries. +efore writing them into the redo log files, they will first bro ght to redo log b ffers in S;A and L;.- will write into files fre% ently. LO;:+U@@!- parameter will decide the si6e. 33#. <o" "ill you estimate the space re;uired by a non1 clustered tables? (alc late the total header si6e (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 si6e. (alc late the average n mber rows that can fit in a bloc& (alc late the n mber of bloc&s and bytes re% ired for the table. After arriving the calc lation, add CB R additional space to calc late the initial e$tent si6e for a wor&ing table. 33&. <o" "ill you monitor the space allocation ? +y % erying 1+A:S!;#!2T 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 789O2 option in 7!. command ? A flag to indicate whether the import sho ld ignore errors enco nter when iss ing (-!AT! commands. 33+. What is the use of @9@3YS command ? Page 48 of 153 D 5er 'E option in J.

A flag to indicate whether statistical information abo t the e$ported objects sho ld be written to e$port d mp file. 34,. What is the use of 2OWS option in 7!. command ? A flag to indicate whether rows sho ld be imported. /f this is set to '2' then only 11L for database objects will be e$ec ted. 341. What is the use of 796 J S option in J. command ? A flag to indicate whether inde$es on tables will be e$ported. 342. What is the use of 796 J S option in 7!. command ? A flag to indicate whether import sho ld import inde$ on tables or not. 343. What is the use of 82@9T option in J. command? A flag to indicate whether grants on databse objects will be e$ported or not. 0al e is '"' or '2'. 344. What is the use of 82@9T option in 7!. command ? A flag to indicate whether grants on database objects will be imported. 34#. What is the use of 4>33 option in J. command ? A flag to indicate whether f ll databse e$port sho ld be performed. 34&. What is the use of S<OW option in 7!. command ? A flag to indicate whether file content sho ld be displayed or not. 34'. What is the use of *O9ST2@79TS option in J. command ? A flag to indicate whether constraints on table need to be e$ported. 34). What is the use of *O9S7ST 9T D5er 'E option in J. command ? A flag to indicate whether a read consistent version of all the e$ported objects sho ld be maintained. 34+. What are the different methods of bac0ing up oracle database ? , Logical +ac& ps , (old +ac& ps , 4ot +ac& ps 'Archive log) 3#,. What is the difference bet"een O915@376@T 147 36 trigger and a .OST1*<@98 trigger ? .hen yo changes the !$isting val e to n ll, the On,validate field trigger will fire post change trigger will not fire. At the time of e$ec te, % ery post,change trigger will fire, on,validate field trigger will not fire. 3#1. When is .2 1?> 2Y trigger e$ecuted ? .hen !$ec te,% ery or co nt,% ery *ac&age proced res are invo&ed. Page 49 of 153

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 ? Unlimited 3#4. While specifying masterHdetail relationship bet"een t"o bloc0s specifying the (oin condition is a must ? True or 4alse. ? Tr e 3##. J7TB4O2! is a restricted pac0age procedure ?a. True b. 4alse Tr e 3#&. What is the usage of an O9179S 2T%O916 3 T and O91 >.6@T T2788 2S ? 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. @or !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 .op1up "indo" ? the pop, p field editor pop, p list of val es pop, p pages. Alert ? 3#). What is an S?3 I4O2!S ? S3L Nforms is K;L tool for developing and e$ec tingD Oracle based interactive application. 3#+. <o" do you control the constraints in forms ? Select the se constraint property is O2 +loc& definition screen. +LO(8 3&,. What is the difference bet"een restricted and unrestricted pac0age procedure ? -estricted pac&age proced re that affects the basic f nctions of S3L N @orms. /t cannot sed in all triggers e$cept &ey triggers. Unrestricted pac&age proced re that does not interfere with the basic f nctions of S3L N @orms it can be sed in any triggers. 3&1. @ ;uery fetched 1, records <o" many times does a .2 1 ?> 2Y Trigger and .OST1?> 2Y Trigger "ill get e$ecuted ? *-!,3U!-" fires once. *OST,3U!-" fires CB times.

Page 50 of 153

3&2. 8i-e the se;uence in "hich triggers fired during insert operations% "hen the follo"ing 3 triggers are defined at the same bloc0 le-el ? a. O2,/2S!-T b. *OST,/2S!-T c. *-!,/2S!-T 3&3. State the order in "hich these triggers are e$ecuted ? *OST,@/!L1,O2,0AL/1AT!,@/!L1,*OST,(4A2;! and 8!",2!OT@L1. 8!",2!OT@L1,*OST,(4A2;!, O2,0AL/1AT!,@/!L1, *OST,@/!L1. g. 3&4. What the .@>S pac0age 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 O-A(L! *recompliers ser e$its O(/ 'O-A(L! (all /nterface) 2on,O-A(!L ser e$its. *age ? $its ?

3&'. What is the difference bet"een an O915@376@T 147 36 trigger and a trigger ? On,validate,field trigger fires, when the field 0alidation stat s 2ew or changed. *ost,field,trigger whenever the control leaving form the field, it will fire. 3&). *an "e use a restricted pac0age procedure in O91 5@376@T 147 36 Trigger ? 2o 3&+. 7s a :ey startup trigger fires as result of a operator pressing a 0ey e$plicitly ? 2o 3',. *an "e use 8O1/3O*: pac0age in a pre1field trigger ? 2o 3'1. *an "e create t"o bloc0s "ith the same name in form 3., ? 2o 3'2. What is .ost1/loc0 is a. ??? a. 2avigational Trigger. b. 8ey trigger c. Transaction Trigger. 3'3. What does an on1clear1bloc0 Trigger fire? Page 51 of 153

/t fires j st before S3L N forms the c rrent bloc&. 3'4. 9ame the t"o files that are created "hen you generate the form gi-e the file$ e$tension ? /2* 'So rce @ile) @-# '!$ec table @ile) 3'#. What pac0age procedure used for in-o0e s;l Iplus from s;l Iforms ? 4ost '!.g. 4ost 's%lpl s)) 3'&. What is the significance of .@8 4ide the fields for internal calc lation. , in forms 3., ?

3''. What are the different types of 0ey triggers ? @ nction 8ey 8ey,f nction 8ey,others 8ey,start p 3'). What is the difference bet"een a 4unction :ey Trigger and :ey 4unction Trigger ? @ nction &ey triggers are associated with individ al S3LN@O-#S f nction &eys "o can attach 8ey f nction triggers to CB &eys or &ey se% ences that normally do not perform any S3L N @O-#S operations. These &eys referred as &ey @B thro gh &ey @>. 3'+. *ommitted bloc0 sometimes refer to a /@S @alse T@/3 ?

3),. rrorB*ode is a pac0age proecdure ? a. Tr e b. false @alse 3)1. When is cost based optimi=ation triggered? Dfor 6/@ /t's important to have statistics on all tables for the (+O '(ost +ased Optimi6er) to wor& correctly. /f one table involved in a statement does not have statistics, Oracle has to revert to r le,based optimi6ation for that statement. So yo really want for all tables to have statistics right awayD it won't help m ch to j st have the larger tables analy6ed. ;enerally, the (+O can change the e$ec tion plan when yo ? C. (hange statistics of objects by doing an A2AL"9!D E. (hange some initiali6ation parameters 'for e$ample? hash:join:enabled, sort:area:si6e, db:file:m ltibloc&:read:co nt). 3)2. <o" can one optimi=e MJYCM ;ueries? Dfor 6/@ /t is possible to improve RO"9R % eries by forcing the optimi6er to scan all the entries from the inde$ instead of the table. This can be done by specifying hints. /f the inde$ is physically smaller than the Page 52 of 153

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 pac0age procedure does ? !nter 0alidate,data in the c rrent validation nit. 3)4. Where can one find 7HO statistics per table? Dfor 6/@ The UTL!STAT report shows /=O per tablespace b t one cannot see what tables in the tablespace has the most /=O. The <O-A(L!:4O#!=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 N @-O# io:per:objectD to e$tract the re% ired information. @or more details, loo& at the header comments in the <O-A(L!:4O#!=rdbms=admin=catio.s%l script. 3)#. !y ;uery "as fine last "ee0 and no" it is slo". Why? Dfor 6/@ 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 offending % ery and compare it to a previo s one that was ta&en when the % ery was performing well. Us ally the previo s plan is not available. Some factors that can ca se a plan to change are? . .hich tables are c rrently analy6edX .ere they previo sly analy6edX 'ie. .as the % ery sing -+O and now (+OX) . 4as O*T/#/9!-:#O1! been changed in /2/T.O-AX . 4as the 1!;-!! of parallelism been defined=changed on any tableX . 4ave the tables been re,analy6edX .ere the tables analy6ed sing estimate or comp teX /f estimate, what percentage was sedX . 4ave the statistics changedX . 4as the /2/T.O-A parameter 1+:@/L!:#ULT/+LO(8:-!A1:(OU2T been changedX . 4as the /2/T.O-A parameter SO-T:A-!A:S/9! been changedX . 4ave any other /2/T.O-A parameters been changedX . .hat do yo thin& the plan sho ld beX - n the % ery with hints to see if this prod ces the re% ired performance. 3)&. Why is Oracle not using the damn inde$? Dfor 6/@ This problem normally only arises when the % ery plan is being generated by the (ost +ased Optimi6er. The s al ca se is beca se the (+O calc lates that e$ec ting a @ ll Table Scan wo ld be faster than accessing the table via the inde$. @ ndamental things that can be chec&ed are? . US!-:TA+:(OLU#2S.2U#:1/ST/2(T , This col mn defines the n mber of distinct val es the col mn holds. . US!-:TA+L!S.2U#:-O.S , /f 2U#:1/ST/2(T A 2U#:-O.S then sing an inde$ wo ld be preferable to doing a @ULL TA+L! S(A2. As the 2U#:1/ST/2(T decreases, the cost of sing an inde$ increase Page 53 of 153

thereby is ma&ing the inde$ less desirable. . US!-:/21!O!S.(LUST!-/2;:@A(TO- , This defines how ordered the rows are in the inde$. /f (LUST!-/2;:@A(TO- approaches the n mber of bloc&s in the table, the rows are ordered. /f it approaches the n mber of rows in the table, the rows are randomly ordered. /n 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. . 1ecrease the /2/T.O-A parameter 1+:@/L!:#ULT/+LO(8:-!A1:(OU2T , A higher val e will ma&e the cost of a @ULL TA+L! S(A2 cheaper. . -emember that yo #UST s pply the leading col mn of an inde$, for the inde$ to be sed ' nless yo se a @AST @ULL S(A2 or S8/* S(A22/2;). . There are many other factors that affect the cost, b t sometimes the above can help to show why an inde$ is not being sed by the (+O. /f 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 T8*-O@ with T/#!1:STAT/ST/(S, so that one can see the (*U tili6ation, or with AUTOT-A(! to see the statistics. (ompare this to the e$plain plan when not sing an inde$. 3+'. When should one rebuild an inde$? Dfor 6/@ "o can r n the 'A2AL"9! /21!O 0AL/1AT! ST-U(TU-!' command on the affected inde$es , each invocation of this command creates a single row in the /21!O:STATS view. This row is overwritten by the ne$t A2AL"9! /21!O command, so copy the contents of the view into a local table after each A2AL"9!. The 'badness' of the inde$ can then be j dged by the ratio of '1!L:L@:-O.S' to 'L@:-O.S'. 3)). What are the unrestricted procedures used to change the popup screen position during run time ? Anchor,view -esi6e ,0iew #ove,0iew. 3)+. What is an @lert ? An alert is window that appears in the middle of the screen overlaying a portion of the c rrent display. 3+,. 6eleting a page remo-es information about all the fields in that page ? a. True. b. 4alse? 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. 4alse? a. Tr e.

Page 54 of 153

3+2. *lassify the restricted and unrestricted procedure from the follo"ing. a. *all b. >ser1 $it c. *all1?uery d. >p e. $ecute1?uery f. !essage g. $it14rom h. .ost i. /rea0? a. (all , nrestricted b. User !$it , Unrestricted c. (all:% ery , Unrestricted d. Up , -estricted e. !$ec te 3 ery , -estricted f. #essage , -estricted g. !$it:form , -estricted h. *ost , -estricted i. +rea& , Unrestricted. 3+3. What is an >ser $its ? A ser e$it is a s bro tine which are written in programming lang ages sing proN( pro N(obol , etc., that lin& into the S3L N forms e$ec table. 3+4. What is a Trigger ? A piece of logic that is e$ec ted at or triggered by a S3L Nforms event. 3+#. What is a .ac0age .rocedure ? A *ac&age proced re is b ilt in *L=S3L proced re. 3+). What is the ma$imum si=e of a form ? ELL character width and ELL characters Length. 3++. What is the difference bet"een system.currentBfield and system.cursorBfield ? C. System.c rrent:field gives name of the field. E. System.c rsor:field gives name of the field with bloc& name. 4,,. 3ist the system -ariables related in /loc0 and 4ield? C. System.bloc&:stat s E. System.c rrent:bloc& F. System.c rrent:field K. System.c rrent:val e L. System.c rsor:bloc& M. System.c rsor:field H. System.field:stat s.

Page 55 of 153

4,1. What are the different types of .ac0age .rocedure ? C. -estricted pac&age proced re. E. Unrestricted pac&age proced re. 4,2. What are the types of T2788 2S ? C. 2avigational Triggers. E. Transaction Triggers. 4,3. 7dentify pac0age function from the follo"ing ? 1. *ode 2. /rea0 3. *all 4. rror1te$t #. 4orm1failure &. 4orm1fatal '. $ecute1;uery ). @nchor 5ie" +. !essageBcode? C. !rror:(ode E. !rror:Te$t F. @orm:@ail re K. @orm:@atal L. #essage:(ode rror1

4,3. *an you attach an lo- to a field at run1time? if yes% gi-e the build1in name.? "es. Set:item:proprety 4,4. 7s it possible to attach same library to more than one form? "es 4,#. *an you attach an lo- to a field at design time? "es 4,&. 3ist the "indo"s e-ent triggers a-ailable in 4orms 4.,? .hen,window,activated, when,window,closed, when,window,deactivated, when,window,resi6ed 4,'. What are the triggers associated "ith the image item? .hen,/mage,activated'@ires when the operator do ble clic&s on an image /tems) .hen,image,pressed'fires when the operator selects or deselects the image item) 4,). What is a -isual attribute? Page 56 of 153

0is 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? Unlimited no of radio b ttons can be assigned to a radio gro p 411. What is a 3ayout 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. 412. 3ist the Types of 7tems? Te$t item. (hart item. (hec& bo$. 1isplay item. /mage item. List item. -adio ;ro p. User Area item. 413. 3ist system -ariables a-ailable in forms 4.,% and not a-ailable in forms 3.,? System.cordination:operation System 1ate:threshold System.effective:1ate System.event:window System.s ppress:wor&ing 414. What are the display styles of an alert? Stop, (a tion, note 41#. What built1in is used for sho"ing the alert during run1 time? Show:alert. 41&. What built1in is used for changing the properties of the "indo" dynamically? Set:window:property (anvas,0iew 41'. What are the different types of "indo"s? -oot window, secondary window. 41). What is a predefined e$ception a-ailable in forms 4.,? -aise form:trigger:fail re 41+. What is a radio 8roup?

Page 57 of 153

-adio gro ps display a fi$ed no of options that are m t ally !$cl sive. User can select one o t of n n mber of options. 41+. What are the different type of a record group? 3 ery record gro p Static record gro p 2on % ery record gro p 42,. What are the menu items that oracle forms 4., supports? *lain, (hec&,-adio, Separator, #agic 421. 8i-e the e;ui-alent term in forms 4., for the follo"ing. .age% .age ,? *age , (anvas,0iew *age B , (anvas,view n ll. 422. What triggers are associated "ith the radio group? Only when,radio,changed trigger associated with radio gro p 0is al Attrib tes. 423. What are the triggers associated "ith a chec0 bo$? Only .hen,chec&bo$,activated Trigger associated with a (hec& bo$. 424.*an you attach an alert to a field? 2o 42#. *an a root "indo" be made modal? 2o 42&. What is a list item? /t is a list of te$t elements. 42'. 3ist some built1in routines used to manipulate images in imageBitem? /mage:add /mage:and /mage:s btract /mage:$or /mage:6oom 42). *an you change the alert messages at run1time? /f 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 built1in used to get and set lo- properties during run1time? ;et:lov:property Set:lov:property -ecord ;ro p Page 58 of 153

43,. What is the built1in routine used to count the no of ro"s in a group? ;et:gro p :row:co nt System 0ariables 431. 8i-e the Types of modules in a form? @orm #en Library 432. Write the @bbre-iation for the follo"ing 4ile 4!/ 2. !!/ 3. .33? @#+ ,,,,, @orm #od le +inary. ##+ ,,,,, #en #od le +inary. *LL ,,,,,, *L=S3L Library #od le +inary. $tension 1.

433. 3ist the built1in routine for controlling "indo" during run1 time? @ind:window, get:window:property, hide:window, move:window, resi6e:window, set:window:property, show:0iew 434. 3ist the built1in routine for controlling "indo" during run1 time? @ind:canvas ;et,(anvas:property ;et:view:property 4ide:0iew -eplace:content:view Scroll:view Set:canvas:property Set:view:property Show:view Alert 43#. What is the built1in function used for finding the alert? @ind:alert !ditors 43&. 3ist the editors a-ailables in forms 4.,? 1efa lt editor User:defined editors system editors. Page 59 of 153

43'. What buil1in routines are used to display editor dynamicaly? !dit:te$t item show:editor LO0 43). What is an 3o-? 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 8roup? 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,. 8i-e built1in routine related to a record groups? (reate:gro p '@ nction) (reate:gro p:from:% ery'@ nction) 1elete:gro p'*roced re) Add:gro p:col mn'@ nction) Add:gro p:row'*roced re) 1elete:gro p:row'*roced re) *op late:gro p'@ nction) *op late:gro p:with:% ery'@ nction) Set:gro p:(har:cell'proced re) 441. 3ist the built1in routines for the controlling can-as -ie"s during run1time? @ind:canvas ;et,(anvas:property ;et:view:property 4ide:0iew -eplace:content:view Scroll:view Set:canvas:property Set:view:property Show:view Alert 442. System.effecti-eBdate system -ariable is read only TrueH4alse? @alse 443. What are the builtBin used to trapping errors in forms 4? !rror:type ret rn character !rror:code ret rn n mber !rror:te$t ret rn char 1bms:error:code ret rn no. 1bms:error:te$t ret rn char Page 60 of 153

444. What is Oracle 4inancials? Dfor 6/@ Oracle @inancials prod cts provide organi6ations with sol tions to a wide range of long, and short,term acco nting system iss es. -egardless of the si6e of the b siness, Oracle @inancials can meet acco nting management demands with? Oracle Assets? !ns res that an organi6ation's property and e% ipment investment is acc rate and that the correct asset ta$ acco nting strategies are chosen. Oracle ;eneral Ledger? Offers a complete sol tion to jo rnal entry, b dgeting, allocations, consolidation, and financial reporting needs. Oracle /nventory? 4elps an organi6ation ma&e better inventory decisions by minimi6ing stoc& and ma$imi6ing cash flow. Oracle Order !ntry? *rovides organi6ations with a sophisticated order entry system for managing c stomer commitments. Oracle *ayables? Lets an organi6ation process more invoices with fewer staff members and tighter controls. 4elps save money thro gh ma$im m disco nts, ban& float, and prevention of d plicate payment. Oracle *ersonnel? /mproves the management of employee, related iss es by retaining and ma&ing available every form of personnel data. Oracle * rchasing? /mproves b ying power, helps negotiate bigger disco nts, eliminates paper flow, increases financial controls, and increases prod ctivity. Oracle -eceivables?. /mproves cash flow by letting an organi6ation process more payments faster, witho t off,line research. 4elps correctly acco nt for cash, red ce o tstanding receivables, and improve collection effectiveness. Oracle -even e Acco nting ;ives an organi6ation timely and acc rate reven e and fle$ible commissions reporting. Oracle Sales Analysis? Allows for better forecasting, planning. and reporting of sales information. 44#. What are the design facilities a-ailable in forms 4.,? 1efa lt +loc& facility. Layo t !ditor. #en !ditor. Object Lists. *roperty Sheets. *L=S3L !ditor. Tables (ol mns +rowser. + ilt,ins +rowser. 44&. What is the most important module in Oracle 4inancials? Dfor 6/@ The ;eneral Ledger ';L) mod le is the basis for all other Oracle @inancial mod les. All other mod les provide information to it. /f yo Page 61 of 153

implement Oracle @inancials, yo sho ld switch yo r c rrent ;L system first.;L is relatively easy to implement. "o sho ld go live with it first to give yo r implementation team a chance to be familiar with Oracle @inancials. 44'. What are the types of can-as1-ie"s? (ontent 0iew, Stac&ed 0iew. 44). What is the !ultiOrg and "hat is it used for? Dfor 6/@ # ltiOrg or # ltiple Organi6ations Architect re allows m ltiple operating nits and their relationships to be defined within a single installation of Oracle Applications. This &eeps each operating nit's transaction data separate and sec re. Use the following % ery to determine if # liOrg is intalled? select m lti:org:flag from fnd:prod ct:gro psD 44+. What is the difference bet"een 4ields and 4le$4ields? Dfor 6/@ A field is a position on a form that one ses to enter, view, pdate, or delete information. A field prompt describes each field by telling what &ind of information appears in the field, or alternatively, what &ind of information sho ld be entered in the field. A fle$field is an Oracle Applications field made p of segments. !ach segment has an assigned name and a set of valid val es. Oracle Applications ses fle$fields to capt re information abo t yo r organi6ation. There are two types of fle$fields? &ey fle$fields and descriptive fle$fields. 4#,. $plain types of /loc0 in forms4.,? +ase table +loc&s. (ontrol +loc&s. C. A base table bloc& is one that is associated with a specific database table or view. E. A control bloc& is a bloc& that is not associated with a database table. /T!#S 4#1. What is an @lert? An alert is a modal window that displays a message notifies the operator of some application condition 4##. What are the built1in routines is a-ailable in forms 4., to create and manipulate a parameter list? Add:parameter (reate:*arameter:list 1elete:parameter 1estroy:parameter:list ;et:parameter:attr ;et:parameter:list set:parameter:attr Page 62 of 153

4#& .What is a record 8roup? 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 9a-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 4orms 4.,? A library is a collection of *l=S3L program nits, incl ding ser named proced res, f nctions T pac&ages 4&,. <o" imageBitems can be populate to field in forms 4.,? A fetch from a long raw database col mn *L=S%l assignment to e$ec ting the read:image:file b ilt:in proced re to get an image from the file system. 4&1. What is the content -ie" and stac0ed -ie"? A content view is the 5+ase5 view that occ pies the entire content pane of the window in which it is displayed. A stac&ed view differs 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 *hec0 /o$? A (hec& +o$ is a two state control that indicates whether a certain condition or val e is on or off, tr e or false. The display state of a chec& bo$ is always either 5chec&ed5 or 5 nchec&ed5. 4&3. What is a can-as1-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 specific canvas. !ach canvas, in term, m st be displayed in a specific window. 4&4. $plain the follo"ing file e$tension related to library? .pll,.lib,.pld The library pll files is a portable design file comparable to an fmb form file The library lib file is a plat form specific, generated library file comparable to a fm$ form file The pld file is T$t format file and can be sed for so rce controlling yo r library files *arameter 4&#. $plain the usage of W< 2 cursors ? Page 63 of 153 *>22 9T O4 clause in

.4!-! (U--!2T O@ cla se in an U*1AT!,1!L!T! statement refers to the latest row fetched from a c rsor. 1atabase Triggers 4&&. 9ame the tables "here characteristics of .ac0age% procedure and functions are stored ? User:objects, User:So rce and User:error. 4&'. $plain the t"o type of *ursors ? There are two types of c rsors, /mplicit ( rsor and !$plicit ( rsor. *L=S3L ses /mplicit ( rsors for % eries. User defined c rsors are called !$plicit ( rsors. They can be declared and sed. 4&). What are t"o parts of pac0age ? The two parts of pac&age are *A(8A;! S*!(/@/(AT/O2 T *A(8A;! +O1". *ac&age Specification 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 OL1.col mn:name and 2!..col mn:name. @or triggers related to /2S!-T only 2!..col mn:name val es only available. @or triggers related to U*1AT! only OL1.col mn:name 2!..col mn:name val es only available. @or triggers related to 1!L!T! only OL1.col mn:name val es only available. 4',. What is 4ine 8rained @uditing? Dfor 6/@ @ine ;rained A diting '1+#S:@;A) allows a diting records to be generated when certain rows are selected from a table. A list of defined policies can be obtained from 1+A:AU1/T:*OL/(/!S. A dit records are stored in 1+A:@;A:AU1/T:T-A/L. Loo& at this e$ample? o Add policy on table with a titing condition... e$ec te dbms:fga.add:policy''4-', '!#*', 'policyC', 'deptno I CB')D o # st A2AL"9!, this feat re wor&s with (+O '(ost +ased Optimi6er) analy6e table !#* comp te statisticsD select N from !#* where cC A CCD ,, .ill trigger a diting select N from !#* where cC A B>D ,, 2o a diting o 2ow we can see the statments that triggered the a diting condition... select s%lte$t from sys.fga:log<D delete from sys.fga:log<D 4'1. What is a pac0age ? What are the ad-antages of pac0ages ? What is .ragma J *.T7O9B797T ? $plain the usage ? The *-A;#A !O!(*T/O2:/2/T tells the complier to associate an e$ception with an oracle error. To get an error message of a specific Page 64 of 153

oracle error. e.g. *-A;#A !O(!*T/O2:/2/T 'e$ception name, oracle error n mber) 4'2. What is 4ine 8rained @ccess *ontrol? Dfor 6/@ See % estion 5.hat is a 0irt al *rivate 1atabase5. 4'3. What is a 5irtual .ri-ate 6atabase? Dfor 6/@ Oracle Gi introd ced the notion of a 0irt al *rivate 1atabase '0*1). A 0*1 offers @ine,;rained Access (ontrol '@;A() for sec re separation of data. This ens res that sers only have access to data that pertains to them. Using this option, one co ld even store m ltiple companies' data within the same schema, witho t them &nowing abo t it. 0*1 config ration is done via the 1+#S:-LS '-ow Level Sec rity) pac&age. Select from S"S.0<0*1:*OL/(" to see e$isting 0*1 config ration. 4'4. What is 2aiseBapplicationBerror ? -aise:application:error is a proced re of pac&age 1+#S:STA21A-1 which allows to iss e an ser:defined error messages from stored s b, program or database trigger. 4'#. What is Oracle 3abel Security? Dfor 6/@ Oracle Label Sec rity 'formerly called Tr sted Oracle #LS -1+#S) ses the 0*1 '0irt al *rivate 1atabase) feat re of OracleGi 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 config red, controlled and managed from the *olicy #anager, an !nterprise #anager,based ;U/ tility. 4'&. 8i-e the structure of the procedure ? *-O(!1U-! name 'parameter list.....) is local variable declarations +!;/2 !$ec table statements. !$ception. e$ception handlers endD 4''. What is O ! DOracle nterprise !anagerE? Dfor 6/@ O!# is a set of systems management tools provided by Oracle (orporation for managing the Oracle environment. /t 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 5Lights O t5 management. 4'). ?uestion What is .3HS?3 ?

Page 65 of 153

*L=S3L is a proced ral lang age that has both interactive S3L and proced ral programming lang age constr cts s ch as iteration, conditional branching. 4'+. What are the components of O !? Dfor 6/@ Oracle !nterprise #anager 'O!#) has the following components? . #anagement Server 'O#S)? #iddle tier server that handles comm nication with the intelligent agents. The O!# (onsole connects to the management server to monitor and config re the Oracle enterprise. . (onsole? 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, Uni$ OTerm 'oemapp command) or .eb browser session 'oem:webstage). . /ntelligent Agent 'O/A)? The O/A 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. 7s it possible to use Transaction control Statements such a 2O33/@*: or *O!!7T in 6atabase Trigger ? Why ? /t is not possible. As triggers are defined for each table, if yo se (O##/T of -OLL+A(8 in a trigger, it affects logical transaction processing. 4)2. <o" many types of database triggers can be specified on a table ? What are they ? /nsert Update 1elete +efore -ow o.&. o.&. o.&. After -ow o.&. o.&. o.&. +efore Statement o.&. o.&. o.&. After Statement o.&. o.&. o.&. /f @O- !A(4 -O. cla se is specified, then the trigger for each -ow affected by the statement. /f .4!2 cla se is specified, the trigger fires according to the ret rned +oolean val e. 4)3. What are the modes of parameters that can be passed to a procedure ? /2,OUT,/2,OUT parameters. 4)4. Where the .reBdefinedBe$ceptions are stored ? /n the standard pac&age. *roced res, @ nctions T *ac&ages D 4)#. Write the order of precedence for -alidation of a column in a table ? 7. done using 6atabase triggers. ii. done using 7ntegarity *onstraints.? / T ii. Page 66 of 153

4)&. 8i-e the structure of the function ? @U2(T/O2 name 'arg ment list .....) -et rn datatype is local variable declarations +egin e$ec table statements !$ception e$ec tion handlers !ndD 4)'. $plain ho" procedures and functions are called in a .3HS?3 bloc0 ? @ nction is called as part of an e$pression. sal ?A calc late:sal ''aGEE')D proced re is called as a *L=S3L statement calc late:bon s ''AGEE')D 4)). What are ad-antages fo Stored .rocedures? !$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=S3L bloc&. The types are *redefined and ser defined. Some of *redefined e$ceptions are. (U-SO-:AL-!A1":O*!2 1U*:0AL:O2:/21!O 2O:1ATA:@OU21 TOO:#A2":-O.S /20AL/1:(U-SO/20AL/1:2U#+!LO;O2:1!2/!1 2OT:LO;;!1:O2 *-O;-A#,!--OSTO-A;!:!--OT/#!OUT:O2:-!SOU-(! 0ALU!:!--O9!-O:1/0/1! OT4!-S. 4+,. What are the .3HS?3 Statements used in cursor processing ? 1!(LA-! (U-SO- c rsor name, O*!2 c rsor name, @!T(4 c rsor name /2TO or -ecord types, (LOS! c rsor name. 4+1. What are the components of a .3HS?3 /loc0 ? 1eclarative part, !$ec table part and !$ception part. 1atatypes *L=S3L

Page 67 of 153

4+2. What is a database trigger ? 9ame some usages of database trigger ? 1atabase trigger is stored *L=S3L program nit associated with a specific database table. Usages are A dit data modifications, Log events transparently, !nforce comple$ b siness r les 1erive col mn val es a tomatically, /mplement comple$ sec rity a thori6ations. #aintain replicate tables. 4+3. What is a cursor ? Why *ursor is re;uired ? ( rsor is a named private S3L area from where information can be accessed. ( rsors are re% ired to process rows individ ally for % eries ret rning m ltiple rows. 4+4. What is a cursor for loop ? ( rsor for loop implicitly declares R-O.T"*! as loop inde$,opens a c rsor, fetches rows of val es from active set into fields in the record and closes when all the records have been processed. eg. @O- emp:rec /2 (C LOO* salary:total ?A salary:total Semp:rec salD !21 LOO*D 4+#. What "ill happen after commit statement ? ( rsor (C is Select empno, ename from empD +egin open (CD loop @etch (C into eno.enameD !$it .hen (C Rnotfo ndD,,,,, commitD end loopD endD The c rsor having % ery as S!L!(T .... @O- U*1AT! gets closed after (O##/T=-OLL+A(8. The c rsor having % ery as S!L!(T.... does not get closed even after (O##/T=-OLL+A(8. 4+&. <o" pac0aged procedures and functions are called from the follo"ing? a. Stored procedure or anonymous bloc0 b. an application program such a .2* I*% .2OI *O/O3 c. S?3 I.3>S?? a. *A(8A;! 2A#!.*-O(!1U-! 2A#! 'parameters)D variable ?A *A(8A;! 2A#!.@U2(T/O2 2A#! 'arg ments)D !O!( S3L !O!(UT! b.+!;/2 Page 68 of 153

*A(8A;! 2A#!.*-O(!1U-! 2A#! 'parameters) variable ?A *A(8A;! 2A#!.@U2(T/O2 2A#! 'arg ments)D !21D !21 !O!(D c. !O!(UT! *A(8A;! 2A#!.*-O(!1U-! 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 specific f nction. 4+). What are the components of a .3HS?3 bloc0 ? A set of related declarations and proced ral statements is called bloc&. 4++. What is difference bet"een a .2O* 6>2 L 4>9*T7O9 ? A @U2(T/O2 is always ret rns a val e sing the ret rn statement. A *-O(!1U-! may ret rn one or more val es thro gh parameters or may not ret rn at all. #,,. What is difference bet"een a *ursor declared in a procedure and *ursor declared in a pac0age specification ? A c rsor declared in a pac&age specification 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 .3HS?3 ? R/SO*!2 , to chec& whether c rsor is open or not R -O.(OU2T , n mber of rows fetched= pdated=deleted. R @OU21 , to chec& whether c rsor has fetched any row. Tr e if rows are fetched. R 2OT @OU21 , to chec& whether c rsor has fetched any row. Tr e if no rows are featched. These attrib tes are proceeded with S3L for /mplicit ( rsors and with ( rsor name for !$plicit ( rsors. #,2. What are M TY. and M 2OWTY. ? What are the ad-antages of using these o-er datatypes? R T"*! provides the data type of a variable or a database col mn to that variable. R -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 ? /. 2eed not &now abo t variable's data type ii. /f the database definition of a col mn in a table changes, the data type of a variable changes accordingly. #,3. What is difference bet"een M 2OWTY. 2 *O26 ? Page 69 of 153 and TY.

R -O.T"*! is to be sed whenever % ery ret rns a entire row of a table or view. T"*! rec -!(O-1 is to be sed whenever % ery ret rns col mns of different table or views and variables. !.g. T"*! r:emp is -!(O-1 'eno emp.empnoR type,ename emp ename Rtype )D e:rec empR -O.T"*! c rsor cC is select empno,deptno from empD e:rec cC R-O.T"*!. #,4. What are the different types of .3HS?3 program units that can be defined and stored in O2@*3 database ? *roced res and @ nctions,*ac&ages and 1atabase Triggers. #,#. What are the ad-antages of ha-ing a .ac0age ? /ncreased 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 6atabase Trigger ? 1atabase triggers can be sed to a tomatic data generation, a dit data modifications, enforce comple$ /ntegrity constraints, and c stomi6e comple$ sec rity a thori6ations. #,'. What is a .rocedure ? A *roced re consist of a set of S3L and *L=S3L statements that are gro ped together as a nit to solve a specific problem or perform a set of related tas&s. #,). What is a .ac0age ? 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 difference bet"een .rocedures and 4unctions ? A @ nction ret rns a val e to the caller where as a *roced re does not. #1,. What is 6atabase Trigger ? A 1atabase Trigger is proced re 'set of S3L and *L=S3L 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 0ey contain more than one columns? "es

Page 70 of 153

#13. What is an >T3B473 .What are different procedures and functions associated "ith it? UTL:@/L! is a pac&age that adds the ability to read and write to operating system files. *roced res associated with it are @(LOS!, @(LOS!:ALL and L proced res to o tp t data to a file *UT, *UT:L/2!, 2!.:L/2!, *UT@, @@LUS4.*UT, @@LUS4.*UT:L/2!,@@LUS4.2!.:L/2!. @ nctions associated with it are @O*!2, /SO*!2. #14. What are O2@*3 .2 *O!.73 2S? Using O-A(L! *-!(O#*/L!-S, S3L statements and *L=S3L bloc&s can be contained inside F;L programs written in (,(SS,(O+OL,*AS(AL, @O-T-A2,*L=C A21 A1A. The *recompilers are &nown as *roN(,*roN(obol,... This form of *L=S3L is &nown as embedded pl=s%l,the lang age in which pl=s%l is embedded is &nown as the host lang age. The prcompiler translates the embedded S3L 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#. 6ifferentiate bet"een T2>9*@T and 6 3 T ? T-U2(AT! deletes m ch faster than 1!L!T! T-U2(AT! 1!L!T! /t is a 11L statement /t is a 1#L statement /t is a one way trip,cannot -OLL+A(8 One can -ollbac& 1oesn't have selective feat res 'where cla se) 4as 1oesn't fire database triggers 1oes /t re% ires disabling of referential constraints. #1&. What is difference 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. @ormal 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./t can be declared e$plicitly as a ser,defined or R-O.T"*! can be sed. eg T"*! t:st dentsref /S -!@ (U-SO- -!TU-2 st dentsR-O.T"*! #1). What are different Oracle database ob(ects? ,TA+L!S ,0/!.S Page 71 of 153

,/21!O!S ,S"2O2"#S ,S!3U!2(!S ,TA+L!S*A(!S etc #1+. What is difference bet"een S>/ST2 and 79ST2? SU+ST- ret rns a specified portion of a string eg SU+ST-''+(1!@',K) o tp t +(1! /2ST- provides character position in which a pattern is fo nd in a string. eg /2ST-''A+(,1(,@',',',E) o tp t H 'End occ rence of ',') #2,. 6isplay the number -alue in Words? S3LI select sal, 'to:char'to:date'sal,'j'), 'jsp')) from empD the o tp t li&e, SAL 'TO:(4A-'TO:1AT!'SAL,'P'),'PS*')) ,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, GBB eight h ndred CMBB one tho sand si$ h ndred CELB one tho sand two h ndred fifty /f yo want to add some te$t li&e, -s. Three Tho sand only. S3LI select sal 5Salary 5, '' -s. 'QQ 'to:char'to:date'sal,'j'), 'Psp'))QQ ' only.')) 5Sal in .ords5 from emp = Salary Sal in .ords ,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, GBB -s. !ight 4 ndred only. CMBB -s. One Tho sand Si$ 4 ndred only. CELB -s. One Tho sand Two 4 ndred @ifty only. #21. What is difference bet"een S?3 and S?3I.3>S? S3LN*LUS is a command line tool where as S3L and *L=S3L lang age interface and reporting tool. /ts a command line tool that allows ser to type S3L commands to be e$ec ted directly against an Oracle database. S3L is a lang age sed to % ery the relational database'1#L,1(L,11L). S3LN*LUS commands are sed to format % ery res lt, Set options, !dit S3L commands and *L=S3L. #22. What are -arious (oins used "hile "riting S>/?> 27 S? Self join,/ts a join foreign &ey of a table references the same table. O ter Poin,,/ts 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,,/ts 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.

Page 72 of 153

#23. What a S 3 *T 4O2 >.6@T cursor represent.? S!L!(T......@-O#......@O-......U*1AT![O@ col mn,reference\[2O.A/T\ The processing done in a fetch loop modifies the rows that have been retrieved by the c rsor. A convenient way of modifying the rows is done by a method with two parts? the @O- U*1AT! cla se in the c rsor declaration, .4!-! (U--!2T O@ (LAUS! in an U*1AT! or declaration statement. #24. What are -arious pri-ileges that a user can grant to another user? ,S!L!(T ,(O22!(T ,-!SOU-(!S #2#. 6isplay the records bet"een t"o range? select rown m, empno, ename from emp where rowid in 'select rowid from emp where rown m ZAT pto min s select rowid from emp where rown mZTStart)D #2&. min-alue.s;l Select the 9th lo"est -alue from a table? select level, min''col:name') from my:table where level A 'Tn' connect by prior ''col:name') Z 'col:name') gro p by levelD !$ample? ;iven a table called emp with the following col mns? ,, id n mber ,, name varcharE'EB) ,, sal n mber ,, ,, @or the second lowest salary? ,, select level, min'sal) from emp ,, where levelAE ,, connect by prior sal Z sal ,, gro p by level #2'. What is difference bet"een 2ename and @lias? -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 S3L statement is e$ec ted. #2). 6ifference bet"een an implicit L an e$plicit cursor.? only one row. 4owever,% eries that ret rn more than one row yo m st declare an e$plicit c rsor or se a c rsor @O- 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 (U-SO-.../S statement. An implicit c rsor is sed for all S3L statements 1eclare, Open, @etch, (lose. An e$plicit c rsors are sed to process m ltirow S!L!(T statements An implicit c rsor is sed to process /2S!-T, U*1AT!, 1!L!T! and single row S!L!(T. ./2TO statements. Page 73 of 153

#2+. What is a O>T 2 NO79? O ter Poin,,/ts a join condition sed where yo can % ery all the rows of one of the tables in the join condition even tho gh they don7t satisfy the join condition. #3,. What is a cursor? Oracle ses wor& area to e$ec te S3L statements and store processing information *L=S3L 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=S3l bloc&. #31. What is the purpose of a cluster? Oracle does not allow a ser to specifically locate tables, since that is a part of the f nction of the -1+#S. 4owever, for the p rpose of increasing performance, oracle allows a developer to create a (LUST!-. A (LUST!- provides a means for storing data from different tables together for faster retrieval than if the table placement were left to the -1+#S. #32. What is O*7. What are its uses? Oracle (all /nterface is a method of accesing database from a F;L program. Uses,,2o precompiler is re% ired,*L=S3L bloc&s are e$ec ted li&e other 1#L statements. The O(/ library provides ,,f nctions to parse S3L 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*!2 c rsor variable @O- S!L!(T...Statement (LOS! c rsor variable /n order to associate a c rsor variable with a partic lar S!L!(T statement O*!2 synta$ is sed. /n order to free the reso rces sed for the % ery (LOS! statement is sed. #34. 6isplay OddH -en number of records? Odd n mber of records? select N from emp where 'rowid,C) in 'select rowid, mod'rown m,E) from emp)D O tp t?, C F L !ven n mber of records? select N from emp where 'rowid,B) in 'select rowid, mod'rown m,E) Page 74 of 153

from emp) O tp t?, E K M #3#. What are -arious constraints used in S?3? ,2ULL ,2OT 2ULL ,(4!(8 ,1!@AULT #3&. *an cursor -ariables be stored in .3HS?3 tables.7f yes ho". 7f not "hy? 2o, a c rsor variable points a row which cannot be stored in a two, dimensional *L=S3L table. #3'. 6ifference bet"een 9O 6@T@ 4O>96 and M9OT4O>96? 2O 1ATA @OU21 is an e$ception raised only for the S!L!(T..../2TO 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 R2OT@OU21 attrib te is set to T-U! instead. #3). *an you use a commit statement "ithin a database trigger? 2o #3+. What W< 2 *>22 9T O4 clause does in a cursor? LOO* S!L!(T n m:credits /2TO v:n mcredits @-O# classes .4!-! deptACEF and co rseACBCD U*1AT! st dents @48ODDDDDDDDDS!T c rrent:creditsAc rrent:creditsSv:n mcredits .4!-! (U--!2T O@ OD #4,. There is a string 12,,,, 12 , .12# % ho" you "ill find the position of the decimal place? /2ST-''CEBBBB CE B .CEL',C,'.') o tp t CF #41. What are different modes of parameters used in functions and procedures? ,/2 ,OUT ,/2OUT #42. <o" you "ere passing cursor -ariables in .3HS?3 2.2? /n *L=S3L E.E 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 *roN( or O(/ with version E.E, the only means of passing a c rsor

Page 75 of 153

variable to a *L=S3L bloc& is via bind variable or a proced re parameter. #43. When do you use W< 2 clause and "hen do you use <@5798 clause? 4A0/2; cla se is sed when yo want to specify a condition for a gro p f nction and it is written after ;-OU* +" cla se. The .4!-! 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 ;-OU* +" cla se if it is sed. #44. 6ifference bet"een procedure and function.? @ nctions are named *L=S3L 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 parameter. A proced re all is a *L=S3L statement by itself, while a @ nction call is called as part of an e$pression. #4#. Which is more faster 1 79 or J7STS? !O/STS is more faster than /2 beca se !O/STS ret rns a +oolean val e whereas /2 ret rns a val e. #4&. What is synta$ for dropping a procedure and a function .@re these operations possible? 1rop *roced re proced re:name 1rop @ 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:field:name)D or delete d plicate:val es:field:name dv from table:name ta where rowid Z'select min'rowid) from table:name tb where ta.dvAtb.dv)D #4). 6ifference bet"een database triggers and form triggers? ,1ata base trigger'1+T) fires when a 1#L operation is performed on a data base table. @orm trigger'@T) @ires when ser presses a &ey or navigates between fields on the screen ,(an be row level or statement level 2o distinction between row level and statement level. ,(an manip late data stored in Oracle tables via S3L (an manip late data in Oracle tables as well as variables in forms. ,(an be fired from any session e$ec ting the triggering 1#L statements. (an be fired only from the form that define the trigger. ,(an ca se other database triggers to fire.(an ca se other database triggers to fire, b t not other form triggers. #4+. What is a cursor for loop? ( rsor @or 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. Page 76 of 153

##,. <o" you "ill a-oid duplicating records in a ;uery? +y sing 1/ST/2(T ##1. What is a -ie" ? A view is stored proced re based on one or more tables, it7s a virt al table. ##2. What is difference bet"een >97?> and .27!@2Y : Y constraints? A table can have only one *-/#A-" 8!" whereas there can be any n mber of U2/3U! &eys. The col mns that compose *8 are a tomatically define 2OT 2ULL, whereas a col mn that compose a U2/3U! is not a tomatically defined to be mandatory m st also specify the col mn is 2OT 2ULL. ##3. What is use of a cursor -ariable? <o" it is defined? A c rsor variable is associated with different statements at r n time, which can hold different 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 (). 1eclaring a c rsor variable? T"*! type:name /S -!@ (U-SO- -!TU-2 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 find the numbert of ro"s in a Table ? A bad answer is co nt them 'S!L!(T (OU2T'N) @-O# table:name) A good answer is ?, '+y generating S3L to A2AL"9! TA+L! table:name (OU2T STAT/ST/(S by % erying Oracle System (atalog es 'e.g. US!-: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 A2AL"9! TA+L! for each Table individ ally. ###. What is the ma$imum buffer si=e that can be specified using the 6/!SBO>T.>T. 9@/3 function? C,BBB,BB ##&. What are cursor attributes? ,R-O.(OU2T ,R2OT@OU21 ,R@OU21 ,R/SO*!2 ##'. There is a M sign in one field of a column. What "ill be the ;uery to find it? Page 77 of 153

'' Sho ld be sed before 'R'. ##). What is O9 6 3 T *@S*@6 ? .hen O2 1!L!T! (AS(A1! is specified 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 ? Using -O./1.(O2ST-A/2TS #&,. What is difference bet"een T2>9*@T L 6 3 T ? T-U2(AT! commits after deleting entire table i.e., can not be rolled bac&. 1atabase triggers do not fire on T-U2(AT!1!L!T! allows the filtered deletion. 1eleted records can be rolled bac& or committed.1atabase triggers fire on 1!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 57 W ? 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-ateHdeacti-ate integrity constraints ? The integrity constraints can be enabled or disabled by ALT!- TA+L! !2A+L! constraint=1/SA+L! constraint. #&4. Where the integrity constraints are stored in 6ata 6ictionary ? The integrity constraints are stored in US!-:(O2ST-A/2TS. #&#. What is the Sub;uery ? S b % ery is a % ery whose ret rn val es are sed in filtering conditions of the main % ery. #&&. <o" to access the current -alue and ne$t -alue from a se;uence ? 7s it possible to access the current -alue in a session before accessing ne$t -alue ? Se% ence name (U--0AL, Se% ence name 2!OT0AL./t 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 S@5 .O79TS ?-alue in a session before accessing ne$t -alue ? SA0!*O/2TS are sed to s bdivide a transaction into smaller parts. /t enables rolling bac& part of a transaction. #a$im m of five save points are allowed.

Page 78 of 153

#&). What is 2OW76 ?in a session before accessing ne$t -alue ? -O./1 is a pse do col mn attached to each row of a table. /t is CG character long, bloc&no, rown mber are the components of -O./1. #&+. $plain *onnect by .rior ?in a session before accessing ne$t -alue ? -etrieves rows in hierarchical order.e.g. select empno, ename from emp where. #',. <o" many 3O98 columns are allo"ed in a table ? 7s it possible to use 3O98 columns in W< 2 clause or O26 2 /Y ? Only one LO2; col mns is allowed. /t is not possible to se LO2; col mn in .4!-! or O-1!- +" cla se. #'1. What is 2eferential 7ntegrity ? #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 different types of (oins ? Poin is a % ery which retrieves related col mns or rows from m ltiple tables.Self Poin , Poining the table with itself.!% i Poin , Poining two tables by e% ating two common col mns.2on,!% i Poin , Poining two tables by e% ating two common col mns.O ter Poin , Poining 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. 7f an uni;ue 0ey constraint on 6@T column is created% "ill it -alidate the ro"s that are inserted "ith SYS6@T ? /t won't, +eca se S"S1AT! format contains time attached with it. #'4. <o" does one stop and start the O!S? Dfor 6/@ Use the following command se% ence to stop and start the O#S 'Oracle #anagement Server)? oemctl start oms oemctl stat s oms sysman=oem:temp oemctl stop oms sysman=oem:temp .indows 2T=EBBB sers can j st stop and start the re% ired services. The defa lt O!# administrator is 5sysman5 with a password of 5oem:temp5. 2OT!? Use command oemctrl instead of oemctl for Oracle Gi and below. #'#. What is an 7ntegrity *onstraint ? /ntegrity constraint is a r le that restricts val es to a col mn in a table. #'&. <o" does one create a repository? Dfor 6/@ @or O!# vE and above, start the Oracle !nterprise #anager (onfig ration Assistant 'emca on Uni$) to create and config re the Page 79 of 153

management server and repository. -emember to set p a bac& p for the repository database after creating it. #''. 7f a 5ie" on a single base table is manipulated "ill the changes be reflected on the base table ? /f 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 ! 51.$ D-ery oldOOOE repository on Windo"s9TP . (reate a tablespace that wo ld hold the repository data. A si6e between EBB, ELB #+ wo ld be ideal. Let s call it 1 mmy:Space. . (reate an Oracle ser who wo ld own this repository. Assign 1+A, S2#*Agent, !$p:@ ll:database, /mp:@ ll:database roles to this ser. Lets call this ser 1 mmy: ser. Assign 1 mmy:Space as the defa lt tablespace. . (reate an operating system ser with the same name as the Oracle sername. /.e. 1 mmy:User. Add 'Log on as a batch job' nder advanced rights in User manager. . @ire p !nterprise manager and log in as 1 mmy:User and enter the password. This wo ld trigger the creation of the repository. @rom now on, !nterprise manager is ready to accept jobs. #'+. What is a database lin0 ? 1atabase Lin& is a named path thro gh which a remote database can be accessed. #),. <o" does one list oneFs databases in the O ! *onsole? Dfor 6/@ @ollow these steps to discover databases and other services from the O!# (onsole? C. !ns re the ;LO+AL:1+2A#! parameter is set for all databases in yo r L/ST!2!-.O-A file 'optional). These names will be listed in the O!# (onsole. *lease note that names entered are case sensitive. A portion of a listener.ora file? 'S/1:1!S( A ';LO+AL:1+2A#! A 1+:name:for:O!#) 'S/1:2A#! A ... E. Start the Oracle /ntelligent Agent on the machine yo want to discover. See section 54ow does one start the Oracle /ntelligent AgentX5. F. Start the O!# (onsole, navigate to men 52avigator= 1iscover 2odes5. The O!# 1iscovery .i6ard will g ide yo thro gh the process of discovering yo r databases and other services. #)1. What is *Y*3 H9O *Y*3 in a Se;uence ? ("(L! specifies that the se% ence contin es to generate val es after reaching either ma$im m or minim m val e. After pan ascending Page 80 of 153

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.2O ("(L! specifies that the se% ence cannot generate more val es after reaching its ma$im m or minim m val e. #)2. What is correlated sub1;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 ? (4A-,0A-(4A-E,2U#+!-,1AT!,-A.,LO2; and LO2; -A.. #)4. What is difference bet"een *<@2 and 5@2*<@22 ? What is the ma$imum S7C allo"ed for each type ? (4A- pads blan& spaces to the ma$im m length. 0A-(4A-E does not pad blan& spaces. @or (4A- it is ELL and EBBB for 0A-(4A-E. #)#. *an a -ie" be updatedHinsertedHdeleted? 7f Yes under "hat conditions ? A 0iew 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 different types of *oordinations of the !aster "ith the 6etail bloc0? *O*ULAT!:;-OU*'f nction) *O*ULAT!:;-OU*:./T4:3U!-"'f nction) S!T:;-OU*:(4A-:(!LL'proced re) S!T:;-OU*(!LL'proced re) S!T:;-OU*:2U#+!-:(!LL'proced re) #)'. >se the @66B82O>.B*O3>!9 function to add a column to a record group that "as created at design time? 7E T2> 77E4@3S //) @ALS! #)). >se the @66B82O>.B2OW procedure to add a ro" to a static record group? 7E T2> 77E4@3S /) @ALS! #)+. ma$-alue.s;l Select the 9th <ighest -alue from a table? select level, ma$''col:name') from my:table where level A 'Tn' connect by prior ''col:name') I 'col:name') gro p by levelD !$ample? ;iven a table called emp with the following col mns? ,, id n mber ,, name varcharE'EB) ,, sal n mber Page 81 of 153

,, ,, ,, ,, ,, ,,

@or the second highest salary? select level, ma$'sal) from emp where levelAE connect by prior sal I sal gro p by level

#+,. 4ind out nth highest salary from emp table? S!L!(T 1/ST/2(T 'a.sal) @-O# !#* A .4!-! T2 A 'S!L!(T (OU2T '1/ST/2(T 'b.sal)) @-O# !#* + .4!-! a.salZAb.sal)D @or !g?, !nter val e for n? E SAL ,,,,,,,,, FHBB #+1. Suppose a customer table is ha-ing different columns li0e customer no% payments.What "ill be the ;uery to select top three ma$ payments? S!L!(T c stomer:no, payments from c stomer (C .4!-! FZA'S!L!(T (OU2T'N) from c stomer (E .4!-! (C.payment ZA (E.payment) #+2. <o" you "ill a-oid your ;uery from using inde$es? S!L!(T N @-O# emp .here emp:noS' 'ACEFKLD i.e yo have to concatenate the col mn name with space within codes in the where condition. S!L!(T =NS @ULL'a) N= ename, emp:no from emp where emp:noACEFKD i.e sing 4/2TS #+3. What utility is used to create a physical bac0up? !ither rman or alter tablespace begin bac& p will do.. #+4. What are the /ac0 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 first five 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) 1ata +ase .riter'1+.-) ?? 1ata +ase .riter .rites #odified bloc&s from 1atabase b ffer cache to 1ata @iles.This is re% ired since the data is not written whenever a transaction is commited. b)Log.riter'L;.-) ?? Log.riter writes the redo log entries to dis&. -edo Log data is generated in redo log b ffer of S;A. As transaction commits and log b ffer fills, L;.- writes log entries into a online redo log file. Page 82 of 153

c) System #onitor'S#O2) ?? The System #onitor performs instance recovery at instance start p.This is sef l for recovery from system fail re d)*rocess #onitor'*#O2) ?? The *rocess #onitor peforms process recovery when ser *rocess fails. *mon (lears and @rees reso rces that process was sing. e) (hec&*oint'(8*T) ?? At Specified times, all modified database b ffers in S;A are written to data files by 1+.- at (hec&points and Updating all data files and control files of database to indicate the most recent chec&point f)Archieves'A-(4) ?? The Archiver copies online redo log files to archival storal when they are b sy. g) -ecoveror'-!(O) ?? The -ecoveror is sed to resolve the distrib ted transaction in networ& h) 1ispatcher '1nnn) ?? The 1ispatcher is sef l in # lti Threaded Architect re i) Lc&n ?? .e can have pto CB 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 M types of s%l statments.They are a) 1ata 1efination Lang age'11L) ?? The 11L statments define and maintain objects and drop objects. b) 1ata #anip lation Lang age'1#L) ?? The 1#L statments manip late database data. c) Transaction (ontrol Statements ?? #anage change by 1#L d) Session (ontrol ?? Used to control the properties of c rrent session enabling and disabling roles and changing .e.g ?? Alter Statements,Set -ole e) System (ontrol Statements ?? (hange *roperties of Oracle /nstance .e.g?? Alter System f) !mbedded S%l ?? /ncorporate 11L,1#L and T.(.S in *rogramming Lang age.e.g?? Using the S%l Statements in lang ages s ch as '(', Open,@etch, e$ec te and close #+&. What is a Transaction in Oracle A transaction is a Logical nit of wor& that compromises one or more S3L Statements e$ec ted by a single User. According to A2S/, a transaction begins with first e$ec table statment and ends when it is e$plicitly commited or rolled bac&. #+'. :ey Words >sed in Oracle The 8ey words that are sed in Oracle are ?? a) (ommiting ?? A transaction is said to be commited when the transaction ma&es permanent changes res lting from the S3L statements. b) -ollbac& ?? A transaction that retracts any of the changes res lting from S3L statements in Transaction. Page 83 of 153

c) Save*oint ?? @or long transactions that contain many S3L statements, intermediate mar&ers or savepoints are declared. Savepoints can be sed to divide a transactino into smaller points. d) -olling @orward ?? *rocess of applying redo log d ring recovery is called rolling forward. e) ( rsor ?? A c rsor is a handle ' name or a pointer) for the memory associated with a specific 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 Uses !$plcit c rsor for a m lti row % ery. f) System ;lobal Area'S;A) ?? The S;A is a shared memory region allocated by the Oracle that contains 1ata and control information for one Oracle /nstance./t consists of 1atabase + ffer (ache and -edo log + ffer. g) *rogram ;lobal Area '*;A) ?? The *;A is a memory b ffer that contains data and control information for server process. g) 1atabase + ffer (ache ?? 1atabese + ffer of S;A stores the most recently sed bloc&s of datatbase data.The set of database b ffers in an instance is called 1atabase + ffer (ache. h) -edo log + ffer ?? -edo log + ffer of S;A stores all the redo log entries. i) -edo Log @iles ?? -edo log files are set of files that protect altered database data in memory that has not been written to 1ata @iles. They are basically sed for bac& p when a database crashes. j) *rocess ?? A *rocess is a 'thread of control' or mechansim in Operating System that e$ec tes series of steps. #+). What are .rocedure%functions and .ac0ages *roced res and f nctions consist of set of *L=S3L statements that are gro ped together as a nit to solve a specific problem or perform set of related tas&s. *roced res do not -et rn val es while @ nctions ret rn one One 0al e *ac&ages ?? *ac&ages *rovide a method of encaps lating and storing related proced res, f nctions, variables and other *ac&age (ontents #++. What are 6atabase Triggers and Stored .rocedures 1atabase Triggers ?? 1atabase Triggers are *roced res that are a tomatically e$ec ted as a res lt of insert in, pdate to, or delete from table. 1atabase 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. 1T 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.g?? operations insert, pdate ,delete F before ,after FNE A total of M combinatons At statment level'once for the trigger) or row level' for every e$ec tion ) M N E A total of CE. Th s a total of CE combinations are there and the restriction of sage of CE triggers has been lifted from Oracle H.F Page 84 of 153

Onwards. Stored *roced res ?? 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 7ntegrity 2ules are there and "hat are they There are Three /ntegrity - les. They are as follows ?? a) !ntity /ntegrity - le ?? The !ntity /ntegrity - le enforces that the *rimary &ey cannot be 2 ll b) @oreign 8ey /ntegrity - le ?? The @8/- 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. c) + siness /ntegrity - les ?? The Third /ntigrity r le is abo t the comple$ b siness processes which cannot be implemented by the above E r les. &,1. What are the 5arious !aster and 6etail 2elation ships. The vario s #aster and 1etail -elationship are a) 2on/solated ?? The #aster cannot be deleted when a child is e$isiting b) /solated ?? The #aster can be deleted when the child is e$isiting c) (ascading ?? The child gets deleted when the #aster is deleted. &,2. What are the 5arious /loc0 *oordination .roperties The vario s +loc& (oordination *roperties are a) /mmediate 1efa lt Setting. The 1etail records are shown when the #aster -ecord are shown. b) 1effered with A to 3 ery Oracle @orms defer fetching the detail records ntil the operator navigates to the detail bloc&. c) 1effered with 2o A to 3 ery The operator m st navigate to the detail bloc& and e$plicitly e$ec te a % ery &,3. What is in all those JG tables? Dfor 6/@ The following list attempts to describe some $< tables. The list may not be complete or acc rate, b t represents an attempt to fig 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 notification. 8ernel E *hase (ommit ;lobal Transaction !ntry O<8E;T!E @i$ed Table O<8E;T! O<+4 O<8(+(+4 8ernel E *hase (ommit ;lobal Transaction !ntry @i$ed Table + ffer headers contain information describing the c rrent contents of a piece of the b ffer cache (ache + ffer ( rrent + ffer 4eader @i$ed Table. /t can predict the potential loss of decreasing the n mber of database b ffers. The

Page 85 of 153

db:bloc&:lr :statistics parameter has to be set to tr e to gather information in this table. O<8(0@4 O<812(! O<812ST O<81O4S O<81OST O<8;4LU O<8;L+O1" O<8;L(LUST!O<8;L/21!O O<8;LL( O<8;L*2 O<8;LTA+L! O<8;LTO<8;LT-/;;!O<8;LOS O<88##1 O<88S+0 O<8S#S* O<8S312 O<8S3ST O<8SU(@ O<8SU*L O<8SU-U O<8S3ST O<8TT0S O<80// O<80/S O<80/T Page 86 of 153 @ile 4eader @i$ed Table S;A (ache !ntry @i$ed Table Se% ence (ache Statistics @i$ed Table 4istogram str ct re @i$ed Table Statistics collection @i$ed Table One,row s mmary of L-U statistics for the shared pool 1erived from O<8;LO+ 'col &glhdnsp A E) 1erived from O<8;LO+ 'col &glhdnsp A L) 1erived from O<8;LO+ 'col &glhdnsp A K) Latch (lean, p state for library cache objects @i$ed Table Library cache pin @i$ed Table 1erived from O<8;LO+ 'col &glhdnsp A C) Library (ache Translation Table entry @i$ed Table 1erived from O<8;LO+ 'col &glhdnsp A F) Library (ache Access Table @i$ed table to loo& at what databases are mo nted and their stat s ( rsor (ache +ind 0ariables !ach row represents a piece of memory in the shared pool ;lobal database name !n% e e statistics by type (ost f nction for each 8ernel *rofile 'join to O<8SU*L) -eso rce Limit for each 8ernel *rofile -eso rce Usage for each 8ernel *rofile 'join with O<8SU*L) ;ets and waits for different types of en% e es /ndicate tablespace that has valid save ndo segments /nternal instance parameters set at instance initiali6ation Oracle 1ata +loc& 'si6e:t type) variables /nstance internal flags, variables and parameters

that can change d ring the life of an instance O<8O@*(1S O<8O@*(#S O<891OS O<89S-O O<L! O<#!SSA;!S (lient 1e% e e Statistics (lient #essages Statistics -epresent an os role as defined by the operating system Sec rity state -ole? List of enabled roles Loc& !lement? each *(# loc& that is sed by the b ffer cache 'gc:db:loc&s) 1isplays all the different messages that can be sent to the +ac&gro nd processes

O<2LS:*A-A#!T!-S 2LS database parameters 4andy O<table % eries Some handy % eries based on the O< memory tables? . Largest J bloc&s yo can write at any given time? select &viival write:batch:si6e from $<&vii where &viitag A '&cbswc'D . See the gets and waits for different types of en% e es? select N from $<&s%st where &s%stget I BD Oracle 8ernel 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 files and internal messages. @or e$ample, if yo see messages li&e this, yo will at least &now where they come from? O*/-/*? Unca ght error KKH. !rror stac&? 8(@? write=open error bloc&AB$FeGBB onlineAC O*/ 88 8O 8E 2*/ 89 83 -*/ 8A 81 8T Oracle *rogram /nterface (ompilation Layer , *arse S3L, compile *L=S3L !$ec tion Layer , +ind and e$ec te S3L and *L=S3L 1istrib ted !$ec tion Layer , E*( handling 2etwor& *rogram /nterface Sec rity Layer , 0alidate privs 3 ery Layer -ec rsive *rogram /nterface Access Layer 1ata Layer Transaction Layer

Page 87 of 153

8( 8S 8P 8; 80 S or O1S

(ache Layer Services Layer Loc& #anager Layer ;eneric Layer 8ernel 0ariables 'eg. $<80/S and O<80//) Operating System 1ependencies

&,4. What are the 6ifferent Optimisation Techni;ues The 0ario s Optimisation techni% es are a) !$ec te *lan ?? we can see the plan of the % ery and change it accordingly based on the inde$es b) Optimi6er:hint ?? set:item:property''1ept+loc&',O*T/#/9!-:4/2T,'@/-ST:-O.S')D Select =NS @irst:-ows N= 1eptno,1name,Loc,-owid from dept where '1eptno I EL) c) Optimi6e:S%l ?? +y setting the Optimi6e:S%l A 2o, Oracle @orms assigns a single c rsor for all S3L statements.This slow downs the processing beca se for evertime the S3L m st be parsed whenver they are e$ec ted. fKLr n mod le A my:firstform serid A scott=tiger optimi6e:s%l A 2o d) Optimi6e:Tp ?? +y setting the Optimi6e:TpA 2o, Oracle @orms assigns seperate c rsor only for each % ery S!L!(T statement. All other S3L statements re se the c rsor. fKLr n mod le A my:firstform serid A scott=tiger optimi6e:Tp A 2o &,#. <o" does one change an Oracle userFs pass"ord?Dfor 6/@ /ss e the following S3L command? ALT!- US!- Z sernameI /1!2T/@/!1 +" Znew:passwordID @rom OracleG yo can j st type 5password5 from S3LN*l s, or if yo need to change another ser's password, type 5password ser:name5. Loo& at this e$ample? S3LI password (hanging password for S(OTT Old password? 2ew password? -etype new password? &,&. <o" does one create and drop database users? Loo& at these e$amples? (-!AT! US!- scott /1!2T/@/!1 +" tiger ,, Assign password 1!@AULT TA+L!SA(! tools ,, Assign space for table and inde$ segments T!#*O-A-" TA+L!S*A(! tempD ,, Assign sort space Page 88 of 153

1-O* US!- scott (AS(A1!D ,, -emove ser After creating a new ser, assign the re% ired privileges? ;-A2T (O22!(T, -!SOU-(! TO scottD ;-A2T 1+A TO scottD ,, #a&e ser a 1+ Administrator -emember to give the ser some space % ota on its tablespaces? ALT!- US!- scott 3UOTA U2L/#/T!1 O2 toolsD &,'. Who created all these users in my database?H *an 7 drop this user? Dfor 6/@ Oracle creates a n mber of defa lt database sers or schemas when a new database is created. +elow are a few of them? S"S=(4A2;!:O2:/2STALL or /2T!-2AL Oracle 1ata 1ictionary= (atalog (reated by? X=rdbms=admin=s%l.bs% and vario s catN.s%l scripts (an password be changed? "es '1o so right after the database was created) (an ser be dropped? 2O S"ST!#=#A2A;!The defa lt 1+A ser name 'please do not se S"S) (reated by? X=rdbms=admin=s%l.bs% (an password be changed? "es '1o so right after the database was created) (an ser be dropped? 2O OUTL2=OUTL2 Stored o tlines for optimi6er plan stability (reated by? X=rdbms=admin=s%l.bs% (an password be changed? "es '1o so right after the database was created) (an ser be dropped? 2O S(OTT=T/;!-, A1A#S=.OO1, PO2!S=ST!!L, (LA-8=(LOT4 and +LA8!=*A*!-. Training= demonstration sers containing the pop lar !#* and 1!*T tables (reated by? X=rdbms=admin= tlsampl.s%l (an password be changed? "es (an ser be dropped? "!S , 1rop sers cascade from all prod ction environments 4-=4- '4 man -eso rces), O!=O! 'Order !ntry), S4=S4 'Sales 4istory). Training= demonstration sers containing the pop lar !#*LO"!!S and 1!*A-T#!2TS tables (reated by? X=demo=schema=m&sample.s%l (an password be changed? "es (an ser be dropped? "!S , 1rop sers cascade from all prod ction environments (TOS"S=(TOS"S Oracle inter#edia '(onTe$t (artridge) administrator ser (reated by? X=ct$=admin=drBcsys.s%l T-A(!S0-=T-A(! Page 89 of 153

Oracle Trace server (reated by? X=rdbms=admin=otrcsvr.s%l 1+S2#*=1+S2#* Oracle /ntelligent agent (reated by? X=rdbms=admin=catsnmp.s%l, called from catalog.s%l (an password be changed? "es , p t the new password in snmp:rw.ora file (an ser be dropped? "!S , Only if yo do not se the /ntelligent Agents O-1*LU;/2S=O-1*LU;/2S Object -elational 1ata 'O-1) User sed by Time Series, etc. (reated by? X=ord=admin=ordinst.s%l O-1S"S=O-1S"S Object -elational 1ata 'O-1) User sed by Time Series, etc (reated by? X=ord=admin=ordinst.s%l 1SS"S=1SS"S Oracle 1ynamic Services and Syndication Server (reated by? X=ds=s%l=dssys:init.s%l #1S"S=#1S"S Oracle Spatial administrator ser (reated by? X=ord=admin=ordinst.s%l AU-O-A<O-+<U2AUT4!2T/(AT!1=/20AL/1 Used for sers who do not a thenticate in A rora=O-+ (reated by? X=javavm=install=init:orb.s%l called from X=javavm=install=initjvm.s%l *!-@STAT=*!-@STAT Oracle Statistics *ac&age 'STATS*A(8) that s persedes UTL+STAT=UTL!STAT (reated by? X=rdbms=admin=statscre.s%l -emember to change the passwords for the S"S and S"ST!# sers immediately after installationU !$cept for the ser S"S, there sho ld be no problem altering these sers to se a different defa lt and temporary tablespace. &,). <o" does one enforce strict pass"ord control? Dfor 6/@ +y defa lt Oracle's sec rity is not e$tremely good. @or 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. @rom OracleG one can manage passwords thro gh profiles. Some of the things that one can restrict? . @A/L!1:LO;/2:ATT!#*TS , failed login attempts before the acco nt is loc&ed . *ASS.O-1:L/@!:T/#! , limits the n mber of days the same password can be sed for a thentication . *ASS.O-1:-!US!:T/#! , n mber of days before a password can be re sed Page 90 of 153

. *ASS.O-1:-!US!:#AO , n mber of password changes re% ired before the c rrent password can be re sed . *ASS.O-1:LO(8:T/#! , n mber of days an acco nt will be loc&ed after ma$im m failed login attempts . *ASS.O-1:;-A(!:T/#! , n mber of days after the grace period begins d ring which a warning is iss ed and login is allowed . *ASS.O-1:0!-/@":@U2(T/O2 , password comple$ity verification script Loo& at this simple e$ample? (-!AT! *-O@/L! my:profile L/#/T *ASS.O-1:L/@!:T/#! FBD ALT!- US!- scott *-O@/L! my:profileD &,+. <o" does one s"itch to another user in Oracle? Dfor 6/@ Users normally se the 5connect5 statement to connect from one database ser to another. 4owever, 1+As can switch from one ser to another witho t a password. Of co rse it is not advisable to bridge Oracle's sec rity, b t loo& at this e$ample? S3LI select password from dba: sers where sernameA'S(OTT'D *ASS.O-1 @G>KGKK(FKKBE+MH S3LI alter ser scott identified by lionD User altered. S3LI connect scott=lion (onnected. -!# 1o whatever yo li&e... S3LI connect system=manager (onnected. S3LI alter ser scott identified by val es '@G>KGKK(FKKBE+MH'D User altered. S3LI connect scott=tiger (onnected. 2ote? Also see the s .s%l script in the Usef l Scripts and Sample *rograms *age. &1,. What are snap shots and -ie"s Snapshots are mirror or replicas of tables. 0iews are b ilt sing the col mns from one or more tables. The Single Table 0iew can be pdated b t the view with m lti table cannot be pdated &11. What are the OO.S 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 Page 91 of 153

&12. What is the difference bet"een candidate 0ey% uni;ue 0ey and primary 0ey (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. Uni% 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 different 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& .e can do the table as Share:Loc& as many share:loc&s can be p t on the same reso rce. &14. .re-ileges and 8rants *revileges are the right to e$ec te a partic lare type of S3L statements. e.g ?? -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%6ata 4iles%.arameter 4ile% *ontrol 4iles Table Space ?? 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 ?? This data file stores all the tables related to the system and dba tables b) User Table space ?? This data file 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. 1ata @iles ?? !very Oracle 1ata +ase has one or more physical data files.They store the data for the database.!very datafile is associated with only one database.Once the 1ata file is created the si6e cannot change.To increase the si6e of the database to store more data we have to add data file. *arameter @iles ?? *arameter file is needed to start an instance.A parameter file contains the list of instance config ration parameters e.g.?? db:bloc&:b ffers A LBB db:name A O-AH db:domain A .s.acme lang (ontrol @iles ?? (ontrol files record the physical str ct re of the data files and redo log files They contain the 1b name, name and location of dbs, data files ,redo log files and time stamp.

Page 92 of 153

&1&. .hysical Storage of the 6ata The finest level of gran larity of the data base are the data bloc&s. 1ata +loc& ?? One 1ata +loc& correspond to specific n mber of physical database space !$tent ?? !$tent is the n mber of specific n mber of contigio s data bloc&s. Segments ?? Set of !$tents allocated for !$tents. There are three types of Segments a) 1ata Segment ?? 2on (l stered Table has data segment data of every table is stored in cl ster data segment b) /nde$ Segment ?? !ach /nde$ has inde$ segment that stores data c) -oll +ac& Segment ?? Temporarily store ' ndo' information &1'. What are the .ct 4ree and .ct >sed *ct @ree is sed to denote the percentage of the free space that is to be left when creating a table. Similarly *ct Used is sed to denote the percentage of the sed space that is to be sed when creating a table eg.?? *ctfree EB, *ct sed KB &1). What is 2o" *haining The data of a row in a table may not be able to fit the same data bloc&.1ata for row is stored in a chain of data bloc&s . &1+. What is a 2 .hase *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. /t contains 1#L statements or -emote *roced ral calls that reference a remote object. There are basically E phases in a E phase commit. a) *repare *hase ?? ;lobal coordinator as&s participants to prepare b) (ommit *hase ?? (ommit all participants to coordinator to *repared, -ead only or abort -eply &2,. What is the difference bet"een deleting and truncating of tables 1eleting 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 ?? /f 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 2ules (odd - les describe the ideal nat re of a -1+#S. 2o -1+#S satisfies all the CE codd r les and Oracle Satisfies CC of the CE r les and is the only -dbms to satisfy the ma$im m n mber of r les.

Page 93 of 153

&23. What is 9ormalisation 2ormalisation is the process of organising the tables to remove the red ndancy.There are mainly L 2ormalisation r les. a) C 2ormal @orm ?? A table is said to be in Cst 2ormal @orm when the attrib tes are atomic b) E 2ormal @orm ?? A table is said to be in End 2ormal @orm when all the candidate &eys are dependant on the primary &ey c) Frd 2ormal @orm ?? A table is said to be third 2ormal form when it is not dependant transitively &24. What is the 6ifference bet"een a post ;uery and a pre ;uery A post % ery will fire for every row that is fetched b t the pre % ery will fire only once. &2#. 6eleting the 6uplicate ro"s in the table .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! [[ 1/SA+L! all:trigger \\ &2'. What is pseudo columns ? 9ame 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 mns? N (U--0AL N 2!OT0AL N L!0!L N -O./1 N -O.2U# &2). <o" many columns can table ha-e? The n mber of col mns in a table can range from C to ELK. &2+. 7s space ac;uired in bloc0s or e$tents ? /n e$tents . &3,. "hat is clustered inde$? /n an inde$ed cl ster, rows are stored together based on their cl ster &ey val es . (an not applied for 4AS4. &31. "hat are the datatypes supported /y oracle D79T 29@3E? 0archarE, 2 mber,(har , #LSLA+!L. &32. What are attributes of cursor? R@OU21 , R2OT@OU21 , R/SO*!2,R-O.(OU2T Page 94 of 153

&33. *an you use select in 42O! clause of S?3 select ? "es. &34. Which trigger are created "hen master 1detail rela? master delete property N 2O2,/SOLAT!1 'defa lt) a) on chec& delete master b) on clear details c) on pop late details N /SOLAT!1 a) on clear details b) on pop late details N (AS(A1! a) per,delete b) on clear details c) on pop late details &3#. "hich system -ariables can be set by users? S"ST!#.#!SSA;!:L!0!L S"ST!#.1AT!:T4-!S4OL1 S"ST!#.!@@!(T/0!:1AT! S"ST!#.SU**-!SS:.O-8/2; &3&. What are ob(ect group? An object gro p is a container for a gro p of objects. "o define 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+. 7s forms 4.# ob(ect oriented tool ? "hy? yes , partially. C) *-O*!-T" (LASS , inheritance property E) O0!-LOA1/2; ? proced res and f nctions. &4,. *an you issue 663 in forms? Page 95 of 153

yes, b t yo have to se @O-#S:11L. -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 FE8? , a literal , an e$pression or a variable representing the te$t of a bloc& of dynamically created *L=S3L code , a 1#L statement or , a 11L statement -estrictions? The statement yo pass to @O-#S:11L may not contain bind variable references in the string, b t the val es of bind variables can be concatenated into the string before passing the res lt to @O-#S:11L. &41. What is S *>2 property? , 4ides 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 firing in te$t item Triggers can be classified as 8ey Triggers, #o se Triggers ,2avigational Triggers. 8ey Triggers ?? 8ey Triggers are fired as a res lt of 8ey action.e.g ?? 8ey,ne$t,field, 8ey, p,8ey,1own #o se Triggers ?? #o se Triggers are fired as a res lt of the mo se navigation.e.g. .hen,mo se,b tton,presed,when,mo se, do bleclic&ed,etc 2avigational Triggers ?? These Triggers are fired as a res lt of 2avigation. !.g ? *ost,Te$t,item,*re,te$t,item. .e also have event triggers li&e when Xnew,form,instance and when, new,bloc&,instance. .e cannot call restricted proced res li&e go:to'Xmy:bloc&.first:itemX) in the 2avigational triggers + t can se them in the 8ey,ne$t,item. The 1ifference between 8ey,ne$t and *ost,Te$t is an very important % estion. The &ey,ne$t is fired as a res lt of the &ey action while the post te$t is fired as a res lt of the mo se movement. 8ey ne$t will not fire nless there is a &ey event. The se% ence of firing in a te$t item are as follows ?? a) pre , te$t b) when new item c) &ey,ne$t d) when validate e) post te$t Page 96 of 153

&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 define 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 definition of a property class, yo can change the definition of all objects that inherit properties from that class. "es . All type of triggers . &4#. 7f you ha-e property class attached to an item and you ha-e same trigger "ritten for the item . Which "ill fire first? /tem level trigger fires , /f item level trigger fires, property level trigger won't fire. Triggers at the lowest level are always given the first preference. The item level trigger fires first and then the bloc& and then the @orm level trigger. &4&. What are record groups ? I *an record groups created at run1time? A record gro p is an internal Oracle @orms data str ct re that has a col mn=row framewor& similar to a database table. 4owever, nli&e database tables, record gro ps are separate objects that belong to the form mod le in which they are defined. A record gro p can have an nlimited n mber of col mns of type (4A-, LO2;, 2U#+!-, or 1AT! provided that the total n mber of col mns does not e$ceed MK8. -ecord gro p col mn names cannot e$ceed FB characters. *rogrammatically, record gro ps can be sed whenever the f nctionality offered by a two,dimensional array of m ltiple data types is desirable. T"*!S O@ -!(O-1 ;-OU*? 3 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. 2on,% 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 modified programmatically at r ntime. Static -ecord ;ro p A static record gro p is not associated with a % eryD rather, yo define its str ct re and row val es at design time, and they remain fi$ed at r ntime. &4'. What are @3 2T?

Page 97 of 153

An AL!-T is a modal window that displays a message notifiying operator of some application condition. &4). *an a button ha-e icon and lable at the same time ? ,2O &4+. What is mouse na-igate property of button? .hen #o se 2avigate is Tr e 'the defa lt), Oracle @orms performs standard navigation to move the foc s to the item when the operator activates the item with the mo se. .hen #o se 2avigate is set to @alse, Oracle @orms 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 4O2!SB!67BW796OW? forms r n inside the #1/ application window. This property is sef l for calling a form from another one. &#1. What are timers ? "hen "hen1timer1e$pired does not fire? The .hen,Timer,!$pired trigger can not fire d ring trigger, navigation, or transaction processing. &#2. *an ob(ect group ha-e a bloc0? "es , object gro p can have bloc& as well as program nits. &#3. <o" many types of can-ases are there. There are E 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 effect. /ts li&e a plate on which we add items and stac&ed canvas is sed for giving F dimensional effect. &#4. What are user1e$its? /t invo&es F;L programs. &##. *an you pass -alues to1and1fro 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 @orms variable or item. #a&e s re that the Oracle @orms variable or item is the same data type as the ret rn val e from the foreign f nction. After assigning an Oracle @orms variable or item val e to a *L=S3L variable, pass the *L=S3L variable as a parameter val e in the *L=S3L interface of the foreign f nction. The *L=S3L variable that is passed as a parameter m st be a valid *L=S3L data typeD it m st also be the appropriate parameter type as defined in the *L=S3L interface. &#&. What is 7@.JT/ structure ? The entries of *ro N ( and ser e$its and the form which sim late the proc or ser:e$it are stored in /A*OT+ table in d=b. Page 98 of 153

&#'. *an you call W791S6: thruoF user e$its? "!S. &#). 6oes user e$its supports 633 on !SW796OWS ? "!S . &#+. What is path setting for 633? #a&e s re yo incl de the name of the 1LL in the @O-#SKL:US!-!O/T variable of the O-A(L!./2/ file, or rename the 1LL to @KLOT+.1LL. /f yo rename the 1LL to @KLOT+.1LL, replace the e$isting @KLOT+.1LL in the O-A./2+/2 directory with the new @KLOT+.1LL. &&,. <o" is mapping of name of 633 and function done? The dll can be created sing the 0is al (SS = 0is al +asic Tools and then the dll is p t in the path that is defined the registery. &&1. "hat is precompiler? /t is similar to ( precompiler directives. &&2. *an you connect to non 1 oracle datasource ? <o"? "es . &&3. "hat are 0ey1mode and loc0ing mode properties? le-el ? 8ey #ode ? Specifies how oracle forms ni% ely identifies rows in the database.This is property incl des for application that will r n against 2O2,O-A(L! dataso rces . 8ey setting ni% e 'defa lt.) dateable n, pdateable. Loc&ing mode ? Specifies when Oracle @orms 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? Specifies whether Oracle @orms 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. @or applications that will r n against O-A(L!, se the defa lt setting. ( rsor mode , define c rs r state across transaction Open=close. &&#. *an you replace default form processing ? <o" ? &&&. What is transactional trigger property? /dentifies a bloc& as transactional control bloc&. i.e. non , database bloc& that oracle forms sho ld manage as transactional bloc&.'2O2, O-A(L! dataso rce) defa lt , @ALS!. Page 99 of 153

&&'. What is O3 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. '@O-#S:OL!) &&). What does in-o0e built1in do? This proced re invo&es a method. Synta$? *-O(!1U-! OL!E./20O8! 'object obj:type, method 0A-(4A-E, list list:type ?A B)D *arameters? object /s an OL!E A tomation Object. method /s a method 'proced re) of the OL!E object. list /s the name of an arg ment list assigned to the OL!E.(-!AT!:A-;L/ST f nction. &&+. What are O. 9B4O2!%*@33B4O2!%9 WB4O2!? diff? (ALL:@O-# ? /t 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 @orms iss es a savepoint for the called form. /f the (L!A-:@O-# f nction ca ses a rollbac& when the called form is c rrent, Oracle @orms rolls bac& ncommitted changes to this savepoint. O*!2:@O-# ? .hen yo call a form, Oracle @orms iss es a savepoint for the called form. /f the (L!A-:@O-# f nction ca ses a rollbac& when the called form is c rrent, Oracle @orms rolls bac& ncommitted changes to this savepoint. 2!.:@O-# ? !$its the c rrent form and enters the indicated form. The calling form is terminated as the parent form. /f the calling form had been called by a higher form, Oracle @orms &eeps the higher call active and treats it as a call to the new form. Oracle @orms releases memory 's ch as database c rsors) that the terminated form was sing. Oracle @orms r ns the new form with the same - nform options as the parent form. /f the parent form was a called form, Oracle @orms r ns the new form with the same options as the parent form. &',. What is call form stac0? .hen s ccessive forms are loaded via the (ALL:@O-# proced re, the res lting mod le hierarchy is &nown as the call form stac&. &'1. *an u port applictions across the platforms? ho"?

Page 100 of 153

"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 fKLgen my:form.fmb scott=tiger &'2. What is a -isual attribute? 0is 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. 6iff. bet"een 5@T and .roperty *lass? imp 2amed vis al attrib tes define only font, color, and pattern attrib tesD 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 programmaticallyD 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 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,1o ble(lic& .hen,#o se,1own .hen,#o se,!nter .hen,#o se,Leave .hen,#o se,#ove .hen,#o se,Up &'4. What is *urrent record attribute property? Specifies 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 /f yo define 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 5@T 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 formKL:font to the desired font. :brea& &''. What is 3og S"itch ? The point at which O-A(L! ends writing to one online redo log file and begins writing to another is called a log switch.

Page 101 of 153

&'). What is On1line 2edo 3og? The On,line -edo Log is a set of tow or more on,line redo files that record all committed changes made to the database. .henever a transaction is committed, the corresponding redo entries temporarily stores in redo log b ffers of the S;A are written to an on,line redo log file by the bac&gro nd process L;.-. The on,line redo log files are sed in cyclical fashion. &'+. Which parameter specified in the 6 4@>3T STO2@8 clause of *2 @T T@/3 S.@* cannot be altered after creating the tablespace? All the defa lt storage parameters defined for the tablespace can be changed sing the ALT!- TA+L!S*A(! command. .hen objects are created their /2/T/AL and #/2!OT!2S val es cannot be changed. &),. What are the steps in-ol-ed in 6atabase Startup ? Start an instance, #o nt the 1atabase and Open the 1atabase. -olling forward to recover data that has not been recorded in data files, 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 4ull /ac0up be performed "hen the database is open ? 2o. &)3. What are the different modes of mounting a 6atabase "ith the .arallel Ser-er ? !$cl sive #ode /f the first instance that mo nts a database does so in e$cl sive mode, only that /nstance can mo nt the database. *arallel #ode /f the first 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 @2*<75 3O8 mode o-er operating it in 9O @2*<75 3O8 mode ? (omplete database recovery from dis& fail re is possible only in A-(4/0!LO; mode. Online database bac& p is possible only in A-(4/0!LO; mode. &)#. What are the steps in-ol-ed in 6atabase Shutdo"n ?

Page 102 of 153

(lose the 1atabase, 1ismo nt the 1atabase and Sh tdown the /nstance. &)&. What is @rchi-ed 2edo 3og ? Archived -edo Log consists of -edo Log files that have archived before being re sed. &)'. What is 2estricted !ode of 7nstance 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-/(T!1 S!SS/O2 system privilege. &''. *an u ha-e O3 ob(ects in forms? "es. &'). *an u ha-e 5/J and O*J controls in forms ? "es. &'+. What r the types of "indo"s DWindo" styleE? Specifies whether the window is a 1oc ment window or a 1ialog window. &),. What is O3 @cti-ation style property? Specifies the event that will activate the OL! containing item. &)1. *an u change the mouse pointer ? <o"? "es. Specifies the mo se c rsor style. Use this property to dynamically change the shape of the c rsor. &)2. <o" many types of columns are there and "hat are they @orm la col mns ?? @or doing mathematical calc lations and ret rning one val e S mmary (ol mns ?? @or doing s mmary calc lations s ch as s mmations etc. *lace holder (ol mns ?? 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 /t 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 2 ll &)#. What is the loc0 option in reports layout +y sing the loc& option we cannot move the fields in the layo t editor o tside the frame. This is sef l for maintaining the fields . &)&. What is 4le$ Page 103 of 153

@le$ is the property of moving the related fields together by setting the fle$ 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 K 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? A schema is collection of database objects of a User. &+2. 6escribe 2eferential 7ntegrity ? A r le defined 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). /t also specifies 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 .ri-ate Synonyms ? A *rivate Synonyms can be accessed only by the owner. &+#. What is 6atabase 3in0 ? A database lin& is a named object that describes a 5path5 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? Page 104 of 153

4ash cl sters are better choice when a table is often % eried with e% ality % eries. @or s ch % eries the specified cl ster &ey val e is hashed. The res lting hash &ey val e points directly to the area on dis& that stores the specified rows. &++.When can hash cluster used? 4ash cl sters are better choice when a table is often % eried with e% ality % eries. @or s ch % eries the specified cl ster &ey val e is hashed. The res lting hash &ey val e points directly to the area on dis& that stores the specified rows. ',,. What are the types of database lin0s? *rivate database lin&, p blic database lin& T networ& database lin&. ',1. What is pri-ate database lin0? *rivate database lin& is created on behalf of a specific ser. A private database lin& can be sed only when the owner of the lin& specifies a global object name in a S3L statement or in the definition of the owner's views or proced res. ',2. What is public database lin0? * blic database lin& is created for the special ser gro p *U+L/(. A p blic database lin& can be sed when any ser in the associated database specifies a global object name in a S3L statement or object definition. ',3. What is net"or0 database lin0? 2etwor& 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& specifies a global object name in a S3L statement or object definition. ',4. What is data bloc0? Oracle database's data is stored in data bloc&s. One data bloc& corresponds to a specific n mber of bytes of physical database space on dis&. ',#. <o" to define data bloc0 si=e? A data bloc& si6e is specified for each Oracle database when the database is created. A database sers and allocated free database space in Oracle data bloc&s. +loc& si6e is specified in init.ora file and cannot be changed latter. ',&. What is ro" chaining? /n circ mstances, all of the data for a row in a table may not be able to fit 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. Page 105 of 153

','. What is an e$tent? An e$tent is a specific n mber of contig o s data bloc&s, obtained in a single allocation and sed to store a specific type of information. ',). What are the different types of segments? 1ata 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. '1,. What is rollbac0 segment? A database contains one or more rollbac& segments to temporarily store 5 ndo5 information. '11. What are the uses of rollbac0 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 S3L statement needs a temporary wor& area to complete e$ec tion. .hen the statement finishes e$ec tion, the temporary segment e$tents are released to the system for f t re se. '13. What is a datafile? !very Oracle database has one or more physical data files. A database's data files 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 files allocated for a database. '14. What are the characteristics of data files? A data file can be associated with only one database. Once created a data file can't change si6e. One or more data files form a logical nit of database storage called a tablespace. '1#. What is a redo log? The set of redo log files for a database is collectively &nown as the database redo log. '1&. What is the function of redo log?

Page 106 of 153

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 file 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 files. '1). What does a control file contains? , 1atabase name , 2ames and locations of a database's files and redolog files. , Time stamp of database creation. '1+. What is the use of control file? .hen an instance of an Oracle database is started, its control file is sed to identify the database and redo log files that m st be opened for database operation to proceed. /t is also sed in database recovery. '2,. 7s it possible to split the print re-ie"er into more than one region? "es '21. 7s it possible to center an ob(ect hori=ontally in a repeating frame that has a -ariable hori=ontal si=e? "es '22. 4or a field 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 field be used in a report "ithout it appearing in any data group? "es '24. The (oin defined by the default data lin0 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'. 7s it possible to insert comments into s;l statements return in the data model editor? Page 107 of 153

"es '2). 7s it possible to disable the parameter from "hile running the report? "es '2+. When a form is in-o0ed "ith callBform% 6oes oracle forms issues a sa-e point? "es '3,. $plain the difference bet"een a hot bac0up and a cold bac0up and the benefits 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 benefit 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 benefit of ta&ing a cold bac& p is that it is typically easier to administer the bac& p and recovery process. /n 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 bac0up and do not ha-e any control files. <o" "ould you go about bringing up this database? / wo ld create a te$t based bac& p control file, stip lating where on dis& all the data files where and then iss e the recover command with the sing bac& p control file cla se. '32. <o" do you s"itch from an init.ora file to a spfile? /ss e the create spfile from pfile command. '32. $plain the difference bet"een a data bloc0% 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. 8i-e t"o e$amples of ho" you might determine the structure of the table 6 .T. Use the describe command or se the dbms:metadata.get:ddl pac&age.

Page 108 of 153

'34. Where "ould you loo0 for errors from the database engine? /n the alert log. '3#. *ompare and contrast T2>9*@T and 6 3 T 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 difference between the two is that the tr ncate command is a 11L operation and j st moves the high water mar& and prod ces a now rollbac&. The delete command, on the other hand, is a 1#L operation, which will prod ce a rollbac& and th s ta&e longer to complete. '3&. 8i-e the reasoning behind using an inde$. @aster access to data bloc&s in a table. '3'. 8i-e the t"o types of tables in-ol-ed in producing a star schema and the type of data they hold. @act 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+. 8i-e t"o e$amples of referential integrity constraints. A primary &ey and a foreign &ey. '4,. @ table is classified as a parent table and you "ant to drop and re1create it. <o" "ould you do this "ithout affecting the children tables? 1isable the foreign &ey constraint to the parent, drop the table, re, create the table, enable the foreign &ey constraint. '41. $plain the difference bet"een @2*<75 3O8 mode and 9O@2*<75 3O8 mode and the benefits and disad-antages to each. A-(4/0!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. 2OA-(4/0!LO; mode is basically the absence of A-(4/0!LO; mode and has the disadvantage of not being able to recover to any point in time. 2OA-(4/0!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 bac0up control file? Alter database bac& p control file to trace.

Page 109 of 153

'43. 8i-e the stages of instance startup to a usable state "here normal users may access it. STA-TU* 2O#OU2T , /nstance start p STA-TU* #OU2T , The database is mo nted STA-TU* O*!2 , The database is opened '44. What column differentiates the 5G -ie"s to the 85G -ie"s and ho"? The /2ST:/1 col mn which indicates the instance in a -A( environment the information came from. '4#. <o" "ould you go about generating an J.3@79 plan? (reate a plan table with tl$plan.s%l. Use the e$plain plan set statement:id A 'tstC' into plan:table for a S3L statement Loo& at the e$plain plan with tl$plp.s%l or tl$pls.s%l '4&. <o" "ould you go about increasing the buffer cache hit ratio? Use the b ffer cache advisory over a given wor&load and then % ery the v<db:cache:advice table. /f a change was necessary then / wo ld se the alter system set db:cache:si6e command. '4'. $plain an O2@1,1### "o get this error when yo get a snapshot too old within rollbac&. /t can s ally be solved by increasing the ndo retention or increasing the si6e of rollbac&s. "o sho ld also loo& at the logic involved in the application getting the error message. '4). $plain the difference bet"een GO2@*3 B<O! and GO2@*3 B/@S . O-A(L!:+AS! is the root directory for oracle. O-A(L!:4O#! 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 1+T/#!9O2! from d alD '#,. $plain the use of setting 83O/@3B9@! S e;ual to T2> . Setting ;LO+AL:2A#!S dictates how yo might connect to a database. This variable is either T-U! or @ALS! and if it is set to T-U! 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 .3HS?3 application? .-A*

Page 110 of 153

'#2. $plain the difference bet"een a 4>9*T7O9% .2O* 6>2 and .@*:@8 . A f nction and proced re are the same in that they are intended to be a collection of *L=S3L 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=S3L logic b t are intended to be sed as a normal table or view in a S3L statement. They are also sed to pipeline information in an !TL process. '#4. 9ame three ad-isory statistics you can collect. + ffer (ache Advice, Segment Level Statistics, T Timed Statistics '##. Where in the Oracle directory tree structure are audit traces placed? /n ni$ <O-A(L!:4O#!=rdbms=a dit, in .indows the event viewer '#&. $plain materiali=ed -ie"s and ho" they are used. #ateriali6ed views are objects that are red ced sets of information that have been s mmari6ed, 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 bac0ground process cleans up after it? *#O2 '#). What bac0ground process refreshes materiali=ed -ie"s? The Pob 3 e e *rocesses. '#+. <o" "ould you determine "hat sessions are connected and "hat resources they are "aiting for? Use of 0<S!SS/O2 and 0<S!SS/O2:.A/T '&,. 6escribe "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./T(4 LO;@/L!D '&2. 8i-e t"o methods you could use to determine "hat 663 changes ha-e been made. Page 111 of 153

"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 difference bet"een a T !.O2@2Y tablespace and a . 2!@9 9T 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. '&#. 9ame 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? ;rant the (O22!(T to the ser. '&'. <o" do you add a data file to a tablespace ALT!- TA+L!S*A(! Ztablespace:nameI A11 1ATA@/L! Zdatafile:nameI S/9! '&). <o" do you resi=e a data file? ALT!- 1ATA+AS! 1ATA@/L! Zdatafile:nameI -!S/9! Znew:si6eID '&+. What -ie" "ould you use to loo0 at the si=e of a data file? 1+A:1ATA:@/L!S '',. What -ie" "ould you use to determine free space in a tablespace? 1+A:@-!!:S*A(! ''1. <o" "ould you determine "ho has added a ro" to a table? T rn on fine grain a diting for the table. ''2. <o" can you rebuild an inde$? ALT!- /21!O Zinde$:nameI -!+U/L1D ''3. $plain "hat partitioning is and "hat its benefit 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 .3HS?3 pac0age but got errors% ho" "ould you -ie" the errors? S4O. !--O-S Page 112 of 153

''#. <o" can you gather statistics on a table? The A2AL"9! command. ''&. <o" can you enable a trace for a session? Use the 1+#S:S!SS/O2.S!T:S3L:T-A(! or Use ALT!- S!SS/O2 S!T S3L:T-A(! A T-U!D '''. What is the difference bet"een the S?3I3oader and 7!.O2T utilities? These two Oracle tilities are sed for loading data into the database. The difference is that the import tility relies on the data being prod ced by another Oracle tility !O*O-T while the S3LNLoader tility allows data to be loaded that has been prod ced by other tilities from different data so rces j st so long as it conforms to AS(// formatted or delimited files. ''). 9ame t"o files used for net"or0 connection to a database. T2S2A#!S.O-A and S3L2!T.O-A ''+. What is the function of Optimi=er ? The goal of the optimi6er is to choose the most efficient way to e$ec te a S3L statement. '),. What is $ecution .lan ? The combinations of the steps the optimi6er chooses to e$ec te a statement is called an e$ec tion plan. ')1. *an one resi=e tablespaces and data files? Dfor 6/@E One can man ally increase or decrease the si6e of a datafile from Oracle H.E sing the command. ALT!- 1ATA+AS! 1ATA@/L! 'filenameE' -!S/9! CBB#D +eca se yo can change the si6es of datafiles, yo can add more space to yo r database witho t adding more datafiles. This is beneficial if yo are concerned abo t reaching the ma$im m n mber of datafiles allowed in yo r database. #an ally red cing the si6es of datafiles allows yo to reclaim n sed space in the database. This is sef l for correcting errors in estimations of space re% irements. Also, datafiles can be allowed to a tomatically e$tend if more space is re% ired. Loo& at the following command? (-!AT! TA+L!S*A(! pcs:data:ts 1ATA@/L! 'c?Yora:appsYpcsYpcsdataC.dbf' S/9! F# AUTO!OT!21 O2 2!OT C# #AOS/9! U2L/#/T!1 1!@AULT STO-A;! '/2/T/AL CBEKB 2!OT CBEKB #/2!OT!2TS C #AO!OT!2TS U2L/#/T!1 Page 113 of 153

*(T/2(-!AS! B) O2L/2! *!-#A2!2TD ')2. What is S@5 .O79T ? @or long transactions that contain many S3L 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 specified for O.T7!7C 2 !O6 .arameter ? (OST and -UL!. ')4. *an one rename a tablespace? Dfor 6/@E 2o, this is listed as !nhancement -e% est CKGHKE. .or&aro nd? !$port all of the objects from the tablespace 1rop the tablespace incl ding contents -ecreate the tablespace /mport the objects ')#. What is 2>3 1based 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 specified for O.T7!7C 2B8O@3 parameter of the @3T 2 S SS7O9 *ommand ? E (4OOS!,ALL:-O.S,@/-ST:-O.S and -UL!. ')'. <o" does one create a standby database? Dfor 6/@E .hile yo r prod ction database is r nning, ta&e an 'image copy) bac& p and restore it on d plicate hardware. 2ote that an e$port will not wor&UUU On yo r standby database, iss e the following commands? ALT!- 1ATA+AS! (-!AT! STA21+" (O2T-OL@/L! AS 'filename'D ALT!- 1ATA+AS! #OU2T STA21+" 1ATA+AS!D -!(O0!- STA21+" 1ATA+AS!D On systems prior to Oracle Gi, write a job to copy archived redo log files from the primary database to the standby system, and apply the redo log files to the standby database 'pipe it). -emember the database is recovering and will prompt yo for the ne$t log file to apply. Oracle Gi onwards provide an 5A tomated Standby 1atabase5 feat re, which will send archived, log files to the remote site via 2!TG, and apply then to the standby database. .hen one needs to activate the standby database, stop the recovery Page 114 of 153

process and activate it? ALT!- 1ATA+AS! A(T/0AT! STA21+" 1ATA+AS!D ')).<o" does one gi-e de-elopers access to trace files Dre;uired as input to t0profE? Dfor 6/@E The 5alter session set s%l:traceAtr e5 command generates trace files in US!-:1U#*:1!ST that can be sed by developers as inp t to t&prof. On Uni$ the defa lt file mas& for these files are 5rw$ r,, ,,,5. There is an ndoc mented /2/T.O-A parameter that will allow everyone to read 'rw$ r,r,,) these trace files? :trace:files:p blic A tr e /ncl de this in yo r /2/T.O-A file and bo nce yo r database for it to ta&e effect. ')+. What are the responsibilities of a 6atabase @dministrator ? /nstalling 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 optimi6ing 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 file and ho" is it created ? !ach server and bac&gro nd process can write an associated trace file. .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? 1+A , role (ontains all database system privileges. S"S ser acco nt , The 1+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 , /t 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 file Dinit.oraE ? 1+ 2A#! , # st set to a te$t string of no more than G characters and it will be stored inside the datafiles, redo log files and control files and control file while database creation. 1+:1O#A/2 , /t is string that specifies the networ& domain where the Page 115 of 153

database is created. The global database name is identified by setting these parameters '1+:2A#! T 1+:1O#A/2) (O2TO-L @/L!S , List of control filenames of the database. /f name is not mentioned then defa lt name will be sed. 1+:+LO(8:+U@@!-S , To determine the no of b ffers in the b ffer 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 L 'bac&gro nd process) and additional C for each ser. -OLL+A(8:S!;#!2TS , List of rollbac& segments an O-A(L! instance ac% ires at database start p. Also optionally L/(!2S!:#AO:S!SS/O2S,L/(!2S!:S!SS/O2:.A-2/2; and L/(!2S!:#AO:US!-S. '+3. Why and "hen should 7 bac0up my database? Dfor 6/@ +ac& p and recovery is one of the most important aspects of a 1+As job. /f yo lose yo r company's data, yo co ld very well lose yo r job. 4ardware and software can always be replaced, b t yo r data may be irreplaceableU 2ormally 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 factors? . -ate of data change= transaction rate . 1atabase availability= (an yo sh tdown for cold bac& psX . (riticality of the data= 0al 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 . /f yo are r nning in archivelog mode yo can bac& p parts of a database over an e$tended cycle of days . /f archive logging is enabled one needs to bac& p archived log files timeo sly to prevent database free6es . !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. Off,site va lting is also highly recommended. @re% 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 organi6ational errors and miscomm nications. '+4. What strategies are a-ailable for bac0ing1up an Oracle database? Dfor 6/@ The following methods are valid for bac&ing, p an Oracle database? !$port=/mport , !$ports are 5logical5 database bac& ps in that they e$tract logical definitions and data from the database to a file. (old or Off,line +ac& ps , Sh t the database down and bac& p p ALL Page 116 of 153

data, log, and control files. 4ot or On,line +ac& ps , /f the databases are available and in A-(4/0!LO; mode, set the tablespaces into bac& p mode and bac& p their files. Also remember to bac& p the control files and archived redo log files. -#A2 +ac& ps , .hile the database is off,line or on,line, se the 5rman5 tility to bac& p the database. /t is advisable to se more than one of these methods to bac& p yo r database. @or 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. /t is better to be save than sorry. -egardless of yo r strategy, also remember to bac& p all re% ired software libraries, parameter files, password files, etc. /f yo r database is in A-(;/0!LO; mode, yo also need to bac& p archived log files. '+#. What is the difference bet"een online and offline bac0ups? Dfor 6/@ 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-(4/0!LO; mode. A cold bac& p is a bac& p performed while the database is off,line and navailable to its sers. '+&. What is the difference bet"een restoring and reco-ering? Dfor 6/@ -estoring involves copying bac& p files from secondary storage 'bac& p media) to dis&. This can be done to replace damaged files 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 specific point,in,time 'before the disaster occ rred), or roll,forward ntil the last transaction recorded in the log files. S%lI connect S"S as S"S1+A S%lI -!(O0!- 1ATA+AS! U2T/L T/#! 'EBBC,BF,BM?CM?BB?BB' US/2; +A(8U* (O2T-OL@/L!D '+'. <o" does one bac0up a database using the e$port utility? Dfor 6/@ Oracle e$ports are 5logical5 database bac& ps 'not physical) as they e$tract data and logical definitions from the database into a file. Other bac& p strategies normally bac&, p the physical data files. 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 file. To completely restore a database from an e$port file one practically needs to recreate the entire database. Always do f ll system level e$ports '@ULLA"!S). @ ll e$ports incl de more information abo t the database in the e$port file than ser level e$ports. '+). What are the builtBins used the display the 3O5? Page 117 of 153

Show:lov List:val es '++. <o" do you call other Oracle .roducts from Oracle 4orms? - n:prod ct is a b ilt,in, Used to invo&e one of the s pported oracle tools prod cts and specifies the name of the doc ment or mod le to be r n. /f the called prod ct is navailable at the time of the call, Oracle @orms ret rns a message to the operator. ),,. What is the main diff. bet. 2eports 2., L 2eports 2.#? -eport E.L is object oriented. ),1. What are the /uilt1ins to display the user1named editor? A ser named editor can be displayed programmatically with the b ilt in proced re S4O.,!1/TO-, !1/T:T!T/T!# 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 (4A-, LO2;, 2U#+!-, or 1AT! provided that the total n mber of col mn does not e$ceed MK8. ),4. What is a ?uery 2ecord 8roup? 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 2on 3 ery -ecord ;ro pX ),#. 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 reflects 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 L "hat is its use? What are the -arious sub e-ents a mouse double clic0 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.

Page 118 of 153

),+. >se the addBgroupBcolumn function to add a column to record group that "as created at a design time? @alse )1,. What are the -arious sub e-ents a mouse double clic0 e-ent in-ol-es? What are the -arious sub e-ents a mouse double clic0 e-ent in-ol-es? 1o ble clic&ing the mo se consists of the mo se down, mo se p, mo se clic&, mo se down T mo se p events. )11. What is the use of brea0 group? What are the -arious sub e-ents a mouse double clic0 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. )12. What tuning indicators can one use? Dfor 6/@ The following high,level t ning indicators can be sed to establish if a database is performing optimally or not? . + ffer (ache 4it -atio @orm la? 4it -atio A 'Logical -eads , *hysical -eads) = Logical -eads Action? /ncrease 1+:(A(4!:S/9! '1+:+LO(8:+U@@!-S prior to >i) to increase hit ratio . Library (ache 4it -atio Action? /ncrease the S4A-!1:*OOL:S/9! to increase hit ratio )13. What toolsHutilities does Oracle pro-ide to assist "ith performance tuning? Dfor 6/@ Oracle provide the following tools= tilities to assist with performance monitoring and t ning? . T8*rof . UTL+STAT.S3L and UTL!STAT.S3L , +egin and end stats monitoring . Statspac& . Oracle !nterprise #anager , T ning *ac& )14. What is ST@TS.@*: and ho" does one use it? Dfor 6/@ Statspac& is a set of performance monitoring and reporting tilities provided by Oracle from OracleGi and above. Statspac& provides improved +STAT=!STAT f nctionality, tho gh the old +STAT=!STAT scripts are still available. @or more information abo t STATS*A(8, read the doc mentation in file <O-A(L!:4O#!=rdbms=admin=spdoc.t$t. /nstall Statspac&? cd <O-A(L!:4O#!=rdbms=admin s%lpl s 5= as sysdba5 ]spdrop.s%l ,, /nstall Statspac& , s%lpl s 5= as sysdba5 ]spcreate.s%l,, !nter tablespace names when prompted Use Statspac&? s%lpl s perfstat=perfstat e$ec statspac&.snapD ,, Ta&e a performance snapshots e$ec statspac&.snapD Page 119 of 153

o ;et a list of snapshots select S2A*:/1, S2A*:T/#! from STATS<S2A*S4OTD ]spreport.s%l ,, !nter two snapshot id's for difference report Other Statspac& Scripts? . spp rge.s%l , * rge a range of Snapshot /d's between the specified begin and end Snap /d's . spa to.s%l , Sched le a dbms:job to a tomate the collection of STAT*A(8 statistics . spcreate.s%l , /nstalls the STATS*A(8 ser, tables and pac&age on a database '- n as S"S). . spdrop.s%l , 1einstall STATS*A(8 from database '- n as S"S) . spp rge.s%l , 1elete a range of Snapshot /d's from the database . spreport.s%l , -eport on differences between val es recorded in two snapshots . sptr nc.s%l , Tr ncates all data in Statspac& tables )1#. What are the common 2!@9 errors D"ith solutionsE? Dfor 6/@ Some of the common -#A2 errors are? -#A2,EBEKE? Specification does not match any archivelog in the recovery catalog. Add to -#A2 script? s%l 'alter system archive log c rrent'D -#A2,BMBG>? archived log $y6 not fo nd or o t of sync with catalog !$ec te from -#A2? change archivelog all validateD )1&. <o" can you e$ecute the user defined triggers in forms 3., ? !$ec te Trigger 'trigger,name) )1'. What 2@S pac0age procedure does ? !rase removes an indicated global variable. )1). What is the difference bet"een 9@! B79 and *O.Y ? (opy is pac&age proced re and writes val es into a field. 2ame in is a pac&age f nction and ret rns the contents of the variable to which yo apply. )1+. What pac0age procedure is used for calling another form ? (all '!.g. (all'formname) )2,. When the form is running in 6 />8 mode% 7f you "ant to e$amine the -alues of global -ariables and other form -ariables% What pac0age procedure command you "ould use in your trigger te$t ? +rea&. S"ST!# 0A-/A+L!S

Page 120 of 153

)21. The -alue recorded in system.lastBrecord -ariable is of type a. 9umber b. /oolean c. *haracter. ? b. +oolean. )22. What is mean by .rogram 8lobal @rea D.8@E ? /t is area in memory that is sed by a Single Oracle User *rocess. )23. What is hit ratio ? /t is a meas re of well the data cache b ffer is handling re% ests for data. 4it -atio A 'Logical -eads , *hysical -eads , 4its #isses)= Logical -eads. )24. <o" do u implement the 7f statement in the Select Statement .e can implement the if statement in the select statement by sing the 1ecode statement. e.g select 1!(O1! '!#*:(AT,'C','@irst','E','Second'2 ll)D 4ere the 2 ll is the else statement where n ll is done . )2#. <o" many types of $ceptions are there There are E types of e$ceptions. They are a) System !$ceptions e.g. .hen no:data:fo nd, .hen too:many:rows b) User 1efined !$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 E 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 K )2+. What is the difference bet"een static and dynamic loThe 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? Dfor 6/@ Oracle ser acco nts can be loc&ed, nloc&ed, forced to choose new passwords, etc. @or e$ample, all acco nts e$cept S"S and S"ST!# will be loc&ed after creating an Oracle>i1+ database sing the 1+ Page 121 of 153

(onfig ration Assistant 'dbca). 1+A's m st nloc& these acco nts to ma&e them available to sers. Loo& at these e$amples? ALT!- US!- scott A((OU2T LO(8 ,, loc& a ser acco nt ALT!- US!- scott A((OU2T U2LO(8D ,, nloc&s a loc&ed sers acco nt ALT!- US!- scott *ASS.O-1 !O*/-!D ,, @orce ser to choose a new password )31. <o" does one tune Oracle Wait e-ents? Dfor 6/@ Some wait events from 0<S!SS/O2:.A/T and 0<S"ST!#:!0!2T views? !vent 2ame? T ning -ecommendation? db file se% ential read b ffer b sy waits log b ffer spaces T ne S3L to do less /=O. #a&e s re all objects are analy6ed. -edistrib te /=O across dis&s. /ncrease 1+:(A(4!:S/9! '1+:+LO(8:+U@@!-S prior to >i)= Analy6e contention from S"S.0<+4 /ncrease LO;:+U@@!- parameter or move log files to faster dis&s

)32. What is the difference bet"een 6/4ile Se;uential and Scattered 2eads?Dfor 6/@ +oth 5db file se% ential read5 and 5db file scattered read5 events signify time waited for /=O read re% ests to complete. Time is reported in CBB's of a second for Oracle Gi releases and below, and CBBB'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&. /nstead they sho ld thin& of how data is read into the S;A b ffer cache. db file se% ential read? A se% ential read operation reads data into contig o s memory ' s ally a single,bloc& read with pFAC, b t can be m ltiple bloc&s). Single bloc& /=Os are s ally the res lt of sing inde$es. This event is also sed for reb ilding the controlfile and reading datafile headers '*EAC). /n general, this event is indicative of dis& contention on inde$ reads. db file scattered read? Similar to db file se% ential reads, e$cept that the session is reading m ltiple data bloc&s and scatters them into different discontin o s b ffers in the S;A. This statistic is 2O-#ALL" indicating dis& contention on f ll table scans. -arely, data from f ll table scans co ld be fitted into a contig o s b ffer 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 reads? prompt 5A0!-A;! .A/T T/#! @O- -!A1 -!3U!STS5 select a.average:wait 5S!3 -!A15, b.average:wait 5S(AT -!A15 from sys.v:<system:event a, sys.v:<system:event b Page 122 of 153

where a.event A 'db file se% ential read' and b.event A 'db file scattered read'D )33. What is the use of .@2473 option in J. command ? 2ame of the parameter file to be passed for e$port. )34. What is the use of T@/3 S option in List of tables sho ld be e$ported.6e) J. command ?

)3#. What is the O.T7!@3 parameter? /t is sed to set the optimal length of a rollbac& segment. )3&. <o" does one use O2@6 />8 from Ser-er !anagerH S?3I.lus? Dfor 6/@ !$ec te the 5O-A1!+U; 4!L*5 command from svrmgrl or s%lpl s to obtain a list of valid O-A1!+U; commands. Loo& at these e$amples? S3L*LUSI -!# Trace S3L statements with bind variables S3L*LUSI oradeb g setospid CBCEC Oracle pid? >C, Uni$ process pid? CBCEC, image? oracleorcl S3L*LUSI oradeb g !0!2T CBBKM trace name conte$t forever, level CE Statement processed. S3L*LUSI U vi =app=oracle=admin=orcl=bd mp=ora:CBCEC.trc S3L*LUSI -!# Trace *rocess Statistics S3L*LUSI oradeb g setorapid E Uni$ process pid? CKFM, image? ora:pmon:orcl S3L*LUSI oradeb g procstat Statement processed. S3L*LUSII oradeb g T-A(!@/L!:2A#! =app=oracle=admin=orcl=bd mp=pmon:CKFM.trc S3L*LUSI -!# List semaphores and shared memory segments in se S3L*LUSI oradeb g ipc S3L*LUSI -!# 1 mp !rror Stac& S3L*LUSI oradeb g setospid ZpidI S3L*LUSI oradeb g event immediate trace name errorstac& level F S3L*LUSI -!# 1 mp *arallel Server 1L# loc&s S3L*LUSI oradeb g l&deb g ,a convloc& S3L*LUSI oradeb g l&deb g ,a convres S3L*LUSI oradeb g l&deb g ,r Zreso rce handleI 'i.e B$GBMMdFFG from convres d mp) )3'. @re there any undocumented commands in Oracle? Dfor 6/@ S re there are, b t it is hard to find them. Loo& at these e$amples? @rom Server #anager 'OracleH.F and above)? O-A1!+U; 4!L* /t loo&s li&e one can change memory locations with the O-A1!+U; *O8! command. Anyone brave eno gh to test this one for sX *revio sly this f nctionality was available with O-A1+O 'ls ,l Page 123 of 153

<O-A(L!:4O#!=rdbms=lib=oradb$.oD ma&e ,f oracle.m& oradb$) S3LN*l s? ALT!- S!SS/O2 S!T (U--!2T:S(4!#A A S"SD )3). 7f the ma$imum record retrie-ed property of the ;uery is set to 1, then a summary -alue "ill be calculated? Only for CB records. )3+. What are the different ob(ects that you cannot copy or reference in ob(ect groups? Objects of different mod les Another object gro ps /ndivid al bloc& dependent items *rogram nits. )4,. What is an O3 ? Object Lin&ing T !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? 2o )42. 7s it possible to set a filter condition in a cross product group in matri$ reports? 2o )43. What is O-erloading of procedures ? The Same proced re name is repeated with parameters of different datatypes and parameters in different positions, varying n mber of parameters is called overloading of proced res. e.g. 1+#S:OUT*UT p t:line )44. What are the return -alues of functions S?3*O6 and S?3 22! ? What is .ragma J *.T7O9B797T ? $plain the usage ? S3L(O1! ret rns the latest code of the error that has occ rred. S3L!--# ret rns the relevant error message of the S3L(O1!. )4#. What are the datatypes a a-ailable in .3HS?3 ? Some scalar data types s ch as 2U#+!-, 0A-(4A-E, 1AT!, (4A-, LO2;, +OOL!A2. Some composite data types s ch as -!(O-1 T TA+L!. )4&. What are the t"o parts of a procedure ? *roced re Specification and *roced re +ody. )4'. What is the basic structure of .3HS?3 ? Page 124 of 153

*L=S3L ses bloc& str ct re as its basic str ct re. Anonymo s bloc&s or nested bloc&s can be sed in *L=S3L. )4+. W<@T 7S 2!@9 ? Dfor 6/@ -ecovery #anager is a tool that? manages the process of creating bac& ps and also manages the process of restoring and recovering from them. )#,. W<Y >S 2!@9 ? Dfor 6/@ 2o e$tra costs ^/ts available free X-#A2 introd ced in Oracle G it has become simpler with newer versions and easier than ser managed bac& ps X*roper sec rity X"o are CBBR s re yo r database has been bac&ed p. X/ts contains detail of the bac& ps ta&en etc in its central repository @acility for testing validity of bac& ps also commands li&e crosschec& to chec& the stat s of bac& p. @aster bac& ps and restores compared to bac& ps witho t -#A2 -#A2 is the only bac& p tool which s pports incremental bac& ps. Oracle CBg has got f rther optimi6ed 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 different details of bac& p 2o e$tra redo generated when bac& p is ta&en..compared to online bac& p witho t -#A2 which res lts in saving of space in hard dis& -#A2 an intelligent tool #aintains repository of bac& p metadata -emembers bac& p set location 8nows what need to bac&ed p 8nows what is re% ired for recovery 8nows what bac& ps are red ndant >96 2ST@96798 T< 2!@9 @2*<7T *T>2 An oracle 2!@9 comprises of 2!@9 J *>T@/3 This co ld be present and fired even thro gh client side T@28 T 6@T@/@S This is the database which needs to be bac&ed p. 2 *O5 2Y *@T@3O8 -ecovery catalog is optional otherwise bac& p details are stored in target database controlfile . /t is a repository of information % eried and pdated by -ecovery #anager /t is a schema or ser stored in Oracle database. One schema can s pport many databases Page 125 of 153

/t contains information abo t physical schema of target database datafile and archive log ,bac& p sets and pieces -ecovery catalog is a m st in following scenarios . /n order to store scripts . @or tablespace point in time recovery #edia #anagement Software #edia #anagement software is a m st if yo are sing -#A2 for storing bac& p in tape drive directly. +ac& ps in 2!@9 Oracle bac& ps in 2!@9 are of the following type -#A2 complete bac& p O- 2!@9 incremental bac& p These bac& ps are of 2!@9 proprietary nat re 7!@8 *O.Y The advantage of ing /mage copy is its not in -#A2 proprietary format.. +ac& p @ormat -#A2 bac& p is not in oracle format b t in -#A2 format. Oracle bac& p comprises of bac& p sets and it consists of bac& p pieces. +ac& p sets are logical entity /n oracle >i it gets stored in a defa lt location There are two type of bac& p sets 1atafile bac& p sets, Archivelog bac& p sets One more important point of data file 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 files which are in -#A2 proprietary format. !$ample of ta&ing bac& p sing -#A2 Ta&ing -#A2 +ac& p /n non archive mode in dos prompt type -#A2 "o get the -#A2 prompt -#A2 I (onnect Target (onnect to target database ? #agic sing target database controlfile instead of recovery catalog Lets ta&e a simple bac& p of database in non archive mode sh tdown immediate D , , Sh tdowns the database start p mo nt bac& p database D, its start bac&ing the database alter database openD .e can fire the same command in archive log mode And whole of datafiles will be bac&ed +ac& p database pl s archivelogD

Page 126 of 153

-estoring database -estoring database has been made very simple in >i . /t is j st -estore database.. -#A2 has become intelligent to identify which datafiles has to be restored and the location of bac& ped p file. Oracle !nhancement for -#A2 in CB ; @lash -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 mean time between recoverability. The new parameter introd ced is 1+:-!(O0!-":@/L!:1!ST A =oracle=flash:recovery:area +y config ring the -#A2 -!T!2T/O2 *OL/(" the flash recovery area will a tomatically delete obsolete bac& ps and archive logs that are no longer re% ired based on that config ration Oracle has introd ced new feat res in incremental bac& p (hange Trac&ing @ile Oracle CBg has the facility to deliver faster incrementals with the implementation of changed trac&ing file 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 /ncrementally Updated +ac& ps Oracle database CBg /ncrementally Updates +ac& p feat res merges the image copy of a datafile with -#A2 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 -#A2 recover command. This res lts in faster recovery. +inary compression techni% e red ces bac& p space sage by LB, HLR. .ith the new 1U-AT/O2 option for the -#A2 +A(8U* command, 1+As can weigh bac& p performance against system service level re% irements. +y specifying a d ration, -#A2 will a tomatically calc late the appropriate bac& p rateD in addition, 1+As can optionally specify whether bac& ps sho ld minimi6e time or system load. 2ew @eat res in Oem to identify -#A2 related bac& p li&e bac& p pieces, bac& p sets and image copy Oracle >i 2ew feat res *ersistent -#A2 (onfig ration Page 127 of 153

A new config re command has been introd ced in Oracle >i , that lets yo config 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 -#A2 command file. (ontrolfile A to bac& ps Thro gh this new feat re -#A2 will a tomatically perform a controlfile a to bac& p. after every bac& p or copy command. +loc& #edia -ecovery /f we can restore a few bloc&s rather than an entire file we only need few bloc&s. .e even dont need to bring the data file offline. Synta$ for it as follows +loc& -ecover datafile G bloc& EED (onfig re +ac& p Optimi6ation *rior to >i whenever we bac&ed p database sing -#A2 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. 2ow with >i bac& p optimi6ation parameter we can prevent repeat bac& p of read only tablespace and archive log. The command for this is as follows (onfig re bac& p optimi6ation on Archive Log failover /f -#A2 cannot read a bloc& in an archived log from a destination. -#A2 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 'FC,jan,EBBE CK?BB?BB' 1o not bac& p previo sly bac&ed p files 'say a previo s bac& p failed and yo want to restart from where it left off). 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 file . *arallel operation s pported . !$tensive reporting available . Scripting . 1 ple$ bac& p sets . (orr pt bloc& detection . +ac& p archive logs *itfalls of sing -#A2 Page 128 of 153

*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$ ^-#A2 has now become very simple and easy to se.. /f yo changed the location of bac& p set it is comp lsory for yo to register it sing -#A2 or while yo are trying to restore bac& p /t 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 file. (omp lsory #edia #anagement only if sing tape bac& p /ncremental bac& ps tho gh sed to cons me less space sed to be slower since it sed to read the entire database to find the changed bloc&s and also They have diffic lt time streaming the tape device. . (onsiderable improvement has been made in CBg to optimi6e the algorithm to handle changed bloc&. Observation /ntrod ced in Oracle G it has become more powerf l and simpler with newer version of Oracle > and CB g. So if yo really don't want to miss something critical please start sing -#A2. )#1. $plain >97O9%!79>S%>97O9 @33% 79T 2S *T ? /2T!-S!(T ret rns all distinct rows selected by both % eries.#/2US , ret rns all distinct rows selected by the first % ery b t not by the second.U2/O2 , ret rns all distinct rows selected by either % eryU2/O2 ALL , ret rns all rows selected by either % ery, incl ding all d plicates. )#2. Should the O ! *onsole be displayed at all times D"hen there are scheduled (obsE? Dfor 6/@ .hen a job is s bmitted the agent will confirm 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 O/A 'Oracle /ntelligent Agent). The O/A maintains a .jo file 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 file 'binary) are reported to the console job s bsystem. 2ote that O!# will not be able to send e,mail and paging notifications when the (onsole is not started. )#3. 6ifference bet"een S>/ST2 and 79ST2 ? /2ST- 'StringC,StringE'n,'m)),/2ST- ret rns the position of the mth occ rrence of the string E instringC. The search begins from nth position of stringC.SU+ST- 'StringC n,m)SU+ST- ret rns a character string of si6e m in stringC, starting from nth position of stringC. )#4. What 0ind of (obs can one schedule "ith O !? Dfor 6/@

Page 129 of 153

O!# comes with pre,defined jobs li&e !$port, /mport, r n OS commands, r n s%l scripts, S3LN*l s commands etc. /t also gives yo the fle$ibility of sched ling c stom jobs written with the T(L lang age. )##. What are the pre re;uisites ? /. to modify data type of a col mn X ii. to add a col mn with 2OT 2ULL constraint X To #odify the datatype of a col mn the col mn m st be empty. to add a col mn with 2OT 2ULL constrain, the table m st be empty. )#&. <o" does one bac0out e-ents and (obs during maintenance slots? Dfor 6/@ #anagemnet and data collection activity can be s spended by imposing a blac&o t. Loo& at these e$amples? agentctl start blac&o t J +lac&o t the entrire agent agentctl stop blac&o t J -es me normal monitoring and management agentctl start blac&o t O-(L J +lac&o t database O-(L agentctl stop blac&o t O-(L J -es me normal monitoring and management agentctl start blac&o t ,s jobs ,d BB?EB J +lac&o t jobs for EB min tes )#'. What are the types of S?3 Statement ? 1ata 1efinition Lang age ? (-!AT!,ALT!-,1-O*,T-U2(AT!,-!0O8!,2O AU1/T T (O##/T. 1ata #anip lation Lang age? /2S!-T,U*1AT!,1!L!T!,LO(8 TA+L!,!O*LA/2 *LA2 T S!L!(T.Transactional (ontrol? (O##/T T -OLL+A(8Session (ontrol? ALT!-S!SS/O2 T S!T -OL!System (ontrol ? ALT!- S"ST!#. )#). What is the Oracle 7ntelligent @gent? Dfor 6/@ The Oracle /ntelligent Agent 'O/A) 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 /ntelligent Agent is responsible for? . 1iscovering targets that can be managed '1atabase Servers, 2etG Listeners, etc.)D . #onitoring of events registered in !nterprise #anagerD and . !$ec ting tas&s associated with jobs s bmitted to !nterprise #anager. )#+. <o" does one start the Oracle 7ntelligent @gent? Dfor 6/@ One needs to start an O/A 'Oracle /ntelligent Agent) process on all machines that will to be managed via O!#. @or O!# >i and above? Page 130 of 153

agentctl start agent agentctl stop agent @or O!# E.C and below? lsnrctl dbsnmp:start lsnrctl dbsnmp:stat s On .indows 2T, start the 5OracleAgent5 Service. /f the agent doesn't want to start, ens re yo r environment variables are set correctly and delete the following files before trying again? C) /n <O-A(L!:4O#!=networ&=admin? snmp:ro.ora and snmp:rw.ora. E) Also delete ALL files in <O-A(L!:4O#!=networ&=agent=. (an one write scripts to send alert messages to the consoleX Start the O!# console and create a new event. Select option 5!nable Unsolicited !vent5. Select test 5Unsolicited !vent5. .hen entering the parameters, enter val es similar to these? !vent 2ame? =oracle=script=myalert Object? N Severity? N #essage? N One can now write the script and invo&e the oemevent command to send alerts to the console. Loo& at this e$ample? oemevent =oracle=script=myalert 1!ST/2AT/O2 alert 5#y c stom error message5 where 1!ST/2AT/O2 is the same val e as entered in the 5#onitored 1estinations5 field when yo 've registered the event in the O!# (onsole. )&,. Where can one get more information about T*3? Dfor 6/@ 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(L? . The Tcl 1eveloper Ochange , download and learn abo t T(L . OraT(L at So rceforge , 1ownload the OraT(L pac&age . Tom *oinde$ter's Tcl *age , Oratcl was originally written by Tom *oinde$ter )&1. @re there any troubleshooting tips for O !? Dfor 6/@ . (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. /t is a bad practice to create the repository with S"S and System. . /f yo are nable to la nch the console or there is a comm nication problem with the intelligent agent 'daemon). !ns re O(O files are registered. Type the following in the 1OS prompt 'the c rrent directory sho ld be <O-A(L!:4O#!Y+/2? (?YOrawin>LY+inI -egSvrFE mmd$FE.O(O Page 131 of 153

(?YOrawin>LY+inI -egSvrFE vojt.O(O . /f yo have a problem starting the Oracle Agent Sol tion A? +ac& p the N.3 files and 1elete all the N.3 @iles '<Oracle:home=networ&=agent folder) +ac& p and delete S2#*:-O.ora, S2#*:-..ora, dbsnmp.ver and services.ora files '<Oracle:4ome=networ&=admin folder) Start the Oracle Agent service. Sol tion +? "o r version of /ntelligent Agent co ld be b ggy. (hec& with Oracle for any available patches. @or e$ample, the /ntelligent Agent that comes with Oracle G.B.K is b ggy. Sometimes yo get a @ailed 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 importHe$port and "hy does one need it? Dfor 6/@ The Oracle e$port '!O*) and import '/#*) 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 file 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. @or more information on how to load and nload data from files, read the S3LNLoader @A3. The e$port=import tilities are also commonly sed to perform the following tas&s? . +ac& p and recovery 'small databases only) . -eorgani6ation of data= !liminate database fragmentation . 1etect database corr ption. !ns re that all the data can be read. . Transporting tablespaces between databases . !tc. )&3. "hat is a display item? 1isplay 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 importHe$port utilities? Dfor 6/@ Loo& for the 5imp5 and 5e$p5 e$ec tables in yo r <O-A(L!:4O#!=bin directory. One can r n them interactively, sing command line parameters, or sing parameter files. Loo& at the imp=e$p parameters before starting. These parameters can be listed by e$ec ting the following commands? 5e$p helpAyes5 or 5imp helpAyes5. The following e$amples demonstrate how the imp=e$p tilities can be sed? e$p scott=tiger fileAemp.dmp logAemp.log tablesAemp rowsAyes inde$esAno e$p scott=tiger fileAemp.dmp tablesA'emp,dept) imp scott=tiger fileAemp.dmp f llAyes Page 132 of 153

imp scott=tiger fileAemp.dmp from serAscott to serAscott tablesAdept e$p seridAscott=tiger]orcl parfileAe$port.t$t ... where e$port.t$t contains? +U@@!-ACBBBBB @/L!Aacco nt.dmp @ULLAn O.2!-Ascott ;-A2TSAy (O#*-!SSAy 2OT!? /f yo do not li&e command line tilities, yo can import and e$port data with the 5Schema #anager5 ;U/ that ships with Oracle !nterprise #anager 'O!#). )&). What are the types of -isual attribute settings? ( stom 0is al attrib tes 1efa lt vis al attrib tes 2amed 0is al attrib tes. .indow )&+. *an one e$port a subset of a table? Dfor 6/@ @rom OracleGi one can se the 3U!-"A e$port parameter to selectively nload a s bset of the data from a table. Loo& at this e$ample? e$p scott=tiger tablesAemp % eryAY5where deptnoACBY5 )',. What are the t"o "ays to incorporate images into a oracle forms application? +oilerplate /mages /mage:items )'1. *an one monitor ho" fast a table is imported? Dfor 6/@ /f yo need to monitor how fast rows are imported from a r nning import job, try one of the following methods? #ethod C? select s bstr's%l:te$t,instr's%l:te$t,'/2TO 5'),FB) table:name, rows:processed, ro nd''sysdate,to:date'first:load:time,'yyyy,mm,dd hhEK?mi?ss'))NEKNMB,C) min tes, tr nc'rows:processed=''sysdate,to:date'first:load:time,'yyyy,mm,dd hhEK?mi?ss'))NEKNMB)) rows:per:min from sys.v:<s%larea where s%l:te$t li&e '/2S!-T R/2TO 5R' and command:type A E and open:versions I BD @or this to wor& one needs to be on Oracle H.F or higher 'H.E might also be O8). /f 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 E? Page 133 of 153

Use the @!!1+A(8An import parameter. This command will tell /#* to display a dot for every 2 rows imported. )'2. *an one import tables to a different tablespace? Dfor 6/@ Oracle offers no parameter to specify a different 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 res? *re,create the table's) in the correct tablespace? . /mport the d mp file sing the /21!O@/L!A option . !dit the inde$file. -emove remar&s and specify the correct tablespaces. . - n this inde$file against yo r database, this will create the re% ired tables in the appropriate tablespaces . /mport the table's) with the /;2O-!A" option. (hange the defa lt tablespace for the ser? . -evo&e the 5U2L/#/T!1 TA+L!S*A(!5 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 . /mport the table )'3. What do you mean by a bloc0 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 S?3I3oader and "hat is it used for? Dfor 6/@ S3LNLoader is a b l& loader tility sed for moving data from e$ternal files into the Oracle database. /ts synta$ is similar to that of the 1+E Load tility, b t comes with more options. S3LNLoader s pports vario s load formats, selective loading, and m lti,table loads. )'&. <o" does one use the S?3I3oader utility? Dfor 6/@ One can load data into an Oracle database by sing the s%lldr 's%lload on some platforms) tility. /nvo&e the tility witho t arg ments to get a list of available parameters. Loo& at the following e$ample? s%lldr scott=tiger controlAloader.ctl This sample control file 'loader.ctl) will load an e$ternal data file containing delimited data? load data infile 'c?YdataYmydata.csv' into table emp Page 134 of 153

fields terminated by 5,5 optionally enclosed by '5' ' empno, empname, sal, deptno ) The mydata.csv file may loo& li&e this? CBBBC,5Scott Tiger5, CBBB, KB CBBBE,5@ran& 2a de5, LBB, EB Another Sample control file with in,line data formatted as fi$ length records. The tric& is to specify 5N5 as the name of the data file, and se +!;/21ATA to start the data section in the control file. load data infile N replace into table departments ' dept position 'BE?BL) char'K), deptname position 'BG?EH) char'EB) ) begindata (OS( (O#*UT!- S(/!2(! !2;L !2;L/S4 L/T!-ATU-! #AT4 #AT4!#AT/(S *OL" *OL/T/(AL S(/!2(! )''. <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. )'). 7s there a S?3I>nloader to do"nload data to a flat file? Dfor 6/@ Oracle does not s pply any data nload tilities. 4owever, yo can se S3LN*l s to select and format yo r data and then spool it to a file? set echo off newpage B space B pagesi6e B feed off head off trimspool on spool oradata.t$t select colC QQ ',' QQ colE QQ ',' QQ colF from tabC where colE A 'O"9'D spool off Alternatively se the UTL:@/L! *L=S3L pac&age? rem -emember to pdate initS/1.ora, tl:file:dirA'c?Yoradata' parameter declare fp tl:file.file:typeD begin fp ?A tl:file.fopen''c?Yoradata','tabC.t$t','w')D tl:file.p tf'fp, 'Rs, RsYn', 'Te$t@ield', LL)D tl:file.fclose'fp)D endD = "o might also want to investigate third party tools li&e S3L.ays from Page 135 of 153

/spirer Systems, TOA1 from 3 est, or #anage/T @ast Unloader from (A to help yo nload data from Oracle. )'+. *an one load -ariable and fi$ length data records? Dfor 6/@ "es, loo& at the following control file e$amples. /n the first we will load delimited data 'variable length)? LOA1 1ATA /2@/L! N /2TO TA+L! load:delimited:data @/!L1S T!-#/2AT!1 +" 5,5 O*T/O2ALL" !2(LOS!1 +" '5' T-A/L/2; 2ULL(OLS ' dataC, dataE ) +!;/21ATA CCCCC,AAAAAAAAAA EEEEE,5A,+,(,1,5 /f yo need to load positional data 'fi$ed length), loo& at the following control file e$ample? LOA1 1ATA /2@/L! N /2TO TA+L! load:positional:data ' dataC *OS/T/O2'C?L), dataE *OS/T/O2'M?CL) ) +!;/21ATA CCCCCAAAAAAAAAA EEEEE++++++++++ (an one s&ip header records load while loadingX Use the 5S8/* n5 &eyword, where n A n mber of logical rows to s&ip. Loo& at this e$ample? LOA1 1ATA /2@/L! N /2TO TA+L! load:positional:data S8/* L ' dataC *OS/T/O2'C?L), dataE *OS/T/O2'M?CL) ) +!;/21ATA CCCCCAAAAAAAAAA EEEEE++++++++++ )),. *an one modify data as it loads into the database? Dfor 6/@ 1ata can be modified as it loads into the Oracle 1atabase. 2ote that this only applies for the conventional load path and not for direct path loads. Page 136 of 153

LOA1 1ATA /2@/L! N /2TO TA+L! modified:data ' rec:no 5my:db:se% ence.ne$tval5, region (O2STA2T 'FC', time:loaded 5to:char'S"S1AT!, '44EK?#/')5, dataC *OS/T/O2'C?L) 5?dataC=CBB5, dataE *OS/T/O2'M?CL) 5 pper'?dataE)5, dataF *OS/T/O2'CM?EE)5to:date'?dataF, '""##11')5 ) +!;/21ATA CCCCCAAAAAAAAAA>>CEBC EEEEE++++++++++>>BCCE LOA1 1ATA /2@/L! 'mail:orders.t$t' +A1@/L! 'bad:orders.t$t' A**!21 /2TO TA+L! mailing:list @/!L1S T!-#/2AT!1 +" 5,5 ' addr, city, state, 6ipcode, mailing:addr 5decode'?mailing:addr, n ll, ?addr, ?mailing:addr)5, mailing:city 5decode'?mailing:city, n ll, ?city, ?mailing:city)5, mailing:state ) ))1.*an one load data into multiple tables at once? Dfor 6/@ Loo& at the following control file? LOA1 1ATA /2@/L! N -!*LA(! /2TO TA+L! emp .4!2 empno UA ' ' ' empno *OS/T/O2'C?K) /2T!;!- !OT!-2AL, ename *OS/T/O2'M?CL) (4A-, deptno *OS/T/O2'CH?CG) (4A-, mgr *OS/T/O2'EB?EF) /2T!;!- !OT!-2AL ) /2TO TA+L! proj .4!2 projno UA ' ' ' projno *OS/T/O2'EL?EH) /2T!;!- !OT!-2AL, empno *OS/T/O2'C?K) /2T!;!- !OT!-2AL ) ))2. What is the difference bet"een boiler plat images and image items?

Page 137 of 153

+oiler plate /mages are static images '!ither vector or bit map) that yo import from the file system or database to se a graphical elements in yo r form, s ch as company logos and maps. /mage 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 definition of an image item is stored as part of the form mod le @#+ and @#O files, b t no image file 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 filter or a format trigger? +eca se, in a where cla se the condition is applied d ring data retrievalthan after retrieving the data. ))#. *an one selecti-ely load only the records that one need? Dfor 6/@ Loo& at this e$ample, 'BC) is the first character, 'FB?FH) are characters FB to FH? LOA1 1ATA /2@/L! 'mydata.dat' +A1@/L! 'mydata.bad' 1/S(A-1@/L! 'mydata.dis' A**!21 /2TO TA+L! my:selective:table .4!2 'BC) ZI '4' and 'BC) ZI 'T' and 'FB?FH) A 'C>>>CECH' ' region (O2STA2T 'FC', service:&ey *OS/T/O2'BC?CC) /2T!;!- !OT!-2AL, call:b:no *OS/T/O2'CE?E>) (4A) ))&. *an one s0ip certain columns "hile loading data? Dfor 6/@ One cannot se *OST/O2'$?y) with delimited data. L c&ily, from Oracle Gi one can specify @/LL!- col mns. @/LL!- col mns are sed to s&ip col mns=fields in the load file, ignoring fields that one does not want. Loo& at this e$ample? ,, One cannot se *OST/O2'$?y) as it is stream data, there are no positional fields,the ne$t field begins after some delimiter, not in col mn O. ,,I LOA1 1ATA T-U2(AT! /2TO TA+L! TC @/!L1S T!-#/2AT!1 +" ',' ' fieldC, fieldE @/LL!-, fieldF )

Page 138 of 153

))'. <o" does one load multi1line records? Dfor 6/@ One can create one logical record from m ltiple physical records sing one of the following two cla ses? . (O2(AT!2AT!? , se when S3LNLoader sho ld combine the same n mber of physical records together to form one logical record. . (O2T/2U!/@ , se if a condition indicates that m ltiple records sho ld be treated as one. !g. by having a 'J' character in col mn C. ))+. <o" can get S?3I3oader to *O!!7T only at the end of the load file? Dfor 6/@ One cannot, b t by setting the -O.SA 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.SA. )+,. *an one impro-e the performance of S?3I3oader? Dfor 6/@ 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 significantly slow down load times even with -O.SA set to a high val e. Add the following option in the command line? 1/-!(TAT-U!. This will effectively bypass most of the -1+#S processing. 4owever, there are cases when yo can't se direct load. -efer to chapter G on Oracle server Utilities man al. T rn off database logging by specifying the U2-!(O0!-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 S?3I3oader to load images% sound clips and documents? Dfor 6/@ S3LNLoader can load data from a 5primary data file5, S1@ 'Secondary 1ata file , for loading nested tables and 0A--A"s) or LO;@/L!. The LO+@/L! method provides and easy way to load doc ments, images and a dio clips into +LO+ and (LO+ col mns. Loo& at this e$ample? ;iven the following table? (-!AT! TA+L! image:table ' image:id 2U#+!-'L), file:name 0A-(4A-E'FB), image:data +LO+)D (ontrol @ile? LOA1 1ATA /2@/L! N /2TO TA+L! image:table -!*LA(! @/!L1S T!-#/2AT!1 +" ',' ' image:id /2T!;!-'L), file:name (4A-'FB), Page 139 of 153

image:data LO+@/L! 'file:name) T!-#/2AT!1 +" !O@ ) +!;/21ATA BBC,imageC.gif BBE,imageE.jpg )+2. What is the difference bet"een the con-entional and direct path loader? Dfor 6/@ The conventional path loader essentially loads the data by sing standard /2S!-T statements. The direct path loader '1/-!(TAT-U!) bypasses m ch of the logic involved with that, and loads directly into the Oracle data files. #ore information abo t the restrictions of direct path loading can be obtained from the Utilities Users ; ide. 8 9 2@3 79T 257 W ?> ST7O9S D1E 1.What are the -arious types of $ceptions ? User defined and *redefined !$ceptions. 2.*an "e define e$ceptions t"ice in same bloc0 ? 2o. 3.What is the difference bet"een a procedure and a function ? @ 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 OUT parameter. 4.*an you ha-e t"o functions "ith the same name in a .3HS?3 bloc0 ? "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 ? 2o. '.What are the -arious types of parameter modes in a procedure ? /2, OUT A21 /2OUT. ).What is O-er 3oading and "hat are its restrictions ? OverLoading means an object performing different f nctions depending pon the no. of parameters or the data type of the parameters passed to it. +.*an functions be o-erloaded ? "es.

Page 140 of 153

1,.*an 2 functions ha-e same name L input parameters but differ only by return datatype 2o. 11.What are the constructs of a procedure% function or a pac0age ? The constr cts of a proced re, f nction or a pac&age are ? variables and constants c rsors e$ceptions 12.Why *reate or 2eplace and not 6rop and recreate procedures ? So that ;rants are not dropped. 13.*an you pass parameters in pac0ages ? <o" ? "es. "o can pass parameters to proced res or f nctions in a pac&age. 14.What are the parts of a database trigger ? The parts of a trigger are? A triggering event or statement A trigger restriction A trigger action 1#.What are the -arious types of database triggers ? There are CE types of triggers, they are combination of ? /nsert, 1elete and Update Triggers. +efore and After Triggers. -ow and Statement Triggers. 'FNENEACE) 1&.What is the ad-antage of a stored procedure o-er a database trigger ? .e have control over the firing of a stored proced re b t we have no control over the firing of a trigger. 1'.What is the ma$imum no. of statements that can be specified in a trigger statement ? One. 1).*an -ie"s be specified in a trigger statement ? 2o 1+.What are the -alues of Pne" and Pold in 7nsertH6eleteH>pdate Triggers ? /2S!-T ? new A new val e, old A 2ULL 1!L!T! ? new A 2ULL, old A old val e U*1AT! ? new A new val e, old A old val e

Page 141 of 153

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 fired, the triggers are said to be cascading. #a$ A FE. 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 /nsert=Updat e on a table having referential integrity constraint on the triggering table. 23.6escribe Oracle databaseFs physical and logical structure ? *hysical ? 1ata files, -edo Log files, (ontrol file. Logical ? Tables, 0iews, Tablespaces, etc. 24.*an you increase the si=e of a tablespace ? <o" ? "es, by adding datafiles to it. 2&.What is the use of *ontrol files ? (ontains pointers to locations of vario s data files, redo log files, etc. 2'.What is the use of 6ata 6ictionary ? Used by Oracle to store information abo t vario s physical and logical Oracle str ct res e.g. Tables, Tablespaces, datafiles, 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 /nsert increases. 3,.*an 3ongH3ong 2@W be clustered ? 2o. 31.*an null 0eys be entered in cluster inde$% normal inde$ ? "es. 32.*an *hec0 constraint be used for self referential integrity ? <o" ? "es. /n the (4!(8 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 rollbac0 e$tent ? Two 34.What are the states of a rollbac0 segment ? What is the difference bet"een partly a-ailable and needs reco-ery ? Page 142 of 153

The vario s states of a rollbac& segment are ? O2L/2!, O@@L/2!, *A-TL" A0A/LA+L!, 2!!1S -!(O0!-" and /20AL/1. 3#.What is the difference bet"een uni;ue 0ey and primary 0ey ? Uni% e &ey can be n llD *rimary &ey cannot be n ll. 3&.@n insert statement follo"ed by a create table statement follo"ed by rollbac0 ? Will the ro"s be inserted ? 2o. 3'.*an you define multiple sa-epoints ? "es. 3).*an you 2ollbac0 to any sa-epoint ? "es. 4,.What is the ma$imum no. of columns a table can ha-e ? ELK. 41.What is the significance of the L and LL operators in .3 S?3 ? The T operator means that the *L S3L bloc& re% ires ser inp t for a variable. The TT 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. /f a transaction is very large, and the rollbac& segment is not able to hold the rollbac& information, then will the transaction span across different rollbac& segments or will it terminate X /t 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. (U-SO- cC 'median /2 2U#+!-) /S S!L!(T job, ename @-O# emp .4!-! sal I medianD 43.What are the -arious types of 2oll/ac0 Segments ? * blic Available to all instances *rivate Available to specific instance 44.*an you use M2o"*ount as a parameter to a cursor ? "es 4#.7s the ;uery belo" allo"ed P Select sal% ename 7nto $ 4rom emp Where ename Q F:798F DWhere $ is a record of 9umberD4E and *harD1#EE "es

Page 143 of 153

4&.7s the assignment gi-en belo" allo"ed P @/* Q .?2 DWhere @/* and .?2 are recordsE "es 4'.7s this for loop allo"ed P 4or $ in LStart..L nd 3oop "es 4).<o" many ro"s "ill the follo"ing S?3 return P Select I from emp Where ro"num R 1,S > rows 4+.<o" many ro"s "ill the follo"ing S?3 return P Select I from emp Where ro"num Q 1,S 2o rows #,.Which symbol preceeds the path to the table in the remote database ? ] #1.@re -ie"s automatically updated "hen base tables are updated ? "es #2.*an a trigger "ritten for a -ie" ? 2o #3.7f all the -alues from a cursor ha-e been fetched and another fetch is issued% the output "ill be P error% last record or first record ? Last -ecord #4.@ table has the follo"ing data P TT#% 9ull% 1,UU. What "ill the a-erage function return ? H.L ##.7s Sysdate a system -ariable or a system function? System @ 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 rollbac0 and again issue a ne$t-al. What "ill the output be ? F #&.6efinition of relational 6ata/ase by 6r. *odd D7/!E?

Page 144 of 153

A -elational 1atabase is a database where all data visible to the ser is organi6ed strictly as tables of data val es and where all database operations wor& on these tables. #'.What is !ulti Threaded Ser-er D!T@E ? /n a Single Threaded Architect re 'or a dedicated server config 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 26/!S% <ierarchical L 9H" database ? -1+#S , - system 4ierarchical , /#S 2=. , 1+T; &,.What is 4unctional 6ependency ;iven a relation -, attrib te " of - is f nctionally dependent on attrib te O of - if and only if each O,val e has associated with it precisely one ," val e in &1.What is @uditing ? The database has the ability to a dit all actions that ta&e place within it. a) Login attempts, b) Object Accesss, c) 1atabase Action -es lt of ;reatest'C,2ULL) or Least'C,2ULL) 2ULL &2.While designing in clientHser-er "hat are the 2 imp. things to be considered ? 2etwor& Overhead 'traffic), Speed and Load of client server &4.When to create inde$es ? To be created when table is % eried for less than ER or KR to ELR of the table rows. &#.<o" can you a-oid inde$es ? TO ma&e inde$ access path navailable , Use @ULL hint to optimi6er for f ll table scan , Use /21!O or A21,!3UAL hint to optimi6er to se one inde$ or set to inde$es instead of another. , Use an e$pression in the .here (la se of the S3L. &&.What is the result of the follo"ing S?3 P Select 1 from dual >97O9 Select F@F from dualS !rror

Page 145 of 153

&'.*an database trigger "ritten on synonym of a table and if it can be then "hat "ould be the effect if original table is accessed. "es, database trigger wo ld fire. &).*an you alter synonym of -ie" or -ie" ? 2o &+.*an you create inde$ on -ie" 2o ',.What is the difference bet"een a -ie" and a synonym ? Synonym is j st a second name of table sed for m ltiple lin& of database. 0iew 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 difference bet"een alias and synonym ? Alias is temporary and sed with one % ery. Synonym is permanent and not sed as alias. '2.What is the effect of synonym and table name used in same Select statement ? 0alid '3.WhatFs the length of S?3 integer ? FE bit length '4.What is the difference bet"een foreign 0ey and reference 0ey ? @oreign &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 '&.7f content of dual is updated to some -alue computation ta0es place or not ? "es ''.7f any other table same as dual is created "ould it act similar to dual? "es ').4or "hich relational operators in "here clause% inde$ is not used ? ZI , li&e 'R ...' is 2OT f nctions, field Sconstant, field QQ '' Page 146 of 153

'+.@ssume that there are multiple databases running on one machine. <o" can you s"itch from one to another ? (hanging the O-A(L!:S/1 ),.What are the ad-antages of Oracle ? *ortability ? Oracle is ported to more platforms than any of its competitors, r nning on more than CBB hardware platforms and EB networ&ing protocols. #ar&et *resence ? Oracle is by far the largest -1+#S vendor and spends more on - T 1 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 ? 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 ? Speed of a 't ned' Oracle 1atabase and application is % ite good, even with large databases. Oracle can manage I CBB;+ databases. # ltiple database s pport ? 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=S3L re% ires that yo declare an identifier 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 specification terminated by a semicolon. )2.What are actual and formal parameters ? Act al *arameters ? 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. @or e$ample, the following proced re call lists two act al parameters named emp:n m and amo nt? !g. raise:salary'emp:n m, amo nt)D @ormal *arameters ? The variables declared in a s bprogram specification and referenced in the s bprogram body are formal parameters. @or e$ample, the following proced re declares two formal parameters named emp:id and increase? !g. *-O(!1U-! raise:salary 'emp:id /2T!;!-, increase -!AL) /S c rrent:salary -!ALD )3.What are the types of 9otation ? *osition, 2amed, #i$ed and -estrictions. )4.What all important parameters of the init.ora are supposed to be increased if you "ant to increase the S8@ si=e ? Page 147 of 153

/n o r case, db:bloc&:b ffers was changed from MB to CBBB 'std val es are MB, LLB T FLBB) shared:pool:si6e was changed from F.L#+ to >#+ 'std val es are F.L, L T >#+) open:c rsors was changed from EBB to FBB 'std val es are EBB T FBB) db:bloc&:si6e was changed from EBKG 'E8) to KB>M 'K8) Vat the time of database creationW. The initial S;A was aro nd K#+ when the server -A# was FE#+ and The new S;A was aro nd CF#+ when the server -A# was increased to CEG#+. )#.7f 7 ha-e an e$ecute pri-ilege on a procedure in another users schema% can 7 e$ecute his procedure e-en though 7 do not ha-e pri-ileges on the tables "ithin the procedure ? "es )&.What are -arious types of (oins ? !% ijoins, 2on,e% ijoins, self join, o ter join )'.What is a pac0age cursor ? A pac&age c rsor is a c rsor which yo declare in the pac&age specification witho t an S3L statement. The S3L statement for the c rsor is attached dynamically at r ntime from calling proced res. )).7f you insert a ro" in a table% then create another table and then say 2ollbac0. 7n this case "ill the ro" be inserted ? "es. +eca se (reate table is a 11L which commits a tomatically as soon as it is e$ec ted. The 11L 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 ?? 2ormal 3 eries S b 3 eries (o,related % eries 2ested % eries (ompo nd % eries +,.What is a transaction ? A transaction is a set of S3L statements between any two (O##/T and -OLL+A(8 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. /t is created by Oracle for each individ al S3L. +2.Which of the follo"ing is not a schema ob(ect P 7nde$es% tables% public synonyms% triggers and pac0ages ? * blic synonyms

Page 148 of 153

+4.What is .3HS?3? *L=S3L is Oracle's *roced ral Lang age e$tension to S3L. 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. +#.7s there a .3HS?3 ngine in S?3I.lus? 2o. Unli&e Oracle @orms, S3LN*l s does not have a *L=S3L engine. Th s, all yo r *L=S3L are send directly to the database engine for e$ec tion. This ma&es it m ch more efficient as S3L statements are not stripped off and send to the database individ ally. +&.7s there a limit on the si=e of a .3HS?3 bloc0? ( rrently, the ma$im m parsed=compiled si6e of a *L=S3L bloc& is MK8 and the ma$im m code si6e is CBB8. "o can r n the following select statement to % ery the si6e of an e$isting pac&age or proced re. S3LI select N from dba:object:si6e where name A 'proced re:name' +'.*an one readH"rite files from .3HS?3? /ncl ded in Oracle H.F is a UTL:@/L! pac&age that can read and write files. The directory yo intend writing to has to be in yo r /2/T.O-A file 'see UTL:@/L!:1/-A... parameter). +efore Oracle H.F the only means of writing a file was to se 1+#S:OUT*UT with the S3LN*l s S*OOL command. 1!(LA-! file4andler UTL:@/L!.@/L!:T"*!D +!;/2 file4andler ?A UTL:@/L!.@O*!2''=home=oracle=tmp', 'myo tp t','.')D UTL:@/L!.*UT@'file4andler, '0al e of f ncC is Rsn', f ncC'C))D UTL:@/L!.@(LOS!'file4andler)D !21D +).<o" can 7 protect my .3HS?3 source code? *L=S3L 0E.E, available with OracleH.E, implements a binary wrapper for *L=S3L programs to protect the so rce code. This is done via a standalone tility that transforms the *L=S3L 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. S3LN*l s and S3LN1+A will still nderstand and &now how to e$ec te s ch scripts. P st be caref l, there is no 5decode5 command available. The synta$ is? wrap inameAmyscript.s%l onameA$$$$.yyy ++.*an one use dynamic S?3 "ithin .3HS?3? O2 *an you use a 663 in a procedure ? <o" ?

Page 149 of 153

@rom *L=S3L 0E.C one can se the 1+#S:S3L pac&age to e$ec te dynamic S3L statements. !g? (-!AT! O- -!*LA(! *-O(!1U-! 1"2S3L AS c r integerD rc integerD +!;/2 c r ?A 1+#S:S3L.O*!2:(U-SO-D 1+#S:S3L.*A-S!'c r,'(-!AT! TA+L! O '" 1AT!)', 1+#S:S3L.2AT/0!)D rc ?A 1+#S:S3L.!O!(UT!'c r)D 1+#S:S3L.(LOS!:(U-SO-'c r)D !21D Oracel 7nter-ie" ?uestion Only D1E .hat is -eferential /ntegrity r leX 1ifferentiate between 1elete T Tr ncate command. /mplicit ( rsor T !$plicit ( rsor. -ef. &ey T @oreign &ey. .here T 4aving (la se. .hat are vario s &inds of /ntegrity (onstraints in OracleX .hat are vario s &ind of joinsX .hat is -aise:Application:!rrorX .hat are vario s &inds of e$ceptions in OracleX 2ormal @orms .hat is meant by Scrollable c rsorX The se of 4A0/2; , .4!-! and ;-OU*+" in one S3LX .hat is meant by SO-T/2; and ;-OU*/2;X .hat are the different types of OUT!- PO/2SX !$plain the U2/O2 operation in S3L . .hat is meant by OUT!PO/2X .hat is a 2on, corelated s b% eryX .hat is a corelated s b% eryX .hat do yo &now abo t s b% eriesX .hat is the theory behind the PO/2 statement in 1+EX .hat are the different types of S3LX 4ow to drop the col mn in a tableX 4ow to drop the inde$X .hat are the different tablespaces in databaseX .hat is the ma$im m n mber of triggers, can apply to a single tableX .hat is the o tp t of S/;2 f nctionX .hat are the more common pse do,col mnsX Other way to replace % ery res lt n ll val e with a te$tX .hat are *L=S3L ( rsor !$ceptionsX Any three *L=S3L !$ceptionsX Any three *L=S3L !$ceptionsX .hich date f nction ret rns n mber val eX 1isplay Odd= !ven n mber of recordsX Page 150 of 153

1isplay the n mber val e in .ordsX To view installed Oracle version informationX @ind o t nth highest salary from emp tableX /mplicit ( rsor attrib tesX !$plicit ( rsor attrib tesX 1isplay the records between two range / &now the nvl f nction only allows the same data type'ie. n mber or char or date 2vl'comm, B)), if commission is n ll then the te$t 2ot Applicable want to display, instead of blan& space. 4ow do / write the % eryXXX 4ow do / display row n mber with recordsX 4ow do / eliminate the d plicate rowsX /f a view on a single base table is manip lated will the changes be reflected on the base tableX /f "es , nder what conditionsX (an a view be pdated=inserted=deletedX .hat are the advantages of 0/!.X .hat is ("(L!=2O ("(L! in a Se% enceX /s it possible to access the c rrent val e in a session before accessing ne$t val eX 4ow to access the c rrent val e and ne$t val e from a se% enceX .hat is a database lin&X /f ni% e &ey constraint on 1AT! col mn is created, will it validate the rows that are inserted with S"S1AT!X 4ow will yo activate=deactivate integrity constraintsX .here the integrity constraints are stored in data dictionaryX .hat are the pre,re% isites to modify datatype of a col mn and to add a col mn with 2OT 2ULL constraintX /s it possible to se LO2; col mns in .4!-! cla se or O-1!+"X 4ow many LO2; col mns are allowed in a tableX .hat is the ma$im m S/9! allowed for each typeX .hat is difference between (4A- and 0A-(4A-EX .hat are the data types allowed in a tableX .hat is O2 1!L!T! (AS(A1!X .hat is the sage of SA0!*O/2TSX .hat is referential integrity constraintX .hat is an integrity constraintX .hat is the fastest way of accessing a row in a tableX .hat is -O./1X !$plain U2/O2, #/2US, U2/O2 ALL and /2T!-S!(TX 1ifference between SU+ST- and /2ST-X !$plain (O22!(T +" *-/O-X .hat is correlated s b,% eryX .hat is the s b,% eryX

Page 151 of 153

!$plain the different types of joinsX .hat is a joinX .hat is difference between T-U2(AT! T 1!L!T!X .hat is a transactionX .hat are the types of S3L statementX .hich datatype is sed for storing graphics and imagesX LO2; -A. data type is sed for storing +LO+'s 'binary large objects).X .hat is a pse do col mn. ;ive some e$amplesX /t is a col mn that is not an act al col mn in the tableX eg US!-, U/1, S"S1AT!, -O.2U#, -O./1, 2ULL, A21 L!0!L.X .hat are the differences yo have seen while installing Oracle on 2T and Uni$ platformX .hat tility is sed to create a logical bac& pX e$port .hat are the differences between database designing and database modelingX /f the large table contains tho sands of records and the application is accessing FLR of the table which method to se? inde$ searching or f ll table scanX /n which sit ation whether pea& time or off pea& time yo will e$ec te the A2AL"9! TA+L! command. .hyX 4ow to chec& to memory gap once the S;A is started in -estricted modeX All the sers are complaining that their application is hanging. 4ow yo will resolve this sit ation in OLT*X /f the S3L N *l s hangs for a long time, what is the reasonX Shall we create proced res to fetch more than one recordX 4ow do yo increase the performance of RL/8! operatorX "o are reg larly changing the pac&age body part. 4ow will yo create or what will yo do before creating that pac&ageX 4ow can yo see the so rce code of the pac&ageX 1 al table e$plain. /s any data internally storing in d al table. Lot of sers are accessing select sysdate from d al and they getting some millisecond differences. /f we e$ec te S!L!(T S"S1AT! @-O# !#*D what error will we get. .hyX /n e$ception handling we have some 2OT:@OU21 and OT4!-S. /n inner layer we have some 2OT:@OU21 and OT4!-S. .hile e$ec ting which one whether o ter layer or inner layer will chec& firstX .hat is m tated trigger, is it the problem of loc&s. /n single ser mode we got m tated error, as a 1+A how yo will resolve itX 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. /n this case where the data will be stored whether in Schema A or Schema +X .hat is b l& S3LX 4ow to do the sched led tas&=jobs in Uni$ platformX

Page 152 of 153

/f the entire dis& is corr pted how will yo and what are the steps to recover the databaseX 4ow will yo monitor rollbac& segment stat sX 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$tendX .hat is redo log file mirroringX 4ow can we plan storage for very large tables .hen will be a segment released X .hat are disadvantages of having raw devicesX List the factors that can affect the acc racy of the estimaX .hat is the difference between <<1AT!<< T <<1+1AT!<<< <1+1AT!<< retrieves the c rrent database date<<date<< retrieves the c rrent operating system 4ow to prevent na thori6ed se of privileges granted to a -ole X .hat is a deadloc& and !$plainX .hat are the basic element of base config ration of an Oracle databaseX .hat is an inde$ and 4ow it is implemented in Oracle databaseX .hat is the se of redo log informationX .hat is a schemaX .hat is *arallel ServerX .hat is a database instance and !$plainX .hat is a datafileX .hat is a temporary segmentX .hat are the ses of rollbac& segment

Page 153 of 153

Potrebbero piacerti anche