Vous êtes sur la page 1sur 24

Oracle DBA Interview questions

Differentiate between TRUNCATE and DELETE. The Delete command will log the data changes in the log file where as the truncate will simply remove the data without it. Hence Data removed by Delete command can be rolled back but not the data removed by TRUNC T!. Truncate is a DD" statement whereas D!"!T! is a D#" statement.

!at is t!e "a#i"u" buffer si$e t!at can be s%ecified usin& t!e DB'()OUT*UT.ENABLE function+ $%%%%%%

Can ,ou use a co""it state"ent wit!in a database tri&&er+ &es' if you are using autonomous transactions in the Database triggers.

!at is an UTL)-ILE+ wit! it+

!at are different %rocedures and functions associated

The UT"()*"! package lets your +",-." programs read and write operating system /0-1 te2t files. *t provides a restricted version of standard 0- stream file input,output /*,01. -ubprogram 3Description )0+!N function30pens a file for input or output with the default line si4e. *-(0+!N function 3Determines if a file handle refers to an open file. )C"0-! procedure 3Closes a file. )C"0-!( "" procedure 3Closes all open file handles. 5!T("*N! procedure 3Reads a line of te2t from an open file. +UT procedure36rites a line to a file. This does not append a line terminator. N!6("*N! procedure36rites one or more 0-3specific line terminators to a file. +UT("*N! procedure 36rites a line to a file. This appends an 0-3specific line terminator. +UT) procedure 3 +UT procedure with formatting. ))"U-H procedure3+hysically writes all pending output to a file. )0+!N function 30pens a file with the ma2imum line si4e specified.

Difference between database tri&&ers and for" tri&&ers+ Database triggers are fired whenever any database action like *N-!RT' U+ T!' D!"!T!' "050N "050)) etc occurs. )orm triggers on the other hand are fired in response to any event that takes place while working with the forms' say like navigating from one field to another or one block to another and so on.

!at is OCI.

!at are its uses+

0C* is 0racle Call *nterface. 6hen applications developers demand the most powerful interface to the 0racle Database -erver' they call upon the 0racle Call *nterface /0C*1. 0C* provides the most comprehensive access to all of the 0racle Database functionality. The newest performance' scalability' and security features appear first in the 0C* +*. *f you write applications for the 0racle Database' you likely already depend on 0C*. -ome types of applications that depend upon 0C* are7 8 +",-." applications e2ecuting -." 8 C99 applications using 0CC* 8 :ava applications using the 0C*3based :D;C driver 8 C applications using the 0D;C driver 8 <; applications using the 0"!D; driver 8 +ro=C applications 8 Distributed -."

!at are ORACLE *RECO'*ILER(+ precompiler is a tool that allows programmers to embed -." statements in high3level source programs like C' C99' C0;0"' etc. The precompiler accepts the source program as input' translates the embedded -." statements into standard 0racle runtime library calls' and generates a modified source program that one can compile' link' and e2ecute in the usual way. !2amples are the +ro=C +recompiler for C' +ro=Cobol for Cobol' -.": for :ava etc.

!at is s,nta# for dro%%in& a %rocedure and a function+ Are t!ese o%erations %ossible+

Drop +rocedure,)unction > yes' if they are standalone procedures or functions. *f they are a part of a package then one have to remove it from the package definition and body and recompile the package. .ow to c!ec/ if A%%s 00i (,ste" is Autoconfi& enabled + Under ? D(T0+,bin check for file adcfginfo.sh and if this e2ists use adcfginfo.sh conte2tfile@AC0NT!BTC show@enabled *f this file is not there ' look for any configuration file under ++"(T0+ if system is utoconfig enabled then you will see entry like

.ow to c!ec/ if Oracle A%%s 00i (,ste" is Ra%id Clone enabled + )or syetem to be Rapid Clone enabled ' it should be utoconfig enabled /Check above How to confirm if pps $$i is utoconfig enabled1. &ou should have Rapid Clone +atches applied ' Rapid Clone is part of Rapid *nstall +roduct whose )amily +ack Name is DB. ;y default all pps $$i *nstances $$.D.E and above are utoconfig and Rapid Clone enabled.

!ats is difference between two env files in 1CONTE2T3.env and A**(1CONTE2T3.env under 4A**L)TO* + ++-AC0NT!BTC.env is main environment file which inturn calls other environment files like AC0NT!BTC.env under ? ++"(T0+' AC0NT!BTC.env under F%G 0R C"!(H0#! and custom.env for any Customi4ed environment files.

!ats "ain concurrent 'ana&er t,%es. H *C# 3 *nternal Concurrent #anager which manages concurrent #anagers H -tandard #anagers 3 6hich #anage processesing of reIuests. H CR# 3 Conflict Resolution #anagers ' resolve conflicts in case of incompatibility.

!ats U( director, in 4AD)TO* or under various %roduct TO*5s . U- directory is defauly language directory in 0racle pplications. *f you have multiple languages *nstalled in your pplications then you will see other languages directories

besides U-' that directory will contain reports' fm2 and other code in that respective directory like )R for )rance' R for arabic' simplifies chinese or spanish.

!ere is Concurrent 'ana&er lo& file location. ;y default standard location is ? ++"C-),? ++""05 ' in some cases it can go to ?)ND(T0+,log as well.

!ere would i find .rf6 file7 and w!at e#ecatl, it dose + These files are used during restart of patch in case of patch failure because of some reason.

!ere is a%%sweb.cf& or a%%sweb)4CONTE2T.cf& stored and w!, its used + This file is defined by environment variable )0R#-G%(6!;(C0N)*5()*"! This is usually in directory ?0 (HT#",bin on forms tier. This file is used by any forms client session. 6hen a user try to access forms ' fG%webm2 picks up this file and based on this configuration file creates a forms session to user,client.

!at is 'ulti Node (,ste" + #ulti Node -ystem in 0racle pplications $$i means you have pplications $$i Component on more than one system. Typical e2ample is Database' Concurrent #anager on one machine and forms' 6eb -erver on second machine is e2ample of Two Node -ystem. Can a function ta/e OUT %ara"eters. If not w!,+ yes' *N' 0UT or *N 0UT.

Can t!e default values be assi&ned to actual %ara"eters+

&es. *n such case you donJt need to specify any value and the actual parameter will take the default value provided in the function definition.

!at is difference between a for"al and an actual %ara"eter+ The formal parameters are the names that are declared in the parameter list of the header of a module. The actual parameters are the values or e2pressions placed in the parameter list of the actual call to the module.

!at are different "odes of %ara"eters used in functions and %rocedures+ There are three different modes of parameters7 *N' 0UT' and *N 0UT. *N 3 The *N parameter allows you to pass values in to the module' but will not pass anything out of the module and back to the calling +",-." block. *n other words' for the purposes of the program' its *N parameters function like constants. :ust like constants' the value of the formal *N parameter cannot be changed within the program. &ou cannot assign values to the *N parameter or in any other way modify its value. *N is the default mode for parameters. *N parameters can be given default values in the program header. 0UT 3 n 0UT parameter is the opposite of the *N parameter. Use the 0UT parameter to pass a value back from the program to the calling +",-." block. n 0UT parameter is like the return value for a function' but it appears in the parameter list and you can' of course' have as many 0UT parameters as you like. *nside the program' an 0UT parameter acts like a variable that has not been initialised. *n fact' the 0UT parameter has no value at all until the program terminates successfully /without raising an e2ception' that is1. During the e2ecution of the program' any assignments to an 0UT parameter are actually made to an internal copy of the 0UT parameter. 6hen the program terminates successfully and returns control to the calling block' the value in that local copy is then transferred to the actual 0UT parameter. That value is then available in the calling +",-." block. *N 0UT 3 6ith an *N 0UT parameter' you can pass values into the program and return a value back to the calling program /either the original' unchanged value or a new value set within the program1. The *N 0UT parameter shares two restrictions with the 0UT parameter7 n *N 0UT parameter cannot have a default value.

n *N 0UT actual parameter or argument must be a variable. *t cannot be a constant' literal' or e2pression' since these formats do not provide a receptacle in which +",-." can place the outgoing value.

Difference between %rocedure and function. function always returns a value' while a procedure does not. 6hen you call a function you must always assign its value to a variable.

Can cursor variables be stored in *L8(9L tables. If ,es !ow. If not w!,+ &es. Create a cursor type 3 R!) CUR-0R and declare a cursor variable of that type. D!C" R! ,= Create the cursor type. =, T&+! company(curtype *- R!) CUR-0R R!TURN companyKR06T&+!> ,= Declare a cursor variable of that type. =, company(curvar company(curtype> ,= Declare a record with same structure as cursor variable. =, company(rec companyKR06T&+!> ;!5*N ,= 0pen the cursor variable' associating with it a -." statement. =, 0+!N company(curvar )0R -!"!CT = )R0# company> ,= )etch from the cursor variable. =, )!TCH company(curvar *NT0 company(rec> ,= Close the cursor obLect associated with variable. =, C"0-! company(curvar> !ND> Can ,ou clone fro" "ulti node s,ste" to sin&le node s,ste" and vice versa + &es ' this is now supported via Rapid Clone' Check if your system has all prereI. patches for Rapid Clone and you are on latest rapid clone patch.

Does ra%id clone ta/es care of U%datin& :lobal oraInventor, or ,ou !ave to re&ister "anuall, in :lobal OraInventor, after clone +

Rapid Clone will automatically Update 5lobal ora*nventory during configuration phase. &ou donMt have to do any thing manually for 5lobal ora*nventory.

!at is .dbc file 7 w!ere its stored 7 w!ats use of .dbc file + dbc as name says is database connect descriptor file which stores database connection information used by application tier to connect to database. This file is in directory ?)ND(T0+,secure also called as )ND(-!CUR!

!ats t!in&s ,ou do to reduce %atc! ti"in& + &ou can take advantage of following 3 H #erging patches via admrgpch H Use various adpatch options like nocompiledb or nocompileLsp H Use defaults file H -taged ++"(T0+ during upgrades H *ncrease batch si4e /#ight result into negative 1

.ow ,ou %ut A%%lications 00i in 'aintenance "ode + Use adadmin to change #aintenance mode is 0racle pps. 6ith D.* you need to enable maintenance mode in order to apply apps patch via adpatch utility. *f you donMt want to put apps in maintenance mode you can use adpatch options@hotpatch feature.

Can ,ou a%%l, %atc! wit!out %uttin& A%%lications 00i in 'aintenance "ode + &es' use options@hotpatch as mentioned above with adpatch.

!at are various o%tions available wit! ad%atc! + <arious options available with adpatch depending on your D version are autoconfig' check(e2clusive' checkfile' compiledb' compileLsp' copyportion' databaseprtion' generateportion' hotpatch' integrity' maintainmrc' parallel' prereI' validate

ADIDENT UTILIT; is used for w!at + D*D!NT UT*"*T& in oracle apps is used to find version of any file . D *dentification. for e2. Nadident Header AfilenameC .ow do ,ou %ass cursor variables in *L8(9L+ +ass a cursor variable as an argument to a procedure or function. &ou can' in essence' share the results of a cursor by passing the reference to that result set.

.ow do ,ou o%en and close a cursor variable.

!, it is required+

Using 0+!N cursor(name and C"0-! cursor(name commands. The cursor must be opened before using it in order to fetch the result set of the Iuery it is associated with. The cursor needs to be closed so as to release resources earlier than end of transaction' or to free up the cursor variable to be opened again.

!at s!ould be t!e return t,%e for a cursor variable. Can we use a scalar data t,%e as return t,%e+ The return type of a cursor variable can be KR06T&+! or record(nameKT&+! or a record type or a ref cursor type. scalar data type like number or varchar canJt be used but a record type may evaluate to a scalar value.

!at is use of a cursor variable+ .ow it is defined+ Cursor variable is used to mark a work area where 0racle stores a multi3row Iuery output for processing. *t is like a pointer in C or +ascal. ;ecause it is a T&+!' it is defined as T&+! R!) CUR-0R R!TURN >

!at

.ERE CURRENT O- clause does in a cursor+

The 6here Current 0f statement allows you to update or delete the record that was last fetched by the cursor.

Difference between NO DATA -OUND and <NOT-OUND

N0 D T )0UND is an e2ception which is raised when either an implicit Iuery returns no data' or you attempt to reference a row in the +",-." table which is not yet defined. -."KN0T)0UND' is a ;00"! N attribute indicating whether the recent -." statement does not match to any row.

!at is a cursor for loo%+ cursor )0R loop is a loop that is associated with /actually defined by1 an e2plicit cursor or a -!"!CT statement incorporated directly within the loop boundary. Use the cursor )0R loop whenever /and only if1 you need to fetch and process each and every record from a cursor' which is a high percentage of the time with cursors. !at is iA( *atc! + i - +atch are patches released to fi2 bugs associated with * -(0R C"!(H0#! /6eb -erver Component1 Usually these are shiiped as -hell scripts and you apply i - patches by e2ecuting -hell script. Note that by default 0R C"!(H0#! is pointing to F.%.G 0R C"!(H0#! and if you are applying i - patch e2port 0R C"!(H0#! to i - . &ou can do same by e2ecuting environment file under ?* -(0R C"!(H0#!

If we run autoconfi& w!ic! files will &et effected + *n order to check list of files changes during utoconfig ' you can run adchkcfg utility which will generate HT#" report. This report will list all files and profile options going to change when you run utoConfig.

!at is difference between .#"l file and AutoConfi& + utoconfig is Utility to configure your 0racle pplication environment. .2ml file is repository of all configuration from which utoConfig picks configuration and polulates related files.

!at is .l&i files + lgi files are created with patching along with .log files . .lgi files are informative log files containing information related to patch. &ou can check .lgi files to see what activities patch has done. Usually informative logs.

.ow will ,ou s/i% wor/er durin& %atc! + *f in your adctrl there are si2 option shown then seventh is hidden option./*f there are seven options visible then Fth option is to -kip worker depending on ad version1.

!ic! two tables created at start of A%%s *atc! and dro%s at end of *atc! + )ND(*N-T ""!D(+R0C!-- and D(D!))!R!D(:0;- are the tables that get updated while applying a patch mainly d or unified driver.

.ow to co"%ile an Oracle Re%orts file + Utility adrepgen is used to compile Reports. -ynat2 is given below adrepgen userid@appsOApsswdC source @ ?+R0DUCT(T0+OsrwOfilename.rdf dest@?+R0DUCT(T0+OsrwOfilename.rdf stype@rdffile dtype@rdffile logfile@2.log overwrite@yes batch@yes dunit@character

!at is difference between AD)BU:( and AD)A**LID)*ATC.E( + D(;U5- holds information about the various 0racle pplications bugs whose fi2es have been applied /ie. patched1 in the 0racle pplications installation. D( ++"*!D(+ TCH!- holds information about the NdistinctN 0racle pplications patches that have been applied. *f P patches happen to have the same name but are different in content /eg. NmergedN patches1' then they are considered distinct and this table will therefore hold P records. !at is AD(*LICE UTILIT; + D-+"*C! UT*"*T& in oracle apps is utility to add a new product.

.ow can ,ou licence a %roduct after installation + &ou can use ad utility adlicmgr to licence product in 0racle pps.

!at is 'RC +

!at ,ou do as A%%s DBA for 'RC +

#RC also called as #ultiple Reporting Currency in oracle pps. Default you have currency in U- Dollars but if your organi4ation operating books are in other currency then you as apps dba need to enable #RC in pps. How to enable #RC coming soon...

!at is access)lo& in a%ac!e 7 w!at entries are recored in access)lo& + default location of t!si file +

!ere is

access(log in 0racle pplication -erver records all users accessing oracle applications $$i. This file location is defined in httpd.conf with default location at ?* -(0R C"!(H0#!, pache, pache,logs. !ntries in this file is defined by directive "og)ormat in httpd.conf Typical entry in access(log is $EF.%.%.$ 3 3 Q$%,-ep,P%%G7$F7RS7$S 9%$%%T N+0-T ,0 (HT#",0 .LspU.... HTT+,$.$N P%% PF%RD where P%% is HTT+ status code and last digits PF%RD is bytes dowloaded as this page/-i4e of page1

!ere is =serv confi&uration files stored + :serv configuration files are stored in ?* -(0R C"!(H0#!, pache,:serv,etc

!ere is a%%lications start8sto% scri%ts stored + applications start,stop scripts are in directory ?C0##0N(T0+,admin,scripts, ?C0NT!BT(N #!

!at are "ain confi&uration files in

eb (erver >A%ac!e? +

#ain configuration files in 0racle pps 6eb -erver are H httpd.conf' apps.conf' oracle(apache.conf' httpd(pls.conf H Lserv.conf' ssp(init.t2t' Lserv.properties' 4one.properties H plsIl.conf' wdbsvr.app' plsIl.conf Can C driver in a%%s %atc! create Invalid Ob@ect in database + No ' C driver only copies files in )ile -ystem. Database 0bLect might be invalidated during D driver when these obLects are created,dropped,modified.

!at is devABc&i and fABc&i + C5* stands for Common 5ateway *nterface and these are -cript lias in 0racle pps used to access forms server . Usually )orm -erver access directly via http7,,hostname7port,devG%cgi,fG%cgi

!, does a wor/er fails in Oracle A%%s *atc! and few scenarios in w!ic! it failed for ,ou + pps +atch worker can fail in case it doesnMt find e2pected data' obLect' files or any thing which driver is trying to update,edit,modify. +ossible symptoms may be underlying tables,obLects are invalid' a prereI patch is missing ' login information is incorrect' inconsistency in seeded data...

!at is difference between "od)osso and "od)ose in Oracle .TT* (erver + mod(osso is 0racle -ingle -ign30n #odule where as mod(ose is module for 0racle -ervlet !ngine. mod(osso is module in 0racleMs HTT+ -erver serves as Conduit between 0racle pache -erver and -ingl -ign30n -erver where as mod(ose is also another module in 0racleMs HTT+ -erver serves as conduit between 0racle pache and 0racle -ervlet !ngine.

!at is difference between CO'*ILE)ALLC(*ECIAL and CO'*ILECALL w!ile co"%ilin& -or"s + ;oth the options will compile all the +",-." in the resultant .)#B' .+"B' or .##B file but C0#+*"!( ""@&!- also changes the cached version in the source .)#;' .+""' or .##; file. This confuses version control and build tools /C<-' -ubversion' make' scons1> they believe youMve made significant changes to the source. C0#+*"!( ""@-+!C* " does not do this.

!at is :(' in Oracle a%%lication EDBusiness (uite + 5-# stands for 5eneric -ervice #anagement )ramework. 0racle !3;usiness -uite consist of various compoennts like )orms' Reports' 6eb -erver' 6orkflow' Concurrent #anager ..

!arlier each service used to start at their own but managing these services /given that1 they can be on various machines distributed across network. -o 5eneric -ervice #anagement is e2tension of Concurrent +rocessing which manages all your services ' provide fault tolerance /*f some service is down *C# through )ND-# and other processes will try to start it even on remote server1 6ith 5-# all services are centrally managed via this )ramework.

!at is -ND(' + )ND-# is e2ecutable and core component in 5-# / 5eneric -ervice #anagement )ramework discussed above1. &ou start )ND-# services via ++- listener on all Nodes in pplication Tier in !3;usiness -uite. !at are cursor attributes+ Cursor attributes are used to get the information about the current status of your cursor. ;oth e2plicit and implicit cursors have four attributes' as shown7 Name Description K)0UND Returns TRU! if record was fetched successfully' ) "-! otherwise. KN0T)0UND Returns TRU! if record was not fetched successfully' ) "-! otherwise. KR06C0UNT Returns number of records fetched from cursor at that point in time. K*-0+!N Returns TRU! if cursor is open' ) "-! otherwise.

Difference between an i"%licit and an e#%licit cursor. The implicit cursor is used by 0racle server to test and parse the -." statements and the e2plicit cursors are declared by the programmers.

!at is a cursor+ cursor is a mechanism by which you can assign a name to a Vselect statementW and manipulate the information within that -." statement.

!at is t!e %ur%ose of a cluster+ cluster provides an optional method of storing table data. cluster is comprised of a group of tables that share the same data blocks' which are grouped together because they

share common columns and are often used together. )or e2ample' the !#+ and D!+T table share the D!+TN0 column. 6hen you cluster the !#+ and D!+T' 0racle physically stores all rows for each department from both the !#+ and D!+T tables in the same data blocks. &ou should not use clusters for tables that are freIuently accessed individually.

.ow do ,ou find t!e nu"ber of rows in a Table + select count/=1 from table' or from NU#(R06- column of user(tables if the table statistics has been collected.

Dis%la, t!e nu"ber value in

ords+

!at is a %seudo colu"n. :ive so"e e#a"%les+ *nformation such as row numbers and row descriptions are automatically stored by 0racle and is directly accessible' ie. not through tables. This information is contained within pseudo columns. These pseudo columns can be retrieved in Iueries. These pseudo columns can be included in Iueries which select data from tables. vailable +seudo Columns 8 R06NU# 3 row number. 0rder number in which a row value is retrieved. 8 R06*D 3 physical row /memory or disk address1 location' ie. uniIue row identification. 8 -&-D T! 3 system or todayJs date. 8 U*D 3 user identification number indicating the current user. 8 U-!R 3 name of currently logged in user. !ats is location of access)lo& file + access(log file by default is located in ?* -(0R C"!(H0#!, pache, pache,logs. "ocation of this file is defined in httpd.conf by patameter Custom"og or Transfer"og

!at is ,our Oracle A%%s 00i

ebserver Eersion and !ow to find it +

)rom $$.D.F to $$.D.$% 6ebserver version is i - $.%.P.P.P' *n order to find version under ?* -(0R C"!(H0#!, pache, pache,bin e2ecute .,httpd 3version .,httpd 3version

-erver version7 0racle HTT+ -erver +owered by pache,$.R.$E -erver built7 Dec G P%%D $X7DE7$R /i - $.%.P.P.P rollup D1

!at is Location of =serv confi&uration files + :serv configuration files are located in ?* -(0R C"!(H0#! , pache,:serv,etc .

!at is %lssql8database cac!e + *n order to improve performance mod(pls / pache component1 caches some database content to file. This database,plssIl cache is usually of type session and plsIl cache H session cache is used to store session information. H plsIl cache is used to store plsIl cache i.e. used by mod(pls

!ere is DATABA(E8*L((9L cac!e stored + +"--." and session cache are stored under ?* -(0R C"!(H0#!, pache,modplsIl,cache directory.

!at is F.DBC file and w!ats is location of DBC file + D;C as name stands for is database connect descriptor file used to connect to database. This file by default located in ?)ND(T0+,secure directory also called as ?)ND(-!CUR! directory.

!at is content of DBC file and w!, its i"%ortant + D;C file is Iuite important as whenever :ava or any other program like forms want to connect to database it uses D;C file. Typical entry in D;C file is 5U!-T(U-!R(+6D ++-(:D;C(UR" D;(H0-T !at are few %rofile o%tions w!ic! ,ou u%date after clonin& +

Rapid clone updates profile options specific to site level . *f you have any profile option set at other levels like server' responsibility' user....level then reset them.

.ow to retrieve (;(AD'IN %assword + *f forgot password link is enabled and -&- D#*N account is configured with mail id user forget password link else you can reset s-&- D#*N password via )NDC+ --.

!ats is T

O)TA(G in Oracle Database +

T60(T -Y mocks your tns alias which you are going to use to connect to database. "ets assume you have database client with tns alias defined as +R0D to connect to Database +R0D on machine teachmeoracle.com listening on port $DP$. Then usual way to connect is sIlplus username,passwdZ+R0D > now if you donMt want to use Z+R0D then you set T60(T -Y@+R0D and then can simply use sIlplus username,passwd then sIl will check that it has to connect to tnsalias define by value +R0D i.e. T60(T -Y

!at is : ;UID + 56&U*D ' stands for 5ateway User *D and password. Usually like ++"-&-+U;,+U;

!ere : ;UID defined and w!at is its used in Oracle A%%lications + 56&U*D is defined in dbc i.e. Database Connect Descriptor file . *t is used to connect to database by think clients.

If A**()'RC sc!e"a is not used in 00.H.0B and !i&!er t!en .ow 'RC is wor/in& + )or products like +ayable' Recievables which uses #RC and if #RC is enabled then each transaction table in base schema related to currency now has an assoicated #RC -ubtables.

!en ,ou a%%l, C driver %atc! does it require database to be U% and

!, +

&es ' database and db listener should be Up when you apply any driver patch in apps. even if driver is not updating any database obLect connection is reIuired to validate appsand other schema and to upload patch history information in database tables. .ow ,ou will avoid ,our quer, fro" usin& inde#es+ ;y changing the order of the columns that are used in the inde2' in the 6here condition' or by concatenating the columns with some constant values.

!at is a OUTER =OIN+ n 0UT!R :0*N returns all rows that satisfy the Loin condition and also returns some or all of those rows from one table for which no rows from the other satisfy the Loin condition.

!ic! is "ore faster D IN or E2I(T(+ 6ell' the two are processed very differently. -elect = from T$ where 2 in / select y from TP 1 is typically processed as7 select = from t$' / select distinct y from tP 1 tP where t$.2 @ tP.y> The sub Iuery is evaluated' distinctJed' inde2ed /or hashed or sorted1 and then Loined to the original table [ typically. s opposed to select = from t$ where e2ists / select null from tP where y @ 2 1 That is processed more like7 for 2 in / select = from t$ 1 loop if / e2ists / select null from tP where y @ 2.2 1 then 0UT+UT TH! R!C0RD end if end loop *t always results in a full scan of T$ whereas the first Iuery can make use of an inde2 on T$/21. -o' when is where e2ists appropriate and in appropriateU "ets say the result of the sub Iuery / select y from TP 1 is VhugeW and takes a long time. ;ut the table T$ is relatively small and e2ecuting / select null from tP where y @ 2.2 1 is very fast /nice inde2 on tP/y11. Then the e2ists will be faster as the time to full scan T$ and do the inde2 probe

into TP could be less then the time to simply full scan TP to build the sub Iuery we need to distinct on. "ets say the result of the sub Iuery is small [ then *N is typically more appropriate. *f both the sub Iuery and the outer table are huge [ either might work as well as the other [ depends on the inde2es and other factors.

!en do ,ou use

.ERE clause and w!en do ,ou use .AEIN: clause+

The 6H!R! condition lets you restrict the rows selected to those that satisfy one or more conditions. Use the H <*N5 clause to restrict the groups of returned rows to those groups for which the specified condition is TRU!.

T!ere is a < si&n in one field of a colu"n.

!at will be t!e quer, to find it+

-!"!CT column(name )R0# table(name 6H!R! column(name "*Y! \KOKKJ !-C +! \OJ> !ere will ,ou find for"s confi&uration details a%art fro" #"l file + )orms configuration at time of startup is in script adfrmctl.sh and appsweb(?C0NT!BT(N #!.cfg /defined by environment variable )0R#-G%(6!;(C0N)*5()*"!1 for forms client connection used each time a user initiates forms connection.

!at is for"s server e#ecutable Na"e + fG%srvm

!at are different "odes of for"s in w!ic! ,ou can start -or"s (erver and w!ic! one is default + &ou can start forms server in -0CY!T or -!R<"!T by defualt )orms are configured to start in socket mode.

.ow ,ou will start Discoverer in Oracle A%%s 00i +

*n order to start dicoverer you can use script addisctl.sh under ?0 D(T0+,admin,scripts, ?C0NT!BT(N #! or startall.sh under ?0R C"!(H0#!,discwbX,util /under #iddle, pplication Tier1

.ow "an, ORACLE .O'E are Oracle A%%s and w!ats si&nificance of eac! + There are three ?0R C"!(H0#! in 0racle pps' Two for pplication Tier /#iddle Tier1 and 0ne in Database Tier. H 0R C"!(H0#! $ 7 0n pplication Tier used to store F.%.G techstack software. This is used by forms' reports and discoverer. 0R C"!(H0#! should point to this 0R C"!(H0#! which applying pps +atch. H 0R C"!(H0#! P7 0n pplication Tier used by i - /6eb -erver1 techstack software. This is used by 6eb "istener and contains pache. H 0R C"!(H0#! R7 0n Database Tier used by Database -oftware usually Fi'Ei or $%g database.

!ere is .T'L Cac!e stored in Oracle A%%s (erver + 0racle HT#" Cache is available at ?C0##0N(T0+,(pages for some previous versions you might find it in ?0 (HT#",(pages

!ere is %lssql cac!e stored in Oracle A%%s + Usually two type of cache session and plssIl stored under ?* -(0R C"!(H0#!, pache,modplsIl,cache

!at !a%%ens if ,ou don5t &ive cac!e si$e w!ile definin& Concurrent 'ana&er + "ets first understand what is cache si4e in Concurrent #anager. 6hen #anager picks reIuest from )ND C0NCURR!NT R!.U!-T- .ueues' it will pick up number of reIuests defined by cache si4e in one shot and will work on them before going to sleep. *f you donMt define cache si4e while defining C# then it will take default value $' i.e. picking up one reIuest per cycle. T!ere are lot of DBC file under 4-ND)(ECURE7 .ow its deter"ined t!at w!ic! dbc file to use fro" 4-ND)(ECURE + This value is determined from profile option N pplications Database *DN

!at is RRA8-ND-( + Report Review gent/RR 1 also referred by e2ecutable )ND)- is default te2t viewer in 0racle pplications $$i for viewing output files and log files. s most of apps dbaMs are not clear about Report -erver and RR ' *Mll discuss one on my blog and update link here .

!at is *C* is Oracle A%%lications 00i + +C+ is acronym for +arallel Concurrurent processing. Usually you have one Concurrent #anager e2ecuting your reIuests but if you can configure Concurrent #anager running on two machines /&es you need to do some additional steps in order to configure +arallel Concurrent +rocessing1 . -o for some of your reIuests primary C# Node is on machine$ and secondary C# node on machineP and for some reIuests primary C# is on machineP and secondary C# on machine$.

!, I need two Concurrent *rocessin& Nodes or in w!at scenarios *C* is Used + 6ell *f you are running 5" #onth end reports or ta2ation reports annually these reposrts might take couple of days. -ome of these reIuests are very resource intensive so you can have one node running long running ' resource intensive reIuests while other processing your day to day short running reIuets. nother scenario is when your reIuests are very critical and you want high resilience for your Concurrent +rocessing Node ' you can configure +C+. -o if node$ goes down you still have C# node available processing your reIuests.

Out%ut and Lo&files for requests e#ecuted on source Instance not wor/in& on cloned Instance Here is e2act problem description 3 &ou cloned an 0racle pps *nstance from +R0D;0B to another bo2 with *nstance name say C"0N!;0B on $st of ugust. &ou can any C# logs,output files after $st of ugust only becuase these all are generated on C"0N!;0B itself' ;ut unable to view the logs,output files which are prior to $st ugust. 6hat will you do and where to check U "og ' 0utput file path and location is stored in table )ND(C0NCURR!NT(R!.U!-T-. Check select logfile(name' logfile(node(name' outfile(name' outfile(node(name from fnd(concurrent(reIuests where reIuest(id@]reIuestid > where reIuestid is id of reIuest for which you are not able to see log or out files. &ou should see output like ,u%$,+R0D;0B,log,l$PRXDG.reI'

host$',u%$,+R0D;0B,out,o$PRXDG.out' host$ Update it according to your cloned *nstance <ariables.

.ow to confir" if Re%ort (erver is U% and Runnin& + Report -erver is started by e2ecutable rwmtsG% on concurrent manager Node and this file is under ?0R C"!(H0#!,bin .e2ecute command on your server like ps 3ef ^ grep rwmtsG% &ou should get output like applmgr ....... rwmtsG% name@R!+G%(<*-*0N

!at is difference between IC'7 (tandard 'ana&ers and CR' in Concurrent 'ana&er + H *C# stand for *nternal Concurrent #anager' which controls other managers. *f it finds other managers down ' it checks and try to restart them. &ou can say it as administrator to other concurrent managers. *t has other tasks as well. H -tandard #anager These are normal managers which control,action on the reIuests nd does batch or single reIuest processing. H CR# acronym for Conflict Resolution #anager is used to resolve conflicts between managers nd reIuest. *f a reIuest is submitted whose e2ecution is clashing or it is defined not to run while a particular type of reIuest is running then such reIuests are actioned,assigned to CR# for *ncompatibilities and Conflict resolution. !at is difference between (UB(TR and IN(TR+ *N-TR function search string for sub3string and returns an integer indicating the position of the character in string that is the first character of this occurrence. -U;-TR function return a portion of string' beginning at character position' substring(length characters long. -U;-TR calculates lengths using characters as defined by the input character set.

!ic! data t,%e is used for storin& &ra%!ics and i"a&es+ Raw' "ong Raw' and ;"0;.

!at is difference between (9L and (9LF*LU(+

-." is the Iuery language to manipulate the data from the database. -."=+"U- is the tool that lets to use -." to fetch and display the data.

!at is difference between UNI9UE and *RI'AR; GE; constraints+ n UN*.U! key can have NU"" whereas +R*# R& key is always not N0T NU"". ;oth bears uniIue values.

!at is difference between Rena"e and Alias+ Rename is actually changing the name of an obLect whereas lias is giving another name /additional name1 to an e2isting obLect. Rename is a permanent name given to a table or column whereas lias is a temporary name given to a table or column which do not e2ist once the -." statement is e2ecuted.

!at are various @oins used w!ile writin& (UB9UERIE(+ @' ' *N' N0T *N' *N N&' *N ""' !B*-T-' N0T !B*-T-. !at is use of A%%s listener + pps "istener usually running on ll 0racle pplications $$i Nodes with listener alias as ++-(?-*D is mainly used for listening reIuests for services like )ND)- and )ND-#.

.ow to start A%%s listener + *n 0racle $$i' you have script adalnctl.sh which will start your apps listener. &ou can also start it by command lsnrctl start ++-(?-*D /Replace sid by your *nstance -*D Name1

.ow to confir" if A%%s Listener is U% and Runnin& + e2ecute below command lsnrctl status ++-(?-*D /replcae -*D with your *nstance Name1 so *f your -*D is <*-*0N then use lsnrctl status ++-(<*-*0N out put should be like -ervices -ummary...

)ND)- has $ service handler/s1 )ND-# has $ service handler/s1

!at is

eb Listener +

6eb "istener is 6eb -erver listener which is listening for web -ervices/HTT+1 reIuest. This listener is started by adapcctl.sh and defined by directive /"isten' +ort1 in httpd.conf for 6eb -erver. 6hen you initially type reIuest like http7,,becomeappsdba.blogspot.com7F% to access application here port number F% is 6eb "istener port.

.ow will ,ou find Invalid Ob@ects in database + using Iuery -."+"U-C select count/=1 from dba(obLects where status like M*N< "*DM>

.ow to co"%ile Invalid Ob@ects in database + &ou can use adadmin utility to compile or you can use utlrp.sIl script shipped with 0racle Database to compile *nvalid Database 0bLects.

.ow to co"%ile =(* in Oracle A%%s + &ou can use oLspCompile.pl perl script shipped with 0racle apps to compile :-+ files. This script is under ?:T)(T0+,admin,scripts. -ample compilation method is perl oLspCompile.pl 33compile 33Iuiet

!at is difference between AD*ATC. and O*ATC. + H D+ TCH is utility to apply oracle apps +atches whereas H 0+ TCH is utility to apply database patches

Can ,ou use bot! AD*ATC. and O*ATC. in A%%s +

&es you have to use both in apps ' for apps patches you will use D+ TCH UT*"*T& and for applying database patch in apps you will use opatch UT*"*T&.

Vous aimerez peut-être aussi