tag:blogger.com,1999:blog-34284689787356610962024-03-14T00:10:01.243-07:00Oracle Interview Questions And AnswersSumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.comBlogger40125tag:blogger.com,1999:blog-3428468978735661096.post-23618587363024409972009-06-27T02:09:00.000-07:002009-06-27T02:09:01.145-07:00How does one use SQL*Loader to load images, sound clips and documents? (for DBA)<meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="0" name="Body Text"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:"Georgia Serif"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:"Times New Roman"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:"Trebuchet MS"; panose-1:2 11 6 3 2 2 2 2 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:647 0 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman";} span.klink {mso-style-name:klink; mso-style-unhide:no;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} </style> <![endif]--><strong><span style="font-size: 12pt; font-family: "Georgia Serif","serif"; color: rgb(51, 51, 51);"></span></strong><span style="font-size: 12pt; font-family: "Times New Roman","serif";">
<br />SQL*Loader can load data from a “primary <a href="http://rainbowonnet.blogspot.com/2007/03/oracle-interview-questions-and-answers_4011.html" target="_top"><span class="klink"><span style="font-family: "Trebuchet MS","sans-serif"; color: red; text-decoration: none;">data file</span></span></a>”, SDF (Secondary Data file - for loading nested tables and VARRAYs) or LOGFILE. The LOBFILE method provides and easy way to load documents, images and <a href="http://rainbowonnet.blogspot.com/2007/03/oracle-interview-questions-and-answers_4011.html" target="_top"><span class="klink"><span style="font-family: "Trebuchet MS","sans-serif"; color: red; text-decoration: none;">audio clips</span></span></a> into BLOB and CLOB columns. Look at this example:
<br />Given the following table:
<br />CREATE TABLE image_table (
<br />image_id NUMBER(5),
<br />file_name VARCHAR2(30),
<br />image_data BLOB);
<br />Control File:
<br />LOAD DATA
<br />INFILE *
<br />INTO TABLE image_table
<br />REPLACE
<br />FIELDS TERMINATED BY ‘,’
<br />(
<br />image_id INTEGER(5),
<br />file_name CHAR(30),
<br />image_data LOBFILE (file_name) TERMINATED BY EOF
<br />)
<br />BEGINDATA
<br />001,image1.gif
<br />002,image2.jpg
<br /> <!--[if !supportLineBreakNewLine]-->
<br /> <!--[endif]--></span>Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com1tag:blogger.com,1999:blog-3428468978735661096.post-5357441303020113782009-06-25T02:09:00.000-07:002009-06-25T02:09:00.711-07:00What is the difference between the conventional and direct path loader?(for DBA)<br />The conventional path loader essentially loads the data by using standard INSERT statements. The direct path loader (DIRECT=TRUE) bypasses much of the logic involved with that, and loads directly into the Oracle data files. More information about the restrictions of direct path loading can be obtained from the Utilities Users Guide.Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-52804994105312805512009-06-24T02:08:00.000-07:002009-06-24T02:08:01.818-07:00What is the significance of the & and && operators in PL SQL ?The & operator means that the PL SQL block requires user input for a variable. The && operator means that the value of this variable should be the same as inputted by the user previously for this same variable. If a transaction is very large, and the rollback segment is not able to hold the rollback information, then will the transaction span across different rollback segments or will it terminate ? It will terminate (Please check ).Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-79557070298221661222009-06-23T02:08:00.000-07:002009-06-23T02:08:01.723-07:00What all important parameters of the init.ora are supposed to be increased if you want to increase the SGA size ?In our case, db_block_buffers was changed from 60 to 1000 (std values are 60, 550 & 3500) shared_pool_size was changed from 3.5MB to 9MB (std values are 3.5, 5 & 9MB) open_cursors was changed from 200 to 300 (std values are 200 & 300) db_block_size was changed from 2048 (2K) to 4096 (4K) {at the time of database creation}.<br />The initial SGA was around 4MB when the server RAM was 32MB and The new SGA was around 13MB when the server RAM was increased to 128MB.Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com2tag:blogger.com,1999:blog-3428468978735661096.post-18081521231357862612009-06-22T02:08:00.000-07:002009-06-22T02:08:00.826-07:00What are actual and formal parameters ?Actual Parameters : Subprograms pass information using parameters. The variables or expressions referenced in the parameter list of a subprogram call are actual parameters. For example, the following procedure call lists two actual parameters named emp_num and amount:<br />Eg. raise_salary(emp_num, amount);<br />Formal Parameters : The variables declared in a subprogram specification and referenced in the subprogram body are formal parameters. For example, the following procedure declares two formal parameters named emp_id and increase: Eg. PROCEDURE raise_salary (emp_id INTEGER, increase REAL) IS current_salary REAL;Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-3920708173373090112009-06-21T02:07:00.000-07:002009-06-21T02:07:01.185-07:00What are the advantages of Oracle ?<meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="0" name="Body Text"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:"Georgia Serif"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:"Times New Roman"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:"Trebuchet MS"; panose-1:2 11 6 3 2 2 2 2 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:647 0 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman";} span.klink {mso-style-name:klink; mso-style-unhide:no;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} </style> <![endif]--><strong><span style="font-size: 12pt; font-family: "Georgia Serif","serif"; color: rgb(51, 51, 51);"></span></strong><span style="font-size: 12pt; font-family: "Times New Roman","serif";">
<br />Portability : Oracle is ported to more platforms than any of its competitors, running on more than 100 hardware platforms and 20 <a href="http://rainbowonnet.blogspot.com/2007/03/oracle-interview-questions-and-answers_47.html" target="_top"><span class="klink"><span style="font-family: "Trebuchet MS","sans-serif"; color: red; text-decoration: none;">networking protocols</span></span></a>.
<br />Market Presence : Oracle is by far the largest RDBMS vendor and spends more on R & D than most of its competitors earn in total revenue. This market clout means that you are unlikely to be left in the lurch by Oracle and there are always lots of third party interfaces available.
<br />Backup and Recovery : Oracle provides industrial strength support for on-line backup and recovery and good <a href="http://rainbowonnet.blogspot.com/2007/03/oracle-interview-questions-and-answers_47.html" target="_top"><span class="klink"><span style="font-family: "Trebuchet MS","sans-serif"; color: red; text-decoration: none;">software</span></span></a> fault tolerence to disk failure. You can also do point-in-time recovery.
<br />Performance : Speed of a ‘tuned’ <a href="http://rainbowonnet.blogspot.com/2007/03/oracle-interview-questions-and-answers_47.html" target="_top"><span class="klink"><span style="font-family: "Trebuchet MS","sans-serif"; color: red; text-decoration: none;">Oracle Database</span></span></a> and application is quite good, even with large databases. Oracle can manage > 100GB databases.
<br />Multiple database support : Oracle has a superior ability to manage multiple databases within the same transaction using a two-phase commit protocol.
<br /> <!--[if !supportLineBreakNewLine]-->
<br /> <!--[endif]--></span>Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-79120697982075726092009-06-20T02:07:00.000-07:002009-06-20T02:07:15.474-07:00Can one read/write files from PL/SQL?<meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="0" name="Body Text"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:"Georgia Serif"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:"Times New Roman"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:0 0 0 0 0 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman";} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} </style> <![endif]--><strong><span style="font-size: 12pt; font-family: "Georgia Serif","serif"; color: rgb(51, 51, 51);"></span></strong><span style="font-size: 12pt; font-family: "Times New Roman","serif";">
<br />Included in Oracle 7.3 is a UTL_FILE package that can read and write files. The directory you intend writing to has to be in your INIT.ORA file (see UTL_FILE_DIR=... parameter). Before Oracle 7.3 the only means of writing a file was to use DBMS_OUTPUT with the SQL*Plus SPOOL command.
<br />DECLARE
<br />fileHandler UTL_FILE.FILE_TYPE;
<br />BEGIN
<br />fileHandler := UTL_FILE.FOPEN(‘/home/oracle/tmp’, ‘myoutput’,’W’);
<br />UTL_FILE.PUTF(fileHandler, ‘Value of func1 is %sn’, func1(1));
<br />UTL_FILE.FCLOSE(fileHandler);
<br />END;</span>Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-16381227728818555062009-06-19T02:06:00.000-07:002009-06-19T02:06:52.300-07:00How can I protect my PL/SQL source code?<meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="0" name="Body Text"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:"Georgia Serif"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:"Times New Roman"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:0 0 0 0 0 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman";} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} </style> <![endif]--><strong><span style="font-size: 12pt; font-family: "Georgia Serif","serif"; color: rgb(51, 51, 51);"></span></strong><span style="font-size: 12pt; font-family: "Times New Roman","serif";">
<br />PL/SQL V2.2, available with Oracle7.2, implements a binary wrapper for PL/SQL programs to protect the source code. This is done via a standalone utility that transforms the PL/SQL source code into portable binary object code (somewhat larger than the original). This way you can distribute software without having to worry about exposing your proprietary algorithms and methods. SQL*Plus and SQL*DBA will still understand and know how to execute such scripts. Just be careful, there is no “decode” command available.
<br />The syntax is:
<br />wrap iname=myscript.sql oname=xxxx.yyy
<br /> <!--[if !supportLineBreakNewLine]-->
<br /> <!--[endif]--></span>Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-56059237803818719662009-06-18T02:10:00.000-07:002009-06-18T02:10:12.913-07:00Can one improve the performance of SQL*Loader? (for DBA)A very simple but easily overlooked hint is not to have any indexes and/or constraints (primary key) on your load tables during the load process. This will significantly slow down load times even with ROWS= set to a high value.<br />Add the following option in the command line: DIRECT=TRUE. This will effectively bypass most of the RDBMS processing. However, there are cases when you can’t use direct load. Refer to chapter 8 on Oracle server Utilities manual.<br />Turn off database logging by specifying the UNRECOVERABLE option. This option can only be used with direct data loads. Run multiple load jobs concurrently.Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-31508408375037118252009-06-18T02:05:00.000-07:002009-06-18T02:06:28.114-07:00Can one use dynamic SQL within PL/SQL? OR Can you use a DDL in a procedure ? How ?<meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="0" name="Body Text"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:"Georgia Serif"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:"Times New Roman"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:0 0 0 0 0 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman";} p.MsoBodyText, li.MsoBodyText, div.MsoBodyText {mso-style-noshow:yes; mso-style-unhide:no; mso-style-link:"Body Text Char"; margin-top:0in; margin-right:0in; margin-bottom:6.0pt; margin-left:0in; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman";} span.BodyTextChar {mso-style-name:"Body Text Char"; mso-style-noshow:yes; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"Body Text"; mso-ansi-font-size:12.0pt; mso-bidi-font-size:12.0pt;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} </style> <![endif]--> <p class="MsoBodyText"><strong><span style="font-family: "Georgia Serif","serif"; color: rgb(51, 51, 51);"></span></strong>
<br />From PL/SQL V2.1 one can use the DBMS_SQL package to execute dynamic SQL statements.
<br />Eg: CREATE OR REPLACE PROCEDURE DYNSQL
<br />AS
<br />cur integer;
<br />rc integer;
<br />BEGIN
<br />cur := DBMS_SQL.OPEN_CURSOR;
<br />DBMS_SQL.PARSE(cur,’CREATE TABLE X (Y DATE)’, DBMS_SQL.NATIVE);
<br />rc := DBMS_SQL.EXECUTE(cur);
<br />DBMS_SQL.CLOSE_CURSOR(cur);
<br />END;</p> Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-59765294644797395492008-07-21T04:19:00.000-07:002008-07-21T04:20:12.716-07:00Oracle FAQ's<meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List" href="file:///D:%5CDOCUME%7E1%5Cshesu04%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"></o:smarttagtype><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"></o:smarttagtype><!--[if gte mso 9]><xml> <o:documentproperties> <o:author>support</o:Author> <o:version>11.9999</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:usefelayout/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" latentstylecount="156"> </w:LatentStyles> </xml><![endif]--><!--[if !mso]><object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id="ieooui"></object> <style> st1\:*{behavior:url(#ieooui) } </style> <![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:ËÎÌå; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"\@SimSun"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:"\@Arial Unicode MS"; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-fareast-language:EN-US;} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:#606420; text-decoration:underline; text-underline:single;} p {mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-fareast-language:EN-US;} @page Section1 {size:8.3in 10.8in; margin:1.0in 1.25in 45.35pt 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:1498811275; mso-list-template-ids:502709934;} @list l0:level1 {mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} ol {margin-bottom:0in;} ul {margin-bottom:0in;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">1.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]--><b>What is an Oracle instance?
<br /></b>
<br />Overview of an Oracle Instance </p> <p style="margin-left: 0.5in;">Every running Oracle database is associated with an Oracle instance. When a
<br />database is started on a database server (regardless of the type of computer),
<br />Oracle allocates a memory area called the System Global Area (SGA) and starts
<br />one or more Oracle processes. This combination of the SGA and the Oracle
<br />processes is called an Oracle instance. The memory and processes of an instance
<br />manage the associated database’s data efficiently and serve the one or multiple
<br />users of the database.</p> <p style="margin-left: 0.5in;">The Instance and the Database</p> <p style="margin-left: 0.5in;">After starting an instance, Oracle associates the instance with the specified
<br />database. This is called mounting the database. The database is then ready to be
<br />opened, which makes it accessible to authorized users.</p> <p style="margin-left: 0.5in;">Multiple instances can execute concurrently on the same computer, each accessing
<br />its own physical database. In clustered and massively parallel systems (MPP),
<br />the Oracle Parallel Server allows multiple instances to mount a single database.</p> <p style="margin-left: 0.5in;">Only the database administrator can start up an instance and open the database.
<br />If a database is open, the database administrator can shut down the database so
<br />that it is closed. When a database is closed, users cannot access the
<br />information that it contains.</p> <p style="margin-left: 0.5in;">Security for database startup and shutdown is controlled via connections to
<br />Oracle with administrator privileges. Normal users do not have control over the
<br />current status of an Oracle database.</p> <p style="margin-left: 0.5in;"><b>Q: What is a view?
<br /></b>
<br />View</p> <p style="margin-left: 0.5in;">A view is a tailored presentation of the data contained in one or more tables
<br />(or other views). Unlike a table, a view is not allocated any storage space, nor
<br />does a view actually contain data; rather, a view is defined by a query that
<br />extracts or derives data from the tables the view references. These tables are
<br />called base tables.</p> <p style="margin-left: 0.5in;">Views present a different representation of the data that resides within the
<br />base tables. Views are very powerful because they allow you to tailor the
<br />presentation of data to different types of users.</p> <p style="margin-left: 0.5in;">Views are often used to:</p> <p style="margin-left: 0.5in;">• provide an additional level of table security by restricting access to a
<br />predetermined set of rows and/or columns of a table
<br />• hide data complexity
<br />• simplify commands for the user
<br />• present the data in a different perspective from that of the base table
<br />• isolate applications from changes in definitions of base tables
<br />• express a query that cannot be expressed without using a view</p> <p style="margin-left: 0.5in;"><b>What is referential integrity?
<br /></b>
<br />Rules governing the relationships between primary keys and foreign keys of
<br />tables within a relational database that determine data consistency. Referential
<br />integrity requires that the value of every foreign key in every table be matched
<br />by the value of a primary key in another table.</p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>JH Surya Kanth</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">2.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Name the data dictionary that stores user-defined constraints?
<br />USER_CONSTRAINTS </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Krishna</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">3.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->What is a collection of privileges?
<br />user_tab_privs_made
<br />user_tab_privs_recd </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Krishna</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">4.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Snapshot: A snapshot is a read-only copy of a table or a subset of a table. </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Krishna</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">5.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Can i execute Stored Procedures & Functions from SQL prompt ? If yes how can i execute ? </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Koteswara Rao</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">6.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Hi <st1:place st="on">Krishna</st1:place>
<br />What is a collection of privileges?
<br />collection of privilages is role.
<br /><a href="mailto:sasi242@yahoo.com">sasi242@yahoo.com</a> </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Sasidhar</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">7.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->What is a cursor?
<br />Ans:
<br />cursor is a private sql work area used to perform manipulations on data using pl\sql.
<br />adv:
<br />1.mainly used for multiple row manipulations and locking columns.
<br />note: data which is populated into the cursor is known as active dataset.</p> <p style="margin-left: 0.5in;">cursors are of two types
<br />1.implicit
<br />2.explicit
<br />implicit
<br />———
<br />attributes or properties for implicit cursor
<br />1.sql%is open:attribute returns a boolean value stating wether the cursor is open or closed.
<br />2.sql % found: returns boolean value stating whether the record is found in the cursor.
<br />3.sql%notfound : returns a boolean value stating whether the record is not found in the cursor
<br />4.sql %rowcount :returns a pneumeric value stating no.of rows executed in the cursor.</p> <p style="margin-left: 0.5in;"><span style="" lang="FR">explicit cursors—retrives multiple rows.
<br /></span>************
<br />adv: users can perform locks on th data in the cursor
<br />attributes
<br />1.% is open
<br />2.% found
<br />3.% not found
<br />4.% rowcount</p> <p style="margin-left: 0.5in;">Note: DATA which is populated in the cursor is known as active data set.</p> <p style="margin-left: 0.5in;">WE CAN WRITE TWO CURSORS IN ONE PROGRAM</p> <p style="margin-left: 0.5in;">WE CAN WRITE A CURSOR SPECIFYING PARAMETERS</p> <p style="margin-left: 0.5in;">CURSOR WITH UPDATE CLAUSE IS USED TO PERFORM LOCKS ON DATA.
<br />Happy Coding
<br /><a href="mailto:sasi242@yaho.com">sasi242@yaho.com</a> </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Sasidhar</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">8.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->What is a sequence?
<br />Ans:It is a database object to auto generate numbers.
<br />Happy Coding
<br /><a href="mailto:sasi242@yahoo.com">sasi242@yahoo.com</a> </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Sasidhar</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">9.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Name the data dictionary that stores user-defined Stored procedures?
<br />ans :- user_objects </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Aravind Kumar</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">10.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->hi ,
<br />i would like know more about sql advanced queries . </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b><a href="http://oracle/">mrs</a></b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">11.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Question:Why Use Sql* Loader in Oracle Database?
<br />Answer: The Sql Loader module of the oracle database Management System loads data into an existing ORACLE table from an external files.It is available locally only on CMS and PCs with oracle version 5. Throughout this documentation the CAR database described in Referance A is used for illustration.
<br />There are several methods others than using SQL *Loader of inserting data into a table.
<br />1. The Sql insert command may be used from the SQL * Plus module,
<br />for Example :
<br />insert into CAR values(…)
<br />where the values to be inserted into a row of the table are listed inside the parentheses. Dates and Characters data must be Surrounded by single quotes; items are seperated by commas.
<br />2. Sql*Forms allows you to add rows interactively using forms. The forms may contain default values and checks for invalid data.
<br />3. ODL loads the table from a control file and separate fixed format data file. ODL is available on all versions of ORACLE . SQL * Loader is much more flexible than ODL and will eventually supersede it on all systems. </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b><a href="http://www.techinterviews.com/">Shashi</a></b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">12.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->We can execute a function in sql query</p> <p style="margin-left: 0.5in;">select functionname(paramaters) from dual;</p> <p style="margin-left: 0.5in;">Suppose i am created a function add which returns the addition of two numbers then</p> <p style="margin-left: 0.5in;">select add(3,4) from dual;
<br />7</p> <p style="margin-left: 0.5in;">ODBC stands for open database connectivity</p> <p style="margin-left: 0.5in;">trigger is a stored procedure which auotomatically fired on a table whenever any dml operation is affected in the table.
<br />we can create ddl trigger,database trigger(logon,logoff,startup,startoff),audit triggers</p> <p style="margin-left: 0.5in;">pseudo column the column which does not exist in a table
<br />ex;rownum,rowid,level etc </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Dinkocet</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">13.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Thanks a lot for providing answers for the above questions…i am grateful to all of you</p> <p style="margin-left: 0.5in;">Regards</p> <p style="margin-left: 0.5in;"><st1:place st="on">Ravi</st1:place> Prakash </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Ravi Prakash</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">14.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Answer to some of the questions above:
<br />ODBC stands for Open Database Connectivity. It is used to connect the frontend with the backend(database)</p> <p style="margin-left: 0.5in;">Normalization is the techinque of designing the database with the least redundancy and duplicacy of data. Types of Normalization:
<br />1 NF
<br />2 NF
<br />3 NF
<br />BCNF
<br />5 NF
<br />6NF : Impossible to achieve this level of normalization </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Vick</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">15.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->hi
<br />i have problem with import
<br />i have export file on linux os and oracle8i
<br />i want import on windows platform
<br />what should i do? </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>rekhalal</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">16.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Hi <st1:place st="on">Krishna</st1:place> ,
<br />Thanks a lot for the Answers </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>sangeetha</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">17.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Hi All,</p> <p style="margin-left: 0.5in;">Thank you for all posting the Q & A. </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Pranesh</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">18.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->what is a synonym ?</p> <p style="margin-left: 0.5in;">Ans. A synonym is an alternative name for tables,views,procedures and other database objects
<br />generally when we have more than one schema and we wish to access an object of a different schema then we create synonyms for that object in the schema where we wish to access the object.</p> <p style="margin-left: 0.5in;">Syntax:
<br />create synonym synonym-name for schemaname.object-name</p> <p style="margin-left: 0.5in;">what is an exception ?</p> <p style="margin-left: 0.5in;">Exception is an event that causes suspension of normal program execution.
<br />In oracle there are serveral types of exceptions
<br />1) Pre-defined exceptions like NO_DATA_FOUND,TOO_MANY_ROWS
<br />2) User-defined exceptions which would validate the business logic
<br />3) unnamed system exceptions which are raised due to errors in the application code .. you can name these exceptions using PRAGMA EXCEPTION_INIT
<br />4)Unnamed programmer-defined exceptions. Exceptions that are defined and raised in the server by the programmer. In this case, the programmer provides both an error number (between -20000 and -20999) and an error message, and raises that exception with a call to RAISE_APPLICATION_ERROR.</p> <p style="margin-left: 0.5in;">for all the exceptions raised oracle fills in sqleerm and sqlcode variable which provide the error message and error code for the exception raised.</p> <p style="margin-left: 0.5in;">What are pseudo-columns in SQL? Provide examples?</p> <p style="margin-left: 0.5in;">A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but you cannot insert, update, or delete their values.</p> <p style="margin-left: 0.5in;">Examples:
<br />CURRVAL,NEXTVAL,ROWID,LEVEL</p> <p style="margin-left: 0.5in;">what is a schema ?
<br />A schema is a oracle database user account. </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Rajesh B</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">19.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->What is a schema ?</p> <p style="margin-left: 0.5in;">A database user account is called a schema. </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>thevampirea@yahoo.co.in</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">20.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->What is a schema ?
<br />A schema is a logical collection of database objects like tables, views, pkgs, procedures, triggers, etc. It usually has an associated database user. </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Anil Kuppa</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">21.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->this is just to subscribe </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Natraj</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">22.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->What is a co-related sub-query?</p> <p style="margin-left: 0.5in;">It is very similar to sub-queries where the parent query is executed based on the values returned by sub-quries. but when come’s to co-related subqueries for every instance of parent query subquery is executed and based on the result od sub-query the parent query will display the record as we will have refernce of parent quries in su-queries we call these as corelated subquries. </p> <p style="margin-left: 0.5in;">so, we can define co-related sub query as for every record retrival from the sub query is processed and based on result of process the parent record is displayed. </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Natraj</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">23.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->wht is the major difference b/w oracle 8i & 9i </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>renjith</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">24.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->what is trigger?
<br />Trigger is an event. It is used prevent the invalid entries of the data.There
<br />has a different types of trigger are available.
<br />1)rowlevel trigger
<br />before insert,before delete,before update
<br />after insert,after delete,after update
<br />2)statement level trigger
<br />before insert,before delete,before update
<br />after insert,after delete,after update
<br />3)INSTEAD OF trigger
<br />4)Schema level Triggers
<br />5)System level Triggers </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b><a href="http://www.insoft.com/">Ramananth</a></b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">25.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->co-related sub-query - I assume you mean correlated sub-query? </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Mark</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">26.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Hi
<br />i want to get information about coalescing to tablespace?
<br />Send theinformation to me through the mail id i have mentioned above.</p> <p style="margin-left: 0.5in;">Regards
<br />Lucky </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Lucky</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">27.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->i want to know how to use rownum and rowid efficiently in sql*plus queries </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>sudha</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">28.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->hi
<br />will u plezzzz tell me
<br />can we return cursor in the function if yes than what the process?
<br />can we define exceptions twice in same block?
<br />what is max. no. of statment that can specified in triggers?
<br />in cursor where the cursor variable used in package body? </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b><a href="http://www.oracle.com/">lekha reddy</a></b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">29.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->is there any solution to delete a particular colum in a database by sql </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>manraj</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">30.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->How can I assigned two table in a single block (database block) in forms6i? </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Sudipta</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">31.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Q. Is there any solution to delete a particular colum in a database by sql?
<br />A. This is cant be done in versions before 9i.
<br />In 9i
<br />SQL> alter table delete column ; </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Gaurav Sachan</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">32.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->pseudo columns in sql are currval and nextval.These are used with sequences to retreive the next sequence value and current sequence value.
<br />The usage is as follows
<br />suppose abc is the sequence name if i want to see the currval of the sequence we issue the sql statement
<br />select abc.currval from dual;
<br />if we want to see the next value of the sequence we issue the command
<br />select abc.nextval from dual; </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>satish</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">33.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Hi here i would like to give simple answer for question #1
<br />What is an oracle instance?
<br />An Oracle instance consists of the System Global Area (SGA) memory structure and the background processes used to manage a database. An instance is identified by using methods specific to each operating system. The instance can open and use only one database at a time.</p> <p style="margin-left: 0.5in;">Srinivasa Reddy </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Srinivasa Reddy</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">34.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->hi,
<br />what is the major difference between normal FOR LOOP and CURSOR LOOP?</p> <p style="margin-left: 0.5in;">-Regards
<br />Muttappa S.T. </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Muttappa S.T.</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">35.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Hi,
<br />when we install the new version of Oracle then what happens to our earlier forms? </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Ujjwala</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">36.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->what is overloading of packages in oracle </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>jyothi</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">37.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->is it possible to create a cursor which is based on more than one table. </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>vasundhara</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">38.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->The correct answer for this question is
<br />Q. Is there any solution to delete a particular colum in a database by sql?
<br />A. alter table drop column
<br />or
<br />first mark the column unused
<br />alter table set unused column
<br />then drop it
<br />alter table drop unused columns.
<br />This will drop all the columns marked as unused. If a particular column has to be dropped, mention the column name after columns </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Ram</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">39.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->the answer <a href="mailto:thevampirea@yahoo.co.in">thevampirea@yahoo.co.in</a> for “What is a schema?” is wrong.</p> <p style="margin-left: 0.5in;">A schema is a collection of logical objects owned by a user. A user in that regard is an account registered with the Oracle server.</p> <p style="margin-left: 0.5in;">Once u login into <st1:place st="on"><st1:city st="on">ur</st1:city></st1:place> account/user, u can access other user’s schema objects like i can write scott.emp, if at all i’ve acces to scott user’s emp table. </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>rahul</b></cite> </p> <p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">40.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Data Model: The logical data structure developed during the logical database design process is a data model or entity model. It is also a description of the structural properties that define all entries represented in a database and all the relationships that exist among them. </p> <p style="margin-left: 0.5in;">%ROWTYPE is used to declare a record with the same types as found in the specified database table, view or cursor
<br />%TYPE is used to declare a field with the same type as that of a specified table’s column. </p> <p style="margin-left: 0.5in;">Index for a physical structure (b-tree) to help you query run faster.
<br />Table partition is a method of breaking a large table into smaller tables grouped by some logical separators. in your case, having both index and partition will make things faster.</p> <p style="margin-left: 0.5in;">Data Control statements
<br />These are used to control the data using DCL (data control language) ex: Grant etc.</p> <p style="margin-left: 0.5in;">Trigger : A program in a database that gets called each time a row in a table is INSERTED, UPDATED, or DELETED. Triggers allow you to check that any changes are correct, or to fill in missing information before it is commited. Triggers are normally written in PL/SQL or Java. </p> <p style="margin-left: 0.5in;">Relation: Mathematical term for a table.</p> <p style="margin-left: 0.5in;">Redo Log: A set of files that record all changes made to an Oracle database. A database MUST have at least two redo log files. Log files can be multiplexed on multiple disks to ensure that they will not get lost. Also see thread.</p> <p style="margin-left: 0.5in;">Oracle ARCHiver Process. ARCH is an Oracle background process created when you start an instance in ARCHIVE LOG MODE. The ARCH process will archive on-line redo log files to some backup media. </p> <p style="margin-left: 0.5in;">Buffer Cache: The portion of the SGA that holds copies of Oracle data blocks. All user processes that connect to an instance share access to the buffer cache. Performance of the buffer cache is indicated by the BCHR (Buffer Cache Hit Ratio).</p> <p style="margin-left: 0.5in;">Background Process: Non-user process that is created when a database instance is started. These processes are used to manage and monitor database operations. Example background processes: SMON, PMON etc.</p> <p style="margin-left: 0.5in;">Two-Phase Commit: A strategy in which changes to a database are temporarily applied. Once it has been determined that all parts of a change can be made successfully, the changes are permanently posted to the database. The steps involved are the “prepared” and “commit request”</p> <p style="margin-left: 0.5in;"><st1:place st="on">Union</st1:place>: All the distinct rows are selected by either query.
<br />Intersect: All distinct rows selected by both queries
<br />Minus: All distinct rows that are selected by the first SELECT statement and that are not selected in the second SELECT statement.
<br />Join: The process of combining data from two or more tables using matching columns. Types of join are Equi Join, Outer Join, Self Join, Natural Join, etc.
<br />Equi Join: An Equi Join (aka. Inner Join or Simple Join) is a join statement that uses an equivalency operation (i.e: colA = colB) to match rows from different tables. The converse of an equi join is a nonequijoin operation.
<br />Outer Join: Similar to the Equi Join, but Oracle will also return non matched rows from the tale with the outer join operator (+). Missing values are filled with null values.
<br />Self Join: A join in which a table is joined with itself.
<br />Natural Join: A join statement that compares the common columns of both tables with each other. One should check whether common columns exist in both tables before doing a natural join.</p> <p style="margin-left: 0.5in;">Integer Data Types: VARCHAR2 (Size), NUMBER (Precision, Size)</p> <p style="margin-left: 0.5in;">Denormalization: The opposite of data normalization (almost). In a denormalized database, some duplicated data storage is allowed. The benefits are quicker data retrieval and/or a database structure that is easier for end-users. </p> <p style="margin-left: 0.5in;">Regards. </p> <p style="margin-left: 0.5in;"><cite>Tech Interviews comment by <b>Jenis John K</b></cite> </p> <p class="MsoNormal"><o:p> </o:p></p> Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-26108095603337249842008-07-17T22:46:00.001-07:002008-07-17T22:46:59.677-07:00 Oracle app’s technical document<meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List" href="file:///D:%5CDOCUME%7E1%5Cshesu04%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"></o:smarttagtype><!--[if gte mso 9]><xml> <o:documentproperties> <o:author>support</o:Author> <o:version>11.9999</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:usefelayout/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" latentstylecount="156"> </w:LatentStyles> </xml><![endif]--><!--[if !mso]><object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id="ieooui"></object> <style> st1\:*{behavior:url(#ieooui) } </style> <![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:ËÎÌå; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-alt:Verdana; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:536871559 0 0 0 415 0;} @font-face {font-family:"\@SimSun"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:"\@Arial Unicode MS"; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; color:windowtext; mso-fareast-language:EN-US;} p.MsoHeader, li.MsoHeader, div.MsoHeader {margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; tab-stops:center 3.0in right 6.0in; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; color:windowtext; mso-fareast-language:EN-US;} p.MsoFooter, li.MsoFooter, div.MsoFooter {margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; tab-stops:center 3.0in right 6.0in; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; color:windowtext; mso-fareast-language:EN-US;} p.MsoBodyText3, li.MsoBodyText3, div.MsoBodyText3 {margin:0in; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:widow-orphan; font-size:12.0pt; mso-bidi-font-size:10.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; color:windowtext; mso-fareast-language:EN-US; font-weight:bold; mso-bidi-font-weight:normal;} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:#606420; text-decoration:underline; text-underline:single;} p {mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; color:black; mso-fareast-language:EN-US;} p.bodystart, li.bodystart, div.bodystart {mso-style-name:bodystart; mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; color:black; mso-fareast-language:EN-US; mso-bidi-language:TE;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:13654433; mso-list-type:hybrid; mso-list-template-ids:1689039512 693667242 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l0:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:95.25pt; mso-level-number-position:left; margin-left:95.25pt; text-indent:-.25in;} @list l1 {mso-list-id:33774547; mso-list-type:hybrid; mso-list-template-ids:1620971696 1077475298 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l1:level1 {mso-level-start-at:36; mso-level-text:"%1\)"; mso-level-tab-stop:27.75pt; mso-level-number-position:left; margin-left:27.75pt; text-indent:-24.75pt;} @list l2 {mso-list-id:122844855; mso-list-template-ids:1205906524;} @list l2:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in; color:blue;} @list l2:level2 {mso-level-number-format:alpha-lower; mso-level-text:"%2\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; margin-left:.5in; text-indent:-.25in;} @list l2:level3 {mso-level-number-format:roman-lower; mso-level-tab-stop:1.5in; mso-level-number-position:right; text-indent:-9.0pt;} @list l2:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} @list l2:level5 {mso-level-number-format:alpha-lower; mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} @list l2:level6 {mso-level-number-format:roman-lower; mso-level-tab-stop:3.0in; mso-level-number-position:right; text-indent:-9.0pt;} @list l2:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} @list l2:level8 {mso-level-number-format:alpha-lower; mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} @list l2:level9 {mso-level-number-format:roman-lower; mso-level-tab-stop:4.5in; mso-level-number-position:right; text-indent:-9.0pt;} @list l3 {mso-list-id:123279712; mso-list-type:hybrid; mso-list-template-ids:1149019874 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l3:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l4 {mso-list-id:159540888; mso-list-type:hybrid; mso-list-template-ids:1813302720 1821249264 -1246709844 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l4:level1 {mso-level-number-format:alpha-lower; mso-level-text:"%1\)"; mso-level-tab-stop:33.75pt; mso-level-number-position:left; margin-left:33.75pt; text-indent:-.25in;} @list l4:level2 {mso-level-start-at:35; mso-level-text:"%2\)"; mso-level-tab-stop:75.75pt; mso-level-number-position:left; margin-left:75.75pt; text-indent:-24.0pt;} @list l5 {mso-list-id:204028201; mso-list-type:hybrid; mso-list-template-ids:1209695172 2113417966 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l5:level1 {mso-level-start-at:52; mso-level-text:"%1\)"; mso-level-tab-stop:42.0pt; mso-level-number-position:left; margin-left:42.0pt; text-indent:-24.0pt;} @list l6 {mso-list-id:376510425; mso-list-type:hybrid; mso-list-template-ids:-422169722 67698705 142642580 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l6:level1 {mso-level-start-at:3; mso-level-text:"%1\)"; mso-level-tab-stop:27.0pt; mso-level-number-position:left; margin-left:27.0pt; text-indent:-.25in;} @list l6:level2 {mso-level-number-format:alpha-lower; mso-level-text:"%2\)"; mso-level-tab-stop:63.0pt; mso-level-number-position:left; margin-left:63.0pt; text-indent:-.25in;} @list l7 {mso-list-id:477578390; mso-list-type:hybrid; mso-list-template-ids:-2081654738 -363429410 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l7:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:1.75in; mso-level-number-position:left; margin-left:1.75in; text-indent:-.25in;} @list l8 {mso-list-id:555315140; mso-list-type:hybrid; mso-list-template-ids:-325566284 -1 -1 -1 -1 -1 -1 -1 -1 -1;} @list l8:level1 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:63.0pt; mso-level-number-position:left; margin-left:63.0pt; text-indent:-.25in; font-family:Symbol;} @list l9 {mso-list-id:575669008; mso-list-type:hybrid; mso-list-template-ids:293647170 2142249014 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l9:level1 {mso-level-start-at:3; mso-level-text:%1; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l10 {mso-list-id:672344319; mso-list-type:hybrid; mso-list-template-ids:-3501568 1296492384 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l10:level1 {mso-level-start-at:10; mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:39.75pt; mso-level-number-position:left; margin-left:39.75pt; text-indent:-.25in; font-family:Wingdings; mso-fareast-font-family:"Times New Roman"; mso-bidi-font-family:"Times New Roman";} @list l11 {mso-list-id:683676518; mso-list-type:hybrid; mso-list-template-ids:-1351864984 -1 -1 -1 -1 -1 -1 -1 -1 -1;} @list l11:level1 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:63.0pt; mso-level-number-position:left; margin-left:63.0pt; text-indent:-.25in; font-family:Symbol;} @list l12 {mso-list-id:734428220; mso-list-type:hybrid; mso-list-template-ids:141093002 -1988450934 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l12:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:53.25pt; mso-level-number-position:left; margin-left:53.25pt; text-indent:-.25in;} @list l13 {mso-list-id:757597189; mso-list-type:hybrid; mso-list-template-ids:702059798 -266837360 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l13:level1 {mso-level-start-at:6; mso-level-number-format:alpha-lower; mso-level-text:"%1\)"; mso-level-tab-stop:36.75pt; mso-level-number-position:left; margin-left:36.75pt; text-indent:-.25in; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} @list l14 {mso-list-id:787435022; mso-list-type:hybrid; mso-list-template-ids:-461323074 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l14:level1 {mso-level-start-at:52; mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l15 {mso-list-id:794252327; mso-list-type:hybrid; mso-list-template-ids:14061088 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l15:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l16 {mso-list-id:795099795; mso-list-type:hybrid; mso-list-template-ids:-442211980 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l16:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l17 {mso-list-id:813984074; mso-list-type:hybrid; mso-list-template-ids:1231973524 -1 -1 -1 -1 -1 -1 -1 -1 -1;} @list l17:level1 {mso-level-start-at:0; mso-level-number-format:bullet; mso-level-text:-; mso-level-tab-stop:51.0pt; mso-level-number-position:left; margin-left:51.0pt; text-indent:-.25in; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @list l18 {mso-list-id:862016073; mso-list-type:hybrid; mso-list-template-ids:392174050 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l18:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l19 {mso-list-id:950741014; mso-list-type:hybrid; mso-list-template-ids:987675512 -352553894 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l19:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:1.0in; mso-level-number-position:left; margin-left:1.0in; text-indent:-.25in;} @list l20 {mso-list-id:1083188325; mso-list-type:hybrid; mso-list-template-ids:1844593148 -1039109676 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l20:level1 {mso-level-start-at:4; mso-level-text:"%1\)"; mso-level-tab-stop:27.0pt; mso-level-number-position:left; margin-left:27.0pt; text-indent:-.25in;} @list l21 {mso-list-id:1173446964; mso-list-type:hybrid; mso-list-template-ids:147886758 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l21:level1 {mso-level-start-at:52; mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l22 {mso-list-id:1220823729; mso-list-type:hybrid; mso-list-template-ids:-1801291214 1541333208 747783100 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l22:level1 {mso-level-number-format:alpha-lower; mso-level-text:"%1\)"; mso-level-tab-stop:37.5pt; mso-level-number-position:left; margin-left:37.5pt; text-indent:-.25in;} @list l22:level2 {mso-level-text:"%2\)"; mso-level-tab-stop:73.5pt; mso-level-number-position:left; margin-left:73.5pt; text-indent:-.25in;} @list l23 {mso-list-id:1234774392; mso-list-type:hybrid; mso-list-template-ids:753335606 -1 -1 -1 -1 -1 -1 -1 -1 -1;} @list l23:level1 {mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l23:level2 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:1.0in; mso-level-number-position:left; text-indent:-.25in; font-family:Symbol;} @list l23:level3 {mso-level-start-at:0; mso-level-number-format:bullet; mso-level-text:-; mso-level-tab-stop:117.0pt; mso-level-number-position:left; margin-left:117.0pt; text-indent:-.25in; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @list l24 {mso-list-id:1278560486; mso-list-type:hybrid; mso-list-template-ids:-481293468 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l24:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l25 {mso-list-id:1459101993; mso-list-type:hybrid; mso-list-template-ids:1165907422 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l25:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l26 {mso-list-id:1488395419; mso-list-type:hybrid; mso-list-template-ids:-1965647704 1710382104 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l26:level1 {mso-level-number-format:alpha-lower; mso-level-text:"%1\)"; mso-level-tab-stop:.25in; mso-level-number-position:left; margin-left:.25in; text-indent:-.25in;} @list l27 {mso-list-id:1600404833; mso-list-type:hybrid; mso-list-template-ids:1041646112 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l27:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l28 {mso-list-id:1614821700; mso-list-type:hybrid; mso-list-template-ids:-1785323586 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l28:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l29 {mso-list-id:1674070985; mso-list-type:hybrid; mso-list-template-ids:-1705620838 1978585352 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l29:level1 {mso-level-number-format:alpha-upper; mso-level-text:"%1\)"; mso-level-tab-stop:40.5pt; mso-level-number-position:left; margin-left:40.5pt; text-indent:-.25in;} @list l30 {mso-list-id:1683320567; mso-list-type:hybrid; mso-list-template-ids:1448751724 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l30:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l31 {mso-list-id:1756126719; mso-list-type:hybrid; mso-list-template-ids:1205906524 -1188268436 -919469926 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l31:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in; color:blue;} @list l31:level2 {mso-level-number-format:alpha-lower; mso-level-text:"%2\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; margin-left:.5in; text-indent:-.25in;} @list l31:level3 {mso-level-number-format:roman-lower; mso-level-tab-stop:1.5in; mso-level-number-position:right; text-indent:-9.0pt;} @list l32 {mso-list-id:1852572536; mso-list-type:hybrid; mso-list-template-ids:1938344272 -107038532 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l32:level1 {mso-level-start-at:5; mso-level-text:"%1\)"; mso-level-tab-stop:27.0pt; mso-level-number-position:left; margin-left:27.0pt; text-indent:-.25in;} @list l32:level2 {mso-level-number-format:alpha-lower; mso-level-tab-stop:63.0pt; mso-level-number-position:left; margin-left:63.0pt; text-indent:-.25in;} @list l33 {mso-list-id:2040009049; mso-list-type:hybrid; mso-list-template-ids:-362884074 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l33:level1 {mso-level-start-at:29; mso-level-text:"%1\)"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l33:level2 {mso-level-number-format:alpha-lower; mso-level-tab-stop:1.0in; mso-level-number-position:left; text-indent:-.25in;} @list l34 {mso-list-id:2095545720; mso-list-type:hybrid; mso-list-template-ids:-1055077512 547272692 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l34:level1 {mso-level-text:"%1\)"; mso-level-tab-stop:36.75pt; mso-level-number-position:left; margin-left:36.75pt; text-indent:-.25in;} ol {margin-bottom:0in;} ul {margin-bottom:0in;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} table.MsoTableGrid {mso-style-name:"Table Grid"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .5pt; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.5pt solid windowtext; mso-border-insidev:.5pt solid windowtext; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--> <p class="MsoNormal"><span style="font-size: 13pt; color: blue;"><span style=""> </span></span><b><span style="font-size: 16pt; color: rgb(153, 51, 102);"><o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 16pt; color: rgb(153, 51, 102);"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="color: blue;">1) What is ERP? Architecture of apps?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 27.35pt; text-align: justify; text-indent: -27.35pt;"><span style="color: blue;"><span style=""> </span></span><span style="color: black;"><span style=""> </span></span><span style="font-size: 13pt; color: black;">A <u>packaged</u> business software system that lets a company automate and <u>integrate</u> the majority of its business processes; share <u>common data </u>and practices across the enterprise; [and] produce and access information in a <u>real-time</u> environment</span><span style="color: black;">.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">2) Tell me some thing about SQL-LOADER.<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 13pt;">Sql * loader is a bulk loader utility used for moving data from external files into the oracle database.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 13pt;">Sql * loader supports various load formats, selective loading, and multi-tables loads.<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>1) conventional<o:p></o:p></b></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 13pt;"><span style=""> </span>--The conventional path loader essentially loads the data by using standard ‘insert’ statement.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>2) direct<o:p></o:p></b></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>-- the direct path loader (direct = true) by possess of logic involved with that, and loads directly in to the oracle data files. <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;">EX:- <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;">My data.csv file</p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style=""> </span>1001, “scott tiger”,1000,40</p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style=""> </span>1002,”gvreddy”,2345,50</p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 13pt;">Load data<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 13pt;">Infile ‘c:\data\mydata.csv’<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 13pt;">Into table emp<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 13pt;">Fields terminated by “,” optionally enclosed by ‘”’<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 13pt;">(empno, empname,sal,deptno)<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;">><i>sqlldr scott/tiger@vis <o:p></o:p></i></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><i><span style="font-size: 13pt;">control=loader.ctl<span style=""> </span>log= gvlog.log<span style=""> </span>bad=gvbad.bad<span style=""> </span>discard=gvdis.dsc .</span></i><span style="font-size: 13pt;"> <o:p></o:p></span></p> <p class="MsoNormal"><b><span style="color: blue;">3) <span style=""> </span>how do u dump data from pl/sql block to flat files?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style=""> </span>Using utl_file package, we can dump data from pl/sql block to flat file.</p> <p class="MsoNormal"><span style=""> </span><b><span style="color: blue;">PRE-REQUIREMENTS</span></b> for UTL_FILE is specify the accessible directories for the UTL_FILE function in the initialization file (INIT.ORA) Using the UTL_FILE_DIR parameters.</p> <p class="MsoNormal"><span style=""> </span>Ex: UTL_FILE_DIR = <directory> </p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><b>EX:-<o:p></o:p></b></p> <p class="MsoNormal" style="margin-left: 45pt; text-indent: 27pt;">--remember to update INITSID.ORA,</p> <p class="MsoNormal" style="margin-left: 45pt; text-indent: 27pt;">--utl_file_dir = ‘c:\oradata’</p> <p class="MsoNormal" style="margin-left: 9pt;">Declare</p> <p class="MsoNormal" style="margin-left: 9pt;">Fp utl_file.file_type;</p> <p class="MsoNormal" style="margin-left: 9pt;">Begin</p> <p class="MsoNormal" style="margin-left: 9pt;">Fp := utl_file.fopen(c:\oradata’,tab1.txt’,’w’);</p> <p class="MsoNormal" style="margin-left: 9pt;">Utl_file.putf(fp,’%s %s \n ‘text field’, 55);</p> <p class="MsoNormal" style="margin-left: 9pt;">Utl_file.fclose(fp);</p> <p class="MsoNormal" style="margin-left: 9pt;">End;</p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">4) What is SET-OF-BOOKS?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;">Collection of Chat of Accounts and Currency and Calendars is called SOB<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt; color: blue;"><span style="">5)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="font-size: 13pt; color: blue;">What is the interface?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt; color: rgb(51, 51, 51);"><span style=""> </span>Interface Table is a table which is used as medium for transfer of data between two systems. <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt; color: blue;"><span style="">6)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="font-size: 13pt; color: blue;">What is invoice?<o:p></o:p></span></b></p> <p class="MsoNormal" style="text-indent: 0.25in;"><span style="font-size: 13pt; color: rgb(51, 51, 51);"><span style=""> </span>Send you a request for payment<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt; color: blue;"><span style="">7)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="font-size: 13pt; color: blue;">What is INBOUND and OUT BOUND? (Different types of interfaces)<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt; color: fuchsia;"><span style=""> </span><u>Inbound Interface</u></span><span style="font-size: 13pt; color: rgb(51, 51, 51);">:<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt; color: rgb(51, 51, 51);"><span style=""> </span><span style=""> </span><span style=""> </span>For inbound interfaces, where these products are the destination, interface tables as well as supporting validation, processing, and maintenance programs are provided. <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt; color: rgb(51, 51, 51);"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt; color: fuchsia;"><span style=""> </span><u>Outbound Interface</u></span><span style="font-size: 13pt; color: rgb(51, 51, 51);">:<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt; color: rgb(51, 51, 51);"><span style=""> </span><span style=""> </span><span style=""> </span>For outbound interfaces, where these products are the source, database views are provided and the destination application should provide the validation, processing, and maintenance programs<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt; color: blue;"><span style="">8)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="font-size: 13pt; color: blue;"><span style=""> </span>Tell me what r the Base tables in the AR?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt; font-family: Arial;"><span style=""> </span><span style=""> </span><b>hz_parties</b> <span style=""> </span>(party_id)<span style=""> </span>(store info about org, groups and people)<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt;"><span style=""> </span></span><span style="font-size: 11pt;">HZ_PARTIES stores information about parties such as organizations, people, and groups, including the identifying address information for the party.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><b><span style="font-size: 13pt; font-family: Arial;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style="text-indent: 0.5in;"><b><span style="font-size: 13pt; font-family: Arial;">hz_cust_accounts</span></b><span style="font-size: 13pt; font-family: Arial;"> (cust_account_id)<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt; font-family: Arial;"><span style=""> </span></span><span style="font-size: 11pt;">HZ_CUST_ACCOUNTS stores information about customer relationships. If a party becomes a customer, information about the customer account is stored in this table. You can establish multiplecustomer relationships with a single party, so each party can have multiple customer account records in this table.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><b><span style="font-size: 13pt; font-family: Arial;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style="text-indent: 0.5in;"><b><span style="font-size: 13pt; font-family: Arial;">hz_cust_acct_sites_all</span></b><span style="font-size: 13pt; font-family: Arial;"><span style=""> </span>(cust_acct_site_id)<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt; font-family: Arial;"><span style=""> </span><span style=""> </span><span style=""> </span></span><span style="font-size: 11pt;">HZ_CUST_ACCT_SITES_ALL stores information about customer sites.One customer account can have multiple sites. The address is maintained in HZ_LOCATIONS.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><b><span style="font-size: 13pt; font-family: Arial;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style="text-indent: 0.5in;"><b><span style="font-size: 13pt; font-family: Arial;">hz_cust_site_uses_all</span></b><span style="font-size: 13pt; font-family: Arial;"><span style=""> </span>(site_use_id)<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt; font-family: Arial;"><span style=""> </span><span style=""> </span><span style=""> </span><span style=""> </span><span style=""> </span></span><span style="font-size: 11pt;">HZ_CUST_SITE_USES_ALL stores information about site uses or business purposes. A single customer site can have multiple site uses, such as bill to or ship to, and each site use is stored as a record in this table.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 11pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><b><span style="font-size: 13pt; font-family: Arial;">hz_party_sites </span></b><span style="font-size: 13pt; font-family: Arial;">(party_site_id)<b><o:p></o:p></b></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt; font-family: Arial;"><span style=""> </span><span style=""> </span></span><span style="font-size: 11pt;">HZ_PARTY_SITES stores information about the relationship between Parties and Locations. The same party can have multiple party sites.Physical addresses are stored in HZ_LOCATIONS.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 11pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><b><span style="font-size: 13pt; font-family: Arial;">hz_locations </span></b><span style="font-size: 13pt; font-family: Arial;">(location_id)<b><o:p></o:p></b></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt; font-family: Arial;"><span style=""> </span><span style=""> </span></span><span style="font-size: 11pt;">HZ_LOCATIONS stores information about physical locations.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 11pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><b><span style="font-size: 13pt; font-family: Arial;">hz_Person_Profiles </span></b><span style="font-size: 13pt; font-family: Arial;">(person_profile_id)<b><o:p></o:p></b></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt; font-family: Arial;"><span style=""> </span><span style=""> </span></span><span style="font-size: 11pt;">HZ_PERSON_PROFILES stores detail information about people.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 11pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><b><span style="font-size: 13pt; font-family: Arial;">hz_Organization_Profiles </span></b><span style="font-size: 13pt; font-family: Arial;">(organization_profile_id)<b><o:p></o:p></b></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt; font-family: Arial;"><span style=""> </span><span style=""> </span><span style=""> </span><span style=""> </span></span><span style="font-size: 11pt;">HZ_ORGANIZATION_PROFILES stores credit rating, financial statistics, socioeconomic and corporate linkage information for business sites. The primary key for this table is ORGANIZATION_PROFILE_ID.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 1.5in;"><span style="font-size: 13pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 1.5in;"><span style="font-size: 13pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 1.5in;"><span style="font-size: 13pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 1.5in;"><span style="font-size: 13pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt; color: blue;"><span style="">9)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="font-size: 13pt; color: blue;"><span style=""> </span>What r the table’s interface tables in the customer interface tables?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 53.25pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt;"><span style="">1)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="font-size: 13pt;">Ra_customers_interface_all<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 10pt;"><span style=""> </span></span><span style="">This table stores customer, address, and business purpose information. You do not have to enter values in this table if you do not want to import customers, addresses, or business purposes.<o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style=""><o:p> </o:p></span></b></p> <p class="MsoNormal" style=""><b><span style="">ADDRESS1 through 4<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style=""><span style=""> </span>Enter the address for your customer in these four columns. You can enter up to four lines of an address.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style=""><o:p> </o:p></span></p> <p class="MsoNormal" style=""><b><span style="">Validation: </span></b><span style=""><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal" style=""><span style=""><span style=""> </span>If you enter a value in ORIG_SYSTEM_ADDRESS_REF, you must enter a value in ADDRESS1. For multiple rows with the same address reference, insert values in address 1–4.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style=""><o:p> </o:p></span></p> <p class="MsoNormal" style=""><span style=""><span style=""> </span><b>Destination:</b><span style=""> </span>HZ_LOCATIONS.ADDRESS1,<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style=""><span style=""> </span><span style=""> </span>HZ_LOCATIONS.ADDRESS2,<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style=""><span style=""> </span>HZ_LOCATIONS.ADDRESS3, <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style=""><span style=""> </span>HZ_LOCATIONS.ADDRESS4<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span>2) Ra_customer_profile_int_all<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 11pt;">A customer level profile must exist in A_CUSTOMER_PROFILES_INTERFACE for new customers and each bill–to business purpose.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span>3) Ra_contact_phones_int_all<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="">This table stores telephone numbers for customers, addresses and contacts as well as contacts for customers and addresses.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span>4) Ra_customer_banks_int_all<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="">This table stores bank information for a customer or for a specific Bill–To address, you must enter a bank account for this customer</span><span style="font-size: 11pt;">,</span><span style="font-size: 13pt;"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b><span style=""> </span>5) Ra_cust_paymethod_int_all<o:p></o:p></b></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt;">To import payment methods for customers and bill–to business purposes,<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt; color: blue;"><span style="">10)</span></span></b><!--[endif]--><b><span style="font-size: 13pt; color: blue;"> What r the staging tables in the customer interface?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt;"><span style=""> </span>Ra_customers_stg<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt;"><span style=""> </span>Ra_customers_address_stg<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt;"><span style=""> </span>Ra_customers_point_stg<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt;"><span style=""> </span>Ra_customers_contact points_stg<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt;"><span style=""> </span>Ra_customers_relate_stg<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt;"><span style=""> </span>Ra_customer_error.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt; color: blue;"><span style="">11)</span></span></b><!--[endif]--><b><span style="font-size: 13pt; color: blue;">Tell me some mandatory columns in the customer interface tables?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 27pt;"><span style="font-size: 13pt; color: blue;"><span style=""> </span>a) </span><b><span style="font-size: 13pt;">Ra_customers_interface_all</span></b><span style="font-size: 13pt;"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt;"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>1) Orig_system_customer_ref <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt;"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span>2) insert_update_flag<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt;"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span>3) customer_number<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt;"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>4) customer_status<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span><span style=""> </span>5)last_updated_by<span style=""> </span><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span></span><span style="font-size: 10pt;"><o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span><span style=""> </span>6) last_updated_date<span style=""> </span></span><span style="font-size: 10pt;"><o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span><span style=""> </span>7)created_by<span style=""> </span><span style=""> </span></span><span style="font-size: 10pt;"><o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>8) creation_date.<span style=""> </span></span><span style="font-size: 10pt;"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>b) Ra_customer_profile_int_all<o:p></o:p></b></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>1) customer_profile_class_name<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>c) Ra_contact_phones_int_all<o:p></o:p></b></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>1)orig_system_telephone_ref<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>2)telephone <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>3) telephone_type<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span>d) Ra_customer_banks_int_all<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>1) bank_a/c_name<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>2)bank_a/c_no<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>3)bank_a/c_currency_code<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>e) Ra_cust_paymethod_int_all<o:p></o:p></b></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>1) payment_method_name<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt; color: blue;"><span style="">12)</span></span></b><!--[endif]--><b><span style="font-size: 13pt; color: blue;">Tell me the Navigation for customer interface?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt; color: blue;"><span style=""> </span><span style=""> </span></span><span style="font-size: 13pt;">Receivables </span><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span><span style="font-size: 13pt;"> Interface </span><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span><span style="font-size: 13pt;"> Customers<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 1.5in; text-indent: 0.5in;"><b><span style="font-family: Arial; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">1. What tables cannot be updated through customer interface? <o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">No updates will be allowed to be made through customer interface for <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">Following tables <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">RA_SITE_USES_ALL <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">RA_CUSTOMER_RELATIONSHIPS_ALL <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">RA_CUST_RECEIPT_METHODS <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">AP_BANK_BRANCHES <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">AP_BANK_ACCOUNTS_ALL <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">AP_BANK_ACCOUNT_USES_ALL <o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">2. How to send additional customer and address information through customer interafce <o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">Here is where attribute columns are used. <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">* Additional Customer data can be populated in <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">RA_CUSTOMERS_INTERFACE_ALL.customer_attribute1 to 15 <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">This will go into RA_CUSTOMERS.attribute1 to 15 <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">* Additional address information can be populated in <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">RA_CUSTOMERS_INTERFACE_ALL.address_attribute1 to 15 <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">This will go into RA_ADDRESSES_ALL.attribute1 to 15 <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">And so on. <o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">5. What should be the batch size (number of customer records) general guidelines for optimal performance <o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">About 10,000 records per bacth is ideal, it is suggested to keep the batch <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">size small. <o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;"> 6. Why does customer interface error out if there is mismatch in address information? <o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">Because the code validates against these mismatches. <o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt;">arplscin.sql and arplbcin.sql <o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">It validates the address being inserted or updated with respect to the tax <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">location flexfield structure. For each row being inserted or updated in <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">RA_CUSTOMERS_INTERFACE, and that has not already been marked in error, <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">the set_location_ccid function is called to return either an existing ccid <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">for the address entered or to create a new entry in AR_LOCATION_VALUES for <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">this new address. The RA_CUSTOMERS_INTERFACE record is then updated with the <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">value of the ccid returned. <o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">7. How do you send records at customer level profile and address/site level profile? <o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">For every customer record in RA_CUSTOMERS_INTERFACE_ALL, insert two records in table RA_CUSTOMER_PROFILES_INT_ALL. (Refer Note: 1070800.6 ) <o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">9. Does Customer Interface import salesperson data</span></b><span style="font-size: 13pt; color: blue;">? <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">No, Refer Enhancement Bug: 147495 <o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">11. Customer Interface process can be used for updating the customer information How does the UPDATE work? <o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">Current functionality of Customer Interface is to update all the data. You cannot run Customer Interface to update only changed data. (Refer Bug: 879121 for the intended functinality) <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">12. What are some of the important fields that Customer Interface does not load? <o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">Not all fields in RA_CUSTOMERS are being loaded by the interface. <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">SIC_CODE <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">GSA_INDICATOR <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">FOB_POINT <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">SALES_CHANNEL_CODE <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">FREIGHT_TERM <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">WAREHOUSE_ID <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">PRICE LIST <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">SHIP_PARTIAL <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">PAYMENT_TERM_ID in RA_SITE_USES.PAYMENT_TERM_ID <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">(Refer Enhancement Request Bug: 245300) <o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">13. New TCA/Customer Model, how to load customer as PERSON or ORGANIZATION through Customer Interface? <o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">a) Populate ra_customers_interface_all . person_flag = 'Y' <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"> Run Customer Interface process will load this record as PERSON <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;">b) Populate ra_customers_interface_all . person_flag = 'N' ( or NULL ) <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"> Run Customer Interface process will load this record as ORGANIZATION <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt; color: blue;"><span style="">13)</span></span></b><!--[endif]--><b><span style="font-size: 13pt; color: blue;"> Tell me what is the procedure to develop an interface?<span style=""> </span><o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">a.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->First we will get the Requirement document.</p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">b.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->We will create control file based on that plot file.</p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">c.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Then the control files which loads the data into staging tables.</p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">d.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Through pl/sql programs we will mapping and validate the data and then dump into the interface tables.</p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">e.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Through the standard programs we will push the data from interface<b> </b>tables to Base tables.</p> <p class="MsoNormal" style="margin-left: 27pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="color: blue;"><span style="">14)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="color: blue;">What validations u did in the customer interface?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">a.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]--><b>customer name</b> : the same customer reference can’t have different customer names with in this table</p> <p class="MsoNormal" style="margin-left: 63pt;">HZ_PARTIES.PARTY_NAME</p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">b.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]--><b>customer number</b> : must be null if your r using automatic customer numbering, must exit if you are not using automatic customer numbering. This value much be unique with in HZ_PARTIES</p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">c.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]--><b>customer status</b> : must be ‘A’ for active or ‘I’ for inactive</p> <p class="MsoNormal"><span style=""> </span>HZ_PARTIES_STATUS</p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">d.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]--><b>bank account num or bank account currency code</b> : </p> <p class="MsoNormal"><span style=""> </span>if the bank a/c already exist do not enter a value</p> <p class="MsoNormal"><span style=""> </span>if the bank a/c does not exist<span style=""> </span>you must enter a value</p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">e.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]--><b>bank a/c name</b> : it must exist in AP_BANK_ACCOUNTS or if it does not exist values must exist for BANK_A/C_CURRENCY_CODE</p> <p class="MsoNormal"><span style=""> </span>BANK_A/C_NUM</p> <p class="MsoNormal"><span style=""> </span>BANK_NAME</p> <p class="MsoNormal"><span style=""> </span><span style=""> </span>BANK_BRANCH_NAME</p> <p class="MsoNormal"><span style=""> </span>Note : every interface table has two error msg </p> <p class="MsoNormal" style="margin-left: 1.75in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">1)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Error code.</p> <p class="MsoNormal" style="margin-left: 1.75in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="">2)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span><!--[endif]-->Error msg.</p> <p class="MsoNormal" style="margin-left: 27pt;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 27pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="color: blue;"><span style="">15)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="color: blue;">How can u call a standard interface program from sql or pl/sql code?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style=""> </span><span style="font-size: 10pt;">FND_REQUEST.SUBMIT_REQUEST (‘<st1:place st="on">PO</st1:place>’,’EXECUTABLE NAME’,,,,PARAMETERS)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 10pt; color: blue;"><span style="">16)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="font-size: 10pt; color: blue;">API’s FOR CUSTOMER INTERFACE?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 27pt;"><span style="font-size: 10pt;">HZ_CUST_A/C_VZPUB.UPDATE_CUST_A/C<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt;"><span style="font-size: 10pt;">HZ_CUST_A/C_VZPUB.CREATE_CUST_A/C<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt;"><span style="font-size: 10pt;"><span style=""> </span>FND_PROFILES<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt;"><span style="font-size: 10pt;"><span style=""> </span>FND_APPLICATIONS<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt;"><span style="font-size: 10pt;"><span style=""> </span>FND_GLOBAL <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt;"><span style="font-size: 10pt;"><span style=""> </span>FND-FILE<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt;"><span style="font-size: 10pt;"><span style=""> </span>FND_CONCSUB(can submit conc program in host invironment)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt; color: blue;"><span style="">17)</span></span></b><!--[endif]--><b><span style="font-size: 13pt; color: blue;"> Tell me some API?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 13pt;">FND_FILE.PUTLINE(FND_FILE.LOG)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 13pt;">FND_FILE.PUTLINE(FND_FILE.OUTPUT)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><b><span style="font-size: 13pt;">Is the Program exits, delete conc program and its executables.<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">IF<span style=""> </span>FND_PROGRAM.PROGRAM_EXITS(‘EMP’,APPLICATION_NAME_IN) THEN<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;"><span style=""> </span>FND_PROGRAM.DELETE_PROGRAM(‘EMP’,APPLICATION_NAME_IN)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;"><span style=""> </span>FND_PROGRAM.DELETE_EXECUTABLE(‘EMP’,APPLICATION_NAME_IN)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">END;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="color: blue;"><span style="">18)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="color: blue;">What are profile options?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in;">Is the Functional and Technical behavior of Oracle Applications Package.</p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="color: blue;"><span style=""> </span></span>EX: - I want to assign the user3 responsibility to p4 printer then</p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="color: blue;"><span style=""> </span><span style=""> </span></span><b>System Administrator </b><b><span style="font-family: Wingdings;"><span style="">à</span></span>Profile </b><b><span style="font-family: Wingdings;"><span style="">à</span></span>System<o:p></o:p></b></p> <p class="MsoNormal"><i><span style=""> </span>(FND_PROFILE_OPTIONS)<o:p></o:p></i></p> <p class="MsoNormal" style="margin-left: 27pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="color: blue;"><span style="">19)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="color: blue;">Oracle E-Business suite?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in;"><i>Oracle apps + analytical components software.<o:p></o:p></i></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style=""> </span>(Oracle discover)</p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style=""> </span><span style=""> </span>(Oracle sales analyzer)</p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style=""> </span><span style=""> </span>(Oracle financial analyzer)</p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style=""> </span><span style=""> </span><span style=""> </span>(Oracle marketing analyzer)</p> <p class="MsoNormal"><b><span style="color: blue;">24) What is multi org?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="color: blue;"><span style=""> </span></span><b>“Legal entity has more than one operating unit is called as multi org”<o:p></o:p></b></p> <p class="MsoNormal"><b><span style=""> </span></b><span style=""> </span>a) Business group ---<span style="font-size: 14pt;"> </span>Human resources information is secured by<span style=""> </span></p> <p class="MsoNormal"><span style=""> </span>Business group<b><o:p></o:p></b></p> <p class="MsoNormal"><span style=""> </span>b) Legal entity.<span style=""> </span>--- inter-company and fiscal/tax reporting.</p> <p class="MsoNormal"><span style=""> </span><span style=""> </span><b>Security </b><b><span style="font-family: Wingdings;"><span style="">à</span></span> responsibility </b><b><span style="font-family: Wingdings;"><span style="">à</span></span> operating unit.<span style=""> </span><o:p></o:p></b></p> <p class="MsoNormal"><span style=""> </span>c) Operating unit --- secures AR, OE, AP, PA and PO Information.</p> <p class="MsoNormal"><span style=""> </span>d) Organizations<span style=""> </span>--- is a specialize unit of work at particular locations</p> <p class="MsoNormal"><span style="color: blue;"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="color: blue;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="color: blue;">25) What are the User PARAMETERS in the Reports?<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="color: fuchsia;"><span style=""> </span></span>P_CONC_REQUEST_ID<o:p></o:p></b></p> <p class="MsoNormal"><b><span style=""> </span>P_FLEX_VALUE<o:p></o:p></b></p> <p class="MsoNormal"><span style="color: blue;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="color: blue;">26)<span style=""> </span>FND USER EXITS:-<o:p></o:p></span></b></p> <p class="MsoNormal"><u><span style="color: fuchsia;">FND SRWINIT</span></u> <span style=""> </span>sets your profile option values,<span style="font-size: 14pt;"> </span>multiple organizations and allows Oracle Application Object Library user exits to detect that they have been called by an Oracle Reports program.<span style=""> </span></p> <p class="MsoNormal"><u><span style="color: fuchsia;">FND SRWEXI</span></u><span style="color: fuchsia;">T </span><span style=""> </span><span style=""> </span>ensures that all the memory allocated for AOL user exits have been freed up properly.</p> <p class="MsoNormal"><u><span style="color: fuchsia;">FND FLEXIDVAL</span></u><span style=""> </span><span style=""> </span>are used to display flex field information like prompt, value etc </p> <p class="MsoNormal"><u><span style="color: fuchsia;">FND FLEXSQL</span></u><span style="color: fuchsia;"><span style=""> </span><span style=""> </span></span>these user exits allow you to use flex fields in your reports <span style="color: fuchsia;"><o:p></o:p></span></p> <p class="MsoNormal"><u><span style="color: fuchsia;">FND FORMAT_CURRENCY</span></u><span style="color: fuchsia;"> <span style=""> </span><span style=""> </span></span>is used to print currency in various formats by using formula column</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">26) PL/SQL stored procedure parameters? <o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><span style=""> </span>or<span style=""> </span>what are the two parameters that are mandatory for pl/sql type concurrent program?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>Procedure/function (ERRBUF<span style=""> </span>OUT<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>RETCODE OUT<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>………………….)<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style="color: fuchsia;">ERRBUF :-</span><span style=""> </span>Used to write the error message to log or request file.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style="color: fuchsia;">RETCODE :-</span> Populate log request file with program submission details info.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">27) What is Value Set?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>--The value set is a collection (or) container of values.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>--When ever the value set associated with any report parameters. It provides list of values to the end user to accept one of the values as report parameter value.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>-- If the list of values needed to be dynamic and ever changing and define a table based values set.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">27) What r the validation types?<o:p></o:p></span></b></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;">1) None<span style=""> </span>-------- validation is minimal. <o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;">2) Independent ------input must exist on previously defined list of values<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;">3) Dependent<span style=""> </span>------input is checked against a subset of values based on a <o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;"><span style=""> </span>prior value.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;">3) Table<span style=""> </span>----- input is checked against values in an application table<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;">4) Special<span style=""> </span><span style=""> </span>------values set uses a flex field itself.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;">5) Pair<span style=""> </span>------ two flex fields together specify a range of valid values.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;">6) Translatable independent ----- input must exist on previously defined list <o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>of values; translated values can be used.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;">7) Translatable dependent ------- input is checked against a subset of values <o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;"><span style=""> </span>based on a prior values; translated value can be used.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">28) Form development process?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>a) open template form<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>b) Save as <your>.fmb<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>c) Change the form module name as form name.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>d) Delete the default blocks, window, and canvas<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>e) Create a window.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>f) Assign the window property class to window<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>g) Create a canvas<span style=""> </span>(subclass info)<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>h) Assign canvas property class to the canvas<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>I) assign the window to the canvas and canvas to the window<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>j) Create a data block<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>k) Modify the form level properties. (sub class item </span><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span><span style="font-size: 13pt;"> Text item) <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>l) <span style=""> </span>Modify the app_cusom package. In the program unit.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>m) Modify the pre-form trigger (form level)<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>n) Modify the module level properties ((console window, First navigation <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>p) Save and compile the form.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>Place the .fmx in the server directory.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Q) Register in the AOL <o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span>APPLICATION </span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> FORM<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span>APPLICATION </span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> FUNCTION<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span>APPLICATION </span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> MENU<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt; color: blue;"><span style="">29)</span></span></b><!--[endif]--><b><span style="font-size: 13pt; color: blue;">How do u customize the Reports?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">a.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">Identify the Short name of the standard report in which module we have to customize <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.75in;"><span style="font-size: 13pt;"><span style=""> </span><i>Ex: - if u want to customize in the AR module path is<o:p></o:p></i></span></p> <p class="MsoNormal" style="margin-left: 0.75in;"><i><span style="font-size: 11pt;"><span style=""> </span>Appl top\ar\11.5.0\reports\US\ .rdf<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">b.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">Open the .rdf file in Report builder and change the name of the module.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">c.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">Open the data module and modify the query (what is client requirements) assign the columns to the <i>attributes</i>. <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">d.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">Go to report wizard and select, what r the newly created columns.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 14pt;"><span style="">e.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;"><span style=""> </span>Then Compile it. Then u will get a .rep file in the specified module. If it is not in the specified directory then we have to put in the server directory</span><span style="font-size: 14pt;">.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">f.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">Then Register in the AOL<span style=""> </span><b>Concurrent </b></span><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;">executable</span></b><span style="font-size: 13pt;">.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.75in;"><b><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span>Concurrent </span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> program.<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt;"><span style="">g.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><span style="font-size: 13pt;">go to system administrator <span style=""> </span><b>Security</b></span><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;">Responsibility</span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;">request<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>h)<span style=""> </span>Add and assign a concurrent program to a request group<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">30) Registering parametric report?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt; color: blue;"><span style=""> </span></span><span style="font-size: 13pt;">Any applications will have two parameters,<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>1) from-period<span style=""> </span>2) to-period<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>a</b>) Go to object navigator and create the parameters.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>User parameters </b></span><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> from_no, to_no (data type char and width 30)</span></b><span style="font-size: 13pt;"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>b) Open the report layout and write the query(</span><span style="font-size: 11pt;">we have to reg the table in AOL</span><span style="font-size: 13pt;">)<o:p></o:p></span></p> <p class="MsoNormal"><i><span style="font-size: 13pt;"><span style=""> </span>Select empno,ename,from g_emp where empno between :from_no and to_no<o:p></o:p></span></i></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>c</b>) Compile and put the .RDP file in the server directory.<o:p></o:p></span></p> <p class="MsoNormal"><i><span style="font-size: 13pt;"><span style=""> </span></span></i><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><b>d</b>) Registering in AOL.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>Concurrent </b></span><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> executable <o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>Concurrent </b></span><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> program</span></b><span style="font-size: 13pt;"><span style=""> </span>then go to “<b>PARAMETERS”<o:p></o:p></b></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span>e)</span></b><span style="font-size: 13pt;"> Go to <b>Application </b></span><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> validation </span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;">set.<span style=""> </span></span></b><span style="font-size: 13pt;">then go to<b> “EDIT INTO”<o:p></o:p></b></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span></span></b><span style="font-size: 13pt;"><span style=""> </span>After entering the <i>VALUE SETS</i> (1) And <i>TOKENS</i> (2)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 36.75pt; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="font-size: 13pt;"><span style="">f)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><span style="font-size: 13pt;">Go to Administrations <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>Sequrity </b></span><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> responsibility </span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> Request<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>h) Add and assign a concurrent program to a request group<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">31) Tell me some report names and their table names in GL, AP, AR, and <st1:place st="on">PO</st1:place>?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;">1) <b>ra_customer_trx_all<span style=""> </span><o:p></o:p></b></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><b><i><span style="font-size: 11pt;"><span style=""> </span></span></i></b><i><span style="font-size: 11pt;"><span style=""> </span>customer_trx_id<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-left: 0.25in;"><i><span style="font-size: 11pt;"><span style=""> </span>trx_number<span style=""> </span>(invoice no, debit memo no, credit memo no)<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-left: 0.25in;"><i><span style="font-size: 11pt;"><span style=""> </span>cust_trx_type_id<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;">2) <b>ra_customer_lines_all (details of invoice)<o:p></o:p></b></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><i><span style="font-size: 11pt;"><span style=""> </span>cutomer_trx_id<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-left: 0.25in;"><i><span style="font-size: 11pt;"><o:p> </o:p></span></i></p> <p class="MsoNormal" style="margin-left: 0.25in;"><b><span style="font-size: 11pt;">3) ar_payment_schdules_all<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><span style=""> </span><i>check_id<o:p></o:p></i></span></p> <p class="MsoNormal" style=""><i><span style="font-size: 11pt;"><span style=""> </span><span style=""> </span><span style=""> </span></span></i><span style="font-size: 11pt;">This table stores all transactions except adjustments and miscellaneous cash receipts. Oracle Receivables updates this table when activity occurs against an invoice, debit memo, chargeback, credit memo, on account credit, or receipt.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><i><span style="font-size: 11pt;"><o:p> </o:p></span></i></p> <p class="MsoNormal" style="margin-left: 0.25in;"><b><span style="font-size: 11pt;">4) ra_cust_trx_types_all<span style=""> </span>(invoice types)<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.25in;"><i><span style="font-size: 11pt;"><span style=""> </span>cust_trx_type_id<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-left: 0.25in;"><i><span style="font-size: 11pt;"><o:p> </o:p></span></i></p> <p class="MsoNormal" style="margin-left: 0.25in;"><b>5) ra_batches_all<o:p></o:p></b></p> <p class="MsoNormal"><b><span style=""> </span></b><span style=""> </span>Batch_id</p> <p class="MsoNormal" style=""><span style="font-size: 11pt;"><span style=""> </span><span style=""> </span></span><span style="font-size: 11pt;">This table stores information about each receipt batch that you create in<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt;">Oracle Receivables. Each row includes information about a specific batch such as batch source, status, batch type, control count, and control amount<o:p></o:p></span></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 0.25in;"><b>6) ra_receivable_application_all<o:p></o:p></b></p> <p class="MsoNormal" style="margin-left: 0.25in;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 0.25in;"><b>7) ra_adjustments_all<o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span></b><span style=""> </span><span style="font-size: 11pt;">This table stores information about your invoice adjustments. Each row includes general information about the adjustment you are making such as activity name, amount, accounting information, reason, and type of adjustment. You need one row for each adjustment you are making to an invoice</span><span style="font-size: 10pt;">. <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><span style=""> </span></p> <p class="MsoNormal" style=""><o:p> </o:p></p> <p class="MsoNormal" style=""><o:p> </o:p></p> <p class="MsoNormal" style="">8) <b>ra_cash_receiots_all<o:p></o:p></b></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style=""> </span>Cash_receipt_id</p> <p class="MsoNormal" style=""><span style=""> </span><span style="font-size: 11pt;">This table stores one record for each receipt that you enter. Oracle Receivables creates records concurrently in the AR_CASH_RECEIPT_HISTORY_ALL, AR_PAYMENT_SCHEDULES_ALL, and AR_RECEIVABLE_APPLICATIONS tables for invoice–related receipts.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt;"><span style=""> </span><u><o:p></o:p></u></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">1)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">ap_invoice_all<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><span style=""> </span>invoice_amount, base_amount, payment_status_flag(‘y’ –fully paid<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><span style=""> </span>‘n’—unpaid<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><span style=""> </span>‘p’ –partially paid)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">2)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">ap_invoice_payments_all<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><span style=""> </span>invoice_id,<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">3)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">ap_invoice_distibutions_All<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><span style=""> </span>amount, base_amount, dist_code_combination_id, line_type_lookup_code<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">4)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">ap_payment_schdules<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><span style=""> </span>payment_status_flag(“ ‘’’’’”)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">5)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">ap_payment_dustributions_all<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">6)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">ap_checks_all<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><span style=""> </span>check_id,<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt;"><span style=""> </span></span><span style="font-size: 11pt;">AP_CHECKS_ALL stores information about payments issued to suppliers or refunds received from suppliers. You need one row for each payment you issue to a supplier or refund received from a supplier. Your Oracle Payables application uses this information to record payments you make to suppliers or refunds you receive from suppliers.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">7)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">ap_accounting_events_all<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">8)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">ap_bank_accounts_all<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt;"><span style=""> </span></span><span style="font-size: 11pt;">AP_BANK_ACCOUNTS_ALL contains information about your bank accounts. You need one row for each bank account you define. Each bank account must be affiliated with one bank branch. When you initiate an automatic payment batch, enter a manual check, or create a Quick payment, you can select a bank account that you define in this table.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;">9)<span style=""> </span>ap_bank_accounts_uses_all<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt;"><span style=""> </span></span><span style="font-size: 11pt;">AP_BANK_ACCOUNT_USES_ALL stores information for the internal and external bank accounts you define in Oracle Payables and Oracle<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt;">Receivables applications.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">1)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">po_vendors_all<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">2)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">po_vendors_sites_all<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">3)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">po_headers_all<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><span style=""> </span>po_header_id<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">4)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">po_lines_all<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><span style=""> </span>po_line_id<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">5)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">po_line_locations_All<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 11pt;"><span style="">6)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 11pt;">po_distributions_all<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><span style=""> </span>po_distribution_id,<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 11pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><b><span style=""> </span><o:p></o:p></b></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="">1)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></b><!--[endif]--><b>Gl_code_combinations<o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style="font-size: 11pt;"><span style=""> </span></span></b><span style="font-size: 11pt;"><span style=""> </span></span><span style="font-size: 11pt;">GL_CODE_COMBINATIONS stores valid account combinations for each Accounting Flexfield structure within your Oracle General Ledger application. Associated with each account are certain codes and flags, including whether the account is enabled, whether detail posting or detail budgeting is allowed, and others.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="">2)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></b><!--[endif]--><b>Gl_je_batches.<o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span></b><span style=""> </span><span style="font-size: 11pt;">GL_JE_BATCHES stores journal entry batches.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="">3)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></b><!--[endif]--><b>Gl_je_headers<o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style="font-size: 11pt;"><span style=""> </span></span></b><span style="font-size: 11pt;">GL_JE_HEADERS stores journal entries. There is a one–to–many relationship between journal entry batches and journal entries. Each row in this table includes the associated batch ID, the journal entry name and description, and other information about the journal entry. This table corresponds to the Journals window of the Enter Journals form. STATUS is ’U’ for unposted, ’P’ for posted. Other statuses indicate that an error condition was found. A complete list is below.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="">4)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></b><!--[endif]--><b>Gl_je_lines.<o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span></b><span style=""> </span><span style="font-size: 11pt;">GL_JE_LINES stores the journal entry lines that you enter in the Enter Journals form. There is a one–to–many relationship between journal entries and journal entry lines. Each row in this table stores the associated journal entry header ID, the line number, the associated code combination ID, and the debits or credits associated with the journal line. STATUS is ’U’ for unposted or ’P’ for posted<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="">5)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></b><!--[endif]--><b>Gl_set of books<o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span></b><span style="font-size: 11pt;">GL_SETS_OF_BOOKS stores information about the sets of books you define in your Oracle General Ledger application. Each row includes the set of books name, description, functional currency, and other information. This table corresponds to the Set of Books form.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 11pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="">6)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></b><!--[endif]--><b>Gl_periods<o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span><span style=""> </span><span style=""> </span></b><span style=""> </span><span style="font-size: 11pt;">GL_PERIODS stores information about the accounting periods you define using the Accounting Calendar form. Each row includes the start date and end date of the period, the period type, the fiscal year, the period number, and other information. There is a one–to–many relationship between a row in the GL_PERIOD_SETS table and rows in this table.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="color: purple;"><span style="">1)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="color: purple;">OPEN-DEBIT MEMO REPORT?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style=""> </span>This report shows all the open-debit memo transactions, based on customer number and dates.</p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style=""> </span>Columns<span style=""> </span>:- type, customer_no, trx_no, amt_due, remaining.</p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style=""> </span>Parameter :- type, customer, from_date, to_date.</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="color: purple;"><span style="">2)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="color: purple;">GENERATING POSITIVE PAY FILE FOR BANK REPORT?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in;">Basically this report generates a flat file of all the payments in order to send in to the bank.</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="color: purple;"><span style="">3)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="color: purple;">UPDATE POSITIVEPAY CHECKS REPORT?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in;">This report which updates the data into the (AP) account payables system from the plot file, the file which is sent by bank</p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="color: purple;"><span style="">4)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="color: purple;">UPDATE POSITIVEPAY OUT STANDING CHECKS?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in;">This report which shows the out standing checks<span style="color: red;"><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="color: red;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><b><span style="color: purple;"><span style="">5)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="color: purple;">CUSTOMER PAYMENT DETAILS REPORT?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in;">Which shows each customer original amount, amount pay and due amount based on transaction type (books, pens)</p> <p class="MsoNormal"><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="color: red;">Transaction types in AR <o:p></o:p></span></b></p> <p class="MsoNormal" style="">Credit memo transaction types</p> <p class="MsoNormal" style="">Invoice, debit memo, and charge back transaction types</p> <p class="MsoNormal" style="">Commitment transaction types</p> <p class="MsoNormal"><b><span style="color: red;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="color: red;">Q) HOW DO YOU RECTIFY THE ERRORS IN INTERFACE TABLES?</span></b><span style="color: red;"><o:p></o:p></span></p> <p class="MsoNormal" style="">Depending on the naming convention used, errors appear in either alphabetical order or by error code number<span style="font-size: 16pt;">.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">31) How do u identity its name of report?<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span>System administrator </span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> concurrent </span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> program </span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> define<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span>System administrator </span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> concurrent </span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;"> program </span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;">executable<span style=""> </span><o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">32) <span style=""> </span>Who information’s?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>1) Created by <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>2) Creation date<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>3) Last _updated by<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>4) last_update_date<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>5) last_update_value<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">33) FLEX FIELDS?<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span></span></b><span style="font-size: 13pt;"><span style=""> </span></span><b>Used to capture the additional business information</b>.</p> <table class="MsoTableGrid" style="border: medium none ; width: 465.3pt; border-collapse: collapse;" width="620" border="1" cellpadding="0" cellspacing="0"> <tbody><tr style="height: 0.25in;"> <td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 232.65pt; height: 0.25in;" valign="top" width="310"> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span><span style="color: blue;"><span style=""> </span>DFF<o:p></o:p></span></span></b></p> </td> <td style="border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 232.65pt; height: 0.25in;" valign="top" width="310"> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><span style=""> </span>KFF<o:p></o:p></span></b></p> </td> </tr> <tr style="height: 18.6pt;"> <td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 232.65pt; height: 18.6pt;" valign="top" width="310"> <p class="MsoNormal"><span style="font-size: 13pt;">Additional<o:p></o:p></span></p> </td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 232.65pt; height: 18.6pt;" valign="top" width="310"> <p class="MsoNormal"><span style="font-size: 13pt;">Unique Info, Mandatory<o:p></o:p></span></p> </td> </tr> <tr style="height: 18.6pt;"> <td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 232.65pt; height: 18.6pt;" valign="top" width="310"> <p class="MsoNormal"><span style="font-size: 13pt;">Captured in attribute prefixed columns<o:p></o:p></span></p> </td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 232.65pt; height: 18.6pt;" valign="top" width="310"> <p class="MsoNormal"><span style="font-size: 13pt;">Segment prefixed<o:p></o:p></span></p> </td> </tr> <tr style="height: 0.25in;"> <td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 232.65pt; height: 0.25in;" valign="top" width="310"> <p class="MsoNormal"><span style="font-size: 13pt;">Not reported on standard reports<o:p></o:p></span></p> </td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 232.65pt; height: 0.25in;" valign="top" width="310"> <p class="MsoNormal"><span style="font-size: 13pt;">Is reported on standard reports<o:p></o:p></span></p> </td> </tr> <tr style="height: 108.4pt;"> <td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 232.65pt; height: 108.4pt;" valign="top" width="310"> <p class="MsoNormal">To provide expansion space on your form With the help of []. [] Represents </p> <p class="MsoNormal">descriptive Flex field.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><span style="font-size: 10pt; color: red;">FLEX FILED : DESCRIPTIVE : REGIGSTER<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; color: red;"><o:p> </o:p></span></p> </td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 232.65pt; height: 108.4pt;" valign="top" width="310"> <p class="MsoNormal">Used for entering and displaying key information</p> <p class="MsoNormal">For example Oracle General uses a key Flex field called Accounting Flex field to </p> <p class="MsoNormal">uniquely identifies a general account.</p> <p class="MsoNormal"><span style="font-size: 10pt; color: red;"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; color: red;">FLEX FILED : KEY : REGIGSTER</span><span style="font-size: 13pt; color: red;"><o:p></o:p></span></p> </td> </tr> </tbody></table> <p class="MsoNormal"><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">Oracle Applications KEY FLEX FIELDS<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;">1) GL :- ACCOUNTING<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;">2) AR :- SALES TAX LOCATION, TERRITORY,<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;">3) AP :- BANK DETAILS, COST ALLOCATION, PEOPLE GROUP<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">Oracle Applications DESCRIPTIVE FLEX FIELDS (Partial)<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">1)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">GL :-<span style=""> </span>daily rates<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">2)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">AR :- credit history, information<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>3) PA :- bank branch, payment terms, site address,<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt; color: blue;"><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">34) What are the requests groups?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt; color: fuchsia;"><span style=""> </span>a) Single request: -</span><span style="font-size: 13pt;"> this allows you to submit an individual request.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt; color: fuchsia;"><span style=""> </span>b) Request set<span style=""> </span>: -</span><span style="font-size: 13pt;"> this allows you to submit a pre-defined set of requests.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">35) Sys Admin Module?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>a)</b> Define Custom Users, <b>b)</b> Define Login Users, <b>c)</b> Register oracle DB users, <o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;">d</span></b><span style="font-size: 13pt;">) Define Concurrent Programs, <b>e)</b> Register Concurrent Executables, <b>f)</b> Setting Profile Option Values, <b>g)</b> Define Request Types.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">36) AOL?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>a)</b> Registering tables. <b>b)</b> Registering views <b>c)</b> Registering db sequences<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>d</b>) Registering profile options <b>e)</b> Registering lookups and lookup codes <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>f)</b> Registering forms <b>g</b>) Registering Form and Non-Form functions <b>i)</b> registering<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Menus and sub-menus<b>. <span style=""> </span>j)</b> Registering DFF and KFF. <b>k)</b> Libraries<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">37) What r the type Models in the <i>system parameters</i> of the report? <o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>1) Bit map <span style=""> </span><span style=""> </span>2) Character mode<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">38) .What is <a name="SRWPACKAGE"></a><a href="#SRWPACKAGE" title="SRW Package"><span style=""><span style="text-decoration: none;">SRW Package</span></span></a>?<span style=""> </span></span></b><span style="font-size: 13pt;">(<i>Sql Report Writer)</i><b><span style="color: blue;"><span style=""> </span> <o:p></o:p></span></b></span></p> <p class="MsoNormal"><span style="font-size: 13pt;">The Report builder Built in package know as SRW Package <span style=""> </span>This package extends reports ,Control report execution, output message at runtime, Initialize layout fields, Perform<span style=""> </span>DDL statements<span style=""> </span>used to create or Drop<span style=""> </span>temporary table,<span style=""> </span>Call User Exist, to format width of the columns, to page break the column, to set the colors<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;">Ex: SRW.DO_SQL, It’s like DDL command, we can create table, views , etc.,<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>SRW.SET_FIELD_NUM <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>SRW. SET_FILED_CHAR<i><o:p></o:p></i></span></p> <p class="MsoNormal"><i><span style="font-size: 13pt;"><span style=""> </span></span></i><span style="font-size: 13pt;">SRW. SET FILED _DATE<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">37) Difference between Bind and Lexical parameters?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 9pt;"><b><span style="font-size: 13pt;">BIND VARIABLE : <o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 9pt;"><span style="font-size: 13pt;">-- are used to replace a single value in sql, pl/sql<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 9pt;"><span style="font-size: 13pt;">-- bind variable may be used to replace expressions in select, where, group, order <span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 9pt;"><span style="font-size: 13pt;"><span style=""> </span>by, having, connect by, start with cause of queries.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 9pt;"><span style="font-size: 13pt;">-- bind reference may not be referenced in FROM clause (or) in place of <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 9pt;"><span style="font-size: 13pt;"><span style=""> </span>reserved words or clauses.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 9pt;"><b><span style="font-size: 13pt;">LEXICAL REFERENCE:<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 9pt;"><span style="font-size: 13pt;">-- you can use lexical reference to replace the clauses appearing AFTER select, <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 9pt;"><span style="font-size: 13pt;"><span style=""> </span>from, group by, having, connect by, start with.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 9pt;"><span style="font-size: 13pt;">-- you can’t make lexical reference in a pl/sql statmetns<b>.<o:p></o:p></b></span></p> <p class="MsoNormal" style="margin-left: 9pt;"><b><span style="font-size: 13pt;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">38) <a name="Matirx_Report">Matrix Report</a>:</span></b><span style="font-size: 13pt; color: blue;"> Simple, Group above, Nested <span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;">Simple Matrix Report</span></b><span style="font-size: 13pt;"> : 4 groups<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span>1.Cross Product Group<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>2. Row and Column Group<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>3. Cell Group<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>4. Cell column is the source of a cross product summary that <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>becomes the cell content.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span>Frames</span></b><span style="font-size: 13pt;">: 1.Repeating frame for rows(down direction)<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span>2.Repeating frame for columns(Across )<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span><span style=""> </span>3.Matrix object the intersection of the two repeating frames<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">39) what is <a name="Flex_Confine">Flex mode and Confine mode</a>?<span style=""> </span><o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt;">Confine mode <o:p></o:p></span></b></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;">On:<span style=""> </span>child objects cannot be moved outside their enclosing parent objects.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Off:<span style=""> </span>child objects can be moved outside their enclosing parent objects.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;">Flex mode:<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>On:<span style=""> </span>parent borders "stretch" when child objects are moved against them.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Off:<span style=""> </span>parent borders remain fixed when child objects are moved against <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>them.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">40</span></b><a name="Place_Holder_Column"><b><span style="font-size: 13pt;">) <span style="color: blue;">What is Place holder Columns?</span></span></b></a><b><span style="font-size: 13pt; color: blue;"><span style=""> </span><span style=""> </span><o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>A placeholder is a column is an empty container at design time. The placeholder can hold a value at run time has been calculated and placed in to It by pl/sql code from anther object.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;">You can set the value of a placeholder column is<span style=""> </span>in<span style=""> </span>a Before Report trigger.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Store a Temporary value for future reference. EX.<span style=""> </span>Store the current max salary as records are retrieved.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">23)</span></b><b><span style="font-size: 13pt;"> <a name="Formula_Column"><span style="color: blue;">What is Formula </span></a><span style="color: blue;">Column</span>?<span style=""> </span></span></b><span style="font-size: 13pt;"><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>A formula column performs a user-defined computation on another column(s) data, including placeholder columns.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">24)</span></b><b><span style="font-size: 13pt;"> <a name="Summary_Column"><span style="color: blue;">What is Summary columns?<span style=""> </span></span></a><span style="color: blue;"><o:p></o:p></span></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>A summary column performs a computation on another column's data.<span style=""> </span>Using the Report Wizard or Data Wizard, you can create the following summaries:<span style=""> </span>sum, average, count, minimum, maximum, % total.<span style=""> </span>You can also create a summary column manually in the Data Model view, and use the Property Palette to create the following additional summaries:<span style=""> </span>first, last, standard deviation, variance.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-right: -0.5in;"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">50) What is cursor?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt; color: blue;"><span style=""> </span></span><span style="font-size: 13pt;">A Cursor is a pointer, which works on active set, I.e. which points to only one row at a time in the context area’s ACTIVE SET. A cursor is a construct of pl/sql, used to process multiple rows using a pl/sql block.<o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">28) Types of cursors?<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>1) <b>Implicit</b>: declared for all DML and pl/sql statements.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>By default it selects one row only.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>2) <b>Explicit</b>:<span style=""> </span>Declared and named by the programmer.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Use explicit cursor to individually process each row returned by a<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>Multiple statements, is called ACTIVE SET.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Allows the programmer to manually control explicit cursor in the <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Pl/sql block<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 33.75pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">a)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><b><span style="font-size: 13pt;">declare</span></b><span style="font-size: 13pt;">: create a named sql area<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 33.75pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">b)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><b><span style="font-size: 13pt;">Open</span></b><span style="font-size: 13pt;">: identify the active set.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 33.75pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">c)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><b><span style="font-size: 13pt;">Fetch:</span></b><span style="font-size: 13pt;"> load the current row in to variables.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 33.75pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">d)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><b><span style="font-size: 13pt;">Close</span></b><span style="font-size: 13pt;">: release the active set.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span><span style="color: rgb(255, 102, 0);">CURSOR ATTRIBUTES <o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-left: 37.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">a)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><b><span style="font-size: 13pt;">%is open</span></b><span style="font-size: 13pt;">: evaluates to true if the cursor is open.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 37.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">b)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><b><span style="font-size: 13pt;">%not found</span></b><span style="font-size: 13pt;">: evaluates to true if the most recent fetch does not return a row<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 37.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">c)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><b><span style="font-size: 13pt;">%found</span></b><span style="font-size: 13pt;">: evaluates to true if the most recent fetch returns a row.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 37.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">d)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><b><span style="font-size: 13pt;">%row count</span></b><span style="font-size: 13pt;">: evaluates to the total number of rows returned to far.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 10pt; font-family: Verdana; color: blue;">Example for cursor:<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">1)<span style=""> </span>Declare <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Vno emp.empno%type;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Vname emp.ename %type;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Cursor emp_cursor is <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Select empno,ename<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>From emp;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Begin<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Open cursor; <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>For I in 1..10 loop<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Fetch emp_cursor into vno,vname;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Dbms_output.putline(to_char(vno) ||’ ‘||vname);<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>End if;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>E nd;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">2)<span style=""> </span>Begin <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Open emp_cursor;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span><st1:place st="on">Loop</st1:place> <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Fetch when emp_cursor % rowcount >10 or <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Emp_curor % not found;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Bdms_output_put_line(to_char(vno)||’ ‘|| vname);<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>End loop;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Close emp_cursor;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>End;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;"><span style=""> </span>CURSOR FOR <st1:place st="on">LOOP</st1:place><o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 40.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">A)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">cursor for loop is a short cut to process explicit cursors<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 40.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">B)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">it has higher performance<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 40.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">C)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">cursor for loop requires only the declaration of the cursor, remaining things like opening, fetching and close are automatically take by the cursor for loop<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 10pt; font-family: Verdana; color: blue;">Example:<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>1)<span style=""> </span>Declare <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Cursor emp_cursor is <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Select empno,ename<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>From emp;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Begin<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>For emp_record in emp_cursor loop<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span><span style=""> </span>Dbms_output.putline(emp_record.empno);<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Dbms_output.putline(emp_record.ename)<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>End loop<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span><span style=""> </span>End;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="color: blue;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="color: blue;">Can we create a cursor without declaring it?</span></b><b><span style="font-size: 10pt; font-family: Verdana;"><o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 10pt; font-family: Verdana;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">Yes – by using cursor for loop using subqueries.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 10pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 31.45pt;"><span style="font-size: 10pt;">BEGIN<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 31.45pt;"><span style="font-size: 10pt;"><span style=""> </span>FOR emp_record IN ( SELECT empno, ename<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 31.45pt;"><span style="font-size: 10pt;"><span style=""> </span><span style=""> </span>FROM<span style=""> </span>emp) LOOP<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 31.45pt;"><span style="font-size: 10pt;"><span style=""> </span>-- implicit open and implicit fetch occur<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 31.45pt;"><span style="font-size: 10pt;"><span style=""> </span>IF emp_record.empno = 7839 THEN<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 31.45pt;"><span style="font-size: 10pt;"><span style=""> </span>...<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 31.45pt;"><span style="font-size: 10pt;"><span style=""> </span>END LOOP; -- implicit close occurs<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 31.45pt;"><span style="font-size: 10pt;">END;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 31.45pt;"><span style="font-size: 10pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;"><span style=""> </span>a) for update clause:<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>1) use explicit locking to deny access for the duration of a transaction <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>2) lock the rows before update or delete <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Ex : select …….<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>From…….<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>For update[ of column ref] [no_wait]<o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt;"><span style=""> </span><o:p></o:p></span></b></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;"><span style=""> </span>b) where current of clause?<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt;"><span style=""> </span></span></b><span style="font-size: 13pt;"><span style=""> </span>1) use cursor to update or delete the current row <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Where current of <><o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">29) Attribute data types?<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>1) %type 2) %row type.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">30) Exception Handilings?<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Is a mechanism provided by pl/sql to detect runtime errors and process them with out halting the program abnormally<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 73.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">1)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">pre-defined<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 73.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">2)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">user-defined.<o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt;">PRE-DEFINED: <o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 36.75pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">1)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">cursor_already_open--------attempted to open an already open cursor.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 36.75pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">2)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">Dup_val_on_index<span style=""> </span>--------attempted to insert a duplicate values.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 36.75pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">3)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">Invalid_cursor<span style=""> </span>-------- illegal cursor operation occurred.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 36.75pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">4)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">Invalid_number<span style=""> </span>-------- conversion of character string to number fails.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 36.75pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">5)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">Login_denied<span style=""> </span><span style=""> </span>---------loging on to oracle with an invalid user name <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 18.75pt;"><span style="font-size: 13pt;"><span style=""> </span>and password.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 18.75pt;"><span style="font-size: 13pt;">6) program_error<span style=""> </span>-------- pl/sql has an internal problem.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 18.75pt;"><span style="font-size: 13pt;">7) storage_error<span style=""> </span>-------- pl/sql ran out of memory or memory is <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 18.75pt;"><span style="font-size: 13pt;"><span style=""> </span>corrupted.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 18.75pt;"><span style="font-size: 13pt;">8) to_many_row<span style=""> </span>---------single row select returned more than one row.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 18.75pt;"><span style="font-size: 13pt;">9) value_error<span style=""> </span>-------- arithmetic,conversion,truncation or size <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 18.75pt;"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>constraint error occurred.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 18.75pt;"><span style="font-size: 13pt;">10) zero_devided<span style=""> </span>-------- attempted to divided by zero.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 18.75pt;"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt;">USER-DEFINED:<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Declare<span style=""> </span>: name the exception <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Raise<span style=""> </span>: explicitly raise the exception by using the raise statements<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Reference: exception handing section.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt;">The Raise_Application_Error_Procedure:<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 39.75pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt; font-family: Wingdings;"><span style="">n<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">You can use this procedure to issue user-defined error messages from stored sub programs.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 39.75pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt; font-family: Wingdings;"><span style="">n<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">You can report errors to your applications and avoid returning unhandled exceptions.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 21.75pt;"><span style="font-size: 13pt;"><span style=""> </span><b><i>Raise_Application_Error(error_number,message[,{true/false}]<o:p></o:p></i></b></span></p> <p class="MsoNormal" style="margin-left: 21.75pt;"><span style="font-size: 13pt;"><span style=""> </span>Error number </span><span style="font-size: 13pt; font-family: Wingdings;"><span style="">è</span></span><span style="font-size: 13pt;"> between -20000 to -20999<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 21.75pt;"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt;">pragma exception_init?<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>It tells the compiler to associate an exception with an oracle error. <u>To get an error message of a specific oracle error.<o:p></o:p></u></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Ex: pragma exception_init(exception name, oracle error number) <o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">Example for Exceptions?<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;"><span style=""> </span>1) Check the record is exist or not?</span></b><b><span style="font-size: 13pt;"><o:p></o:p></span></b></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt;"><span style=""> </span></span></b><span style="font-size: 13pt;"><span style=""> </span>Declare<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>E<span style=""> </span>emp% rowtype<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Begin<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>e.empno := &empno;<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>select * into e from emp where empno =e.empno;<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span></span><span style="font-size: 10pt; font-family: Verdana;">Dbms_output.putline(‘empno’ || e.empno);<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Exception <o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>When no_data_found then<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Dbms_output.putline(e.empno ||’doest exist’);<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>End;<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana; color: blue;"><span style=""> </span><b>2) User defined exceptions?<o:p></o:p></b></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span></span></b><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Define p_dept_desc =’gvreddy’<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Define p_dept_number =1236<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span><span style=""> </span><span style=""> </span><span style=""> </span>Declare<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>E_invalid_dept exception;<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Begin<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Update departments<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Set dept_name=’&p_dept_desc’<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Where dept_id =’&p_dept_number’;<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span><span style=""> </span>If sql% not found then<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span><span style=""> </span>Raise e_invalid_departments;<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span><span style=""> </span>End if;<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span><span style=""> </span>Commit;<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Exception<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>When e_invalid_departments then<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span>Dbms_output.putline(‘no such dept’);<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span><span style=""> </span>End;<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: Verdana;"><span style=""> </span></span><span style="font-size: 13pt;"><o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">52) what is REF Cursor?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>To execute a multi-row query, oracle opens an unnamed work area that stores processing information, to access the information, an explicit, which names the work area or, a cursor variable, which points to the work area.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>where as a cursor always refers to the same query work area,<span style=""> </span>a cursor variable can refer to a different work areas, cursor variable area like ‘c’ or ‘pascal’ pointers, which hold the memory location(address) of some object instead of the object itself.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;">So, declaring a cursor variable creates a pointers, not an object.<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">32) Can u define exceptions twice in same block?<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>No<o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">33) Can you have two functions with the same name in a pl/sql block?<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Yes<o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">34) Can you have two stored functions with in the same name?<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Yes<o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">35) Can function be overload?<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Yes<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 27.75pt; text-indent: -24.75pt;"><!--[if !supportLists]--><b><span style="font-size: 13pt; color: blue;"><span style="">36)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span></b><!--[endif]--><b><span style="font-size: 13pt; color: blue;">What is the maximum number of statements that can be specified in a trigger statement?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 27.75pt;"><span style="font-size: 13pt;">One.<o:p></o:p></span></p> <p class="MsoNormal" style=""><b><span style="font-size: 13pt; color: blue;">32) Stored procedure?<o:p></o:p></span></b></p> <p class="MsoNormal" style=""><span style="font-size: 13pt;"><span style=""> </span>Stored procedure is a sequence of statements that perform specific function.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">53) What is procedure?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>----<span style=""> </span>is a named pl/sql block to perform a specific task.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>----<span style=""> </span>A procedure may have DML statements.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span>----<span style=""> </span>It may or may not return a value.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>----<span style=""> </span>Procedure can return more than one value.<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">Example for procedure<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt; color: blue;"><span style="">1)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt; color: blue;">To accept the year as a parameter and list emp belong to the year?<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Create or replace <o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;"><span style=""> </span>Procedure empy(y number) is<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span>Cursor emp_cursor is <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span><span style=""> </span>Select * from emp where to_char(hiredate,’yyyy’)=’y’;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>Emp_record<span style=""> </span>emp%rowtype;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Begin<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>For emp_record in emp_cursor loop<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span>Print (emp_record.empno);<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>Print (emp_record.ename);<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>Print (emp_record.sal);<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>End loop;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>End;<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;">Output :<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span></span></b><span style="font-size: 13pt;"><span style=""> </span>var empx number;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Begin <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>:empx := ‘1234’;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>End;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Exec empy(:empx);<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Print empy;<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">54) What is function?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>---- is a named pl/sql block to perform a specific task, is mainly used for calculation purpose.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>---- A function is called as part of an exception.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>---- Every function should return a value<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">Example for function<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Create or replace <o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;"><span style=""> </span>Function get_sal(p_id in emp.emp_no% type) <o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;"><span style=""> </span>Return number<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;"><span style=""> </span>Is <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span><span style=""> </span>v_sal emp.sal%type :=0;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Begin<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Select salary into v_salary <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>From emp<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Where emp_no = p_id;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>Return v_salary <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>End get_sal;<span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>End;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;">Output :<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span></span></b><span style="font-size: 13pt;"><span style=""> </span>var g_sal <span style=""> </span>number;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Exec :g_sal := get_sal(99);<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>Print g_salary;<o:p></o:p></span></p> <p><b><span style="color: blue;">9.Can functions be overloaded ?<o:p></o:p></span></b></p> <p><b>Yes.<o:p></o:p></b></p> <p><b><span style="color: blue;">10.Can 2 functions have same name & input parameters but differ only by return datatype<o:p></o:p></span></b></p> <p><b>No.<o:p></o:p></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">55) What is the package?<span style=""> </span><o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>---- Group logically related pl/sql types, items and subprograms.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 95.25pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">1)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">package specification<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 95.25pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">2)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">package body<o:p></o:p></span></p> <p class="MsoNormal"><b style=""><span style="font-size: 10pt; font-family: Verdana; color: blue;">Advantages of a package:<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in;"><b style=""><span style="font-size: 10pt; font-family: Verdana;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span style="">·<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Verdana;">Modularity <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span style="">·<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Verdana;">Easier Application Design <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span style="">·<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Verdana;">Information Hiding <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 63pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span style="">·<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Verdana; color: black;">Overloading</span><b style=""><span style="font-size: 10pt; font-family: Verdana;"><o:p></o:p></span></b></p> <p class="MsoNormal" style=""><b style=""><span style="font-size: 10pt; font-family: Verdana;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style=""><b style=""><span style="font-size: 10pt; font-family: Verdana; color: blue;">You cannot overload:<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 1in;">•Two subprograms if their formal parameters differ only in name or parameter mode. (datatype and their total number is same).</p> <p class="MsoNormal" style="margin-left: 1in;">•Two subprograms if their formal parameters differ only in datatype and the different datatypes are in the same family (number and decimal belong to the same family)</p> <p class="MsoNormal" style="margin-left: 1in;">•Two subprograms if their formal parameters differ only in subtype and the different subtypes are based on types in the same family (VARCHAR and STRING are subtypes of VARCHAR2)</p> <p class="MsoNormal">•Two functions that differ only in return type, even if the types are in different families.</p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="color: blue;">56) What is FORWARD DECLARATION in Packages?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-size: 10pt; font-family: Verdana;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 35pt;">PL/SQL allows for a special subprogram declaration called a forward declaration. It consists of the subprogram specification in the package body terminated by a semicolon. You can use forward declarations to do the following:</p> <p class="MsoNormal" style="margin-left: 35pt;">• Define subprograms in logical or alphabetical order.</p> <p class="MsoNormal" style="margin-left: 35pt;">• Define mutually recursive subprograms.(both calling each other).</p> <p class="MsoNormal" style="margin-left: 35pt;">• Group subprograms in a package</p> <p class="MsoNormal" style="margin-left: 35pt;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 35pt;"><b style="">Example of forward Declaration:<o:p></o:p></b></p> <p class="MsoNormal" style="margin-left: 35pt;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 80pt; text-indent: -45pt;">CREATE OR REPLACE PACKAGE BODY forward_pack </p> <p class="MsoNormal" style="margin-left: 80pt; text-indent: -45pt;">IS</p> <p class="MsoNormal" style="margin-left: 80pt; text-indent: -45pt;">PROCEDURE calc_rating(. . .);<span style=""> </span><span style=""> </span>-- forward declaration<span style=""> </span></p> <p class="MsoNormal" style="margin-left: 80pt; text-indent: -45pt;">PROCEDURE award_bonus(. . .) </p> <p class="MsoNormal" style="margin-left: 80pt; text-indent: -45pt;"><span style=""> </span>IS<span style=""> </span><span style=""> </span>-- subprograms defined </p> <p class="MsoNormal" style="margin-left: 80pt; text-indent: -45pt;"><span style=""> </span>BEGIN<span style=""> </span><span style=""> </span>-- in alphabetical order</p> <p class="MsoNormal" style="margin-left: 80pt; text-indent: -45pt;"><span style=""> </span>calc_rating(. . .);<span style=""> </span></p> <p class="MsoNormal" style="margin-left: 80pt; text-indent: -45pt;"><span style=""> </span>. . .</p> <p class="MsoNormal" style="margin-left: 80pt; text-indent: -45pt;"><span style=""> </span>END;</p> <p class="MsoNormal" style="margin-left: 80pt; text-indent: -45pt;"><span style=""> </span></p> <p class="MsoNormal" style="margin-left: 80pt; text-indent: -45pt;"><span style=""> </span>PROCEDURE calc_rating(. . .) </p> <p class="MsoNormal" style="margin-left: 80pt; text-indent: -45pt;"><span style=""> </span>IS</p> <p class="MsoNormal" style="margin-left: 0.5in;"><b style=""><span style="color: black;"><span style=""> </span></span></b>BEGIN</p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style=""> </span>. . .</p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style=""> </span>END;</p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style=""> </span></p> <p class="MsoNormal" style="margin-left: 0.5in;">END forward_pack;<span style="color: yellow; display: none;"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 35pt;"><span style="font-size: 10pt;"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">56) What are triggers?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>---- triggers are similar to procedures, in that they are the named pl/sql blocks with declarative, executable and exception-handling sections, how ever a procedure is executed explicitly from another block via a procedure call, which can also pass arguments.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style="color: rgb(51, 102, 255);">---- A trigger is executed implicitly when ever a particular event task places. And is nothing but a event.<o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>---- The triggering event is a DML (insert, update, delete) operations on a data base table<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;">----- fires whenever a data event(such as DML) or system event(such as login or shutdown) occurs on a schema or database <o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">Trigger timing :</span></b><span style="font-size: 13pt;"><span style=""> </span>1) before<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>2) after<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>3) instead of ( this is used for views)<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">Triggering events</span></b><span style="font-size: 13pt;"> : 1) insert<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>2)update<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>3) delete<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">Trigger type :<span style=""> </span></span></b><span style="font-size: 13pt;">1) statement level<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>2) row level<span style="color: blue;">.<o:p></o:p></span></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">Firing sequence of database triggers<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">1)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">before statement trigger<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">2)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">before row trigger<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">3)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">after row trigger<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 13pt;"><span style="">4)<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 13pt;">after statement trigger<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">Ex:<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">1)<span style=""> </span><span style=""> </span>Create or replace trigger secure_emp<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><span style=""> </span></span></b><span style="font-size: 13pt;"><span style=""> </span>Before <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Insert<span style=""> </span>on emp<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Begin<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>If (to_char(sysdate,’dy’) in(‘sat’,’sun’)) or <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>To_char(sysdate,’hh24:mi’)<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Not between ’08:00’ and ’18:00’)<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;">Then raise_application_error(-20500,’u can insert in the office timings’)<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;">End if;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;">End;<o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">Ex :-<span style=""> </span>2)<span style=""> </span>write a program to all transitions with name smith?<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span></span></b><span style="font-size: 13pt;">Create or replace<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Trigger trigger_name<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Before insert or update or delete <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>On emp<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-size: 13pt;"><span style=""> </span>For each row<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>When (old.ename =’smith’ or <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>New.ename =’smith’)<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Begin <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Raise_application_error(-20003,’smith’);<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>End;<span style="color: blue;"><o:p></o:p></span></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><span style=""> </span>57) Difference between triggers and procedures?<o:p></o:p></span></b></p> <table class="MsoTableGrid" style="border: medium none ; border-collapse: collapse;" border="1" cellpadding="0" cellspacing="0"> <tbody><tr style="height: 22.9pt;"> <td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 214.45pt; height: 22.9pt;" valign="top" width="286"> <p class="MsoNormal"><span style="font-size: 13pt;">Defined with create <b>trigger</b><o:p></o:p></span></p> </td> <td style="border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 214.45pt; height: 22.9pt;" valign="top" width="286"> <p class="MsoNormal"><span style="font-size: 13pt;">Defined with create <b>procedure</b><o:p></o:p></span></p> </td> </tr> <tr style="height: 44pt;"> <td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 214.45pt; height: 44pt;" valign="top" width="286"> <p class="MsoNormal"><span style="font-size: 13pt;">The data dictionary contains source code in the user_triggers.<o:p></o:p></span></p> </td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 214.45pt; height: 44pt;" valign="top" width="286"> <p class="MsoNormal"><span style="font-size: 13pt;">Data dictionary contains source code in user_source<o:p></o:p></span></p> </td> </tr> <tr style="height: 22pt;"> <td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 214.45pt; height: 22pt;" valign="top" width="286"> <p class="MsoNormal"><span style="font-size: 13pt;">Implicitly invoked<o:p></o:p></span></p> </td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 214.45pt; height: 22pt;" valign="top" width="286"> <p class="MsoNormal"><span style="font-size: 13pt;">Explicitly invoked<o:p></o:p></span></p> </td> </tr> <tr style="height: 44.9pt;"> <td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 214.45pt; height: 44.9pt;" valign="top" width="286"> <p class="MsoNormal"><span style="font-size: 13pt;">Commit, save point and rollback are not allowed(TCL)<o:p></o:p></span></p> </td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 214.45pt; height: 44.9pt;" valign="top" width="286"> <p class="MsoNormal"><span style="font-size: 13pt;">Those are allowed<o:p></o:p></span></p> </td> </tr> </tbody></table> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">58) LOCKS?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style=""> </span>-- Is to reduce concurrency</p> <p class="MsoNormal"><span style=""> </span>1) <b>share lock<o:p></o:p></b></p> <p class="MsoNormal"><span style=""> </span>---it allows the other users for only reading not to insert or update or delete.</p> <p class="MsoNormal"><span style=""> </span>2) <b>exclusive lock<o:p></o:p></b></p> <p class="MsoNormal"><span style=""> </span>--- only one user can have the privileges of insert or update and delete of particular object</p> <p class="MsoNormal"><span style=""> </span>--- others can only read.</p> <p class="MsoNormal"><span style=""> </span>3) <b>update lock<o:p></o:p></b></p> <p class="MsoNormal"><span style=""> </span>----multiple user can read, update delete </p> <p class="MsoNormal"><span style=""> </span><b><span style="color: fuchsia;">Lock levels :<o:p></o:p></span></b></p> <p class="MsoNormal"><span style=""> </span>1) table level<span style=""> </span>2) table space 3) data base level.</p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><span style=""> </span><o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">58) What is template?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>a) </span>The TEMPLATE form is the required starting point for all development of new </p> <p class="MsoNormal"><span style=""> </span>Forms. </p> <p class="MsoNormal"><span style=""> </span>b) The TEMPLATE form includes platform–independent attachments of several </p> <p class="MsoNormal"><span style=""> </span>Libraries. </p> <p class="MsoNormal"><span style=""> </span><b><span style="color: blue;">APPSCORE :-</span></b> It contains package and procedures that are required of all forms to support<span style=""> </span>the MENUS ,TOOLBARS.</p> <p class="MsoNormal"><span style=""> </span><b><span style="color: blue;">APPSDAYPK :-</span></b> It contains packages that control the oracle applications CALENDER FEATURES.</p> <p class="MsoNormal"><span style="color: blue;"><span style=""> </span><b>FNDSQF<span style=""> </span>:-</b></span> it contains packages and procedures for MESSAGE DICTONARY, FLEX FIELDS, PROFILES AND CONCURRENT PROCESSING.</p> <p class="MsoNormal"><b><span style=""> </span><span style=""> </span><span style="color: blue;">CUSTOM :-</span></b> it allows extension of oracle applications forms with out modification of oracle application code, you can use the custom library for customization such as <b>zoom</b><span style=""> </span>( such as moving to another form and querying up specific records)</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><b style=""><span style="color: blue;">59)<span style=""> </span>What are ad-hoc reports?<o:p></o:p></span></b></p> <p class="MsoNormal">Ans.:<span style=""> </span>Ad-hoc Report is made to meet one-time reporting needs. Concerned with or formed for a<span style=""> </span></p> <p class="MsoNormal"><span style=""> </span>particular purpose. For example, ad hoc tax codes or an ad hoc database query</p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;"><o:p> </o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt; color: blue;">60) What is responsibility?<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Is collection of menus, request security groups and data groups<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b><span style=""> </span>Menus</b>: collection of forms is nothing but menus<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>Request security groups</b>: collection of programs.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span><b>Data groups</b>: is a group of modules to be made accessible by the user through <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><span style=""> </span>Responsibility <o:p></o:p></span></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span>System admin</span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;">security</span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;">define<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><span style=""> </span><span style=""> </span>Security</span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;">user</span></b><b><span style="font-size: 13pt; font-family: Wingdings;"><span style="">à</span></span></b><b><span style="font-size: 13pt;">define<o:p></o:p></span></b></p> <p class="MsoNormal"><b><span style="font-size: 13pt;"><o:p> </o:p></span></b></p> <p class="MsoBodyText3"><span style="font-size: 13pt; color: blue;">61) </span><span style="font-family: Arial; color: blue;">What are different execution methods of executabls?<o:p></o:p></span></p> <p class="MsoBodyText3"><span style="font-size: 10pt; font-family: Arial; font-weight: normal;"><span style=""> </span><o:p></o:p></span></p> <p class="MsoBodyText3"><span style="font-size: 10pt; font-family: Arial; font-weight: normal;">FlexRpt<span style=""> </span><span style=""> </span>The execution file is wrnitten using the FlexReport API.<o:p></o:p></span></p> <p class="MsoBodyText3"><span style="font-size: 10pt; font-family: Arial; font-weight: normal;">FlexSql<span style=""> </span><span style=""> </span>The execution file is written using the FlexSql API.<o:p></o:p></span></p> <p class="MsoBodyText3"><span style="font-size: 10pt; font-family: Arial; font-weight: normal;">Host<span style=""> </span><span style=""> </span>The execution file is a host script.<o:p></o:p></span></p> <p class="MsoBodyText3"><span style="font-size: 10pt; font-family: Arial; font-weight: normal;">Oracle Reports<span style=""> </span><span style=""> </span>The execution file is an Oracle Reports file.<o:p></o:p></span></p> <p class="MsoBodyText3"><span style="font-size: 10pt; font-family: Arial; font-weight: normal;">PL/SQL Stored Procedure<span style=""> </span>The execution file is a stored procedure.<o:p></o:p></span></p> <p class="MsoBodyText3"><span style="font-size: 10pt; font-family: Arial; font-weight: normal;">SQL*Loader<span style=""> </span><span style=""> </span>The execution file is a SQL script.<o:p></o:p></span></p> <p class="MsoBodyText3"><span style="font-size: 10pt; font-family: Arial; font-weight: normal;">SQL*Plus<span style=""> </span><span style=""> </span>The execution file is a SQL*Plus script.<o:p></o:p></span></p> <p class="MsoBodyText3"><span style="font-size: 10pt; font-family: Arial; font-weight: normal;">SQL*Report<span style=""> </span><span style=""> </span>The execution file is a SQL*Report script.<o:p></o:p></span></p> <p class="MsoBodyText3"><span style="font-size: 10pt; font-family: Arial; font-weight: normal;">Spawned<span style=""> </span><span style=""> </span>The execution file is a C or Pro*C program.<o:p></o:p></span></p> <p class="MsoBodyText3" style="margin-left: 2in; text-indent: -2in;"><span style="font-size: 10pt; font-family: Arial; font-weight: normal;">Immediate<span style=""> </span>The execution file is a program written to run as a subroutine of the concurrent manager. We recommend against defining new immediate concurrent programs, and suggest you use either a PL/SQL Stored Procedure or a Spawned C Program instead.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 13pt;"><o:p> </o:p></span></p> <p class="MsoNormal"><b style=""><span style="color: blue;">Composite Datatypes</span></b><span style="color: blue;"> :<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Verdana;">–<span style=""> </span>PL/SQL TABLES<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Verdana;">–<span style=""> </span>PL/SQL RECORDS <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 51pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt;"><span style="">-<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Verdana;">Nested TABLE <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 51pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt;"><span style="">-<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Verdana;">VARRAY<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="color: blue;">What is the sequence of functions – group by,having,orderby in a select statements ?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Verdana;">Select…..<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Verdana;">Group by…<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Verdana;">Having…<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Verdana;">Orderby..<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Verdana;"><o:p> </o:p></span></p> <p class="MsoNormal"><b><span style="color: blue;">Difference between User and Super User?<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Verdana;">User : login user or front end user<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Verdana;">Super user : it has full access of particular module<o:p></o:p></span></p> Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-58810589161425631442008-07-17T20:39:00.000-07:002008-07-17T20:40:19.261-07:00Introduction to Structured Query LanguageThis page is a introductory tutorial of the Structured Query Language (also known as SQL) and is a pioneering effort on the World Wide Web, as this is the first comprehensive SQL tutorial available on the Internet. SQL allows users to access data in relational database management systems, such as Oracle, Sybase, Informix, Microsoft SQL Server, Access, and others, by allowing users to describe the data the user wishes to see. SQL also allows users to define the data in a database, and manipulate that data. This page will describe how to use SQL, and give examples. The SQL used in this document is "ANSI", or standard SQL, and no SQL<br />features of specific database management systems will be discussed until the "Nonstandard SQL" section. It is recommended that you print this page, so that you can easily refer back to previous examples. Also, you may be interested in joining the new SQL Club on Yahoo!, where you can read or enter messages in a SQL forum.<br /><br />Basics of the SELECT Statement<br />In a relational database, data is stored in tables. An example table would relate Social Security Number, Name,<br />and Address:<br />EmployeeAddressTable<br />SSN FirstName LastName Address City State<br />512687458 Joe Smith 83 First Street Howard Ohio<br />758420012 Mary Scott 842 Vine Ave. Losantiville Ohio<br />102254896 Sam Jones 33 Elm St. Paris New York<br />876512563 Sarah Ackerman 440 U.S. 110 Upton Michigan<br /><br />Now, let's say you want to see the address of each employee. Use the SELECT statement, like so:<br /><br />SELECT FirstName, LastName, Address, City, State<br />FROM EmployeeAddressTable;<br /><br />The following is the results of your query of the database:<br />First Name Last Name Address City State<br />Joe Smith 83 First Street Howard Ohio<br />Mary Scott 842 Vine Ave. Losantiville Ohio<br />Sam Jones 33 Elm St. Paris New York<br />Sarah Ackerman 440 U.S. 110 Upton Michigan<br /><br />To explain what you just did, you asked for the all of data in the EmployeeAddressTable, and specifically, you asked for the columns called FirstName, LastName, Address, City, and State. Note that column names and table names do not have spaces...they must be typed as one word; and that the statement ends with a semicolon (;). The general form for a SELECT statement, retrieving all of the rows in the table is:<br />SELECT ColumnName, ColumnName, ...<br />FROM TableName;<br /><br />To get all columns of a table without typing all column names, use:<br />SELECT * FROM TableName;<br /><br />Each database management system (DBMS) and database software has different methods for logging in to the database and entering SQL commands; see the local computer "guru" to help you get onto the system, so that you can use SQL.<br />Conditional Selection To further discuss the SELECT statement, let's look at a new example table (for hypothetical purposes only):<br /><br />EmployeeStatisticsTable<br />EmployeeIDNo Salary Benefits Position<br />010 75000 15000 Manager<br />105 65000 15000 Manager<br />152 60000 15000 Manager<br />215 60000 12500 Manager<br />244 50000 12000 Staff<br />300 45000 10000 Staff<br />335 40000 10000 Staff<br />400 32000 7500 Entry-Level<br />441 28000 7500 Entry-Level<br /><br />Relational Operators<br />There are six Relational Operators in SQL, and after introducing them, we'll see how they're used:<br />= Equal<br />< or != (see<br />manual) Not Equal<br />< Less Than<br />> Greater Than<br /><= Less Than or Equal To<br />>= Greater Than or Equal<br /><br />To<br />The WHERE clause is used to specify that only certain rows of the table are displayed, based on the criteria described in that WHERE clause. It is most easily understood by looking at a couple of examples. If you wanted to see the EMPLOYEEIDNO's of those making at or over $50,000, use the following:<br />SELECT EMPLOYEEIDNO<br />FROM EMPLOYEESTATISTICSTABLE<br />WHERE SALARY >= 50000;<br /><br />Notice that the >= (greater than or equal to) sign is used, as we wanted to see those who made greater than<br />$50,000, or equal to $50,000, listed together. This displays:<br />EMPLOYEEIDNO<br />------------<br />010<br />105<br />152<br />215<br />244<br /><br />The WHERE description, SALARY >= 50000, is known as a condition (an operation which evaluates to True or False). The same can be done for text columns:<br />SELECT EMPLOYEEIDNO<br />FROM EMPLOYEESTATISTICSTABLE<br />WHERE POSITION = 'Manager';<br />This displays the ID Numbers of all Managers. Generally, with text columns, stick to equal to or not equal to, and make sure that any text that appears in the statement is surrounded by single quotes ('). Note: Position is now an illegal identifier because it is now an unused, but reserved, keyword in the SQL-92 standard.<br />More Complex Conditions: Compound Conditions / Logical Operators<br />The AND operator joins two or more conditions, and displays a row only if that row's data satisfies ALL conditions listed (i.e. all conditions hold true). For example, to display all staff making over $40,000, use:<br /><br />SELECT EMPLOYEEIDNO<br />FROM EMPLOYEESTATISTICSTABLE<br />WHERE SALARY > 40000 AND POSITION = 'Staff';<br />The OR operator joins two or more conditions, but returns a row if ANY of the conditions listed hold true. To see all those who make less than $40,000 or have less than $10,000 in benefits, listed together, use the following query:<br /><br />SELECT EMPLOYEEIDNO<br />FROM EMPLOYEESTATISTICSTABLE<br />WHERE SALARY < 40000 OR BENEFITS < 10000;<br />AND & OR can be combined, for example:<br />SELECT EMPLOYEEIDNO<br />FROM EMPLOYEESTATISTICSTABLE<br />WHERE POSITION = 'Manager' AND SALARY > 60000 OR BENEFITS > 12000;<br />First, SQL finds the rows where the salary is greater than $60,000 and the position column is equal to Manager, then taking this new list of rows, SQL then sees if any of these rows satisfies the previous AND condition or the condition that the Benefits column is greater than $12,000. Subsequently, SQL only displays this second new list of rows, keeping in mind that anyone with Benefits over $12,000 will be included as the OR operator includes a row if either resulting condition is True. Also note that the AND operation is done first.To generalize this process, SQL performs the AND operation(s) to determine the rows where the AND<br />operation(s) hold true (remember: all of the conditions are true), then these results are used to compare with the OR conditions, and only display those remaining rows where any of the conditions joined by the OR operator hold true (where a condition or result from an AND is paired with another condition or AND result to use to evaluate the OR, which evaluates to true if either value is true). Mathematically, SQL evaluates all of the<br />conditions, then evaluates the AND "pairs", and then evaluates the OR's (where both operators evaluate left to right).<br />To look at an example, for a given row for which the DBMS is evaluating the SQL statement Where clause to determine whether to include the row in the query result (the whole Where clause evaluates to True), the DBMS has evaluated all of the conditions, and is ready to do the logical comparisons on this result:<br />True AND False OR True AND True OR False AND False<br />First simplify the AND pairs:<br />False OR True OR False<br />Now do the OR's, left to right:<br />True OR False<br />True<br />The result is True, and the row passes the query conditions. Be sure to see the next section on NOT's, and the order of logical operations. I hope that this section has helped you understand AND's or OR's, as it's a difficult subject to explain briefly. To perform OR's before AND's, like if you wanted to see a list of employees making a large salary ($50,000)<br />or have a large benefit package ($10,000), and that happen to be a manager, use parentheses:<br /><br />SELECT EMPLOYEEIDNO<br />FROM EMPLOYEESTATISTICSTABLE<br />WHERE POSITION = 'Manager' AND (SALARY > 50000 OR BENEFITS > 10000);<br />IN & BETWEEN<br /><br />An easier method of using compound conditions uses IN or BETWEEN. For example, if you wanted to list all managers and staff:<br />SELECT EMPLOYEEIDNO<br />FROM EMPLOYEESTATISTICSTABLE<br />WHERE POSITION IN ('Manager', 'Staff');<br /><br />or to list those making greater than or equal to $30,000, but less than or equal to $50,000, use:<br />SELECT EMPLOYEEIDNO<br />FROM EMPLOYEESTATISTICSTABLE<br />WHERE SALARY BETWEEN 30000 AND 50000;<br />To list everyone not in this range, try:<br /><br />6<br />SELECT EMPLOYEEIDNO<br />FROM EMPLOYEESTATISTICSTABLE<br />WHERE SALARY NOT BETWEEN 30000 AND 50000;<br />Similarly, NOT IN lists all rows excluded from the IN list.<br />Additionally, NOT's can be thrown in with AND's & OR's, except that NOT is a unary operator (evaluates one<br />condition, reversing its value, whereas, AND's & OR's evaluate two conditions), and that all NOT's are<br />performed before any AND's or OR's.<br />SQL Order of Logical Operations (each operates from left to right)<br />1. NOT<br />2. AND<br />3. OR<br />Using LIKE<br />Look at the EmployeeStatisticsTable, and say you wanted to see all people whose last names started with "S";<br />try:<br />SELECT EMPLOYEEIDNO<br />FROM EMPLOYEEADDRESSTABLE<br />WHERE LASTNAME LIKE 'S%';<br />The percent sign (%) is used to represent any possible character (number, letter, or punctuation) or set of<br />characters that might appear after the "S". To find those people with LastName's ending in "S", use '%S', or if<br />you wanted the "S" in the middle of the word, try '%S%'. The '%' can be used for any characters in the same<br />position relative to the given characters. NOT LIKE displays rows not fitting the given description. Other<br />possibilities of using LIKE, or any of these discussed conditionals, are available, though it depends on what<br />DBMS you are using; as usual, consult a manual or your system manager or administrator for the available<br />features on your system, or just to make sure that what you are trying to do is available and allowed. This<br />disclaimer holds for the features of SQL that will be discussed below. This section is just to give you an idea of<br />the possibilities of queries that can be written in SQL.<br />Joins<br />In this section, we will only discuss inner joins, and equijoins, as in general, they are the most useful. For more<br />information, try the SQL links at the bottom of the page.<br />Good database design suggests that each table lists data only about a single entity, and detailed information can<br />be obtained in a relational database, by using additional tables, and by using a join.<br />First, take a look at these example tables:<br />AntiqueOwners<br />OwnerID OwnerLastName OwnerFirstName<br /><br />7<br /><br />01 Jones Bill<br />02 Smith Bob<br />15 Lawson Patricia<br />21 Akins Jane<br />50 Fowler Sam<br />Orders<br />OwnerID ItemDesired<br />02 Table<br />02 Desk<br />21 Chair<br />15 Mirror<br />Antiques<br />SellerID BuyerID Item<br />01 50 Bed<br />02 15 Table<br />15 02 Chair<br />21 50 Mirror<br />50 01 Desk<br />01 21 Cabinet<br />02 21 Coffee Table<br />15 50 Chair<br />01 15 Jewelry Box<br />02 21 Pottery<br />21 02 Bookcase<br />50 01 Plant Stand<br />Keys<br />First, let's discuss the concept of keys. A primary key is a column or set of columns that uniquely identifies the<br />rest of the data in any given row. For example, in the AntiqueOwners table, the OwnerID column uniquely<br />identifies that row. This means two things: no two rows can have the same OwnerID, and, even if two owners<br /><br />8<br /><br />have the same first and last names, the OwnerID column ensures that the two owners will not be confused with<br />each other, because the unique OwnerID column will be used throughout the database to track the owners,<br />rather than the names.<br />A foreign key is a column in a table where that column is a primary key of another table, which means that any<br />data in a foreign key column must have corresponding data in the other table where that column is the primary<br />key. In DBMS-speak, this correspondence is known as referential integrity. For example, in the Antiques<br />table, both the BuyerID and SellerID are foreign keys to the primary key of the AntiqueOwners table<br />(OwnerID; for purposes of argument, one has to be an Antique Owner before one can buy or sell any items),<br />as, in both tables, the ID rows are used to identify the owners or buyers and sellers, and that the OwnerID is the<br />primary key of the AntiqueOwners table. In other words, all of this "ID" data is used to refer to the owners,<br />buyers, or sellers of antiques, themselves, without having to use the actual names.<br />Performing a Join<br />The purpose of these keys is so that data can be related across tables, without having to repeat data in every<br />table--this is the power of relational databases. For example, you can find the names of those who bought a<br />chair without having to list the full name of the buyer in the Antiques table...you can get the name by relating<br />those who bought a chair with the names in the AntiqueOwners table through the use of the OwnerID, which<br />relates the data in the two tables. To find the names of those who bought a chair, use the following query:<br />SELECT OWNERLASTNAME, OWNERFIRSTNAME<br />FROM ANTIQUEOWNERS, ANTIQUES<br />WHERE BUYERID = OWNERID AND ITEM = 'Chair';<br />Note the following about this query...notice that both tables involved in the relation are listed in the FROM<br />clause of the statement. In the WHERE clause, first notice that the ITEM = 'Chair' part restricts the listing to<br />those who have bought (and in this example, thereby own) a chair. Secondly, notice how the ID columns are<br />related from one table to the next by use of the BUYERID = OWNERID clause. Only where ID's match across<br />tables and the item purchased is a chair (because of the AND), will the names from the AntiqueOwners table be<br />listed. Because the joining condition used an equal sign, this join is called an equijoin. The result of this query is<br />two names: Smith, Bob & Fowler, Sam.<br />Dot notation refers to prefixing the table names to column names, to avoid ambiguity, as follows:<br />SELECT ANTIQUEOWNERS.OWNERLASTNAME, ANTIQUEOWNERS.OWNERFIRSTNAME<br />FROM ANTIQUEOWNERS, ANTIQUES<br />WHERE ANTIQUES.BUYERID = ANTIQUEOWNERS.OWNERID AND ANTIQUES.ITEM = 'Chair';<br />As the column names are different in each table, however, this wasn't necessary.<br />DISTINCT and Eliminating Duplicates<br />Let's say that you want to list the ID and names of only those people who have sold an antique. Obviously, you<br />want a list where each seller is only listed once--you don't want to know how many antiques a person sold, just<br />the fact that this person sold one (for counts, see the Aggregate Function section below). This means that you<br />will need to tell SQL to eliminate duplicate sales rows, and just list each person only once. To do this, use the<br />DISTINCT keyword.<br /><br />9<br /><br />First, we will need an equijoin to the AntiqueOwners table to get the detail data of the person's LastName and<br />FirstName. However, keep in mind that since the SellerID column in the Antiques table is a foreign key to the<br />AntiqueOwners table, a seller will only be listed if there is a row in the AntiqueOwners table listing the ID and<br />names. We also want to eliminate multiple occurrences of the SellerID in our listing, so we use DISTINCT on<br />the column where the repeats may occur (however, it is generally not necessary to strictly put the Distinct in front<br />of the column name).<br />To throw in one more twist, we will also want the list alphabetized by LastName, then by FirstName (on a<br />LastName tie). Thus, we will use the ORDER BY clause:<br />SELECT DISTINCT SELLERID, OWNERLASTNAME, OWNERFIRSTNAME<br />FROM ANTIQUES, ANTIQUEOWNERS<br />WHERE SELLERID = OWNERID<br />ORDER BY OWNERLASTNAME, OWNERFIRSTNAME;<br />In this example, since everyone has sold an item, we will get a listing of all of the owners, in alphabetical order<br />by last name. For future reference (and in case anyone asks), this type of join is considered to be in the category<br />of inner joins.<br />Aliases & In/Subqueries<br />In this section, we will talk about Aliases, In and the use of subqueries, and how these can be used in a 3-table<br />example. First, look at this query which prints the last name of those owners who have placed an order and<br />what the order is, only listing those orders which can be filled (that is, there is a buyer who owns that ordered<br />item):<br />SELECT OWN.OWNERLASTNAME Last Name, ORD.ITEMDESIRED Item Ordered<br />FROM ORDERS ORD, ANTIQUEOWNERS OWN<br />WHERE ORD.OWNERID = OWN.OWNERID<br />AND ORD.ITEMDESIRED IN<br />(SELECT ITEM<br />FROM ANTIQUES);<br />This gives:<br />Last Name Item Ordered<br />--------- ------------<br />Smith Table<br />Smith Desk<br />Akins Chair<br />Lawson Mirror<br />There are several things to note about this query:<br />1. First, the "Last Name" and "Item Ordered" in the Select lines gives the headers on the report.<br />2. The OWN & ORD are aliases; these are new names for the two tables listed in the FROM clause that<br />are used as prefixes for all dot notations of column names in the query (see above). This eliminates<br />ambiguity, especially in the equijoin WHERE clause where both tables have the column named<br />OwnerID, and the dot notation tells SQL that we are talking about two different OwnerID's from the<br /><br />10<br /><br /><br />two different tables.<br />3. Note that the Orders table is listed first in the FROM clause; this makes sure listing is done off of that<br />table, and the AntiqueOwners table is only used for the detail information (Last Name).<br />4. Most importantly, the AND in the WHERE clause forces the In Subquery to be invoked ("= ANY" or<br />"= SOME" are two equivalent uses of IN). What this does is, the subquery is performed, returning all of<br />the Items owned from the Antiques table, as there is no WHERE clause. Then, for a row from the<br />Orders table to be listed, the ItemDesired must be in that returned list of Items owned from the Antiques<br />table, thus listing an item only if the order can be filled from another owner. You can think of it this way:<br />the subquery returns a set of Items from which each ItemDesired in the Orders table is compared; the In<br />condition is true only if the ItemDesired is in that returned set from the Antiques table.<br />5. Also notice, that in this case, that there happened to be an antique available for each one<br />desired...obviously, that won't always be the case. In addition, notice that when the IN, "= ANY", or "=<br />SOME" is used, that these keywords refer to any possible row matches, not column matches...that is,<br />you cannot put multiple columns in the subquery Select clause, in an attempt to match the column in the<br />outer Where clause to one of multiple possible column values in the subquery; only one column can be<br />listed in the subquery, and the possible match comes from multiple row values in that one column, not<br />vice-versa.<br />Whew! That's enough on the topic of complex SELECT queries for now. Now on to other SQL statements.<br />Miscellaneous SQL Statements<br />Aggregate Functions<br />I will discuss five important aggregate functions: SUM, AVG, MAX, MIN, and COUNT. They are called<br />aggregate functions because they summarize the results of a query, rather than listing all of the rows.<br />SUM () gives the total of all the rows, satisfying any conditions, of the given column, where the given<br />column is numeric.<br />AVG () gives the average of the given column.<br />MAX () gives the largest figure in the given column.<br />MIN () gives the smallest figure in the given column.<br />COUNT(*) gives the number of rows satisfying the conditions.<br />Looking at the tables at the top of the document, let's look at three examples:<br />SELECT SUM(SALARY), AVG(SALARY)<br />FROM EMPLOYEESTATISTICSTABLE;<br />This query shows the total of all salaries in the table, and the average salary of all of the entries in the table.<br />SELECT MIN(BENEFITS)<br />FROM EMPLOYEESTATISTICSTABLE<br />WHERE POSITION = 'Manager';<br />This query gives the smallest figure of the Benefits column, of the employees who are Managers, which is 12500.<br />SELECT COUNT(*)<br /><br />11<br /><br />FROM EMPLOYEESTATISTICSTABLE<br />WHERE POSITION = 'Staff';<br />This query tells you how many employees have Staff status (3).<br />Views<br />In SQL, you might (check your DBA) have access to create views for yourself. What a view does is to allow<br />you to assign the results of a query to a new, personal table, that you can use in other queries, where this new<br />table is given the view name in your FROM clause. When you access a view, the query that is defined in your<br />view creation statement is performed (generally), and the results of that query look just like another table in the<br />query that you wrote invoking the view. For example, to create a view:<br />CREATE VIEW ANTVIEW AS SELECT ITEMDESIRED FROM ORDERS;<br />Now, write a query using this view as a table, where the table is just a listing of all Items Desired from the<br />Orders table:<br />SELECT SELLERID<br />FROM ANTIQUES, ANTVIEW<br />WHERE ITEMDESIRED = ITEM;<br />This query shows all SellerID's from the Antiques table where the Item in that table happens to appear in the<br />Antview view, which is just all of the Items Desired in the Orders table. The listing is generated by going through<br />the Antique Items one-by-one until there's a match with the Antview view. Views can be used to restrict<br />database access, as well as, in this case, simplify a complex query.<br />Creating New Tables<br />All tables within a database must be created at some point in time...let's see how we would create the Orders<br />table:<br />CREATE TABLE ORDERS<br />(OWNERID INTEGER NOT NULL,<br />ITEMDESIRED CHAR(40) NOT NULL);<br />This statement gives the table name and tells the DBMS about each column in the table. Please note that this<br />statement uses generic data types, and that the data types might be different, depending on what DBMS you are<br />using. As usual, check local listings. Some common generic data types are:<br />Char(x) - A column of characters, where x is a number designating the maximum number of characters<br />allowed (maximum length) in the column.<br />Integer - A column of whole numbers, positive or negative.<br />Decimal(x, y) - A column of decimal numbers, where x is the maximum length in digits of the decimal<br />numbers in this column, and y is the maximum number of digits allowed after the decimal point. The<br />maximum (4,2) number would be 99.99.<br />Date - A date column in a DBMS-specific format.<br />Logical - A column that can hold only two values: TRUE or FALSE.<br /><br />12<br /><br />One other note, the NOT NULL means that the column must have a value in each row. If NULL was used, that<br />column may be left empty in a given row.<br />Altering Tables<br />Let's add a column to the Antiques table to allow the entry of the price of a given Item (Parentheses optional):<br />ALTER TABLE ANTIQUES ADD (PRICE DECIMAL(8,2) NULL);<br />The data for this new column can be updated or inserted as shown later.<br />Adding Data<br />To insert rows into a table, do the following:<br />INSERT INTO ANTIQUES VALUES (21, 01, 'Ottoman', 200.00);<br />This inserts the data into the table, as a new row, column-by-column, in the pre-defined order. Instead, let's<br />change the order and leave Price blank:<br />INSERT INTO ANTIQUES (BUYERID, SELLERID, ITEM)<br />VALUES (01, 21, 'Ottoman');<br />Deleting Data<br />Let's delete this new row back out of the database:<br />DELETE FROM ANTIQUES<br />WHERE ITEM = 'Ottoman';<br />But if there is another row that contains 'Ottoman', that row will be deleted also. Let's delete all rows (one, in<br />this case) that contain the specific data we added before:<br />DELETE FROM ANTIQUES<br />WHERE ITEM = 'Ottoman' AND BUYERID = 01 AND SELLERID = 21;<br />Updating Data<br />Let's update a Price into a row that doesn't have a price listed yet:<br />UPDATE ANTIQUES SET PRICE = 500.00 WHERE ITEM = 'Chair';<br />This sets all Chair's Prices to 500.00. As shown above, more WHERE conditionals, using AND, must be used<br />to limit the updating to more specific rows. Also, additional columns may be set by separating equal statements<br />with commas.<br />Miscellaneous Topics<br />Indexes<br /><br />13<br /><br />Indexes allow a DBMS to access data quicker (please note: this feature is nonstandard/not available on all<br />systems). The system creates this internal data structure (the index) which causes selection of rows, when the<br />selection is based on indexed columns, to occur faster. This index tells the DBMS where a certain row is in the<br />table given an indexed-column value, much like a book index tells you what page a given word appears. Let's<br />create an index for the OwnerID in the AntiqueOwners table:<br />CREATE INDEX OID_IDX ON ANTIQUEOWNERS (OWNERID);<br />Now on the names:<br />CREATE INDEX NAME_IDX ON ANTIQUEOWNERS (OWNERLASTNAME, OWNERFIRSTNAME);<br />To get rid of an index, drop it:<br />DROP INDEX OID_IDX;<br />By the way, you can also "drop" a table, as well (careful!--that means that your table is deleted). In the second<br />example, the index is kept on the two columns, aggregated together--strange behavior might occur in this<br />situation...check the manual before performing such an operation.<br />Some DBMS's do not enforce primary keys; in other words, the uniqueness of a column is not enforced<br />automatically. What that means is, if, for example, I tried to insert another row into the AntiqueOwners table<br />with an OwnerID of 02, some systems will allow me to do that, even though we do not, as that column is<br />supposed to be unique to that table (every row value is supposed to be different). One way to get around that is<br />to create a unique index on the column that we want to be a primary key, to force the system to enforce<br />prohibition of duplicates:<br />CREATE UNIQUE INDEX OID_IDX ON ANTIQUEOWNERS (OWNERID);<br />GROUP BY & HAVING<br />One special use of GROUP BY is to associate an aggregate function (especially COUNT; counting the number<br />of rows in each group) with groups of rows. First, assume that the Antiques table has the Price column, and<br />each row has a value for that column. We want to see the price of the most expensive item bought by each<br />owner. We have to tell SQL to group each owner's purchases, and tell us the maximum purchase price:<br />SELECT BUYERID, MAX(PRICE)<br />FROM ANTIQUES<br />GROUP BY BUYERID;<br />Now, say we only want to see the maximum purchase price if the purchase is over $1000, so we use the<br />HAVING clause:<br />SELECT BUYERID, MAX(PRICE)<br />FROM ANTIQUES<br />GROUP BY BUYERID<br />HAVING PRICE > 1000;<br />More Subqueries<br /><br />14<br /><br />Another common usage of subqueries involves the use of operators to allow a Where condition to include the<br />Select output of a subquery. First, list the buyers who purchased an expensive item (the Price of the item is $100<br />greater than the average price of all items purchased):<br />SELECT BUYERID<br />FROM ANTIQUES<br />WHERE PRICE ><br />(SELECT AVG(PRICE) + 100<br />FROM ANTIQUES);<br />The subquery calculates the average Price, plus $100, and using that figure, an OwnerID is printed for every<br />item costing over that figure. One could use DISTINCT BUYERID, to eliminate duplicates.<br />List the Last Names of those in the AntiqueOwners table, ONLY if they have bought an item:<br />SELECT OWNERLASTNAME<br />FROM ANTIQUEOWNERS<br />WHERE OWNERID IN<br />(SELECT DISTINCT BUYERID<br />FROM ANTIQUES);<br />The subquery returns a list of buyers, and the Last Name is printed for an Antique Owner if and only if the<br />Owner's ID appears in the subquery list (sometimes called a candidate list). Note: on some DBMS's, equals<br />can be used instead of IN, but for clarity's sake, since a set is returned from the subquery, IN is the better<br />choice.<br />For an Update example, we know that the gentleman who bought the bookcase has the wrong First Name in the<br />database...it should be John:<br />UPDATE ANTIQUEOWNERS<br />SET OWNERFIRSTNAME = 'John'<br />WHERE OWNERID =<br />(SELECT BUYERID<br />FROM ANTIQUES<br />WHERE ITEM = 'Bookcase');<br />First, the subquery finds the BuyerID for the person(s) who bought the Bookcase, then the outer query updates<br />his First Name.<br />Remember this rule about subqueries: when you have a subquery as part of a WHERE condition, the<br />Select clause in the subquery must have columns that match in number and type to those in the Where clause of<br />the outer query. In other words, if you have " WHERE ColumnName = (SELECT...);", the Select must have<br />only one column in it, to match the ColumnName in the outer Where clause, and they must match in type (both<br />being integers, both being character strings, etc.).<br />EXISTS & ALL<br /><br />15<br /><br />EXISTS uses a subquery as a condition, where the condition is True if the subquery returns any rows, and False<br />if the subquery does not return any rows; this is a nonintuitive feature with few unique uses. However, if a<br />prospective customer wanted to see the list of Owners only if the shop dealt in Chairs, try:<br />SELECT OWNERFIRSTNAME, OWNERLASTNAME<br />FROM ANTIQUEOWNERS<br />WHERE EXISTS<br />(SELECT *<br />FROM ANTIQUES<br />WHERE ITEM = 'Chair');<br />If there are any Chairs in the Antiques column, the subquery would return a row or rows, making the EXISTS<br />clause true, causing SQL to list the Antique Owners. If there had been no Chairs, no rows would have been<br />returned by the outside query.<br />ALL is another unusual feature, as ALL queries can usually be done with different, and possibly simpler<br />methods; let's take a look at an example query:<br />SELECT BUYERID, ITEM<br />FROM ANTIQUES<br />WHERE PRICE >= ALL<br />(SELECT PRICE<br />FROM ANTIQUES);<br />This will return the largest priced item (or more than one item if there is a tie), and its buyer. The subquery<br />returns a list of all Prices in the Antiques table, and the outer query goes through each row of the Antiques table,<br />and if its Price is greater than or equal to every (or ALL) Prices in the list, it is listed, giving the highest priced<br />Item. The reason "=" must be used is that the highest priced item will be equal to the highest price on the list,<br />because this Item is in the Price list.<br />UNION & Outer Joins (briefly explained)<br />There are occasions where you might want to see the results of multiple queries together, combining their output;<br />use UNION. To merge the output of the following two queries, displaying the ID's of all Buyers, plus all those<br />who have an Order placed:<br />SELECT BUYERID<br />FROM ANTIQUES<br />UNION<br />SELECT OWNERID<br />FROM ORDERS;<br />Notice that SQL requires that the Select list (of columns) must match, column-by-column, in data type. In this<br />case BuyerID and OwnerID are of the same data type (integer). Also notice that SQL does automatic duplicate<br />elimination when using UNION (as if they were two "sets"); in single queries, you have to use DISTINCT.<br />The outer join is used when a join query is "united" with the rows not included in the join, and are especially<br />useful if constant text "flags" are included. First, look at the query:<br /><br />16<br /><br />SELECT OWNERID, 'is in both Orders & Antiques'<br />FROM ORDERS, ANTIQUES<br />WHERE OWNERID = BUYERID<br />UNION<br />SELECT BUYERID, 'is in Antiques only'<br />FROM ANTIQUES<br />WHERE BUYERID NOT IN<br />(SELECT OWNERID<br />FROM ORDERS);<br />The first query does a join to list any owners who are in both tables, and putting a tag line after the ID repeating<br />the quote. The UNION merges this list with the next list. The second list is generated by first listing those ID's not<br />in the Orders table, thus generating a list of ID's excluded from the join query. Then, each row in the Antiques<br />table is scanned, and if the BuyerID is not in this exclusion list, it is listed with its quoted tag. There might be an<br />easier way to make this list, but it's difficult to generate the informational quoted strings of text.<br />This concept is useful in situations where a primary key is related to a foreign key, but the foreign key value for<br />some primary keys is NULL. For example, in one table, the primary key is a salesperson, and in another table is<br />customers, with their salesperson listed in the same row. However, if a salesperson has no customers, that<br />person's name won't appear in the customer table. The outer join is used if the listing of all salespersons is to be<br />printed, listed with their customers, whether the salesperson has a customer or not--that is, no customer is<br />printed (a logical NULL value) if the salesperson has no customers, but is in the salespersons table. Otherwise,<br />the salesperson will be listed with each customer.<br />Another important related point about Nulls having to do with joins: the order of tables listed in the From clause<br />is very important. The rule states that SQL "adds" the second table to the first; the first table listed has any rows<br />where there is a null on the join column displayed; if the second table has a row with a null on the join column,<br />that row from the table listed second does not get joined, and thus included with the first table's row data. This is<br />another occasion (should you wish that data included in the result) where an outer join is commonly used. The<br />concept of nulls is important, and it may be worth your time to investigate them further.<br />ENOUGH QUERIES!!! you say?...now on to something completely different...<br />Embedded SQL--an ugly example (do not write a program like this...for purposes of<br />argument ONLY)<br />/* -To get right to it, here is an example program that uses Embedded<br />SQL. Embedded SQL allows programmers to connect to a database and<br />include SQL code right in the program, so that their programs can<br />use, manipulate, and process data from a database.<br />-This example C Program (using Embedded SQL) will print a report.<br />-This program will have to be precompiled for the SQL statements,<br />before regular compilation.<br />-The EXEC SQL parts are the same (standard), but the surrounding C<br />code will need to be changed, including the host variable<br />declarations, if you are using a different language.<br />-Embedded SQL changes from system to system, so, once again, check<br />local documentation, especially variable declarations and logging<br /><br />17<br /><br />in procedures, in which network, DBMS, and operating system<br />considerations are crucial. */<br />/************************************************/<br />/* THIS PROGRAM IS NOT COMPILABLE OR EXECUTABLE */<br />/* IT IS FOR EXAMPLE PURPOSES ONLY */<br />/************************************************/<br />#include<br />/* This section declares the host variables; these will be the<br />variables your program uses, but also the variable SQL will put<br />values in or take values out. */<br />EXEC SQL BEGIN DECLARE SECTION;<br />int BuyerID;<br />char FirstName[100], LastName[100], Item[100];<br />EXEC SQL END DECLARE SECTION;<br />/* This includes the SQLCA variable, so that some error checking can be done. */<br />EXEC SQL INCLUDE SQLCA;<br />main() {<br />/* This is a possible way to log into the database */<br />EXEC SQL CONNECT UserID/Password;<br />/* This code either says that you are connected or checks if an error<br />code was generated, meaning log in was incorrect or not possible. */<br />if(sqlca.sqlcode) {<br />printf(Printer, "Error connecting to database server.\n");<br />exit();<br />}<br />printf("Connected to database server.\n");<br />/* This declares a "Cursor". This is used when a query returns more<br />than one row, and an operation is to be performed on each row<br />resulting from the query. With each row established by this query,<br />I'm going to use it in the report. Later, "Fetch" will be used to<br />pick off each row, one at a time, but for the query to actually<br />be executed, the "Open" statement is used. The "Declare" just<br />establishes the query. */<br />EXEC SQL DECLARE ItemCursor CURSOR FOR<br />SELECT ITEM, BUYERID<br />FROM ANTIQUES<br />ORDER BY ITEM;<br />EXEC SQL OPEN ItemCursor;<br />/* +-- You may wish to put a similar error checking block here --+ */<br />/* Fetch puts the values of the "next" row of the query in the host<br />variables, respectively. However, a "priming fetch" (programming<br />technique) must first be done. When the cursor is out of data, a<br />sqlcode will be generated allowing us to leave the loop. Notice<br />that, for simplicity's sake, the loop will leave on any sqlcode,<br /><br />18<br /><br />even if it is an error code. Otherwise, specific code checking must<br />be performed. */<br />EXEC SQL FETCH ItemCursor INTO :Item, :BuyerID;<br />while(!sqlca.sqlcode) {<br />/* With each row, we will also do a couple of things. First, bump the<br />price up by $5 (dealer's fee) and get the buyer's name to put in<br />the report. To do this, I'll use an Update and a Select, before<br />printing the line on the screen. The update assumes however, that<br />a given buyer has only bought one of any given item, or else the<br />price will be increased too many times. Otherwise, a "RowID" logic<br />would have to be used (see documentation). Also notice the colon<br />before host variable names when used inside of SQL statements. */<br />EXEC SQL UPDATE ANTIQUES<br />SET PRICE = PRICE + 5<br />WHERE ITEM = :Item AND BUYERID = :BuyerID;<br />EXEC SQL SELECT OWNERFIRSTNAME, OWNERLASTNAME<br />INTO :FirstName, :LastName<br />FROM ANTIQUEOWNERS<br />WHERE BUYERID = :BuyerID;<br />printf("%25s %25s %25s", FirstName, LastName, Item);<br />/* Ugly report--for example purposes only! Get the next row. */<br />EXEC SQL FETCH ItemCursor INTO :Item, :BuyerID;<br />}<br />/* Close the cursor, commit the changes (see below), and exit the<br />program. */<br />EXEC SQL CLOSE ItemCursor;<br />EXEC SQL COMMIT RELEASE;<br />exit();<br />}<br />Common SQL Questions & Advanced Topics<br />1. Why can't I just ask for the first three rows in a table? --Because in relational databases, rows are<br />inserted in no particular order, that is, the system inserts them in an arbitrary order; so, you can only<br />request rows using valid SQL features, like ORDER BY, etc.<br />2. What is this DDL and DML I hear about? --DDL (Data Definition Language) refers to (in SQL) the<br />Create Table statement...DML (Data Manipulation Language) refers to the Select, Update, Insert, and<br />Delete statements. Also, QML, referring to Select statements, stands for Query Manipulation<br />Language.<br />3. Aren't database tables just files? --Well, DBMS's store data in files declared by system managers<br />before new tables are created (on large systems), but the system stores the data in a special format, and<br />may spread data from one table over several files. In the database world, a set of files created for a<br />database is called a tablespace. In general, on small systems, everything about a database (definitions<br />and all table data) is kept in one file.<br />4. (Related question) Aren't database tables just like spreadsheets? --No, for two reasons. First,<br /><br />19<br /><br />spreadsheets can have data in a cell, but a cell is more than just a row-column-intersection. Depending<br />on your spreadsheet software, a cell might also contain formulas and formatting, which database tables<br />cannot have (currently). Secondly, spreadsheet cells are often dependent on the data in other cells. In<br />databases, "cells" are independent, except that columns are logically related (hopefully; together a row<br />of columns describe an entity), and, other than primary key and foreign key constraints, each row in a<br />table is independent from one another.<br />5. How do I import a text file of data into a database? --Well, you can't do it directly...you must use a<br />utility, such as Oracle's SQL*Loader, or write a program to load the data into the database. A program<br />to do this would simply go through each record of a text file, break it up into columns, and do an Insert<br />into the database.<br />6. What web sites and computer books would you recommend for more information about SQL and<br />databases? --First, look at the sites at the bottom of this page. I would especially suggest the following:<br />DB Ingredients (more theorical topics), DBMS Lab/Links (comprehensive academic DBMS link listing),<br />Tutorial Page (listing of other tutorials), and miniSQL (more information about the best known free<br />DBMS).<br />Also, if you wish to practice SQL on an interactive site (using Java technologies), I highly recommend<br />Frank Torres' (torresf@uswest.net) site at http://sqlcourse.com and its new sequel (so to speak) site at<br />http://sqlcourse2.com. Frank did an outstanding job with his site, and if you have a recent release<br />browser, it's definitely worth a visit. In addition, point your browser to www.topica.com, and subscribe<br />to their SQL e-mail Tips of the Day...they are outstanding; Tim Quinlan goes into topics that I can't<br />even begin to go into here, such index data structures (B-trees and B+-trees) and join algorithms, so<br />advanced IT RDBMS pros will get a daily insight into these data management tools.<br />Unfortunately, there is not a great deal of information on the web about SQL; the list I have below is<br />fairly comprehensive (definitely representative). As far as books are concerned, I would suggest (for<br />beginners to intermediate-level) "Oracle: The Complete Reference" (multiple versions) from Oracle and<br />"Understanding SQL" from Sybex for general SQL information. Also, I would recommend O'Reilly<br />Publishing's books, and Joe Celko's writings for advanced users. For specific DBMS info (especially in<br />the Access area), I recommend Que's "Using" series, and the books of Alison Balter.<br />7. What is a schema? --A schema is a logical set of tables, such as the Antiques database above...usually,<br />it is thought of as simply "the database", but a database can hold more than one schema. For example, a<br />star schema is a set of tables where one large, central table holds all of the important information, and is<br />linked, via foreign keys, to dimension tables which hold detail information, and can be used in a join to<br />create detailed reports.<br />8. I understand that Oracle offers a special keyword, Decode, that allows for some "if-then" logic. How<br />does that work? -- Technically, Decode allows for conditional output based on the value of a column or<br />function. The syntax looks like this (from the Oracle: Complete Reference series):<br />Select ...DECODE (Value, If1, Then1, [If 2, Then 2, ...,] Else) ...From ...;<br />The Value is the name of a column, or a function (conceivably based on a column or columns), and for<br />each If included in the statement, the corresponding Then clause is the output if the condition is true. If<br />none of the conditions are true, then the Else value is output. Let's look at an example:<br />Select Distinct City,<br />DECODE (City, 'Cincinnati', 'Queen City', 'New York', 'Big Apple', 'Chicago',<br /><br />20<br /><br />'City of Broad Shoulders', City) AS Nickname<br />From Cities;<br />The output might look like this:<br />City Nickname<br />------------ ------------------------------<br />Boston Boston<br />Cincinnati Queen City<br />Cleveland Cleveland<br />New York Big Apple<br />'City' in the first argument denotes the column name used for the test. The second, fourth, etc. arguments<br />are the individual equality tests (taken in the order given) against each value in the City column. The<br />third, fifth, etc. arguments are the corresponding outputs if the corresponding test is true. The final<br />parameter is the default output if none of the tests are true; in this case, just print out the column value.<br />TIP: If you want nothing to be output for a given condition, such as the default "Else" value, enter the<br />value Null for that value, such as:<br />Select Distinct City,<br />DECODE (City, 'Cincinnati', 'Queen City', 'New York', 'Big Apple', 'Chicago',<br />'City of Broad Shoulders', Null) AS Nickname<br />From Cities;<br />If the City column value is not one of the ones mentioned, nothing is outputted, rather than the city name<br />itself.<br />City Nickname<br />------------ ----------<br />Boston<br />Cincinnati Queen City<br />Cleveland<br />New York Big Apple<br />9. You mentioned Referential Integrity before, but what does that have to do with this concept I've heard<br />about, Cascading Updates and Deletes? --This is a difficult topic to talk about, because it's covered<br />differently in different DBMS's.<br />For example, Microsoft SQL Server (7.0 & below) requires that you write "triggers" (see the Yahoo<br />SQL Club link to find links that discuss this topic--I may include that topic in a future version of this<br />page) to implement this. (A quick definition, though; a Trigger is a SQL statement stored in the database<br />that allows you to perform a given query [usually an "Action" Query--Delete, Insert, Update]<br />automatically, when a specified event occurs in the database, such as a column update, but anyway...)<br />Microsoft Access (believe it or not) will perform this if you define it in the Relationships screen, but it will<br />still burden you with a prompt. Oracle does this automatically, if you specify a special "Constraint" (see<br />reference at bottom for definition, not syntax) on the keyed column.<br />So, I'll just discuss the concept. First, see the discussion above on Primary and Foreign keys.<br /><br />21<br /><br />Concept: If a row from the primary key column is deleted/updated, if "Cascading" is activated, the value<br />of the foreign key in those other tables will be deleted (the whole row)/updated.<br />The reverse, a foreign key deletion/update causing a primary key value to be deleted/changed, may or<br />may not occur: the constraint or trigger may not be defined, a "one-to-many" relationship may exist, the<br />update might be to another existing primary key value, or the DBMS itself may or may not have rules<br />governing this. As usual, see your DBMS's documentation.<br />For example, if you set up the AntiqueOwners table to have a Primary Key, OwnerID, and you set up<br />the database to delete rows on the Foreign Key, SellerID, in the Antiques table, on a primary key<br />deletion, then if you deleted the AntiqueOwners row with OwnerID of '01', then the rows in Antiques,<br />with the Item values, Bed, Cabinet, and Jewelry Box ('01' sold them), will all be deleted. Of course,<br />assuming the proper DB definition, if you just updated '01' to another value, those Seller ID values<br />would be updated to that new value too.<br />10. Show me an example of an outer join. --Well, from the questions I receive, this is an extremely<br />common example, and I'll show you both the Oracle and Access queries...<br />Think of the following Employee table (the employees are given numbers, for simplicity):<br />Name Department<br />1 10<br />2 10<br />3 20<br />4 30<br />5 30<br />Now think of a department table:<br />Department<br />10<br />20<br />30<br />40<br />Now suppose you want to join the tables, seeing all of the employees and all of the departments<br />together...you'll have to use an outer join which includes a null employee to go with Dept. 40.<br />In the book, "Oracle 7: the Complete Reference", about outer joins, "think of the (+), which must<br />immediately follow the join column of the table, as saying add an extra (null) row anytime there's no<br />match". So, in Oracle, try this query (the + goes on Employee, which adds the null row on no match):<br />Select E.Name, D.Department<br />From Department D, Employee E<br />Where E.Department(+) = D.Department;<br /><br /><br />22<br /><br />This is a left (outer) join, in Access:<br />SELECT DISTINCTROW Employee.Name, Department.Department<br />FROM Department LEFT JOIN Employee ON Department.Department =<br />Employee.Department;<br />And you get this result:<br />Name Department<br />1 10<br />2 10<br />3 20<br />4 30<br />5 30<br />40<br />11. What are some general tips you would give to make my SQL queries and databases better and faster<br />(optimized)?<br />You should try, if you can, to avoid expressions in Selects, such as SELECT ColumnA +<br />ColumnB, etc. The query optimizer of the database, the portion of the DBMS that determines<br />the best way to get the required data out of the database itself, handles expressions in such a<br />way that would normally require more time to retrieve the data than if columns were normally<br />selected, and the expression itself handled programmatically.<br />Minimize the number of columns included in a Group By clause.<br />If you are using a join, try to have the columns joined on (from both tables) indexed.<br />When in doubt, index.<br />Unless doing multiple counts or a complex query, use COUNT(*) (the number of rows<br />generated by the query) rather than COUNT(Column_Name).<br />12. What is a Cartesian product? --Simply, it is a join without a Where clause. It gives you every row in the<br />first table, joined with every row in the second table. This is best shown by example:<br />SELECT *<br />FROM AntiqueOwners, Orders;<br />This gives:<br />AntiqueOwners.<br />OwnerID<br />AntiqueOwners.<br />OwnerLastName<br />AntiqueOwners.<br />OwnerFirstName<br />Orders.<br />OwnerID<br />Orders.<br />ItemDesired<br />01 Jones Bill 02 Table<br />01 Jones Bill 02 Desk<br />01 Jones Bill 21 Chair<br />01 Jones Bill 15 Mirror<br />02 Smith Bob 02 Table<br /><br />23<br /><br />02 Smith Bob 02 Desk<br />02 Smith Bob 21 Chair<br />02 Smith Bob 15 Mirror<br />15 Lawson Patricia 02 Table<br />15 Lawson Patricia 02 Desk<br />15 Lawson Patricia 21 Chair<br />15 Lawson Patricia 15 Mirror<br />21 Akins Jane 02 Table<br />21 Akins Jane 02 Desk<br />21 Akins Jane 21 Chair<br />21 Akins Jane 15 Mirror<br />50 Fowler Sam 02 Table<br />50 Fowler Sam 02 Desk<br />50 Fowler Sam 21 Chair<br />50 Fowler Sam 15 Mirror<br />The number of rows in the result has the number of rows in the first table times the number of rows in the<br />second table, and is sometimes called a Cross-Join.<br />If you think about it, you can see how joins work. Look at the Cartesian product results, then look for<br />rows where the OwnerID's are equal, and the result is what you would get on an equijoin.<br />Of course, this is not how DBMS's actually perform joins because loading this result can take too much<br />memory; instead, comparisons are performed in nested loops, or by comparing values in indexes, and<br />then loading result rows.<br />13. What is normalization? --Normalization is a technique of database design that suggests that certain<br />criteria be used when constructing a table layout (deciding what columns each table will have, and<br />creating the key structure), where the idea is to eliminate redundancy of non-key data across tables.<br />Normalization is usually referred to in terms of forms, and I will introduce only the first three, even<br />though it is somewhat common to use other, more advanced forms (fourth, fifth, Boyce-Codd; see<br />documentation).<br />First Normal Form refers to moving data into separate tables where the data in each table is of a<br />similar type, and by giving each table a primary key.<br />Putting data in Second Normal Form involves removing to other tables data that is only dependent of a<br />part of the key. For example, if I had left the names of the Antique Owners in the items table, that would<br />not be in Second Normal Form because that data would be redundant; the name would be repeated for<br />each item owned; as such, the names were placed in their own table. The names themselves don't have<br />anything to do with the items, only the identities of the buyers and sellers.<br /><br />24<br /><br />Third Normal Form involves getting rid of anything in the tables that doesn't depend solely on the<br />primary key. Only include information that is dependent on the key, and move off data to other tables<br />that are independent of the primary key, and create a primary key for the new tables.<br />There is some redundancy to each form, and if data is in 3NF (shorthand for 3rd normal form), it is<br />already in 1NF and 2NF. In terms of data design then, arrange data so that any non-primary key<br />columns are dependent only on the whole primary key. If you take a look at the sample database, you<br />will see that the way then to navigate through the database is through joins using common key columns.<br />Two other important points in database design are using good, consistent, logical, full-word names for<br />the tables and columns, and the use of full words in the database itself. On the last point, my database is<br />lacking, as I use numeric codes for identification. It is usually best, if possible, to come up with keys that<br />are, by themselves, self-explanatory; for example, a better key would be the first four letters of the last<br />name and first initial of the owner, like JONEB for Bill Jones (or for tiebreaking purposes, add numbers<br />to the end to differentiate two or more people with similar names, so you could try JONEB1, JONEB2,<br />etc.).<br />14. What is the difference between a single-row query and a multiple-row query and why is it important to<br />know the difference? --First, to cover the obvious, a single-row query is a query that returns one row as<br />its result, and a multiple-row query is a query that returns more than one row as its result. Whether a<br />query returns one row or more than one row is entirely dependent on the design (or schema) of the<br />tables of the database. As query-writer, you must be aware of the schema, be sure to include enough<br />conditions, and structure your SQL statement properly, so that you will get the desired result (either one<br />row or multiple rows). For example, if you wanted to be sure that a query of the AntiqueOwners table<br />returned only one row, consider an equal condition of the primary key column, OwnerID.<br />Three reasons immediately come to mind as to why this is important. First, getting multiple rows when<br />you were expecting only one, or vice-versa, may mean that the query is erroneous, that the database is<br />incomplete, or simply, you learned something new about your data. Second, if you are using an update<br />or delete statement, you had better be sure that the statement that you write performs the operation on<br />the desired row (or rows)...or else, you might be deleting or updating more rows than you intend. Third,<br />any queries written in Embedded SQL must be carefully thought out as to the number of rows returned.<br />If you write a single-row query, only one SQL statement may need to be performed to complete the<br />programming logic required. If your query, on the other hand, returns multiple rows, you will have to use<br />the Fetch statement, and quite probably, some sort of looping structure in your program will be required<br />to iterate processing on each returned row of the query.<br />15. Tell me about a simple approach to relational database design. --This was sent to me via a news posting;<br />it was submitted by John Frame ( jframe@jframe.com ) and Richard Freedman (<br />rfreedm@voicenet.com ); I offer a shortened version as advice, but I'm not responsible for it, and some<br />of the concepts are readdressed in the next question...<br />First, create a list of important things (entities) and include those things you may not initially believe is<br />important. Second, draw a line between any two entities that have any connection whatsoever; except<br />that no two entities can connect without a 'rule'; e.g.: families have children, employees work for a<br />department. Therefore put the 'connection' in a diamond, the 'entities' in squares. Third, your picture<br />should now have many squares (entities) connected to other entities through diamonds (a square<br />enclosing an entity, with a line to a diamond describing the relationship, and then another line to the other<br /><br />25<br /><br />entity). Fourth, put descriptors on each square and each diamond, such as customer -- airline -- trip.<br />Fifth, give each diamond and square any attributes it may have (a person has a name, an invoice has a<br />number), but some relationships have none (a parent just owns a child). Sixth, everything on your page<br />that has attributes is now a table, whenever two entities have a relationship where the relationship has no<br />attributes, there is merely a foreign key between the tables. Seventh, in general you want to make tables<br />not repeat data. So, if a customer has a name and several addresses, you can see that for every address<br />of a customer, there will be repeated the customer's first name, last name, etc. So, record Name in one<br />table, and put all his addresses in another. Eighth, each row (record) should be unique from every other<br />one; Mr. Freedman suggests a 'auto-increment number' primary key, where a new, unique number is<br />generated for each new inserted row. Ninth, a key is any way to uniquely identify a row in a table...first<br />and last name together are good as a 'composite' key. That's the technique.<br />16. What are relationships? --Another design question...the term "relationships" (often termed "relation")<br />usually refers to the relationships among primary and foreign keys between tables. This concept is<br />important because when the tables of a relational database are designed, these relationships must be<br />defined because they determine which columns are or are not primary or foreign keys. You may have<br />heard of an Entity-Relationship Diagram, which is a graphical view of tables in a database schema,<br />with lines connecting related columns across tables. See the sample diagram at the end of this section or<br />some of the sites below in regard to this topic, as there are many different ways of drawing E-R<br />diagrams. But first, let's look at each kind of relationship...<br />A One-to-one relationship means that you have a primary key column that is related to a foreign key<br />column, and that for every primary key value, there is one foreign key value. For example, in the first<br />example, the EmployeeAddressTable, we add an EmployeeIDNo column. Then, the<br />EmployeeAddressTable is related to the EmployeeStatisticsTable (second example table) by means of<br />that EmployeeIDNo. Specifically, each employee in the EmployeeAddressTable has statistics (one row<br />of data) in the EmployeeStatisticsTable. Even though this is a contrived example, this is a "1-1"<br />relationship. Also notice the "has" in bold...when expressing a relationship, it is important to describe the<br />relationship with a verb.<br />The other two kinds of relationships may or may not use logical primary key and foreign key<br />constraints...it is strictly a call of the designer. The first of these is the one-to-many<br />relationship ("1-M"). This means that for every column value in one table, there is one or more related<br />values in another table. Key constraints may be added to the design, or possibly just the use of some<br />sort of identifier column may be used to establish the relationship. An example would be that for every<br />OwnerID in the AntiqueOwners table, there are one or more (zero is permissible too) Items bought in<br />the Antiques table (verb: buy).<br />Finally, the many-to-many relationship ("M-M") does not involve keys generally, and usually involves<br />identifying columns. The unusual occurrence of a "M-M" means that one column in one table is related to<br />another column in another table, and for every value of one of these two columns, there are one or more<br />related values in the corresponding column in the other table (and vice-versa), or more a common<br />possibility, two tables have a 1-M relationship to each other (two relationships, one 1-M going each<br />way). A [bad] example of the more common situation would be if you had a job assignment database,<br />where one table held one row for each employee and a job assignment, and another table held one row<br />for each job with one of the assigned employees. Here, you would have multiple rows for each<br />employee in the first table, one for each job assignment, and multiple rows for each job in the second<br /><br />26<br /><br />table, one for each employee assigned to the project. These tables have a M-M: each employee in the<br />first table has many job assignments from the second table, and each job has many employees assigned<br />to it from the first table. This is the tip of the iceberg on this topic...see the links below for more<br />information and see the diagram below for a simplified example of an E-R diagram.<br />17. What are some important nonstandard SQL features (extremely common question)? --Well, see the<br />next section...<br />Nonstandard SQL..."check local listings"<br />INTERSECT and MINUS are like the UNION statement, except that INTERSECT produces rows<br />that appear in both queries, and MINUS produces rows that result from the first query, but not the<br />second.<br />Report Generation Features: the COMPUTE clause is placed at the end of a query to place the result of<br />an aggregate function at the end of a listing, like COMPUTE SUM (PRICE); Another option is to use<br />break logic: define a break to divide the query results into groups based on a column, like BREAK ON<br />BUYERID. Then, to produce a result after the listing of a group, use COMPUTE SUM OF PRICE ON<br />BUYERID. If, for example, you used all three of these clauses (BREAK first, COMPUTE on break<br />second, COMPUTE overall sum third), you would get a report that grouped items by their BuyerID,<br />listing the sum of Prices after each group of a BuyerID's items, then, after all groups are listed, the sum<br />of all Prices is listed, all with SQL-generated headers and lines.<br />In addition to the above listed aggregate functions, some DBMS's allow more functions to be used in<br />Select lists, except that these functions (some character functions allow multiple-row results) are to be<br />used with an individual value (not groups), on single-row queries. The functions are to be used only on<br />appropriate data types, also. Here are some Mathematical Functions:<br />ABS(X) Absolute value-converts negative numbers to positive, or leaves positive numbers alone<br />CEIL(X) X is a decimal value that will be rounded up.<br />FLOOR(X) X is a decimal value that will be rounded down.<br /><br />27<br /><br />GREATEST(X,Y) Returns the largest of the two values.<br />LEAST(X,Y) Returns the smallest of the two values.<br />MOD(X,Y) Returns the remainder of X / Y.<br />POWER(X,Y) Returns X to the power of Y.<br />ROUND(X,Y) Rounds X to Y decimal places. If Y is omitted, X is rounded to the nearest integer.<br />SIGN(X) Returns a minus if X < 0, else a plus.<br />SQRT(X) Returns the square root of X.<br />Character Functions<br />LEFT(,X) Returns the leftmost X characters of the string.<br />RIGHT(,X) Returns the rightmost X characters of the string.<br />UPPER() Converts the string to all uppercase letters.<br />LOWER() Converts the string to all lowercase letters.<br />INITCAP() Converts the string to initial caps.<br />LENGTH() Returns the number of characters in the string.<br />|| Combines the two strings of text into one, concatenated string, where the first<br />string is immediately followed by the second.<br />LPAD(,X,'*') Pads the string on the left with the * (or whatever character is inside the quotes),<br />to make the string X characters long.<br />RPAD(,X,'*') Pads the string on the right with the * (or whatever character is inside the quotes),<br />to make the string X characters long.<br />SUBSTR(,X,Y) Extracts Y letters from the string beginning at position X.<br />NVL(,) The Null value function will substitute for any NULLs for in the<br />. If the current value of is not NULL, NVL has no effect.<br />Syntax Summary--For Advanced Users Only<br />Here are the general forms of the statements discussed in this tutorial, plus some extra important ones<br />(explanations given). REMEMBER that all of these statements may or may not be available on your system,<br />so check documentation regarding availability:<br />ALTER TABLE ADD|DROP|MODIFY (COLUMN SPECIFICATION[S]...see Create<br />Table); --allows you to add or delete a column or columns from a table, or change the specification (data<br />type, etc.) on an existing column; this statement is also used to change the physical specifications of a table (how<br />a table is stored, etc.), but these definitions are DBMS-specific, so read the documentation. Also, these physical<br />specifications are used with the Create Table statement, when a table is first created. In addition, only one option<br /><br />28<br /><br />can be performed per Alter Table statement --either add, drop, OR modify in a single statement.<br />COMMIT; --makes changes made to some database systems permanent (since the last COMMIT; known as a<br />transaction)<br />CREATE [UNIQUE] INDEX<br />ON (); --UNIQUE is optional; within brackets.<br />CREATE TABLE<br />( [()] ,<br />...other columns); (also valid with ALTER TABLE)<br />--where SIZE is only used on certain data types (see above), and constraints include the following possibilities<br />(automatically enforced by the DBMS; failure causes an error to be generated):<br />1. NULL or NOT NULL (see above)<br />2. UNIQUE enforces that no two rows will have the same value for this column<br />3. PRIMARY KEY tells the database that this column is the primary key column (only used if the key is a<br />one column key, otherwise a PRIMARY KEY (column, column, ...) statement appears after the last<br />column definition.<br />4. CHECK allows a condition to be checked for when data in that column is updated or inserted; for<br />example, CHECK (PRICE 0) causes the system to check that the Price column is greater than zero<br />before accepting the value...sometimes implemented as the CONSTRAINT statement.<br />5. DEFAULT inserts the default value into the database if a row is inserted without that column's data being<br />inserted; for example, BENEFITS INTEGER DEFAULT = 10000<br />6. FOREIGN KEY works the same as Primary Key, but is followed by: REFERENCES<br />(), which refers to the referential primary key.<br />CREATE VIEW AS ;<br />DELETE FROM WHERE ;<br />INSERT INTO [()]<br />VALUES ();<br />ROLLBACK; --Takes back any changes to the database that you have made, back to the last time you gave a<br />Commit command...beware! Some software uses automatic committing on systems that use the transaction<br />features, so the Rollback command may not work.<br />SELECT [DISTINCT|ALL]<br />FROM<br />[WHERE ]<br />[GROUP BY ]<br />[HAVING ]<br />[ORDER BY [ASC|DESC]]; --where ASC|DESC allows the ordering to be done<br />in ASCending or DESCending order<br />UPDATE<br />SET =<br /><br />29<br /><br />[WHERE ]; --if the Where clause is left out, all rows will be updated according to the Set<br />statement.<br />Exercises<br />Queries<br />Using the example tables in the tutorial, write a SQL statement to:<br />1. Show each Antiques order and the last and first names of the person who ordered the item.<br />2. Show each column in the EmployeeStatisticsTable in alphabetical order by Position, then by<br />EmployeeIDNo.<br />3. Show the annual budget for Benefits from the EmployeeStatisticsTable.<br />4. Using the IN Operator, show the names of the owners of Chairs.<br />5. Show the names of all Antiques Owners who have do not have an order placed.<br />6. Show the names of those who have placed Antique orders, with no duplicates (Hint: consider the order of<br />tables in the From clause).<br />7. Delete all of Bob Smith's Antique orders (Hint: Bob's ID Number is 02).<br />8. Create an Antique order for a Rocking Chair for Jane Akins (Hint: Jane's ID Number is 21).<br />9. Create a table called Employees, with columns EmployeeIDNo (don't worry about trailing zeroes),<br />FirstName, and LastName.<br />10. (Challenger) Show the annual budget for Salary by each position from the EmployeeStatisticsTable (Hint:<br />Try GROUP BY).<br />Databases<br />11. What is the relationship between the AntiqueOwners table and the Owners table?<br />12. If you do not have a primary key in a table, the addition of what type of column is preferred to give the table<br />a primary key?<br />13. Which function will allow you to substitute a given value for any Null values arising from a Select statement?<br />14. When using Embedded SQL, what do you need to create in order to iterate through the results of a<br />multi-row query, one row at a time?<br />15. If all of the columns in all of the tables in your schema are dependent solely on the value of the primary key<br />in each table, in which Normal Form is your design?<br />16. What term is used to describe the event of a database system automatically updating the values of foreign<br />keys in other tables, when the value of a primary key is updated?<br />17. What database object provides fast access to the data in the rows of a table?<br />18. What type of SQL statement is used to change the attributes of a column?<br />19. In a Create Table statement, when a column is designated as NOT NULL, what does this mean?<br />20. If you wish to write a query that is based on other queries, rather than tables, what do these other queries<br />need to be created as?<br />Answers (Queries may have more than one correct answer):<br />1. SELECT AntiqueOwners.OwnerLastName, AntiqueOwners.OwnerFirstName,<br />Orders.ItemDesired<br />FROM AntiqueOwners, Orders<br />WHERE AntiqueOwners.OwnerID = Orders.OwnerID;<br />or<br />SELECT AntiqueOwners.OwnerLastName, AntiqueOwners.OwnerFirstName, Orders.ItemDesired<br />FROM AntiqueOwners RIGHT JOIN Orders ON AntiqueOwners.OwnerID = Orders.OwnerID;<br /><br />30<br /><br />2. SELECT *<br />FROM EmployeeStatisticsTable<br />ORDER BY Position, EmployeeIDNo;<br />3. SELECT Sum(Benefits)<br />FROM EmployeeStatisticsTable;<br />4. SELECT OwnerLastName, OwnerFirstName<br />FROM AntiqueOwners, Antiques<br />WHERE Item In ('Chair')<br />AND AntiqueOwners.OwnerID = Antiques.BuyerID;<br />5. SELECT OwnerLastName, OwnerFirstName<br />FROM AntiqueOwners<br />WHERE OwnerID NOT IN<br />(SELECT OwnerID<br />FROM Orders);<br />6. SELECT DISTINCT OwnerLastName, OwnerFirstName<br />FROM Orders, AntiqueOwners<br />WHERE AntiqueOwners.OwnerID = Orders.OwnerID;<br />or to use JOIN notation:<br />SELECT DISTINCT AntiqueOwners.OwnerLastName, AntiqueOwners.OwnerFirstName<br />FROM AntiqueOwners RIGHT JOIN Orders ON AntiqueOwners.OwnerID = Orders.OwnerID;<br />7. DELETE FROM ORDERS<br />WHERE OWNERID = 02;<br />8. INSERT INTO ORDERS VALUES (21, 'Rocking Chair');<br />9. CREATE TABLE EMPLOYEES<br />(EmployeeIDNo INTEGER NOT NULL,<br />FirstName CHAR(40) NOT NULL,<br />LastName CHAR(40) NOT NULL);<br />10. SELECT Position, Sum(Salary)<br />FROM EmployeeStatisticsTable<br />GROUP BY Position;<br />11. One-to-Many.<br />12. An integer identification number; an auto-increment ID is preferred.<br />13. NVL.<br />14. A Cursor.<br />15. Third Normal Form.<br />16. Cascading update.<br />17. An Index.<br />18. ALTER TABLE.<br />19. A value is required in this column for every row in the table.<br />20. Views.<br />Important Computing & SQL/Database Links<br />SQL Reference Page<br />Programmer's Source<br />DevX<br />DB Ingredients<br />SQL Trainer S/W<br />Web Authoring<br />DBMS Lab/Links<br />SQL FAQ<br /><br />31<br /><br />Query List<br />SQL Practice Site<br />SQL Course II<br />Database Jump Site<br />Programming Tutorials on the Web<br />PostgreSQL<br />Adobe Acrobat<br />A Good DB Course<br />Tutorial Page<br />Intelligent Enterprise Magazine<br />miniSQL<br />SQL for DB2 Book<br />SQL Server 7<br />SQL Reference/Examples<br />SQL Topics<br />Lee's<br />Data Warehousing Homepage<br />MIT SQL for Web Nerds<br />RDBMS Server Feature Comparison Matrix<br />Oracle FAQ<br />Oracle Developer (2000)<br />Intro to Relational Database Design<br />SQL Sam, the SQL Server Detective<br />ZDNet's SQL Introduction<br />Baycon Group's<br />Dragonlee's<br />A good, but anonymous<br />UC Davis' Oracle PDF's<br />About.com's Database Advisor<br />Manas Tungare's at FindTutorials.com<br />A Gentle Introduction to SQL<br />SQL (News) Wire<br />I strongly urge you to visit some of the database links shown above, especially if you're interested in advanced topics, such as the SQL-92 standard, different relational DBMS's, and advanced query processing. If you're using a well-known, name-brand DBMS, the web site of your vendor is often the first and best place to look for information. I am not available for any consultations at this time. If you have a question or comment, please go to theSumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-32045250132005180262008-07-17T20:17:00.002-07:002008-07-17T20:18:32.525-07:00Oracle SQL*Net/ Net8 FAQWhat is SQL*Net/ Net8?<br />NET8 (called SQL*NET prior to Oracle8) is Oracle's client/server middleware product that offers transparent connection from client tools to the database, or from one database to another. SQL*Net/ Net8 works across multiple network protocols and operating systems.<br />TNS or Transparent Network Substrate is Oracle's networking architecture. TNS provides a uniform application interface to enable network applications to access the underlying network protocols transparently.<br />The TNS architecture consists of three software components: TNS-based applications, Oracle Protocol Adapters (OPA), and networking software like TCP/IP.<br />Back to top of file<br /><br /><br />What is the difference between SQL*Net V1, V2 and NET8?<br /><br /> SQL*Net V1 SQL*Net V2 Net8<br /> <br />Default port 1525/tcp 1521/tcp 1521/tcp<br />Start command tcpctl start lsnrctl start lsnrctl start<br />Stop command tcpctl stop lsnrctl stop lsnrctl stop<br />Connect string protocol:host:sid eg. T:SRV1:DB1 Specified in TNSNAMES.ORA Specified in TNSNAMES.ORA<br />Config files /etc/oratab tnsnames.ora, sqlnet.ora & listener.ora tnsnames.ora, sqlnet.ora & listener.ora<br />Env variable LOCAL= TWO_TASK= TWO_TASK=<br />Back to top of file<br /><br /><br />How does one configure SQL*Net?<br />Most people (myself included) prefer to edit the SQL*Net configuration files by hand. The only "officially supported" configuration method, however, is via the Oracle Net8 Assistant or Oracle Net8 Easy Config utility (previously called Oracle Network Manager).<br />This configuration utility is PC based. You need to generate the necessary files on your PC and FTP or copy them to the relevant operating systems you use Oracle on.<br />Look at the following sample configuration files:<br />$ORACLE_HOME/network/admin/sqlnet.ora<br />-------------------------------------<br /> automatic_ipc = ON # Set to OFF for PC's<br /> trace_level_client = OFF # Set to 16 if tracing is required<br /> sqlnet.expire_time = 0 # Idle time in minutes<br /> sqlnet.authentication_services = (ALL)<br /> names.directory_lookup = (TNSNAMES,ONAMES)<br /> names.default_domain = world<br /> name.default_zone = world<br /><br /><br />$ORACLE_HOME/network/admin/tnsnames.ora<br />---------------------------------------<br /> dbname1, aliasname1, aliasname2 =<br /> (description =<br /> (address_list =<br /> (address =<br /> (protocol = tcp)<br /> (host = yourHost.domain)<br /> (port = 1521)<br /> )<br /> )<br /> (connect_data =<br /> (sid = yourSID)<br /> )<br /> )<br /><br /><br />$ORACLE_HOME/network/admin/listener.ora<br />---------------------------------------<br /> LISTENER = # Listener name is LISTENER<br /> (address_list =<br /> (address=<br /> (protocol=ipc)<br /> (key=yourSID)<br /> )<br /> (address=<br /> (protocol = tcp)<br /> (host = yourHost.domain)<br /> (port = 1521)<br /> )<br /> )<br /><br /> STARTUP_WAIT_TIME_LISTENER = 0<br /> CONNECT_TIMEOUT_LISTENER = 10<br /> TRACE_LEVEL_LISTENER = ON<br /> TRACE_FILE_LISTENER = $ORACLE_HOME/network/trace/listener.trc<br /><br /> SID_LIST_LISTENER =<br /> (SID_LIST=<br /> (SID_DESC=<br /> (SID_NAME=yourSID)<br /> (ORACLE_HOME=YOUR_ORACLE_HOME)<br /> )<br /> )<br />NOTE: A wrong TNSNAMES.ORA entry on a line will block all valid entries below. Copy names to the top until you find the incorrect entry.<br />Back to top of file<br /><br /><br />I have some trouble with SQL*Net. How can I produce a trace file?<br />Create/edit your SQLNET.ORA file. You will find this file in one of the following locations (SQL*Net V2 searches for it in this order):<br /> Directory pointed to by the TNS_ADMIN parameter ($TNS_ADMIN on Unix)<br /> /etc (Unix only)<br /> /var/opt/oracle (Unix only)<br /> $ORACLE_HOME/network/admin or net8/admin directory<br />Your SQLNET.ORA file should contain the following lines to produce a trace file:<br /> trace_level_client=16<br /> trace_unique_client=yes<br />Sometimes it is useful to only trace TNSPING packets. Add the following parameters to your SQLNET.ORA file:<br /> TNSPING.TRACE_LEVEL = 16<br /> TNSPING.TRACE_DIRECTORY = /tmp/tnsping/<br />The following parameters are also worth setting:<br /> trace_file_client = cli.trc<br /> trace_directory_client = <path_to_trace_dir><br /> log_file_client = sqlnet.log<br /> log_directory_client = <path_to_log_dir><br />Back to top of file<br /><br /><br />How can I set up a dedicated server connection?<br />When you configue your database to use MTS (Multi-threaded server), all client requests are handed off to one of the shared server processes by the listener, via a dispatcher. If you want certain clients to use a dedicated Server process, you need to set the dedicated server option in your database connect string: ie.<br />SQLPLUS SCOTT/TIGER@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP) (PORT=1521)<br />(NODE=yourServerName))) (CONNECT_DATA=(SID=yourSid) (SERVER=DEDICATED)))<br />You can also edit your TNSNAMES.ORA file and add the (SERVER=DEDICATED) part in the CONNECT_DATA list or simply set USE_DEDICATED_SERVER=ON in your SQLNET.ORA file.<br />Back to top of file<br /><br /><br />Can I upgrade to SQL*Net V2 if I still have V1 clients?<br />SQL*Net V1 cannot talk with SQL*Net V2, and vice versa. The only way to overcome this problem is to run SQL*Net V1 and V2 simultaneously on the same database server. You can then install SQL*Net V2 on your clients as time permits. SQL*Net V1 and V2 can coexist on the same server, or on the same client.<br />You can also list V1 connect strings in your TNSNAMES.ORA file. Eg:<br />ORA1_NET1 = T:machine_name/port:database_name<br />Note that SQL*Net V1 is not available from version 7.3 of the database.<br />Back to top of file<br /><br /><br />How can I enable dead connection detection?<br />Dead database connections can be detected and killed by SQL*Net if you specify the SQLNET.EXPIRE_TIME=n parameter in your SQLNET.ORA file (usually in $ORACLE_HOME/network/admin). This parameter will instruct SQL*Net to send a probe through the network to the client every n minutes, if the client doesn't respond, it will be killed.<br />NOTE: This parameter is only useful on the database server side, specifying it on a client workstation will have no effect.<br />Back to top of file<br /><br /><br />What are inband and out of band breaks?<br />Data exceptions like Control-C can be transmitted as part of the regular data stream (inband) or as a separate asyncronious message (outband). Obviously outband breaks are much faster as they can interrupt the flow of data.<br />Out Of Bound Breaks (OOB) are enabled by default. One can disable OOB from the SQLNET.ORA file:<br />DISABLE_OOB=on<br />Back to top of file<br /><br /><br />What can be done to increase SQL*Net performance?<br /><br />1. While a SQL statement is running SQL*Net polls the client continuously to catch CONTROL-C situations. This results into a lot of poll and fstat system calls.<br />The following SQLNET.ORA parameter can be specified to reduce polling overhead on your system:<br /> BREAK_POLL_SKIP=n # Number of packets to skip between checking for breaks (default=4)<br /> <br />2. Prespawned server sessions. You can tell the listener to start up a pool of idle server processes. When a connection request is made, it doesn't have to start a server process; it just hands one of the idle processes to the client (and then starts a new connection in its own time). This is configured in LISTENER.ORA, in the SID_LIST_LISTENER section, as follows:<br /> SID_LIST_LISTENER =<br /> (SID_LIST =<br /> (SID_DESC =<br /> (SID_NAME = yourSID)<br /> (PRESPAWN_MAX = 50)<br /> (PRESPAWN_LIST =<br /> (PRESPAWN_DESC = (PROTOCOL = TCP) (POOL_SIZE = 5)<br /> (TIMEOUT = 2))))<br /> )<br />PRESPAWN_MAX: if there are over 50 sessions connected to the database, the listener won't prespawn any more.<br />POOL_SIZE: the listener will maintain an idle pool of 5 server processes. TIMEOUT: after a client disconnects, the listener will keep the freed-up server process around for two minutes, waiting for a new connection request, before killing that process.<br />3. Multiple listeners with load balancing. You can start multiple listeners on a server, and reference all of the listeners in the TNSNAMES.ORA file. When a client makes a connection request, the SQL*Net client will randomly pick one of the listeners to contact.<br />In LISTENER.ORA, specify multiple listeners as in:<br /> # Define listener A...<br /> STARTUP_WAIT_TIME_LISTENER_A = 0<br /> CONNECT_TIMEOUT_LISTENER_A = 10<br /> LISTENER_A=<br /> (ADDRESS_LIST =<br /> (ADDRESS =<br /> (PROTOCOL = TCP)<br /> (HOST = yourHost.domain)<br /> (PORT = 1521)))<br /> SID_LIST_LISTENER_A =<br /> (SID_LIST =<br /> (SID_DESC =<br /> (SID_NAME = yourSID)<br /> (PRESPAWN_MAX = 50)))<br /><br /> # Define the second listener...<br /> STARTUP_WAIT_TIME_LISTENER_B = 0<br /> CONNECT_TIMEOUT_LISTENER_B = 10<br /> LISTENER_B=<br /> (ADDRESS_LIST =<br /> (ADDRESS =<br /> (PROTOCOL = TCP)<br /> (HOST = yourHost.domain)<br /> (PORT = 1522)))<br /> SID_LIST_LISTENER_B =<br /> (SID_LIST =<br /> (SID_DESC =<br /> (SID_NAME = yourSID)<br /> (PRESPAWN_MAX = 50)))<br />The TNSNAMES.ORA service for this database would be something like:<br /> oradb1.world =<br /> (description_list=<br /> (description=<br /> (address_list=<br /> (address=<br /> (protocol=tcp)<br /> (host=yourHost.domain)<br /> (port=1521)))<br /> (connect_data =<br /> (sid = yourSID)))<br /> (description =<br /> (address_list =<br /> (address=<br /> (protocol=tcp)<br /> (host=yourHost.domain)<br /> (port=1522)))<br /> (connect_data =<br /> (sid = yourSID))))<br />Back to top of file<br /><br /><br />Can one get connected to a system regardless of machine failure?<br />You can place multiple address entries for a single connection alias in the TNSNAMES.ORA file. This means that you can connect to a database, even if some kind of physical failover occurred. Look at the following example:<br /> oradb1 = (DESCRIPTION =<br /> (ADDRESS_LIST =<br /> (ADDRESS =<br /> (COMMUNITY = TCP_COMM)<br /> (PROTOCOL = TCP)<br /> (HOST = Machine01))<br /> (ADDRESS =<br /> (COMMUNITY = TCP_COMM)<br /> (PROTOCOL = TCP)<br /> (HOST = Machine02)))<br /> (CONNECT_DATA=(<br /> (SID=oradb1))))<br />Suppose Machine01 is down, then every new SQL*NET connection using service oradb1 will automatically login to Machine02. However, there is one restriction, the SID must be the same on both machines. This feature can provide guaranteed login for application servers and for the Oracle Parallel Server.<br />Back to top of file<br /><br /><br />Can one grant or restrict access to a system via SQL*Net?<br />Yes, create a protocal.ora file like this:<br /> tcp.validnode_checking = yes<br /> tcp.invited_nodes = (www.orafaq.org,139.185.5.111)<br /> tcp.excluded_nodes = (133.17.15.21)<br />Back to top of file<br /><br /><br />Where can one get more info about SQL*Net/ Net8?<br /><br /> SQL*NET 1-2-3<br /> Download SQL*Net V2 Light for DOS<br />Back to top of file<br /><br /><br />How does one setup an Oracle Names Server<br /><br /> Create a domain database: Run script $ORACLE_HOME/network/admin/namesins.sql<br /> From a Windows9x/ NT workstation, start the Oracle Net8 Assistant and configure<br /> For server start the names server: namesctl start<br />Back to top of file<br /><br /><br />How to get your listener to register itself with the Names Server?<br /><br />Edit your LISTENER.ORA file and add a line USE_PLUGANDPLAY_listener_name=ON for each listener defined on your machine. Secondly, assign a GLOBAL_DBNAME parameter for each listener.<br />Sample LISTENER.ORA file:<br /> USE_PLUG_AND_PLAY_LISTENER = ON<br /> LISTENER =<br /> (ADDRESS_LIST =<br /> (ADDRESS=<br /> (PROTOCOL=IPC)<br /> (KEY= wblp-nt-011b_orcl.companyX.com)<br /> )<br /> (ADDRESS=<br /> (PROTOCOL=IPC)<br /> (KEY= orcl)<br /> )<br /> (ADDRESS =<br /> (COMMUNITY = TCPIP.companyX.com)<br /> (PROTOCOL = TCP)<br /> (Host = wblp-nt-011b.companyX.com)<br /> (Port = 1526)<br /> )<br /> )<br /> STARTUP_WAIT_TIME_LISTENER = 0<br /> CONNECT_TIMEOUT_LISTENER = 10<br /> TRACE_LEVEL_LISTENER = OFF<br /> SID_LIST_LISTENER =<br /> (SID_LIST =<br /> (SID_DESC =<br /> (GLOBAL_DBNAME = wblp-nt-011b_orcl.companyX.com)<br /> (SID_NAME = orcl)<br /> (ORACLE_HOME = /)<br /> (PRESPAWN_MAX = 10)<br /> )<br /> )<br />Back to top of file<br /><br /><br />How does one register an Oracle Names Server Entry?<br />Oracle Names Server entries are normally entered from the Oracle Network Manager (V7) or the Oracle Net8 Assistant. Both these tools run from your desktop.<br />You can also manually register an entry on your server using the NAMESCTL command. Eg:<br />NAMESCTL> register mydb.world -t oracle_database -d (description=(address=(protocol=tcp)(host=123.45.67.8)(port=1526))(connect_data=(sid=MYDB)))<br />NOTE: the whole command must be entered on one line. Also, make sure you register this database with all Names Servers running in your domain.<br />To check if your entry is correctly recorded in the Names Server, issue this command:<br />NAMESCTL> query mydb.world *<br />Back to top of file<br /><br /><br />How can I check if a listener registered itself with the Names Server?<br />Issue the LSNRCTL command and type either SERVICES or STATUS. If the listener successfully registered itself with the Oracle Names server you will notice the keyword "Registered" next to the service name. Example:<br />Services Summary...<br /> oraweb(Registered) has 1 service handler(s)<br />Back to top of file<br /><br /><br />What is the Connection Manager and what is it good for?<br />The Oracle Connection Manager (CMan) is a Net8 process that relays network traffic to a different address, and optionally changes its characteristics. The Connenction manager is commonly used for the following:<br /> Connenction Concentration<br /> Access Control<br /> Multiprotocol Support<br /> Provide Java applets to connect to a database that is not on the machine the Java applet was downloaded from.<br />Back to top of file<br /><br /><br />How does one configure the Connection Manager?<br />The CMAN.ORA file specify Connection Manager configuration details. Look at this sample CMAN.ORA file:<br />CMAN = (ADDRESS=(PROTOCOL=tcp)(HOST=141.145.83.4)(PORT=1610))<br /><br />CMAN_ADMIN = (ADDRESS=(PROTOCOL=tcp)(HOST=141.145.83.4)(PORT=1650))<br /><br />CMAN_RULES = (RULE_LIST =<br /> (RULE = (SRC=141.145.*.*) # Wildcard is "x"<br /> (DST=141.145.*.*)<br /> (SRV=ed23)<br /> (ACT=ACC)<br /> ))<br /><br />CMAN_PROFILE = (PARAMETER_LIST=<br /> (MAXIMUM_RELAYS=8) # Default is normally too small<br /> (LOG_LEVEL=1)<br /> (TRACING=NO)<br /> (SHOW_TNS_INFO=YES)<br /> (RELAY_STATISTICS=NO)<br />)<br />Back to top of file<br /><br /><br />How does one route data through the Connection Manager?<br />Code a TNSNAMES.ORA entry with two addesses. The first addres specifies the address CM is listening on (coded in CMAN.ORA). The socond is the address the traffic must be routed to. You also need to specify SOURCE_ROUTE=YES.<br />ED23_cman =<br /> (DESCRIPTION =<br /> (ADDRESS_LIST =<br /> (ADDRESS=(PROTOCOL=TCP)(HOST=141.145.83.4)(PORT=1610))<br /> (ADDRESS=(PROTOCOL=TCP)(HOST=zaedu2.za.oracle.com)(PORT=1923))<br /> )<br /> (CONNECT_DATA =<br /> (SERVICE_NAME = ed23)<br /> )<br /> (SOURCE_ROUTE = YES)<br /> )<br />Back to top of file<br /><br />_Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-83564576494118234062008-07-17T20:16:00.000-07:002008-07-17T20:17:05.219-07:00Oracle Precompiler FAQWhat is a precompiler and what is it good for?<br />A precompiler is a tool that allows programmers to embed SQL statements in a high-level source program. The precompiler accepts the source program as input, translates the embedded SQL statements into standard Oracle runtime library calls, and generates a modified source program that you can compile, link, and execute in the usual way. examples are Pro*C Precompiler for C, Pro*Cobol for Cobol and SQLJ for Java etc.<br />Back to top of file<br /><br /><br />What languages are supported?<br />The following 3GL languages are supported by the Oracle precompilers:<br />Host Language: File Extention:<br /> <br />Pro* COBOL *.PCO<br />Pro* Ada *.PAD<br />Pro* Fortran *.PFO<br />Pro* C (C++ included) *.PC<br />Pro* PL/I *.PPL<br />Pro* Pascal *.PPA<br />Please note that Oracle8 does not support Pascal, PL/I and Ada. For Java related issues, visit the JDBC/JSQL FAQ.<br />Back to top of file<br /><br /><br />What is the difference between OCI and the Precompilers?<br />The Oracle OCI (Oracle Call Interface), is an alternate low-level interface to the Oracle database.<br />The SQL precompilers for the various host languages (Pro*C, Pro*Ada, Pro*Fortran, Pro*COBOL, etc.) reads EXEC SQL commands and generate data structures and calls to its runtime library: SQLLIB (libsql.a in UNIX). SQLLIB, in turn, calls the User Program Interface (UPI) to communicate with the database. It does not generate calls to the Oracle Call Interface (OCI) but you can mix OCI and Precompiler calls.<br />For more info about the Oracle Call Interfaces, see the OCI FAQ.<br />Back to top of file<br /><br /><br />Should I use Pro*C V1 or V2?<br />Try to make the switch to version 2.0 as soon as possible. Starting with Oracle7 release 7.3, it will be the only version available. The support matrix:<br />Database Version: Pro*C Version: <br />7.0 1.5 <br />7.1 1.6 and 2.0 <br />7.2 1.6 and 2.1 <br />7.3 2.2 <br />8.x 8.x <br />Because Pro*C 2.x behaves differently from Pro*C 1.x, and to ease migration, both versions of Pro*C were shipped with 7.1 and 7.2. I recommend using 2.x or higher for any new development. You can use the PARSE=PARTIAL or PARSE=NONE options to get behavior similar to version 1.x.<br />Back to top of file<br /><br /><br />How does one compile a precompiler program?<br />The following syntax is used to precompile a Pro*C program:<br /> proc iname=myprog.pc host=C<br />Oracle includes some sample precompiler programs with it's installation. These are normally located under the $ORACLE_HOME/precomp/demo/proc (or related) directories.<br />After you've precompiled your program, invoke the standard host language compiler and linker. Also remember, if you modify your source code, change the original precompiled source program. In C, for example, you would modify the *.PC file and not the *.C file. The *.C file gets overwritten every time you precompile your program.<br />Look at the following table for other host languages:<br />Language: Program: Precompiler: Precompiled to:<br /> <br />C *.pc proc *.c<br />COBOL *.pco procob *.cob<br />FORTRAN *.pfo profor *.for<br />PASCAL *.ppa propas *.pas<br />ADA *.pad proada *.ada<br />Back to top of file<br /><br /><br />How does one compile a PRO*C program?<br />You can study the sample makefile provided by Oracle and construct your own, but it would probably be better to just use "make" to precompile and then compile your program in one step. Look at this Unix examples:<br />Oracle7:<br /> make -f $ORACLE_HOME/precomp/demo/proc/proc.mk build EXE=myprog OBJS=myprog.o<br />Oracle8:<br /> make -f $ORACLE_HOME/precomp/demo/proc/demo_proc.mk build EXE=myprog OBJS=myprog.o<br />NOTE: OBJS and EXE has to be entered in caps!!!<br />Back to top of file<br /><br /><br />How can I tell Pro*C what directory my header files are in?<br />Is there some way to tell the Pro*C preprocessor to search other directories for include (*.h) files, similar to the C compiler switch "-I"? I am hoping to avoid having to change all of my #include statements...<br />As documented in the Pro*C manual (in the chapter called "Running the Precompiler") there is a INCLUDE flag that can be used for this. Look at this example:<br /> proc iname=inputfile.pc include=directory1 include=directory2...<br />Back to top of file<br /><br /><br />What is an indicator variable and why should I use it?<br />Indicator variables are used to explicitly handle NULL values. When you SELECT or FETCH a NULL value into a host variable/array an "ORA-01405: fetched column values is NULL" run-time error will result.<br />This behaviour was introduced with Oracle7 when you recompiled your programs with the DBMS=V7 (the default) precompiler option.<br />One workaround for this is to use the NVL() function to prevent the selection of NULL values.<br />Example:<br /> EXEC SQL SELECT ENAME, SAL, COMM<br /> INTO :emp_name, :emp_sal, :emp_comm:comm_indicator<br /> FROM emp;<br /> if (comm_indicator == -1)<br /> pay = emp_sal;<br /> else<br /> pay = emp_sal + emp_comm;<br />Back to top of file<br /><br /><br />How does one execute PL/SQL code from Pro*C?<br />Example:<br /> EXEC SQL EXECUTE<br /> begin<br /> dbms_application_info.set_client_info('My C Program with embedded PL/SQL');<br /> end;<br /> END-EXEC;<br />Back to top of file<br /><br /><br />Where can I get more info about the Oracle Precompilers?<br /><br /> Oracle Precompilers - Online Documentation<br /> Oracle Precompilers Technical Bulletins<br />Back to top of fileSumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-44985663698783073122008-07-17T20:13:00.001-07:002008-07-17T20:13:42.656-07:00Oracle ODBC Connectivity FAQWhat is ODBC and where does it come from?<br />ODBC (Open Database Connectivity) provides a way for client programs (eg Visual Basic, Excel, Access, Q+E etc) to access a wide range of databases or data sources.<br />ODBC is a standardized API, developed according to the specifications of the SQL Access Group, that allows one to connect to SQL databases. It defines a set of function calls, error codes and datatypes that can be used to develop database independent applications.<br />ODBC is usually used when database independance or simultaneous access to different data sources is required.<br /><br /><br /><br />Are there alternative products that can be used?<br />Yes, look at Oracle Objects for OLE (OO4O).<br /><br /><br /><br />Where can I get ODBC drivers for Oracle7/8 and Oracle Rdb?<br />The Oracle ODBC drivers can be downloaded, free of charge, from the Oracle home page. There is also a free, open source ODBC driver available from http://www.easysoft.org/.<br />If you are still using Oracle V6, you can use the ODBC driver that comes with Microsoft Access 1.1 or an equivalent driver from whatever source.<br />Since ODBC is a standard, there are alternative drivers available via other vendors. The following vendors provide ODBC drivers that can run from Windows and Unix:<br /> InterBase Software Corp.<br /> OpenLink Software<br /> Merant (formerly Intersolv)<br /> SimbaExpress<br /> etc...<br />Note: If you plan to use a 16-bit application with ODBC (even if it is running on Windows95 or Windows NT), you will need to use a 16-bit Windows 3.1 ODBC driver.<br /><br /><br /><br />What do I need to get ODBC to work?<br />A working Oracle ODBC stack looks like this:<br /><br /> +--------------------+ Visual Basic, Excel, Access,<br /> | ODBC Application | Oracle Power Objects, etc.<br /> +--------------------+<br /> |<br /> +--------------------+<br /> | Driver Manager | This is ODBC.DLL<br /> +--------------------+<br /> |<br /> +--------------------+ This is the Oracle ODBC Driver<br /> | ODBC Driver | (SQORA7x.DLL or SQO32_7x.DLL) or<br /> +--------------------+ driver for a different data source/ vendor<br /> |<br /> +--------------------+ Oracle's SQL*Net (only for remote database)<br /> | Database Transport | or other database transport<br /> +--------------------+<br /> |<br /> +--------------------+ TCP/IP or<br /> | Network Transport | other protocol driver<br /> +--------------------+ (optional - only for remote connections)<br /> |<br /> +--------------------+ Your Oracle database or<br /> | Data Source | other data source you connect to<br /> +--------------------+<br /><br /><br /><br />Do I need SQL*Net to connect to Oracle via ODBC?<br />For Oracle's ODBC drivers, YES.<br />Some multi-tier ODBC drivers (eg. Openlink and Visionware) do not require SQL*Net on the client as one has to install an 'ODBC server component' on the server. The ODBC drivers then use the underlying network protocol (eg. TCP/IP) without using SQL*Net.<br /><br /><br /><br />How do I create a Data Source?<br />A data source is a logical name for a data repository or database. To define a data source, open the ODBC manager by double clicking on the ODBC icon in the Control Panel. Select the "add" button, then select the ODBC Driver for the database you want to connect to. The data source definition screen will appear. Define the data source name and other information as it pertains to your configuration.<br /><br /><br /><br />What ODBC Conformance Level is supported by Oracle?<br />ODBC provides 4 conformance levels depending upon how much of the ODBC specification is implemented in the driver. The levels are:<br /> CORE API<br /> LEVEL 1<br /> LEVEL 2<br /> LEVEL 3 - latest spec.<br />The Oracle7 ODBC driver supports ODBC Version 2.5 and 3.0 Level 2 only.<br />Oracle does not support Level 3 ODBC, but Level 1 is all that is necessary to do standard operations. If you develop applications that will run on different databases, you might want to limit yourself to level 1 ODBC calls.<br /><br /><br /><br />Should I give ODBC to my end-users?<br />It all depends... for performance reasons I would not allow end-users to access an OLTP (On-line Transaction Processing) system via ODBC. Rather, setup a Data Warehouse or Data Mart and let users enter their "queries from hell" against that database.<br /><br /><br /><br />How secure is ODBC?<br />Any ODBC sniffer will be able to trace everything from an ODBC perspective. This includes data, usernames, passwords etc. However, if you are using an ODBC driver that provides encryption, you can increase your level of security.<br />Since any front-end tool can effectively connect to and modify your databases, you need to enforce security at the server level.<br />On the other hand, if you use TCP/IP, ODBC security should be the least of your concerns!!!<br /><br /><br /><br />How fast is ODBC?<br />According to Oracle, their ODBC driver, on average, runs about 3% slower than native Oracle access.<br />My experience, however, is that ODBC can be extremely slow!!!<br /><br /><br /><br />How can I test if ODBC is setup correctly?<br />Execute the ODBCTST.EXE program that comes with your ODBC driver to ensure that all your connections are properly configured and that you can connect to your data source.<br /><br /><br /><br />How can I trace ODBC calls?<br />The Microsoft ODBC Administrator (My Computer/ Control Panel/ ODBC) provides a simple ODBC call trace that logs ODBC calls to a file. To use this facility, click the Options button on the initial Data Sources form. Check the box labeled "Trace ODBC Calls" and change the default log filename (SQL.LOG) if desired. The underlying ODBC calls the front-end application makes to communicate with the ODBC Driver will be logged to this file.<br />Specialized ODBC trace programs, such as Microsoft's ODBC Spy (included in the ODBC SDK 2.0), ODBC Inspector and ODBC Agent can be used to capture detailed ODBC call information and the return code for each call.<br /><br /><br /><br />How do I tell which driver version I have installed?<br />Run the ODBC administrator from the desktop (ODBCADM.EXE or ODBCAD32.EXE):<br /> Click the "Drivers" button<br /> Choose the desired ODBC driver<br /> Click the "About" button<br />Version information will be displayed for the selected driver.<br /><br /><br /><br />What is SQLPASSTHROUGH?<br />Use the ODBC SQLPASSTHROUGH option when you need to pass your SQL statement to the ODBC data source directly. No massaging or local processing is done on the statement, it is passed to the database server AS IS. This improves performance, but the resulting dynaset is not updatable. Example:<br /> db.ExecuteSQL("BEGIN procedurename(param1,param2,param3); END;", SQLPASSTHROUGH)<br /><br /><br /><br />How does one attach an Oracle table in MS-Access?<br />Create a linked table under the table tab in Access. Right click; select link table. A dialog box opens, at the bottom, change the "files of type" box to ODBC Databases. This will open the Data Source dialog box. Select your data source, file or machine (note the type you created earlier). You will now be prompted to login to the Oracle database.<br />One can also link a table programmatically. Open a new MODULE in Access, add this code to it and RUN (F5):<br />Option Compare Database<br />Option Explicit<br /><br />Function AttachTable() As Variant<br /> On Error GoTo AttachTable_Err<br /><br /> Dim db As Database<br /> Dim tdef As TableDef<br /> Dim strConnect As String<br /><br /> Set db = CurrentDb()<br /> strConnect = "ODBC;DSN=oraweb;DBQ=qit-uq-cbiw_oraweb;DATABASE="<br /> ' NOTE: DSN is your ODBC Data Source Name; DBQ is your TNSNAMES.ORA entry name<br /><br /> Set tdef = db.CreateTableDef("MY_ACCESS_TABLENAME")<br /> ' tdef.Attributes DB_ATTACHEDODBC<br /> tdef.Connect = strConnect<br /> tdef.SourceTableName = "MY_ORACLE_TABLENAME"<br /> db.TableDefs.Append tdef<br /><br />AttachTable_Exit:<br /> Exit Function<br /><br />AttachTable_Err:<br /> MsgBox "Error: " & Str(Err) & " - " & Error$ & " occured in global module."<br /> Resume AttachTable_Exit<br /><br />End Function<br /><br /><br /><br />How does one get Oracle data into MS-Excel?<br />There are several ways to extract Oracle data from Microsoft Excel. Look at these methods:<br /> From sqlplus, spool records into a file, then import into Excel. Eg:<br /> set echo off pagesize 0 head off feed off veri off trimspool on<br /> spool data.txt<br /> select COL1 || ',' || COL2 || ',' || COL3 ....<br /> spool off<br /> <br /> Load Oracle Objects for OLE (OO4O) on your PC. See the OO4O FAQ for more details.<br /> Download Oraxcel Lite, a freeware plug-in used to run SQL statements directly from Excel. Oraxcel requires OO4O to be installed on your PC.Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com1tag:blogger.com,1999:blog-3428468978735661096.post-12832793350997879192008-07-17T20:12:00.001-07:002008-07-17T20:12:58.965-07:00Oracle Objects for OLE (OO4O) FAQWhat is Oracle Objects for OLE?<br />Oracle Objects for OLE (OO4O) is a middleware product manufactured by Oracle Corporation that allows native access to Oracle7 databases from client applications via the Microsoft OLE (Object Linking and Embedding) standard. OO4O's predecessor was called Oracle Glue.<br />Oracle Objects consists of the following three components:<br /> An OLE 2.0 Automation (InProcess) Server - This provides an OLE Automation interface to applications that support OLE automation scripting such as Visual Basic (VB)<br /> An Oracle Data Control - This is the Visual Basic custom control (VBX)<br /> Two C++ Class Libraries - C-Libraries for Microsoft Foundation Classes (MFC) and Borland (OWL)<br /><br />How does OO4O compare to ODBC?<br />OO4O provides native access to Oracle and only Oracle databases. It is faster than ODBC access but one can use ODBC to connect to a variety of data sources.<br />Since OO4O closely follows the ODBC query interface model, one can retain over 95% code compatibility between the OO4O and ODBC versions of the data layer procedures. This translates to very short retooling times in porting between the two products.<br /><br />Can I use OO4O to access Oracle data from Microsoft applications?<br />Yes, you can use OO4O from any Microsoft application that uses the VB-style macro language. This includes Visual Basic, Excel, and MS-Access.<br />How does one connect to an Oracle Database?<br /><br />Sub Form_Load ()<br /> Dim OraSession As Object 'Declare variables as OLE Objects<br /> Dim OraDatabase As Object<br /> Dim OraDynaset As Object<br /><br /> Set OraSession = CreateObject("OracleInProcServer.XOraSession")<br /> Set OraDatabase = OraSession.DbOpenDatabase("SQL*Net_Connect_String", "scott/tiger", 0&)<br /> MsgBox "Connected to " & OraDatabase.Connect & "@" & OraDatabase.DatabaseName<br /><br /> 'Create the OraDynaset Object and display the first value<br /> Set OraDynaset = OraDatabase.DbCreateDynaset("select empno, ename from emp", 0&)<br /> MsgBox "Employee " & OraDynaset.Fields("empno").value & ", #" & OraDynaset.Fields("ename").value<br />End Sub<br />What are the major VB/ODBC limitations that OO4O overcomes?<br />(From the Oracle Objects Technical Overview by Keith Majkut):<br />Visual Basic 3.0 database access is not very client/server oriented. In fact, the Visual Basic database access is really designed for flatfile databases, but Visual Basic can use ODBC to access SQL databases. Unfortunately, Visual Basic, by default, makes use of a local SQL engine, called JET to process queries (using the MS JET SQL implementation, NOT Oracle's). You may bypass the JET engine (using something called SQLPASSTHROUGH, which causes the SQL to be sent directly to the database), but doing so causes your dynaset to be read-only. You would then have to update data by constructing SQL insert/delete/update statements. You would not be able to use the built in AddNew, Delete and Update methods. (Note: SQL statements cannot contain text data > 32K and cannot contain binary data.)<br />The drawbacks of the VB/JET/ODBC combination are many:<br /> Rows are accessed via a primary key (unique index). Your table MUST contain a unique index, or else the resulting dynaset will NOT be updatable. This is an ODBC feature related to the fact that ODBC is based on Microsoft's SQLServer.<br /> When a dynaset is created, only the primary keys are fetched; rows are not fetched until they are needed. This sounds reasonable until you realize that it results in multiple queries and many trips to the server.<br /> When a snapshot is created, all rows are immediately fetched. This could potentially be millions of rows.<br /> Table joins are performed locally.<br /> Although views and synonyms can be used, they will cause your dynaset to be read-only.<br /> Column aliases and schema references (such as "SCOTT.EMP") cannot be used without SQLPASSTHROUGH.<br /> Object names are referenced in UPPER case unless you use SQLPASSTHROUGH. This only works for the (default) Oracle setting of case-insensitive objects.<br /> There is no support for SQL bind variables (i.e. "SELECT * FROM EMP WHERE ENAME = :name"). If the value of your variable changes, you need to recreate the SQL statement and dynaset. This means that the server must reparse the query and refetch the data.<br /> There is no support for PL/SQL bind variables (in/out parameters). The workaround is to pass values in as literals, and store the return values in a temporary table that you can then query on to get the results.<br /> Multiple data controls (or database opens) use multiple database connections, even if they all reference the same account on the same database. This can be a serious problem with databases that have a limit on the total number of connections they will accept.<br />Oracle Objects has no such drawbacks:<br /> Rows are accessed via their rowid. If a rowid can be obtained, then the data is updatable.<br /> When creating a dynaset, some data is initially fetched and cached locally. Data is fetched and stored locally as needed, as rows are traversed. Admittedly, this can lead to a large local data cache, so many tunable cache parameters are provided to improve performance.<br /> Snapshots have not been implemented, since a read-only dynaset is a reasonable equivalent.<br /> Table joins are performed by the server.<br /> Views, synonyms, column aliases and schema references can be used freely. The updatability of database objects is only dependent SQL updatability rules and on the access you have been granted .<br /> Objects names are not modified in any way. You may use upper or lower case in the names, which are case-insensitive.<br /> Support for SQL bind variables (i.e. "SELECT * FROM EMP WHERE ENAME = :name") is offered via the Parameters collection. The server does not have to reparse the query before refetching data.<br /> Support for PL/SQL bind variables is offered (in/out vars) via the Parameters collection.<br /> Multiple data controls (or database opens) referencing the same account on the same database will all share a single Oracle connection.<br />At first, the VB/JET/ODBC limitations may not sound serious, but consider a typical production Oracle environment where most users only have access to data via synonyms and views. This means that VB/JET/ODBC users can only read, not write data.Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-58811119259096469202008-07-17T20:11:00.001-07:002008-07-17T20:11:35.573-07:00Oracle Forms 4.5/ 5.0/ 6.0 FAQHow does one iterate through items in a specified block?<br />Code example:<br />OriPos := TO_NUMBER(:System.Trigger_Record);<br />First_Record;<br /><br />LOOP<br /> -- do processing<br /> IF (:System.Last_Record = 'TRUE') THEN<br /> Go_Record(OriPos);<br /> EXIT;<br /> ELSE<br /> Next_Record;<br /> END IF;<br />END LOOP<br /><br />Can on bypass the Oracle login screen?<br />The first thing that the user sees when using runform is the Oracle logon prompt asking them for their username, password, and database to connect to. You can bypass this screen or customise it by displaying your own logon screen. Eg:<br />ON-LOGIN<br />declare<br /> uname varchar2(10);<br /> pass varchar2(10);<br />begin<br /> uname := 'username';<br /> pass :='password';<br /> logon(uname, pass||'@connect_database');<br />end;<br /><br />Can one Maximize/ Minimize a Window in Forms?<br />On MS-Windows, Forms run inside a Windows Multiple-Document Interface (MDI) window. You can use SET_WINDOW_PROPERTY on the window called FORMS_MDI_WINDOW to resize this MDI (or any other named) window. Examples:<br /> set_window_property(FORMS_MDI_WINDOW, WINDOW_STATE, MINIMIZE);<br /> set_window_property(FORMS_MDI_WINDOW, POSITION, 7, 15);<br /> set_window_property('my_window_name', WINDOW_STATE, MAXIMIZE);<br />Can one issue DDL statements from Forms?<br />DDL (Data Definition Language) commands like CREATE, DROP and ALTER are not directly supported from Forms because your Forms are not suppose to manipulate the database structure.<br />A statement like CREATE TABLE X (A DATE); will result in error:<br />Encountered the symbol "CREATE" which is a reserved word.<br />However, you can use the FORMS_DDL built-in to execute DDL statements. Eg:<br />FORMS_DDL('CREATE TABLE X (A DATE)');<br /><br />Can one execute dynamic SQL from Forms?<br />Yes, use the FORMS_DDL built-in or call the DBMS_SQL database package from Forms. Eg:<br />FORMS_DDL('INSERT INTO X VALUES (' || col_list || ')');<br />Just note that FORMS_DDL will force an implicit COMMIT and may de-synchronize the Oracle Forms COMMIT mechanism.<br />Forms won't allow me to use restricted built-in's. What should I do?<br />How to get around the "can't use a restricted built-in in built-in XXX" message:<br />1. Create a TIMER at the point where you want the navigation to occur. Eg. create_timer('TIMER_X', 5, NO_REPEAT);<br />2. Code a WHEN-TIMSumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-25753916660413252182008-07-17T20:10:00.001-07:002008-07-17T20:10:43.293-07:00Oracle for WindowsNT FAQShould I use NT Client or NT Server to run Oracle?<br /><br />Windows NT comes in two flavours: Workstation and Server. These terms are highly misleading, suggesting that a machine with server functions should run NT Server. That is not the case at all. The distinction between Workstation and Server is only important to NT itself. The Server product includes the NT domain administration tools and services. If you have more than one NT machine in a network you will probably want one of them to be an NT Server machine to act as the domain controller, but you probably DON'T want to run the Oracle database server on that machine.<br />The Oracle database server and tools will run equally well on an NT "Workstation" machine as on an NT "Server" machine, unless the Server machine is the Domain Controller for a busy domain, in which case it would be a poor choice to host a busy database server as well.<br />Back to top of file<br /><br /><br />What Oracle services must be running on a NT box?<br />To check that the necessary Oracle services are up and running go to CONTROL PANEL/ SERVICES (or type "net start" from a DOS window). You should see at least two lines - OracleStartSID and OracleServiceSID (if you have a SQL*Net listener running, you should see a line for that as well).<br />Back to top of file<br /><br /><br />How can I automatically start Oracle on NT?<br />Check to make sure the OracleServiceSID and OracleStartSID services are started. Go to the control panel/services to perform this task. Make sure that both services are set as AUTOMATIC.<br />You may need to recreate the two services mentioned above. Do the following, assuming a SID of TEST.<br />If the services were not created, create them from the DOS command prompt using Oradimxx (where xx is the version, 73 for 7.3 or 80 for 8.0). NOTE: Each oradim command below should be typed as one line.<br />Open a DOS Command Prompt window.<br />- If neither service was created:<br /> oradimxx -new -sid TEST -intpwd ORACLE -startmode AUTO -pfile C:\ORANT\DATANASE\INITTEST.ORA<br />- If only OracleStartTEST was not created:<br /> oradimxx -delete -sid TEST<br /> oradimxx -new -sid TEST -intpwd ORACLE -startmode AUTO -pfile C:\ORANT\DATANASE\INITTEST.ORA<br />Back to top of file<br /><br /><br />Can one start and stop services from a batch job?<br />Issue commands similar to these from a batch file:<br /> net start "OracleAgent"<br /> net start "OracleStartSID"<br /> rem net start "OracleServiceSID" /y<br /> net start "OracleTNSListener"<br /> net start "OracleWWWListener9999"<br />To stop the services, use net stop instead of net start.<br />These commands are handy if you need to shut down the database for a cold (offline) backup. Do not put this batch file in your Windows startup group as the database will then only start when someone logs onto the server. The database will not start if the server is re-booted and waits on the log-on screen.<br />The following registry entries are also handy to prevent a SHUTDOWN ABORT when the OracleServiceSID service is stopped:<br /> [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE]<br /> "ORA_SID_SHUTDOWN"="TRUE"<br /> "ORA_SID_SHUTDOWN_TIMEOUT"="60"<br />Back to top of file<br /><br /><br />How does one kill Oracle processes on NT?<br />Use the orakill command that comes with Oracle for NT to kill a thread. You need to specify the thread ID in Hex. Try orakill /? or orakill /h for more details.<br />Back to top of file<br /><br /><br />How does one take a hot database backup on NT?<br />You need to use the Oracle OCOPYxx.EXE utility on Windows NT to backup open database files (e.g. do a hotbackup).<br />The NTBACKUP command will not backup open files. Also, OCOPYxx.exe (e.g. OCOPY80.EXE distributed with Oracle8.0) will not backup files to tape, only to another disk location. Once the hotbackup to disk is complete, you can use the NTBACKUP utility to backup the files to tape.<br />Note: If you perform a hot backup your databases must run in archivelog mode, otherwise shutdown and do a cold backup.<br />Back to top of file<br /><br /><br />Can I schedule backups and maintenance jobs on NT Server?<br />Yes, make sure the SCHEDULE service is running (control panel/ services/ schedule). You can now schedule jobs by issuing the AT command. Eg:<br /> C:>at 12:00pm "my_backup"<br /> Added a new job with job ID = 0<br />To get a list of scheduled jobs, execute the AT command without any parameters: Eg:<br /> C:>at<br /> Status ID Day Time Command Line<br /> ----------------------------------------------------------------<br /> 0 Tomorrow 12:00 PM my_backup<br />For more info, type AT /?<br />Also note that several alternatives exist to the AT command. For example, there is a GUI utility in the NT Resource Kit CD-ROM for scheduling jobs. This utility will (supposedly) become part of the OS with version 5.0. It's a lot more convenient to use than its command-line counterpart AT.<br />Back to top of file<br /><br /><br />How can I fool Oracle to think a remote database is local?<br />Some products, like Oracle WebDB, require a local Oracle database. You can direct all connect requests to a TNSNAMES.ORA connect descriptor by setting the LOCAL string in your Windows registry. Whenever you now connect to a database without a connect string, the remote database will be used.<br /> Run the RegEdt32 program<br /> Navigate to: HKEY_LOCAL_MACHINE/ SOFTWARE/ ORACLE<br /> Go to Edit/ Add value and type in LOCAL<br /> When prompted for a String, enter your TNSNAMES.ORA alias.<br />PS: In a BAT or CMD file, you can just do a "set LOCAL=alias_name".<br />Back to top of file<br /><br /><br />Any performance tuning tips for Oracle on NT?<br /><br /> Make sure you have enough memory. If real memory on your system is limited, the CPU will spend considerable time paging and swapping.<br /> Change the machine configuration from the default "Maximize throughput for file sharing" to "Maximize throughput for network applications" (Right click on Network Neighborhood/ Services/ Server/ Properties).<br /> Remove any protocols not required from the installed network software list.<br /> Move the primary used protocol to the top of the list. writing to disk.<br /> Stop all unnecessary services on your machine.<br /> Use proper file placement so I/O is spread evenly across disks. If possible use RAID devices.<br /> Filesystem overhead can be eliminated by using raw devices.<br /> You get the best performance when all threads runs with NORMAL priority (see the ORACLE_PRIORITY registry value).<br /> The default DB_BLOCK_SIZE on NT is 2k, Increase this if you use your system for DSS queries.<br /> If all else fails, consider upgrading to Unix or MVS. You can migrate an Oracle database to a different platform without impacting your end-users.<br />Back to top of file<br /><br /><br />Where can I get more info about WindowsNT?<br /><br /> The Oracle DBA's guide to NT<br /> Microsoft's Windows NT Home Page<br /> Windows NT FAQ<br />Back to top of fileSumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-71720487723856359152008-07-17T20:09:00.002-07:002008-07-17T20:10:11.731-07:00Oracle for Windows 3.x, 95 and 98 FAQWhat happened to my ORACLE.INI file?<br />Normally your WIN.INI file will contain an Oracle section indicating where your ORACLE.INI file can be found. Eg:<br />[Oracle]<br />ORA_CONFIG=c:\windows\oracle.ini<br />Oracle's Windows95 and NT compliant (32-bit) products do not use the ORACLE.INI file but store parameters in the Windows Registry. You can edit the Registry by running the REGEDIT.EXE program (REGEDT32.EXE on NT).<br />To copy settings to a different machine, export the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE key using REGEDIT (say to oracle.reg), copy this file to the new machine and import.<br />Back to top of file<br /><br /><br />How can I identify myself to my DBA?<br />Edit your ORACLE.INI file in your C:\WINDOWS directory (or edit the Windows Registry entries if you don't have one) and add:<br />USERNAME=Frank<br />TERMINAL=AccPc01<br />OS_USER=Frank<br />You DBA can now verify which users are connected to his database via<br />SELECT USERNAME, TERMINAL, STATUS FROM SYS.V_$SESSION;<br />Back to top of file<br /><br /><br />I'm using Windows95, what TCP/IP driver should I install for SQL*Net?<br />I want to install the Oracle SQL*Net TCP/IP Adaptor on a Windows95 PC but there is no matching TCP driver, in the "TCP vendor list", for the native Windows95 TCP driver. What is the best choice or action to take?<br />Simply select Windows Sockets (very first line) - it does work.<br />Back to top of file<br /><br /><br />How can I automatically start Oracle on Windows?<br />First solution:<br />Set the "HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\DATABASE_STARTUP" key in the Windows95 Registry to value "AUTO". To disable automatic startup set the value to NOAUTO.<br />Second solution:<br />Put an icon for Server Manager in your startup group. The command line for Server Manager must include a SQL script that contains the same commands you use to startup Oracle. Eg:<br />SVRMGRxx COMMAND="@startup.sql"<br />All of this assumes that you have the Oracle services set to startup automatically upon system startup. This is the default upon installation. Your startup script should look like this:<br />SPOOL STARTUP.LOG<br />CONNECT INTERNAL<br />STARTUP<br />SPOOL OFF<br />EXIT<br />Back to top of file<br /><br /><br />How does one connect to Personal Oracle?<br /><br />Personal Oracle7:<br />The connect string is 2:<sid> where <sid> is the instance ID. The default SID is ORCL. (no period)<br />Personal Oracle8:<br />For Personal Oracle8, you must use the Bequeth Protocol Adaptor. The connect string is beq-local. The Oracle Net8 Easy Config utility must be run in order to have the TNSNAME.ORA file updated with the appropriate information. Start Net8 Easy Config and create a new service using the Bequeath (Local Database) protocol.<br />In order to connect with Oracle7 tools to the Oracle8 database, you need to define a TCP/IP listener in the LISTENER.ORA file and start it from a DOS window (lsnrctl80 start).<br />Back to top of file<br /><br /><br />How can one change the default database on Windows?<br />If your client machine runs Windows95 or NT, set the LOCAL (or REMOTE) variable to the value of the database alias in the Registry (under the key \LOCAL_MACHINE\SOFTWARE\ORACLE).<br />Back to top of file<br /><br /><br />Commonly used scripts and sample files<br /><br /> SET_SID.REG - Set ORACLE_SID in Windows Registry<br /> CREPO8DB.BAT - Batch file needed to create a new/extra Personal Oracle8 DB<br /> CREPO8DB.SQL - Create a new/extra Personal Oracle8 DB<br />Back to top of file<br /><br /><br />Where can I get more info about Windows?<br /><br /> Microsoft's Windows Home Page<br /> WinMag's Windows FAQ<br /> Windows 3.x FAQ<br /> WinFiles.com<br />Back to top of fileSumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-28015307349848278672008-07-17T20:09:00.001-07:002008-07-17T20:09:38.623-07:00Oracle for UNIX FAQWhat is ORATAB and what is it good for?
<br />The oratab file is normally located in /etc or /var/opt/oracle. Origianally it was used for SQL*Net V1. It contains comments in unix-style leading pound signs (#), and data lines consisting of entries in this format:
<br /> database_sid:oracle_home_dir:Y|N
<br />where database_sid is the system id (sid) of one of your oracle instances on this server. oracle_home_dir is the ORACLE_HOME directory associated with this instance. The Y|N flags indicate if the instance should automatically start at boot time (Y) or not (N).
<br />You might think that if you are no longer running SQL*Net V1, you do not need oratab. However, Oracle's dbstart and dbshut scripts still use this file to figure out (using the third field, YorN) which instances are to be start up or shut down. And some other people (including me) have written scripts that cycle through multiple instances using oratab. But if you don't use SQL*Net V1, and don't use these scripts, you don't really need this file anymore.
<br />Back to top of file
<br />
<br />
<br />How does one prepare the Oracle environment?
<br />An oraenv script is provided with every Oracle installation. Run it as part of your current environment to set the necessary environment variables like ORACLE_HOME, ORACLE_SID, etc. Never set the Oracle Home directory explicitely in a script.
<br />The following example shows how to use oraenv (noninteractively) from a script:
<br /> export ORACLE_SID=ORCL;
<br /> export ORAENV_ASK=NO
<br /> . oraenv
<br />NOTE: the ". " in front of "oraenv" is needed to run the script as part of the current shell.
<br />Back to top of file
<br />
<br />
<br />How do I get Oracle to automatically start when my server boots up?
<br />Make sure the entry for your database SID in the /etc/oratab file ends in a capital Y. Eg:
<br /># $ORACLE_SID:$ORACLE_HOME:[N|Y]
<br />#
<br />ORCL:/u01/app/oracle/product/8.0.5:Y
<br />#
<br />The scripts for starting and stopping databases are: $ORACLE_HOME/bin/dbstart and dbshut. SQL*Net (or Net8) is started with the lsnrctl command. Add the following entries to your /etc/rc2.d/S99dbstart (or equivalent) file:
<br />su - oracle -c "/path/to/$ORACLE_HOME/bin/dbstart" # Start DB's
<br />su - oracle -c "/path/to/$ORACLE_HOME/bin/lsnrctl start" # Start listener
<br />su - oracle -c "/path/tp/$ORACLE_HOME/bin/namesctl start" # Start OraNames (optional)
<br />Back to top of file
<br />
<br />
<br />How does one list all installed products?
<br />One can display all installed products with version information by executing the following commands:
<br /> cd $ORACLE_HOME/orainst
<br /> ./inspdver
<br />NOTE: From oracle 8i the "inspdver" command is not available anymore. If you find an alternative, please let us know.
<br />Back to top of file
<br />
<br />
<br />Can I export directly to a tape drive?
<br />Yes, just use the tape device instead of the file name. Eg:
<br />exp userid/password file=/dev/rmt0 table=emp volsize=1.2G
<br />Note: The volume size is a number ending with a m, k, or b (M, K, or B). The default is bytes.
<br />Back to top of file
<br />
<br />
<br />Can I archive directly to tape?
<br />Yes, set log_archive_dest = /dev/rmt0:100M in your init.ora file.
<br />You can also use ARCHMON which communicates with ARCH. When the end of tape is reached, ARCH stops and signals ARCHMON to prompt the user for a new tape. When ARCHMON knows the tape is mounted, it tells ARCH to resume the archiving operation. It needs regular operator monitoring.
<br /> $ archmon @P:TEST
<br />Back to top of file
<br />
<br />
<br />I don't have enough space to export my database! Any suggestions?
<br />Well, if you can't afford to buy extra disk space you can run export and compress simultaneously. This will prevent the need to get enough space for both the export file AND the compressed export file. Eg:
<br /># Make a pipe
<br />mknod expdat.dmp p # or mkfifo pipe
<br /># Start compress sucking on the pipe in background
<br />compress <> expdat.dmp.Z &
<br /># Wait a second or so before kicking off the export
<br />sleep 5
<br /># Start the export
<br />exp scott/tiger file=expdat.dmp
<br />Or export accross the network directly into the target database:
<br />Host A:
<br />mknod FIFO.dmp p
<br />exp u/p FILE=FIFO.dmp rest_of_parameters...
<br />Host B:
<br />mknod FIFO2.dmp p
<br />rsh host1 dd if=FIFO.dmp > FIFO2.dmp &
<br />imp u/p FILE=FIFO2.dmp rest_of_parameters...
<br />Note:
<br />It is important that you verify that the named pipe is ready on each side before you start the process.
<br />Back to top of file
<br />
<br />
<br />How can I overcome the Unix 2 Gig file limit?
<br />This example uses the Unix split command to create multiple files, each smaller than the Unix (and imp/exp) 2 Gigabyte file size limit. This method would typically be used for import, export and SQL*Loader operations.
<br />cd /tmp/data
<br />rm exp.dmp
<br />mknod exp.dmp p # mkfifo on certain Unix flavours
<br />split -b2047m exp scott/tiger file=/tmp/data/exp.dmp record=n tables=tableX
<br />cd /tmp/data
<br />rm exp.dmp
<br />mknod exp.dmp p
<br />cat xaa xab xac xad >/tmp/data/exp.dmp &
<br />imp scott/tiger file=/tmp/data/exp.dmp commit=y tables=tableX
<br />Back to top of file
<br />
<br />
<br />How can I export/import my database faster?
<br />The IMP/EXP programs run in two task mode to protect the SGA from potential corruption by user programs. If you relink these programs in single task mode you can gain much improvement in speed (up to 30%). Although Oracle won't support this they supposedly use this method themselves.
<br />Although running in single-task is faster, it requires more memory since the Oracle executable's text is no longer shared between the front-end and background processes. Thus, if you need to transfer large amounts of data between databases, relink the executale for greater efficiency.
<br /> cd $ORACLE_HOME/rdbms/lib
<br /> make -f ins_rdbms.mk singletask
<br /> # make -f ins_rdbms.mk expst
<br /> # make -f ins_rdbms.mk impst
<br /> # make -f ins_rdbms.mk sqlldrst
<br /> # mv expst $ORACLE_HOME/bin/
<br /> # mv impst $ORACLE_HOME/bin/
<br /> # mv sqlldrst $ORACLE_HOME/bin/
<br />Now use expst and impst instead of imp or exp.
<br />Back to top of file
<br />
<br />
<br />How can I SELECT a value from a table into a Unix variable?
<br />You can select a value from a database column directly into a Unix shell variable. Look at the following shell script examples:
<br />#!/bin/sh
<br />VALUE=`sqlplus -silent "user/password@instance" <<END
<br />set pagesize 0 feedback off verify off heading off echo off
<br />select max(c1) from t1;
<br />exit;
<br />END`
<br />if [ -z "$VALUE" ]; then
<br /> echo "No rows returned from database"
<br /> exit 0
<br />else
<br /> echo $VALUE
<br />fi
<br />Second example, using the SQL*Plus EXIT status code:
<br />#!/bin/ksh
<br />sqlplus -s >junk1 "usr/psw@instance" <<EOF
<br />column num_rows new_value num_rows format 9999
<br />select count(*) num_rows
<br /> from table_name;
<br />exit num_rows
<br />EOF
<br />echo "Number of rows are: $?"
<br />Yet another example, only this time we will read multiple values from SQL*Plus into shell variables.
<br />sqlplus -s usr/psw@instance |& # Open a pipe to SQL*Plus
<br />
<br />print -p -- 'set feed off pause off pages 0 head off veri off line 500'
<br />print -p -- 'set term off time off'
<br />print -p -- "set sqlprompt ''"
<br />
<br />print -p -- "select sysdate from dual;"
<br />read -p SYSDATE
<br />
<br />print -p -- "select user from dual;"
<br />read -p USER
<br />
<br />print -p -- "select global_name from global_name;"
<br />read -p GLOBAL_NAME
<br />
<br />print -p -- exit
<br />
<br />echo SYSDATE: $SYSDATE
<br />echo USER: $USER
<br />echo GLOBAL_NAME: $GLOBAL_NAME
<br />Back to top of file
<br />
<br />
<br />How can I SELECT information into my vi-file?
<br />When using vi to edit SQL*Plus or Pro*C code, sometimes one need to insert a table definition or data values into the file. You can simply open a new line, put 'desc EMP' (or a SELECT statement) into it and type:
<br /> :.,.!sqlplus -s /
<br />... automagically output from your statement arrives in the vi buffer for cutting and pasting. You might even like to consider piping the output through grep, awk, sed or perl.
<br />Back to top of file
<br />
<br />
<br />How can I automate my on-line backup's?
<br />Write a CRON job to:
<br />1. Get the tablespace names from Oracle:
<br />SELECT TABLESPACE_NAME FROM SYS.DBA_TABLESPACES;
<br />2. Put the tablespaces in backup mode:
<br />ALTER TABLESPACE ... BEGIN BACKUP;
<br />3. Get the database file names from Oracle:
<br />SELECT NAME FROM SYS.V_$DATAFILE;
<br />SELECT NAME FROM SYS.V_$CONTROLFILE;
<br />SELECT MEMBER FROM SYS.V_$LOGFILE;
<br />4. Backup the files using pax, tar, ufsdump, dd, cpio or whatever file copy command you fancy. Note that if your database is on a raw partition, you can only use dd. Some examples:
<br /> $ find . -depth -print | cpio -ocBv >/dev/tapedevice
<br /> $ dd if=/dev/raw_device of=/dev/tape_device BS=8k
<br /> $ pax -w -f archive.pax *
<br />5. End backup mode for all the tablespaces.
<br />ALTER TABLESPACE ... END BACKUP;
<br />Back to top of file
<br />
<br />
<br />What is the purpose of the sgadef.dbf file?
<br />The sgadef.dbf file can be found in the ${ORACLE_HOME}/dbs directory. Whatever you do, DO NOT REMOVE IT!!! It tells the oracle shadow process the address of the SGA when the process first connects to the database. If the process cannot find this file, it assumes the database is down.
<br />Problems can arise when the reverse is true ie. the database is down but the sgadef file exists, as happens when the system crashes. In this case, the memory segment addressed in the file doesn't exist (try ipcs -m to convince yourself), which results in an error.
<br />Back to top of file
<br />
<br />
<br />Can I see what patches are applied to Oracle?
<br />With the Unix "what" command one can see what patches are applied to an executable. The Oracle implementation of what is called owhat.
<br />The 'what' command delves into a file and extracts SCCS version control information from that file, if any exists. For more details, look up 'man what'. Look at this example:
<br />$ cd $ORACLE_HOME/bin
<br />$ owhat oracle
<br />Oracle patches in /app/oracle/product/7.3.4/bin/oracle:
<br /> sf.c VLFS patch 08/1/96
<br /> sksa.c VLFS patch 08/1/96
<br /> sp.c VLFS patch 08/1/96
<br /> ssf.c VLFS patch 08/1/96
<br />Back to top of file
<br />
<br />
<br />How does one monitor and trace Unix processes?
<br />To trace what a Unix process is doing enter:
<br /> truss -rall -wall -p <pid>
<br /> truss -p $ lsnrctl dbsnmp_start
<br />NOTE: The "truss" command works on SUN and Sequent. Use "strace" on Linux. If your operating system doesn't support the truss and strace commands, call your system administrator to find the equivalent command on your system.
<br />Monitor your Unix system:
<br />Unix message files record all system problems like disk errors, swap errors, NFS problems, etc. Monitor the following files on your system to detect system problems:
<br /> tail -f /var/adm/SYSLOG
<br /> tail -f /var/adm/messages
<br /> tail -f /var/log/syslog
<br />Back to top of file
<br />
<br />
<br />How does one write a script to do work on all DB's?
<br />All databases on your machine should be listed in the /etc/oratab file. You can use this information to do processing on all databases on your machine. Look at this example:
<br /> #!/bin/ksh
<br /> ALL_DATABASES=`cat /etc/oratab|grep -v "^#"|grep -v "N$"|cut -f1 -d: -s`
<br /> for DB in $ALL_DATABASES
<br /> do
<br /> unset TWO_TASK
<br /> export ORACLE_SID=$DB
<br /> export ORACLE_HOME=`grep "^${DB}:" /etc/oratab|cut -d: -f2 -s`
<br /> export PATH=$ORACLE_HOME/bin:$PATH
<br /> echo "---> Database $ORACLE_SID, using home $ORACLE_HOME"
<br /> sqlplus -s system/${DB}password @<<-EOF
<br /> select * from global_name;
<br /> exit;
<br /> EOF
<br /> done
<br />NOTE: The terminating 'EOF' should normally be in column 1. The '-' before the first EOF above causes the shell to strip all leading TAB characters (not spaces, only TABs) from that point until (and including the EOF). This lets you indent the code in between using TABs.
<br />Back to top of file
<br />
<br />
<br />Can one prevent passwords from appearing in the process table?
<br />One can prevent Oracle passwords from showing in the Unix process table (ps -ef) when running an Oracle utility (like sqlplus). Look at the following solutions:
<br /> sqlplus /NOLOG @conn.sql
<br /> # No messing with ps, no password leak, connect from witin conn.sql
<br />or...
<br /> echo "Name : \c"
<br /> read Name
<br /> echo "Password : \c"
<br /> stty -echo
<br /> read Password
<br /> stty echo
<br /> echo ${Name}/${Password} | sqlplus
<br />or...
<br /> USER=scott
<br /> PASSWORD=tiger
<br /> { echo ${USER}/${PASSWORD}; cat ${your_script_name_here}; } | sqlplus
<br />PS: You can also create OPS$... or IDENTIFIED EXTERNALLY users in the database (to use OS authentication) and connect with a /
<br />Back to top of file
<br />
<br />
<br />Why doesn't Oracle release file space when you drop a tablespace?
<br />Sometimes when you drop a tablespace within Oracle, then remove (rm) the underlying data files, Oracle will not release filesystem space until you shut it down. This can be confirmed with the "df -k" command.
<br />This is normal behaviour on Unix machines. If a process has a file open for use, the file will be removed, but the space it occupies will remain in place until all processes referencing it are closed.
<br />Use the "fuser" command before deleting Oracle datafiles. If any processes are touching them, you will not get the space back when you rm the file. If SMON is locking your file, just wait a few minutes until it releases it.
<br />Back to top of file
<br />
<br />
<br />How does one relink the Oracle Server executables?
<br />Enter the following Unix commands:
<br /> cd $ORACLE_HOME/rdbms/lib
<br /> make -f ins_rdbms.mk install
<br />Back to top of file
<br />
<br />
<br />Can one copy the Oracle software from machine to machine?
<br />Yes, you can copy or FTP the Oracle Software between similar machines. Look at the following example:
<br /> # use tar to copy files and directorys with permissions and ownership
<br /> tar cf - $ORACLE_HOME | rsh "cd $ORACLE_HOME; tar xf -"
<br />To copy the Oracle software to a different directory on the same server:
<br /> cd /new/oracle/dir/
<br /> ( cd $ORACLE_HOME; tar cf - . ) | tar xvf -
<br />NOTE: Remember to relink the Intelligent Agent on the new machine to prevent messages like "Encryption key supplied is not the one used to encrypt file":
<br /> cd /new/oracle/dir/
<br /> cd network/lib
<br /> make -f ins_agent.mk install
<br />
<br />Back to top of file
<br />
<br />
<br />What should I do with those core files?
<br />Make sure the complete CORE file was written out. System administrators usually limit core size to avoid dangerous core files filling file systems. Core file size can be limited with the "ulimit" or "limit" commands. Look at these examples:
<br /> $ ulimit -a # Display limits for your session under sh or ksh
<br /> $ limit # Display limits for your session under csh or tcsh
<br />
<br /> $ ulimit -c SIZE_IN_BLOCKS # Limit core size under sh or ksh
<br /> $ limit coredumpsize SIZE_IN_KB # Limit core size under csh or tcsh
<br />If you see a core file lying around, just type "file core" to get some details about it. Example:
<br /> $ file core
<br /> core:ELF-64 core file - PA-RISC 2.0 from 'sqlplus' - received SIGABRT
<br />Run the Unix process debugger for details. These details are normally requested by Oracle for in-depth analysis of your problem.
<br /> Solaris, HP-UX, etc:
<br /> $ adb
<br /> $c
<br /> $q
<br />
<br /> Sequent:
<br /> $ debug -c core $ORACLE_HOME/bin/sqlplus
<br /> debug> stack
<br /> debug> quit
<br />Note: Some Unix operating systems use commands like sdb, xdb, dbx, etc. The same principles apply. Do a man on the command and just do it!
<br />Back to top of file
<br />
<br />
<br />What Environment Variables needs to be set?
<br />Here are a few basic ORACLE environment variables. For more environment variables, please refer to the reference guides.
<br />To check the value of these environment variables enter:
<br /> env | grep -e ORA -e TNS
<br />LD_LIBRARY_PATH Path to library files. Eg: /usr/lib:/usr/openwin/lib:$ORACLE_HOME/lib:/usr/games/lib
<br />ORACLE_BASE Full path name to the base directory for all versions of Oracle products.
<br />ORACLE_HOME Full path name to the version of ORACLE you are currently using. ORACLE_HOME is normally found beneath ORACLE_BASE in the directory tree. This variable is used to find executable programs and message files.
<br />ORACLE_SID ORACLE Server system identifier (SID) or instance name. The database name is used as ORACLE_SID. This is required for all ORACLE products and is set by the coraenv script.
<br />ORACLE_PATH Defines the path names to locate files. If ORACLE_PATH is set, the application searches the directories specified by $ORACLE_PATH first, then the current directory. If ORACLE_PATH is not set, then the application uses the current directory. This variable is used by SQL*Plus, Forms and Menu.
<br />ORACLE_TERM Defines a terminal definition. If not set, it defaults to the value of your TERM environment variable. Used by all character mode products.
<br />ORAENV_ASK This will not ask for ORACLE_SID, it will take it as it is specified. This variable is normally set to "NO" before oraenv is invoked from a script.
<br />TNS_ADMIN Defines the path name to the TNS (Transparent Network Substrate) files like TNSNAMES.ORA, SQLNET.ORA etc.
<br />ORACLE_TRACLE Trace Oracle's Unix shell scripts as they execute (using set -x).
<br />TWO_TASK The TWO_TASK environment variable specifies a SQL*Net connect string for connecting to a remote machine in a client/server configuration. SQL*Net will check the value of TWO_TASK and automatically add it to your connect string.
<br />For example the following are equivalent:
<br />sqlplus scott/tiger@db1
<br />and
<br />export TWO_TASK=db1; sqlplus scott/tiger
<br />Back to top of file
<br />
<br />
<br />What Unix commands can be used when administrating my database?
<br />The Unix command set is so rich that I can never list them all, however, if you are a beginner, you may find the following commands useful. To get a detailed description of any command, just type man command-name.
<br />cd Change the current directory. When you log in, you are in your "home" directory
<br />ls List files in a directory (like the DOS DIR command)
<br />pwd Print working (current) directory
<br />cp Copy (duplicate) a file or directory
<br />rm Remove (delete) a file. Note that rm is permanent, there is no undelete. Be careful "rm -r *" is an easy way to get fired!!!
<br />mv Move or rename a file or directory. Works like cp except the old file is deleted
<br />mkdir Creates a new (sub) directory
<br />rmdir Remove a directory
<br />chmod Change file permissions or access attributes
<br />man UNIX manual pages
<br />du Disk usage
<br />script out.log Write everything printed on your terminal to file out.log. Hit CNTL-D to stop.
<br />Some more advanced commands for the guru's:
<br />ps -ef | grep inherit List all running Oracle Listeners
<br />ps -ef | grep smon List all running Oracle Databases
<br />ipcs | grep oracle Semaphores and shared memory segments belonging to oracle Remove with ipcrm, but be carefull!!!
<br />ls -l . | awk '{total += $5}; END {print total}' Prints the total size (in bytes) of all files in the current directory
<br />ls -lR . | awk '{total += $5}; END {print total/1024/1024 " Meg"}' Prints the total size of files in the current directory and subdirectories below
<br />ls -lR | awk '{print $5 "\t" $9}' | sort -n | tail Find the largest files in dir and subdirecotry.
<br />System Admin commands:
<br />Function: Sun: Sequent: HP-UX: AIX: SCO:
<br />System Config: /usr/sbin/psrinfo -v showcfg -s ? ? ?
<br />Admin menu: admintool menu ? smit sysadmsh
<br />Mount CD-Rom: ? ? ? ? ?
<br />Back to top of file
<br />
<br />
<br />Where can I get more info about Unix and Unix vendors?
<br />
<br />
<br />General Reference FAQ Unix Gurus
<br />SUN Vendor FAQ
<br />HP Vendor FAQ
<br />AIX Vendor FAQ
<br />Sequent Vendor
<br />Digital Vendor FAQ
<br />SCO Vendor FAQ
<br />NCR Vendor
<br />SGI Vendor FAQ
<br />Back to top of file
<br />
<br />
<br />Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com1tag:blogger.com,1999:blog-3428468978735661096.post-50150382547115552992008-07-17T20:08:00.001-07:002008-07-17T20:08:51.355-07:00Oracle Call Interface FAQWhat is the Oracle Call Interface?<br />The Oracle Call Interface (OCI) is a set of low-level APIs to perform Oracle database operations (eg. logon, execute, parse, fetch records).<br />OCI programs are normally written in C or C++, although they can be written in almost any programing language. Unlike with the Oracle Precompilers (like Pro*C), OCI programs are not precompiled.<br />Back to top of file<br /><br /><br />Should one use OCI or the Oracle Precompilers?<br />OCI is superior to Pro*C in the following ways:<br /> Performance is much better with OCI<br /> Reduced code size<br /> Direct access to built-in functions (No intermediate files or substitutions).<br /> Piecewise Operation on LONG fields (All LONG field problems are solved)<br /> In Pro*C one cannot dynamically allocate memory to be used as bind variables<br /> You cannot control the Pro*C precompiler to provide better and more compilable C-code.<br /> etc...<br />Common problems with OCI:<br /> OCI code is difficult to write and to maintain<br /> Very few people can write, let alone maintain OCI code<br /> etc...<br />An OCI application program must do the following:<br /> Connect to one or more databases: call the OCILogon (olog, olon or orlon) routines<br /> Open the cursors needed by the program: use oexec, oexn, ofen or oftech calls.<br /> Process the SQL statements that are needed to perform the application's tasks.<br /> Close the cursors using the oclose routine.<br /> Disconnect from the databases: use ologoff to close an open connection to oracle.<br />For more information about Pro*C and other language precompilers, read the Oracle Precompilers FAQ.<br />Back to top of file<br /><br /><br />How does one write an OCI program?<br />Look at this very basic sample Oracle OCI8 program:<br />#include <stdio.h><br />#include <stdlib.h><br />#include <string.h><br />#include <oci.h><br /><br />#pragma comment(lib, "d:\\orant\\oci80\\lib\\msvc\\ora803.lib")<br /><br />static OCIEnv *p_env;<br />static OCIError *p_err;<br />static OCISvcCtx *p_svc;<br />static OCIStmt *p_sql;<br />static OCIDefine *p_dfn = (OCIDefine *) 0;<br />static OCIBind *p_bnd = (OCIBind *) 0;<br /><br />void main()<br />{<br /> int p_bvi;<br /> char p_sli[20];<br /> int rc;<br /> char errbuf[100];<br /> int errcode;<br /><br /> rc = OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0, /* Initialize OCI */<br /> (dvoid * (*)(dvoid *, size_t)) 0,<br /> (dvoid * (*)(dvoid *, dvoid *, size_t))0,<br /> (void (*)(dvoid *, dvoid *)) 0 );<br /><br /> /* Initialize evironment */<br /> rc = OCIEnvInit( (OCIEnv **) &p_env, OCI_DEFAULT, (size_t) 0, (dvoid **) 0 );<br /><br /> /* Initialize handles */<br /> rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_err, OCI_HTYPE_ERROR,<br /> (size_t) 0, (dvoid **) 0);<br /> rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_svc, OCI_HTYPE_SVCCTX,<br /> (size_t) 0, (dvoid **) 0);<br /><br /> /* Connect to database server */<br /> rc = OCILogon(p_env, p_err, &p_svc, "scott", 5, "tiger", 5, "d458_nat", 8);<br /> if (rc != 0) {<br /> OCIErrorGet((dvoid *)p_err, (ub4) 1, (text *) NULL, &errcode, errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);<br /> printf("Error - %.*s\n", 512, errbuf);<br /> exit(8);<br /> }<br /><br /> /* Allocate and prepare SQL statement */<br /> rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_sql,<br /> OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0);<br /> rc = OCIStmtPrepare(p_sql, p_err, "select ename from emp where deptno=:x",<br /> (ub4) 37, (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT);<br /><br /> /* Bind the values for the bind variables */<br /> p_bvi = 10; /* Use DEPTNO=10 */<br /> rc = OCIBindByName(p_sql, &p_bnd, p_err, (text *) ":x",<br /> -1, (dvoid *) &p_bvi, sizeof(int), SQLT_INT, (dvoid *) 0,<br /> (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT);<br /><br /> /* Define the select list items */<br /> rc = OCIDefineByPos(p_sql, &p_dfn, p_err, 1, (dvoid *) &p_sli,<br /> (sword) 20, SQLT_STR, (dvoid *) 0, (ub2 *)0,<br /> (ub2 *)0, OCI_DEFAULT);<br /><br /> /* Execute the SQL statment */<br /> rc = OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 1, (ub4) 0,<br /> (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT);<br /><br /> while (rc != OCI_NO_DATA) { /* Fetch the remaining data */<br /> printf("%s\n",p_sli);<br /> rc = OCIStmtFetch(p_sql, p_err, 1, 0, 0);<br /> }<br /><br /> rc = OCILogoff(p_svc, p_err); /* Disconnect */<br /> rc = OCIHandleFree((dvoid *) p_sql, OCI_HTYPE_STMT); /* Free handles */<br /> rc = OCIHandleFree((dvoid *) p_svc, OCI_HTYPE_SVCCTX);<br /> rc = OCIHandleFree((dvoid *) p_err, OCI_HTYPE_ERROR);<br /><br /> return;<br />}<br />Back to top of file<br /><br /><br />How does one compile and link an OCI program?<br /><br />1. Write an OCI program (e.g. myoci.c). You can find examples in the $ORACLE_HOME/rdbms/demo directory.<br />2. Copy the make file $ORACLE_HOME/rdbms/demo/demo_rdbms.mk into the directory where your OCI program is. You can also copy some of the sample OCI files (cdemo1.c, etc.) provided by Oracle to compile and link.<br />3. Issue the following command make -f demo_rdbms.mk build EXE=cdemo1 OBJS=cdemo1.o<br />Back to top of file<br /><br /><br />Where can I get more info about OCI?<br /><br /> Oracle Call Interface Programmer's Guide<br /> OCI++ - Download free C++ OCI Wrapper<br /> Oracle Call Interface Template Library<br />Back to top of fileSumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-19226093531863383402008-07-17T20:07:00.001-07:002008-07-17T20:07:58.424-07:00Oracle Applications FAQWhat is Oracle Financials?<br />Oracle Financials products provide organizations with solutions to a wide range of long- and short-term accounting system issues. Regardless of the size of the business, Oracle Financials can meet accounting management demands with:<br /> Oracle Assets: Ensures that an organization's property and equipment investment is accurate and that the correct asset tax accounting strategies are chosen.<br /> Oracle General Ledger: Offers a complete solution to journal entry, budgeting, allocations, consolidation, and financial reporting needs.<br /> Oracle Inventory: Helps an organization make better inventory decisions by minimizing stock and maximizing cash flow.<br /> Oracle Order Entry: Provides organizations with a sophisticated order entry system for managing customer commitments.<br /> Oracle Payables: Lets an organization process more invoices with fewer staff members and tighter controls. Helps save money through maximum discounts, bank float, and prevention of duplicate payment.<br /> Oracle Personnel: Improves the management of employee- related issues by retaining and making available every form of personnel data.<br /> Oracle Purchasing: Improves buying power, helps negotiate bigger discounts, eliminates paper flow, increases financial controls, and increases productivity.<br /> Oracle Receivables:. Improves cash flow by letting an organization process more payments faster, without off-line research. Helps correctly account for cash, reduce outstanding receivables, and improve collection effectiveness.<br /> Oracle Revenue Accounting Gives an organization timely and accurate revenue and flexible commissions reporting.<br /> Oracle Sales Analysis: Allows for better forecasting, planning. and reporting of sales information.<br />Back to top of file<br /><br /><br />What is the most important module in Oracle Financials?<br />The General Ledger (GL) module is the basis for all other Oracle Financial modules. All other modules provide information to it. If you implement Oracle Financials, you should switch your current GL system first.GL is relatively easy to implement. You should go live with it first to give your implementation team a chance to be familiar with Oracle Financials.<br />Back to top of file<br /><br /><br />Where can I get more info about Oracle Apps?<br /><br /> Oracle Applications Home Page<br /> Oracle Applications Users Group<br /> Oracle ERP Assist Knowledge Bank<br /> Steps required for the implementation of Multi-Org - Rajani Bartakke and William Green's<br /> The ERP SuperSite<br />Back to top of fileSumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-90301316232622177412008-07-17T20:06:00.000-07:002008-07-17T20:07:05.536-07:00Important Questions in Oracle, Developer /2000(Form 4.5 and Reports 2.5)Oracle<br /><br />1) What are the Back ground processes in Oracle and what are they.<br />1) This is one of the most frequently asked question.There are basically 9 Processes but in a<br />general system we need to mention the first five background processes.They do the house keeping<br />activities for the Oracle and are common in any system.<br />The various background processes in oracle are<br />a) Data Base Writer(DBWR) :: Data Base Writer Writes Modified blocks from Database buffer cache to Data Files.This is required since the data is not written whenever a transaction is commited.<br />b)LogWriter(LGWR) :: LogWriter writes the redo log entries to disk. Redo Log data is generated in redo log buffer of SGA. As transaction commits and log buffer fills, LGWR writes log entries into a online redo log file.<br />c) System Monitor(SMON) :: The System Monitor performs instance recovery at instance startup.This is useful for recovery from system failure<br />d)Process Monitor(PMON) :: The Process Monitor peforms process recovery when user Process fails. Pmon Clears and Frees resources that process was using.<br />e) CheckPoint(CKPT) :: At Specified times, all modified database buffers in SGA are written to data files by DBWR at Checkpoints and Updating all data files and control files of database to indicate the<br />most recent checkpoint<br />f)Archieves(ARCH) :: The Archiver copies online redo log files to archival storal when they are busy.<br />g) Recoveror(RECO) :: The Recoveror is used to resolve the distributed transaction in network<br />h) Dispatcher (Dnnn) :: The Dispatcher is useful in Multi Threaded Architecture<br />i) Lckn :: We can have upto 10 lock processes for inter instance locking in parallel sql.<br /><br /><br />2) How many types of Sql Statements are there in Oracle<br />2) There are basically 6 types of sql statments.They are<br />a) Data Defination Language(DDL) :: The DDL statments define and maintain objects and drop objects.<br />b) Data Manipulation Language(DML) :: The DML statments manipulate database data.<br />c) Transaction Control Statements :: Manage change by DML<br />d) Session Control :: Used to control the properties of current session enabling and disabling roles and changing .e.g :: Alter Statements,Set Role<br />e) System Control Statements :: Change Properties of Oracle Instance .e.g:: Alter System<br />f) Embedded Sql :: Incorporate DDL,DML and T.C.S in Programming Language.e.g:: Using the Sql Statements in languages such as 'C', Open,Fetch, execute and close<br /><br />3) What is a Transaction in Oracle<br />3) A transaction is a Logical unit of work that compromises one or more SQL Statements executed by a single User. According to ANSI, a transaction begins with first executable statment and ends when it is explicitly commited or rolled back.<br /><br />4) Key Words Used in Oracle<br />4) The Key words that are used in Oracle are ::<br /> a) Commiting :: A transaction is said to be commited when the transaction makes permanent changes resulting from the SQL statements.<br />b) Rollback :: A transaction that retracts any of the changes resulting from SQL statements in Transaction.<br /> c) SavePoint :: For long transactions that contain many SQL statements, intermediate markers or savepoints are declared. Savepoints can be used to divide a transactino into smaller points.<br />d) Rolling Forward :: Process of applying redo log during recovery is called rolling forward.<br /> e) Cursor :: A cursor is a handle ( name or a pointer) for the memory associated with a specific stament. A cursor is basically an area allocated by Oracle for executing the Sql Statement. Oracle uses an implicit cursor statement for Single row query and Uses Explcit cursor for a multi row query.<br />f) System Global Area(SGA) :: The SGA is a shared memory region allocated by the Oracle that contains Data and control information for one Oracle Instance.It consists of Database Buffer Cache and Redo log Buffer.<br />g) Program Global Area (PGA) :: The PGA is a memory buffer that contains data and control information for server process.<br />g) Database Buffer Cache :: Databese Buffer of SGA stores the most recently used blocks of datatbase data.The set of database buffers in an instance is called Database Buffer Cache.<br />h) Redo log Buffer :: Redo log Buffer of SGA stores all the redo log entries.<br />i) Redo Log Files :: Redo log files are set of files that protect altered database data in memory that has not been written to Data Files. They are basically used for backup when a database crashes.<br />j) Process :: A Process is a 'thread of control' or mechansim in Operating System that executes series of steps.<br /><br />5) What are Procedure,functions and Packages<br />5) Procedures and functions consist of set of PL/SQL statements that are grouped together as a unit to solve a specific problem or perform set of related tasks.<br /> Procedures do not Return values while Functions return one One Value<br />Packages :: Packages Provide a method of encapsulating and storing related procedures, functions, variables and other Package Contents<br /><br />6) What are Database Triggers and Stored Procedures<br />6) Database Triggers :: Database Triggers are Procedures that are automatically executed as a result of insert in, update to, or delete from table.<br /> Database triggers have the values old and new to denote the old value in the table before it is deleted and the new indicated the new value that will be used. DT are useful for implementing complex business rules which cannot be enforced using the integrity rules.We can have the trigger as Before trigger or After Trigger and at Statement or Row level.<br />e.g:: operations insert,update ,delete 3<br /> before ,after 3*2 A total of 6 combinatons<br /> At statment level(once for the trigger) or row level( for every execution ) 6 * 2 A total of 12.<br /> Thus a total of 12 combinations are there and the restriction of usage of 12 triggers has been lifted from Oracle 7.3 Onwards.<br />Stored Procedures :: Stored Procedures are Procedures that are stored in Compiled form in the database.The advantage of using the stored procedures is that many users can use the same procedure in compiled and ready to use format.<br /><br />7) How many Integrity Rules are there and what are they<br />7) There are Three Integrity Rules. They are as follows ::<br />a) Entity Integrity Rule :: The Entity Integrity Rule enforces that the Primary key cannot be Null<br />b) Foreign Key Integrity Rule :: The FKIR denotes that the relationship between the foreign key and the primary key has to be enforced.When there is data in Child Tables the Master tables cannot be deleted.<br />c) Business Integrity Rules :: The Third Intigrity rule is about the complex business processes which cannot be implemented by the above 2 rules.<br /><br />8) What are the Various Master and Detail Relation ships.<br />8) The various Master and Detail Relationship are<br />a) NonIsolated :: The Master cannot be deleted when a child is exisiting<br />b) Isolated :: The Master can be deleted when the child is exisiting<br />c) Cascading :: The child gets deleted when the Master is deleted.<br /><br />9) What are the Various Block Coordination Properties<br />9) The various Block Coordination Properties are<br />a) Immediate<br />Default Setting. The Detail records are shown when the Master Record are shown.<br />b) Deffered with Auto Query<br />Oracle Forms defer fetching the detail records until the operator navigates to the detail block.<br />c) Deffered with No Auto Query<br />The operator must navigate to the detail block and explicitly execute a query<br /><br />10) What are the Different Optimisation Techniques<br />10) The Various Optimisation techniques are<br />a) Execute Plan :: we can see the plan of the query and change it accordingly based on the indexes<br />b) Optimizer_hint ::<br />set_item_property('DeptBlock',OPTIMIZER_HINT,'FIRST_ROWS');<br />Select /*+ First_Rows */ Deptno,Dname,Loc,Rowid from dept<br />where (Deptno > 25)<br />c) Optimize_Sql ::<br />By setting the Optimize_Sql = No, Oracle Forms assigns a single cursor for all SQL statements.This slow downs the processing because for evertime the SQL must be parsed whenver they are executed.<br />f45run module = my_firstform userid = scott/tiger optimize_sql = No<br />d) Optimize_Tp ::<br /> By setting the Optimize_Tp= No, Oracle Forms assigns seperate cursor only for each query SELECT statement. All other SQL statements reuse the cursor.<br />f45run module = my_firstform userid = scott/tiger optimize_Tp = No<br /><br />11) How do u implement the If statement in the Select Statement<br />11) We can implement the if statement in the select statement by using the Decode statement.<br />e.g select DECODE (EMP_CAT,'1','First','2','Second'Null);<br />Here the Null is the else statement where null is done .<br /><br />12)How many types of Exceptions are there<br />12) There are 2 types of exceptions. They are<br />a) System Exceptions<br />e.g. When no_data_found, When too_many_rows<br />b) User Defined Exceptions<br />e.g. My_exception exception<br />When My_exception then<br /><br />13) What are the inline and the precompiler directives<br />13) The inline and precompiler directives detect the values directly<br /><br />14) How do you use the same lov for 2 columns<br />14) We can use the same lov for 2 columns by passing the return values in global values and using the global values in the code<br /><br />15) How many minimum groups are required for a matrix report<br />15) The minimum number of groups in matrix report are 4<br /><br />16) What is the difference between static and dynamic lov<br />16) The static lov contains the predetermined values while the dynamic lov contains values that come at run time<br /><br />17) What are snap shots and views<br />17) Snapshots are mirror or replicas of tables. Views are built using the columns from one or more tables. The Single Table View can be updated but the view with multi table cannot be updated<br /><br />18) What are the OOPS concepts in Oracle.<br />18) Oracle does implement the OOPS concepts. The best example is the Property Classes. We can categorise the properties by setting the visual attributes and then attach the property classes for the<br />objects. OOPS supports the concepts of objects and classes and we can consider the peroperty classes as classes and the items as objects<br /><br />19) What is the difference between candidate key, unique key and primary key<br />19) Candidate keys are the columns in the table that could be the primary keys and the primary key<br />is the key that has been selected to identify the rows. Unique key is also useful for identifying the distinct rows in the table.<br /><br />20)What is concurrency<br />20) Cuncurrency is allowing simultaneous access of same data by different users. Locks useful for accesing the database are<br />a) Exclusive<br />The exclusive lock is useful for locking the row when an insert,update or delete is being done.This lock should not be applied when we do only select from the row.<br />b) Share lock<br />We can do the table as Share_Lock as many share_locks can be put on the same resource.<br /><br />21) Previleges and Grants<br />21) Previleges are the right to execute a particulare type of SQL statements.<br />e.g :: Right to Connect, Right to create, Right to resource<br />Grants are given to the objects so that the object might be accessed accordingly.The grant has to be<br />given by the owner of the object.<br /><br />22)Table Space,Data Files,Parameter File, Control Files<br />22)Table Space :: The table space is useful for storing the data in the database.When a database is created two table spaces are created.<br />a) System Table space :: This data file stores all the tables related to the system and dba tables<br />b) User Table space :: This data file stores all the user related tables<br />We should have seperate table spaces for storing the tables and indexes so that the access is fast.<br />Data Files :: Every Oracle Data Base has one or more physical data files.They store the data for the database.Every datafile is associated with only one database.Once the Data file is created the size cannot change.To increase the size of the database to store more data we have to add data file.<br />Parameter Files :: Parameter file is needed to start an instance.A parameter file contains the list of instance configuration parameters e.g.::<br />db_block_buffers = 500<br />db_name = ORA7<br />db_domain = u.s.acme lang<br />Control Files :: Control files record the physical structure of the data files and redo log files<br />They contain the Db name, name and location of dbs, data files ,redo log files and time stamp.<br /><br />23) Physical Storage of the Data<br />23) The finest level of granularity of the data base are the data blocks.<br />Data Block :: One Data Block correspond to specific number of physical database space<br />Extent :: Extent is the number of specific number of contigious data blocks.<br />Segments :: Set of Extents allocated for Extents. There are three types of Segments<br />a) Data Segment :: Non Clustered Table has data segment data of every table is stored in<br />cluster data segment<br />b) Index Segment :: Each Index has index segment that stores data<br />c) Roll Back Segment :: Temporarily store 'undo' information<br /><br />24) What are the Pct Free and Pct Used<br />24) Pct Free is used to denote the percentage of the free space that is to be left when creating a table. Similarly Pct Used is used to denote the percentage of the used space that is to be used when creating a table<br />eg.:: Pctfree 20, Pctused 40<br /><br />25) What is Row Chaining<br />25) The data of a row in a table may not be able to fit the same data block.Data for row is stored in a chain of data blocks .<br /><br />26) What is a 2 Phase Commit<br />26) Two Phase commit is used in distributed data base systems. This is useful to maintain the integrity of the database so that all the users see the same values. It contains DML statements or Remote Procedural calls that reference a remote object. There are basically 2 phases in a 2 phase commit.<br />a) Prepare Phase :: Global coordinator asks participants to prepare<br />b) Commit Phase :: Commit all participants to coordinator to Prepared, Read only or abort Reply<br /><br />27) What is the difference between deleting and truncating of tables<br />27) Deleting a table will not remove the rows from the table but entry is there in the database dictionary and it can be retrieved But truncating a table deletes it completely and it cannot be retrieved.<br /><br />28) What are mutating tables<br />28) When a table is in state of transition it is said to be mutating. eg :: If a row has been deleted then the table is said to be mutating and no operations can be done on the table except select.<br /><br />29) What are Codd Rules<br />29) Codd Rules describe the ideal nature of a RDBMS. No RDBMS satisfies all the 12 codd rules and Oracle Satisfies 11 of the 12 rules and is the only Rdbms to satisfy the maximum number of rules.<br /><br />30) What is Normalisation<br />30) Normalisation is the process of organising the tables to remove the redundancy.There are mainly 5 Normalisation rules.<br />a) 1 Normal Form :: A table is said to be in 1st Normal Form when the attributes are atomic<br />b) 2 Normal Form :: A table is said to be in 2nd Normal Form when all the candidate keys are dependant on the primary key<br />c) 3rd Normal Form :: A table is said to be third Normal form when it is not dependant transitively<br /><br />31) What is the Difference between a post query and a pre query<br />31) A post query will fire for every row that is fetched but the pre query will fire only once.<br /><br />32) Deleting the Duplicate rows in the table<br />32) We can delete the duplicate rows in the table by using the Rowid<br /><br /><br />33) Can U disable database trigger? How?<br /> 33) Yes. With respect to table<br /> ALTER TABLE TABLE<br /> [ DISABLE all_trigger ]<br />34) What is pseudo columns ? Name them?<br /><br /> 34) A pseudocolumn behaves like a table column, but is not actually<br /> stored in the table. You can select from pseudocolumns, but you<br /> cannot insert, update, or delete their values. This section<br /> describes these pseudocolumns:<br /> * CURRVAL<br /> * NEXTVAL<br /> * LEVEL<br /> * ROWID<br /> * ROWNUM<br /><br />35) How many columns can table have?<br /> The number of columns in a table can range from 1 to 254.<br /><br />36) Is space acquired in blocks or extents ?<br /><br /> In extents .<br /><br />37) what is clustered index?<br /> In an indexed cluster, rows are stored together based on their cluster key values .<br /> Can not applied for HASH.<br /><br />38) what are the datatypes supported By oracle (INTERNAL)?<br /> Varchar2, Number,Char , MLSLABEL.<br /><br />39 ) What are attributes of cursor?<br /> %FOUND , %NOTFOUND , %ISOPEN,%ROWCOUNT<br /><br />40) Can you use select in FROM clause of SQL select ?<br /> Yes.<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Forms 4.5 Questions<br /><br />1) Which trigger are created when master -detail rela?<br />1) master delete property<br /><br />* NON-ISOLATED (default)<br /><br />a) on check delete master<br />b) on clear details<br />c) on populate details<br /><br /> * ISOLATED<br /><br />a) on clear details<br />b) on populate details<br /><br />* CASCADE<br /><br />a) per-delete<br />b) on clear details<br />c) on populate details<br /><br /><br />2) which system variables can be set by users?<br />2)<br />SYSTEM.MESSAGE_LEVEL<br />SYSTEM.DATE_THRESHOLD<br />SYSTEM.EFFECTIVE_DATE<br />SYSTEM.SUPPRESS_WORKING<br /><br />3) What are object group?<br />3)<br />An object group is a container for a group of objects. You define an object group when you want to package related objects so you can copy or reference them in another module.<br /><br />4) What are referenced objects?<br />4)<br />Referencing allows you to create objects that inherit their functionality and appearance from other objects.<br />Referencing an object is similar to copying an object, except that the resulting reference object maintains a<br /> link to its source object. A reference object automatically inherits any changes that have been made to the<br />source object when you open or regenerate the module that contains the reference object.<br /><br />5) Can you store objects in library?<br />5)<br />Referencing allows you to create objects that inherit their functionality and appearance from other<br />objects. Referencing an object is similar to copying an object, except that the resulting reference<br />object maintains a link to its source object. A reference object automatically inherits any changes that<br />have been made to the source object when you open or regenerate the module that contains the<br />reference object.<br /><br /><br /><br /><br />6) Is forms 4.5 object oriented tool ? why?<br />6)<br />yes , partially. 1) PROPERTY CLASS - inheritance property<br /> 2) OVERLOADING : procedures and functions.<br /><br />7) Can you issue DDL in forms?<br />7)<br />yes, but you have to use FORMS_DDL.<br />Referencing allows you to create objects that inherit their functionality and appearance from other<br />objects. Referencing an object is similar to copying an object, except that the resulting reference object<br />maintains a link to its source object. A reference object automatically inherits any changes that have<br />been made to the source object when you open or regenerate the module that contains the reference object.<br />Any string expression up to 32K:<br />·a literal<br />· an expression or a variable representing the text of a block of dynamically created PL/SQL code<br />· a DML statement or<br />· a DDL statement<br /><br />Restrictions:<br />The statement you pass to FORMS_DDL may not contain bind variable references in the string, but the<br />values of bind variables can be concatenated into the string before passing the result to FORMS_DDL. <br /><br /><br />8) What is SECURE property?<br />8)- Hides characters that the operator types into the text item. This setting is typically used for<br /> password protection.<br /><br />9 ) What are the types of triggers and how the sequence of firing in text item<br />9)<br />Triggers can be classified as Key Triggers, Mouse Triggers ,Navigational Triggers.<br />Key Triggers :: Key Triggers are fired as a result of Key action.e.g :: Key-next-field, Key-up,Key-Down<br />Mouse Triggers :: Mouse Triggers are fired as a result of the mouse navigation.e.g. When-mouse-button-presed,when-mouse-doubleclicked,etc<br />Navigational Triggers :: These Triggers are fired as a result of Navigation. E.g : Post-Text-item,Pre-text-item.<br />We also have event triggers like when –new-form-instance and when-new-block-instance.<br />We cannot call restricted procedures like go_to(‘my_block.first_item’) in the Navigational triggers<br />But can use them in the Key-next-item.<br />The Difference between Key-next and Post-Text is an very important question. The key-next is fired as a result of the key action while the post text is fired as a result of the mouse movement. Key next will not fire unless there is a key event.<br />The sequence of firing in a text item are as follows ::<br /> a) pre - text<br /> b) when new item<br /> c) key-next<br /> d) when validate<br /> e) post text<br /><br />10 ) Can you store pictures in database? How?<br />10)Yes , in long Raw datatype.<br /><br />11) What are property classes ? Can property classes have trigger?<br />11) Property class inheritance is a powerful feature that allows you to quickly define objects that conform to<br />your own interface and functionality standards. Property classes also allow you to make global changes to<br />applications quickly. By simply changing the definition of a property class, you can change the definition<br />of all objects that inherit properties from that class.<br />Yes . All type of triggers .<br /><br />* 12 a) If you have property class attached to an item and you have same trigger written for the item .<br /> Which will fire first?<br /> 12)Item level trigger fires , If 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 block and then the Form level trigger.<br /><br />13) What are record groups ? * Can record groups created at run-time?<br />13)A record group is an internal Oracle Forms data structure that has a column/row framework similar to a<br />database table. However, unlike database tables, record groups are separate objects that belong to the<br />form module in which they are defined. A record group can have an unlimited number of columns of type<br />CHAR, LONG, NUMBER, or DATE provided that the total number of columns does not exceed 64K. <br />Record group column names cannot exceed 30 characters.<br />Programmatically, record groups can be used whenever the functionality offered by a two-dimensional<br />array of multiple data types is desirable.<br />TYPES OF RECORD GROUP:<br />Query Record Group A query record group is a record group that has an associated SELECT statement. <br /> The columns in a query record group derive their default names, data types, and lengths from the database columns referenced in the SELECT statement. The records in a query record group are the rows retrieved by the query associated with that record group.<br />Non-query Record Group A non-query record group is a group that does not have an associated query, but whose structure and values can be modified programmatically at runtime.<br />Static Record Group A static record group is not associated with a query; rather, you define its<br />structure and row values at design time, and they remain fixed at runtime.<br /><br /><br />14) What are ALERT?<br />14)An ALERT is a modal window that displays a message notifiying operator of some application<br /> condition.<br /><br />15) Can a button have icon and lable at the same time ?<br />15) -NO<br /><br />16) What is mouse navigate property of button?<br />16)<br />When Mouse Navigate is True (the default), Oracle Forms performs standard navigation to move the focus<br />to the item when the operator activates the item with the mouse. <br /><br />When Mouse Navigate is set to False, Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse.<br /><br />17) What is FORMS_MDI_WINDOW?<br /> 17) forms run inside the MDI application window. This property is useful for calling a form from another one.<br /><br />18) What are timers ? when when-timer-expired does not fire?<br /> 18) The When-Timer-Expired trigger can not fire during trigger, navigation, or transaction processing.<br /><br />19 ) Can object group have a block?<br /> 19)Yes , object group can have block as well as program units.<br /><br />20) How many types of canvases are there.<br />20)There are 2 types of canvases called as Content and Stack Canvas. Content canvas is the default and the one that is used mostly for giving the base effect. Its like a plate on which we add items and stacked canvas is used for giving 3 dimensional effect.<br /> <br /><br />The following questions might not be asked in an Average Interview and could be asked when the Interviewer wants to trouble u and go deeppppppppppppp……He cannot go further…..<br /><br /><br />1) What are user-exits?<br />1) It invokes 3GL programs.<br /><br />2) Can you pass values to-and-fro from foreign function ? how ?<br />2) Yes . You obtain a return value from a foreign function by assigning the return value to an Oracle Forms<br />variable or item. Make sure that the Oracle Forms variable or item is the same data type as the return value<br />from the foreign function.<br />After assigning an Oracle Forms variable or item value to a PL/SQL variable, pass the PL/SQL variable as<br />a parameter value in the PL/SQL interface of the foreign function. The PL/SQL variable that is passed as<br />a parameter must be a valid PL/SQL data type; it must also be the appropriate parameter type as defined<br />in the PL/SQL interface. <br /><br />3) What is IAPXTB structure ?<br />3) The entries of Pro * C and user exits and the form which simulate the proc or user_exit are stored in IAPXTB table in d/b.<br /><br />4) Can you call WIN-SDK thruo' user exits?<br />4) YES.<br /><br />5) Does user exits supports DLL on MSWINDOWS ?<br /> 5) YES .<br /><br />6) What is path setting for DLL?<br />6) Make sure you include the name of the DLL in the FORMS45_USEREXIT variable of the ORACLE.INI file, or rename the DLL to F45XTB.DLL. If you rename the DLL to F45XTB.DLL, replace the existing F45XTB.DLL in the \ORAWIN\BIN directory with the new F45XTB.DLL.<br /><br /> 7) How is mapping of name of DLL and function done?<br />7) The dll can be created using the Visual C++ / Visual Basic Tools and then the dll is put in the<br />path that is defined the registery.<br /><br />8) what is precompiler?<br />8) It is similar to C precompiler directives.<br /><br /> 9) Can you connect to non - oracle datasource ? How?<br />9) Yes . <br /><br />10 ) what are key-mode and locking mode properties? level ?<br />10) Key Mode : Specifies how oracle forms uniquely identifies rows in the database.This is property includes<br />for application that will run against NON-ORACLE datasources .<br />Key setting unique (default.)<br /> dateable<br /> n-updateable.<br /><br />Locking mode :<br />Specifies when Oracle Forms should attempt to obtain database locks on rows that correspond to queried records in the form.<br />a) immediate b) delayed<br /><br />11) What are savepoint mode and cursor mode properties ? level?<br />11) Specifies whether Oracle Forms should issue savepoints during a session. This property is included primarily for applications that will run against non-ORACLE data sources. For applications that will run against ORACLE, use the default setting.<br />Cursor mode - define cursur state across transaction<br />Open/close.<br /><br />12) Can you replace default form processing ? How ?<br /><br />13) What is transactional trigger property?<br />13) Identifies a block as transactional control block. i.e. non - database block that oracle forms should manage as transactional block.(NON-ORACLE datasource) default - FALSE.<br /><br />14) What is OLE automation ?<br />14) OLE automation allows an OLE server application to expose a set of commands and functions that can be<br />invoked from an OLE container application. OLE automation provides a way for an OLE container application to use the features of an OLE server application to manipulate an OLE object from the OLE container environment. (FORMS_OLE)<br /><br />15) What does invoke built-in do?<br />15) This procedure invokes a method.<br />Syntax:<br />PROCEDURE OLE2.INVOKE<br /> (object obj_type,<br /> method VARCHAR2,<br /> list list_type := 0);<br />Parameters:<br />object Is an OLE2 Automation Object.<br />method Is a method (procedure) of the OLE2 object.<br />list Is the name of an argument list assigned to the OLE2.CREATE_ARGLIST function.<br /><br />16) What are OPEN_FORM,CALL_FORM,NEW_FORM? diff?<br />16) CALL_FORM : It calls the other form. but parent remains active, when called form completes the operation , it releases lock and control goes back to the calling form.<br />When you call a form, Oracle Forms issues a savepoint for the called form. If the CLEAR_FORM function<br />causes a rollback when the called form is current, Oracle Forms rolls back uncommitted changes to this<br />savepoint.<br />OPEN_FORM : When you call a form, Oracle Forms issues a savepoint for the called form. If the<br />CLEAR_FORM function causes a rollback when the called form is current, Oracle Forms rolls back<br />uncommitted changes to this savepoint.<br />NEW_FORM : Exits the current form and enters the indicated form. The calling form is terminated as<br />the parent form. If the calling form had been called by a higher form, Oracle Forms keeps the higher call<br /> active and treats it as a call to the new form. Oracle Forms releases memory (such as database cursors)<br />that the terminated form was using.<br />Oracle Forms runs the new form with the same Runform options as the parent form. If the parent form was<br />a called form, Oracle Forms runs the new form with the same options as the parent form.<br /><br /><br /><br />17 ) What is call form stack?<br />17) When successive forms are loaded via the CALL_FORM procedure, the resulting module hierarchy is known as the call form stack.<br /><br />18) Can u port applictions across the platforms? how?<br />18) Yes we can port applications across platforms.Consider the form developed in a windows system.The form would be generated in unix system by using f45gen my_form.fmb scott/tiger<br /><br />GUI<br /><br />1) What is a visual attribute?<br />1) Visual attributes are the font, color, and pattern properties that you set for form and menu objects that appear in your application's interface.<br /><br />2) Diff. between VAT and Property Class? imp<br />2)Named visual attributes define only font, color, and pattern attributes; property classes can contain these and any other properties.<br />You can change the appearance of objects at runtime by changing the named visual attribute<br />programmatically; property class assignment cannot be changed programmatically.<br />When an object is inheriting from both a property class and a named visual attribute, the named visual<br />attribute settings take precedence, and any visual attribute properties in the class are ignored.<br /><br />3 ) Which trigger related to mouse?<br />3) When-Mouse-Click<br /> When-Mouse-DoubleClick<br /> When-Mouse-Down<br /> When-Mouse-Enter<br /> When-Mouse-Leave<br /> When-Mouse-Move<br /> When-Mouse-Up<br /><br />4) What is Current record attribute property?<br />4) Specifies the named visual attribute used when an item is part of the current record.<br />Current Record Attribute is frequently used at the block level to display the current row in a multi-record<br />If you define an item-level Current Record Attribute, you can display a pre-determined item in a special color<br />when it is part of the current record, but you cannot dynamically highlight the current item, as the input focus changes. <br /><br />5) Can u change VAT at run time?<br />5) Yes. You can programmatically change an object's named visual attribute setting to change the font, color,<br />and pattern of the object at runtime.<br /><br />6) Can u set default font in forms?<br />6) Yes. Change windows registry(regedit). Set form45_font to the desired font.<br /><br />7) Can u have OLE objects in forms?<br />7) Yes.<br /><br />8) Can u have VBX and OCX controls in forms ?<br />8) Yes.<br /><br />9) What r the types of windows (Window style)?<br />9) Specifies whether the window is a Document window or a Dialog window.<br />10) What is OLE Activation style property?<br />10) Specifies the event that will activate the OLE containing item.<br /><br /><br />11) Can u change the mouse pointer ? How?<br />11) Yes. Specifies the mouse cursor style. Use this property to dynamically change the shape of the cursor.<br /><br /><br />Reports 2.5<br /><br />1) How many types of columns are there and what are they<br />1) Formula columns :: For doing mathematical calculations and returning one value<br />Summary Columns :: For doing summary calculations such as summations etc.<br />Place holder Columns :: These columns are useful for storing the value in a variable<br /><br />2) Can u have more than one layout in report<br />2) It is possible to have more than one layout in a report by using the additional layout option in the layout editor.<br /><br />3) Can u run the report with out a parameter form<br />3) Yes it is possible to run the report without parameter form by setting the PARAM value to Null<br /><br />4) What is the lock option in reports layout<br />4) By using the lock option we cannot move the fields in the layout editor outside the frame. This is useful for maintaining the fields .<br /><br />5) What is Flex<br />5) Flex is the property of moving the related fields together by setting the flex property on<br /><br />6) What are the minimum number of groups required for a matrix report<br />6) The minimum of groups required for a matrix report are 4Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0tag:blogger.com,1999:blog-3428468978735661096.post-12185461062396705562008-07-17T20:05:00.001-07:002008-07-17T20:05:38.961-07:00DBA Faq'sWhat database block size should I use?<br />Oracle recommends that your database block size match, or be multiples of your operating system block size. One can use smaller block sizes, but the performance cost is significant. Your choice should depend on the type of application you are running. If you have lots of small transaction like with OLTP, use a smaller block size. With fewer but larger transactions, like with a DSS application, use a larger block size.<br />If you are using a volume manager, consider your "operating system block size" to be 8K. This is because volume manager products use 8K blocks (and this is not configurable).<br />Back to top of file<br /><br /><br />How does one coalesce free space?<br />SMON coalesces free space (extents) into larger, contiguous extents every 2 hours and even then only for a short period of time.<br />SMON will not coalesce free space if a tablespace's default storage parameter "pctincrease" is set to 0. With Oracle 7.3 one can manually coalesce a tablespace using the ALTER TABLESPACE ... COALESCE; command, until then use:<br />SQL> alter session set events 'immediate trace name coalesce level n';<br />where 'n' is the tablespace number you get from SELECT TS#, NAME FROM SYS.TS$;<br />You can get status information about this process by selecting from the SYS.DBA_FREE_SPACE_COALESCED dictionary view.<br />Back to top of file<br /><br /><br />How does one prevent tablespace fragmentation?<br />Always set PCTINCREASE to 0 or 100.<br />Bizarre values for PCTINCREASE will contribute to fragmentation. For example if you set PCTINCREASE to 1 you will see that your extents are going to have weird and wacky sizes: 100K, 100K, 101K, 102K, etc. Such extents of bizarre size are rarely re-used in their entirety. PCTINCREASE of 0 or 100 gives you nice round extent sizes that can easily be reused. Eg. 100K, 100K, 200K, 400K, etc.<br />Back to top of file<br /><br /><br />Where can one find the high water mark for a table?<br />There is no single system table which contains the high water mark (HWM) for a table. A table's HWM can be calculated using the results from the following SQL statements:<br /> SELECT BLOCKS<br /> FROM DBA_SEGMENTS<br /> WHERE OWNER=UPPER(owner) AND SEGMENT_NAME = UPPER(table);<br /><br /> ANALYZE TABLE owner.table ESTIMATE STATISTICS;<br /><br /> SELECT EMPTY_BLOCKS<br /> FROM DBA_TABLES<br /> WHERE OWNER=UPPER(owner) AND SEGMENT_NAME = UPPER(table);<br />Thus, the tables' HWM = (query result 1) - (query result 2) - 1<br />NOTE: You can also use the DBMS_SPACE package and calculate the HWM = TOTAL_BLOCKS - UNUSED_BLOCKS - 1.<br />Back to top of file<br /><br /><br />How is extents allocated to a segment?<br />Oracle8 and above rounds off extents to a multiple of 5 blocks when more than 5 blocks are requested. If one requests 16K or 2 blocks (assuming a 8K block size), Oracle doesn't round it up to 5 blocks, but it allocates 2 blocks or 16K as requested. If one asks for 8 blocks, Oracle will round it up to 10 blocks.<br />Space allocation also depends upon the size of contiguous free space available. If one asks for 8 blocks and Oracle finds a contiguous free space that's exactly 8 blocks, it would give it you. If it is 9 blocks, Oracle would also give it to you. This is why Oracle doesn't always round extents to a multiple of 5 blocks.<br />The exception to this rule is locally managed tablespaces. If a tablespace is created with local extent management and the extent size is 64K, then Oracle allocates 64K or 8 blocks assuming 8K block size. Oracle doesn't round it up to the multiple of 5 when a tablespace is locally managed.<br />Back to top of file<br /><br /><br />Can one rename a database user (schema)?<br />No, this is listed as Enhancement Request 158508. Workaround:<br />Do a user-level export of user A<br />create new user B<br />import system/manager fromuser=A touser=B<br />drop user A<br />Back to top of file<br /><br /><br />Can one rename a tablespace's name?<br />No, this is listed as Enhancement Request 148742. Workaround:<br />Export all of the objects from the tablespace<br />Drop the tablespace including contents<br />Recreate the tablespace<br />Import the objects back in<br />Back to top of file<br /><br /><br />Can one resize tablespaces and data files?<br /><br />You can manually increase or decrease the size of a datafile from Oracle 7.2 using the<br />ALTER DATABASE DATAFILE 'filename2' RESIZE 100M;<br />command.<br />Because you can change the sizes of datafiles, you can add more space to your database without adding more datafiles. This is beneficial if you are concerned about reaching the maximum number of datafiles allowed in your database.<br />Manually reducing the sizes of datafiles allows you to reclaim unused space in the database. This is useful for correcting errors in estimates of space requirements.<br />Also, datafiles can be allowed to automatically extend if more space is required. Look at the following command:<br /> CREATE TABLESPACE pcs_data_ts<br /> DATAFILE 'c:\ora_apps\pcs\pcsdata1.dbf' SIZE 3M<br /> AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED<br /> DEFAULT STORAGE ( INITIAL 10240<br /> NEXT 10240<br /> MINEXTENTS 1<br /> MAXEXTENTS UNLIMITED<br /> PCTINCREASE 0)<br /> ONLINE<br /> PERMANENT;<br />Back to top of file<br /><br /><br />How does one create a standby database?<br />While your production database is running, take an (image copy) backup and restore it on duplicate hardware. Note that an export will not work!!!<br />On your standby database, issue the following commands:<br />ALTER DATABASE CREATE STANDBY CONTROLFILE AS 'file_name';<br />ALTER DATABASE MOUNT STANDBY DATABASE;<br />RECOVER STANDBY DATABASE;<br />On systems prior to Oracle 8i, 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). Remember the database is recovering and will prompt you for the next log file to apply.<br />Oracle 8i onwards provide an "Automated Standby Database" feature which will send archived log files to the remote site via NET8, and apply then to the standby database.<br />When you need the standby database stop the recovery process and activate it:<br />ALTER DATABASE ACTIVATE STANDBY DATABASE;<br />Back to top of file<br /><br /><br />How does one give developers access to trace files (required as input to tkprof)?<br /><br />The "alter session set sql_trace=true" command generates trace files in USER_DUMP_DEST that is used by developers as input to tkprof. On Unix the default file mask for these files are "rwx r-- ---".<br />There is an undocumented INIT.ORA parameter that will allow everybody to read (rwx r-- r--) this trace files:<br />_trace_files_public = true<br />Include this in your INIT.ORA file and bounce your database for it to take effect.<br />Thanks to Erlie Flynn<br />Back to top of file<br /><br /><br />How does one see what the uptime for my database is?<br /><br />column STARTED format a18 head 'STARTUP TIME'<br />select C.INSTANCE,<br /> to_date(JUL.VALUE, 'J')<br /> || to_char(floor(SEC.VALUE/3600), '09' )<br /> || ':'<br /> || substr (to_char(mod(SEC.VALUE/60, 60), '09'), 2, 2)<br /> || '.'<br /> || substr (to_char(mod(SEC.VALUE, 60), '09'), 2, 2) STARTED<br /> from V$INSTANCE JUL,<br /> V$INSTANCE SEC,<br /> V$THREAD C<br /> where JUL.KEY like '%JULIAN%'<br /> and SEC.KEY like '%SECOND%';<br />Marco Bergman provided the following simpler example:<br />SELECT to_char(logon_time,'Dy dd Mon HH24:MM:SS') "DB Startup Time"<br />FROM sys.v_$session<br />WHERE sid=1 /* this is pmon */<br />/<br />Back to top of file<br /><br /><br />How can one see who is using a temporary segment?<br />For every user using temporary space, there is an entry in SYS.V$_LOCK with type 'TS'.<br />All temporary segments are named 'ffff.bbbb' where 'ffff' is the file it is in and 'bbbb' is first block of the segment.<br />If your temporary tablespace is set to TEMPORARY, all sorts are done in one large temporary segment. For usage stats, see SYS.V_$SORT_SEGMENT<br />From Oracle 8i, one can just query SYS.v$sort_usage. Look at this example:<br /> select s.username, u."USER", u.tablespace, u.contents, u.extents, u.blocks<br /> from sys.v_$session s, sys.v_$sort_usage u<br /> where s.addr = u.session_addr<br />/<br /><br /><br /><br /><br />Index Search Add FAQ Ask Question<br />Oracle Database Administration FAQ<br />$Date: 15-Apr-2000 $<br />$Revision: 1.31 $<br />$Author: Frank Naudé $<br />The only thing to fear is bear itself<br /><br />Topics<br /><br /> What database block size should I use?<br /> How does one coalesce free space?<br /> How does one prevent tablespace fragmentation?<br /> Where can one find the high water mark for a table?<br /> How is extents allocated to a segment?<br /> Can one rename a database user (schema)?<br /> Can one rename a tablespace's name?<br /> Can one resize tablespaces and data files?<br /> How does one create a standby database?<br /> How does one give developers access to trace files (required as input to tkprof)?<br /> How does one see what the uptime for my database is?<br /> How can one see who is using a temporary segment?<br /><br />Back to Oracle DBA Topics<br /><br /><br />What database block size should I use?<br />Oracle recommends that your database block size match, or be multiples of your operating system block size. One can use smaller block sizes, but the performance cost is significant. Your choice should depend on the type of application you are running. If you have lots of small transaction like with OLTP, use a smaller block size. With fewer but larger transactions, like with a DSS application, use a larger block size.<br />If you are using a volume manager, consider your "operating system block size" to be 8K. This is because volume manager products use 8K blocks (and this is not configurable).<br />Back to top of file<br /><br /><br />How does one coalesce free space?<br />SMON coalesces free space (extents) into larger, contiguous extents every 2 hours and even then only for a short period of time.<br />SMON will not coalesce free space if a tablespace's default storage parameter "pctincrease" is set to 0. With Oracle 7.3 one can manually coalesce a tablespace using the ALTER TABLESPACE ... COALESCE; command, until then use:<br />SQL> alter session set events 'immediate trace name coalesce level n';<br />where 'n' is the tablespace number you get from SELECT TS#, NAME FROM SYS.TS$;<br />You can get status information about this process by selecting from the SYS.DBA_FREE_SPACE_COALESCED dictionary view.<br />Back to top of file<br /><br /><br />How does one prevent tablespace fragmentation?<br />Always set PCTINCREASE to 0 or 100.<br />Bizarre values for PCTINCREASE will contribute to fragmentation. For example if you set PCTINCREASE to 1 you will see that your extents are going to have weird and wacky sizes: 100K, 100K, 101K, 102K, etc. Such extents of bizarre size are rarely re-used in their entirety. PCTINCREASE of 0 or 100 gives you nice round extent sizes that can easily be reused. Eg. 100K, 100K, 200K, 400K, etc.<br />Back to top of file<br /><br /><br />Where can one find the high water mark for a table?<br />There is no single system table which contains the high water mark (HWM) for a table. A table's HWM can be calculated using the results from the following SQL statements:<br /> SELECT BLOCKS<br /> FROM DBA_SEGMENTS<br /> WHERE OWNER=UPPER(owner) AND SEGMENT_NAME = UPPER(table);<br /><br /> ANALYZE TABLE owner.table ESTIMATE STATISTICS;<br /><br /> SELECT EMPTY_BLOCKS<br /> FROM DBA_TABLES<br /> WHERE OWNER=UPPER(owner) AND SEGMENT_NAME = UPPER(table);<br />Thus, the tables' HWM = (query result 1) - (query result 2) - 1<br />NOTE: You can also use the DBMS_SPACE package and calculate the HWM = TOTAL_BLOCKS - UNUSED_BLOCKS - 1.<br />Back to top of file<br /><br /><br />How is extents allocated to a segment?<br />Oracle8 and above rounds off extents to a multiple of 5 blocks when more than 5 blocks are requested. If one requests 16K or 2 blocks (assuming a 8K block size), Oracle doesn't round it up to 5 blocks, but it allocates 2 blocks or 16K as requested. If one asks for 8 blocks, Oracle will round it up to 10 blocks.<br />Space allocation also depends upon the size of contiguous free space available. If one asks for 8 blocks and Oracle finds a contiguous free space that's exactly 8 blocks, it would give it you. If it is 9 blocks, Oracle would also give it to you. This is why Oracle doesn't always round extents to a multiple of 5 blocks.<br />The exception to this rule is locally managed tablespaces. If a tablespace is created with local extent management and the extent size is 64K, then Oracle allocates 64K or 8 blocks assuming 8K block size. Oracle doesn't round it up to the multiple of 5 when a tablespace is locally managed.<br />Back to top of file<br /><br /><br />Can one rename a database user (schema)?<br />No, this is listed as Enhancement Request 158508. Workaround:<br />Do a user-level export of user A<br />create new user B<br />import system/manager fromuser=A touser=B<br />drop user A<br />Back to top of file<br /><br /><br />Can one rename a tablespace's name?<br />No, this is listed as Enhancement Request 148742. Workaround:<br />Export all of the objects from the tablespace<br />Drop the tablespace including contents<br />Recreate the tablespace<br />Import the objects back in<br />Back to top of file<br /><br /><br />Can one resize tablespaces and data files?<br /><br />You can manually increase or decrease the size of a datafile from Oracle 7.2 using the<br />ALTER DATABASE DATAFILE 'filename2' RESIZE 100M;<br />command.<br />Because you can change the sizes of datafiles, you can add more space to your database without adding more datafiles. This is beneficial if you are concerned about reaching the maximum number of datafiles allowed in your database.<br />Manually reducing the sizes of datafiles allows you to reclaim unused space in the database. This is useful for correcting errors in estimates of space requirements.<br />Also, datafiles can be allowed to automatically extend if more space is required. Look at the following command:<br /> CREATE TABLESPACE pcs_data_ts<br /> DATAFILE 'c:\ora_apps\pcs\pcsdata1.dbf' SIZE 3M<br /> AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED<br /> DEFAULT STORAGE ( INITIAL 10240<br /> NEXT 10240<br /> MINEXTENTS 1<br /> MAXEXTENTS UNLIMITED<br /> PCTINCREASE 0)<br /> ONLINE<br /> PERMANENT;<br />Back to top of file<br /><br /><br />How does one create a standby database?<br />While your production database is running, take an (image copy) backup and restore it on duplicate hardware. Note that an export will not work!!!<br />On your standby database, issue the following commands:<br />ALTER DATABASE CREATE STANDBY CONTROLFILE AS 'file_name';<br />ALTER DATABASE MOUNT STANDBY DATABASE;<br />RECOVER STANDBY DATABASE;<br />On systems prior to Oracle 8i, 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). Remember the database is recovering and will prompt you for the next log file to apply.<br />Oracle 8i onwards provide an "Automated Standby Database" feature which will send archived log files to the remote site via NET8, and apply then to the standby database.<br />When you need the standby database stop the recovery process and activate it:<br />ALTER DATABASE ACTIVATE STANDBY DATABASE;<br />Back to top of file<br /><br /><br />How does one give developers access to trace files (required as input to tkprof)?<br /><br />The "alter session set sql_trace=true" command generates trace files in USER_DUMP_DEST that is used by developers as input to tkprof. On Unix the default file mask for these files are "rwx r-- ---".<br />There is an undocumented INIT.ORA parameter that will allow everybody to read (rwx r-- r--) this trace files:<br />_trace_files_public = true<br />Include this in your INIT.ORA file and bounce your database for it to take effect.<br />Thanks to Erlie Flynn<br />Back to top of file<br /><br /><br />How does one see what the uptime for my database is?<br /><br />column STARTED format a18 head 'STARTUP TIME'<br />select C.INSTANCE,<br /> to_date(JUL.VALUE, 'J')<br /> || to_char(floor(SEC.VALUE/3600), '09' )<br /> || ':'<br /> || substr (to_char(mod(SEC.VALUE/60, 60), '09'), 2, 2)<br /> || '.'<br /> || substr (to_char(mod(SEC.VALUE, 60), '09'), 2, 2) STARTED<br /> from V$INSTANCE JUL,<br /> V$INSTANCE SEC,<br /> V$THREAD C<br /> where JUL.KEY like '%JULIAN%'<br /> and SEC.KEY like '%SECOND%';<br />Marco Bergman provided the following simpler example:<br />SELECT to_char(logon_time,'Dy dd Mon HH24:MM:SS') "DB Startup Time"<br />FROM sys.v_$session<br />WHERE sid=1 /* this is pmon */<br />/<br />Back to top of file<br /><br /><br />How can one see who is using a temporary segment?<br />For every user using temporary space, there is an entry in SYS.V$_LOCK with type 'TS'.<br />All temporary segments are named 'ffff.bbbb' where 'ffff' is the file it is in and 'bbbb' is first block of the segment.<br />If your temporary tablespace is set to TEMPORARY, all sorts are done in one large temporary segment. For usage stats, see SYS.V_$SORT_SEGMENT<br />From Oracle 8i, one can just query SYS.v$sort_usage. Look at this example:<br /> select s.username, u."USER", u.tablespace, u.contents, u.extents, u.blocks<br /> from sys.v_$session s, sys.v_$sort_usage u<br /> where s.addr = u.session_addr<br />/<br /><br /><br />Index Search Add FAQ Ask Question<br />Oracle Performance Tuning FAQ<br />$Date: 23-Apr-2000 $<br />$Revision: 1.10 $<br />$Author: Frank Naudé $<br />Proper Preparation Prevents Piss Poor Performance<br /><br />Topics<br /><br /> When is cost base optimization triggered?<br /> How can one optimize %XYZ% queries?<br /> Where can one find I/O statistics per table?<br /> My query was fine last week and now it is slow. Why?<br /> Why is Oracle not using the damn index?<br /> How does one tune Oracle Wait events?<br /><br />Back to Oracle DBA Topics<br /><br /><br />When is cost base optimization triggered?<br />It's important to have statistics on all tables for the CBO (Cost Based Optimizer) to work correctly. If one table involved in a statement does not have statistics, Oracle has to revert to rule-based optimization for that statement. So you really want for all tables to have statistics right away; it won't help much to just have the larger tables analyzed.<br />Generally, the CBO can change the execution plan when you:<br />1. Change statistics of objects by doing an ANALYZE;<br />1. Change some initialization parameters (for example: hash_join_enabled, sort_area_size, db_file_multiblock_read_count).<br />Back to top of file<br /><br /><br />How can one optimize %XYZ% queries?<br />It is possible to improve %XYZ% queries by forcing the optimizer to scan all the entries from the index instead of the table. This can be done by specifying hints.<br />If the index is physically smaller than the table (which is usually the case) it will take less time to scan the entire index than to scan the entire table.<br />Back to top of file<br /><br /><br />Where can one find I/O statistics per table?<br />The UTLESTAT report shows I/O per tablespace but one cannot see what tables in the tablespace has the most I/O.<br />The $ORACLE_HOME/rdbms/admin/catio.sql script creates a sample_io procedure and table to gather the required information. After executing the procedure, one can do a simple SELECT * FROM io_per_object; to extract the required information.<br />For more details, look at the header comments in the $ORACLE_HOME/rdbms/admin/catio.sql script.<br />Back to top of file<br /><br /><br />My query was fine last week and now it is slow. Why?<br />The likely cause of this is because the execution plan has changed. Generate a current explain plan of the offending query and compare it to a previous one that was taken when the query was performing well. Usually the previous plan is not available.<br />Some factors that can cause a plan to change are:<br /> Which tables are currently analyzed? Were they previously analyzed? (ie. Was the query using RBO and now CBO?)<br /> Has OPTIMIZER_MODE been changed in INIT.ORA?<br /> Has the DEGREE of parallelism been defined/changed on any table?<br /> Have the tables been re-analyzed? Were the tables analyzed using estimate or compute? If estimate, what percentage was used?<br /> Have the statistics changed?<br /> Has the INIT.ORA parameter DB_FILE_MULTIBLOCK_READ_COUNT been changed?<br /> Has the INIT.ORA parameter SORT_AREA_SIZE been changed?<br /> Have any other INIT.ORA parameters been changed?<br />What do you think the plan should be? Run the query with hints to see if this produces the required performance.<br />Back to top of file<br /><br /><br />Why is Oracle not using the damn index?<br />This problem normally only arises when the query plan is being generated by the Cost Based Optimizer. The usual cause is because the CBO calculates that executing a Full Table Scan would be faster than accessing the table via the index. Fundamental things that can be checked are:<br /> USER_TAB_COLUMNS.NUM_DISTINCT - This column defines the number of distinct values the column holds.<br /> USER_TABLES.NUM_ROWS - If NUM_DISTINCT = NUM_ROWS then using an index would be preferable to doing a FULL TABLE SCAN. As the NUM_DISTINCT decreases, the cost of using an index decreases.<br /> USER_INDEXES.CLUSTERING_FACTOR - This defines how ordered the rows are in the index. If CLUSTERING_FACTOR approaches the number of blocks in the table, the rows are ordered. If it approaches the number of rows in the table, the rows are randomly ordered. In such a case, it is unlikely that index entries in the same leaf block will point to rows in the same data blocks.<br /> Decrease the INIT.ORA parameter DB_FILE_MULTIBLOCK_READ_COUNT - A higher value will make the cost of a FULL TABLE SCAN cheaper.<br />Remember that you MUST supply the leading column of an index, for the index to be used (unless you use a FAST FULL SCAN).<br />There are many other factors taht affect the cost, but sometimes the above can help to show why an index is not being used by the CBO. If from checking the above you still feel that the query should be using an index, try specifying an index hint. Obtain an explain plan of the query either using TKPROF with TIMED_STATISTICS, so that one can see the CPU utilization, or with AUTOTRACE to see the statistics. Compare this to the explain plan when not using an index.<br />Back to top of file<br /><br /><br />How does one tune Oracle Wait events?<br />Some wait events from V$SESSION_WAIT and V$SYSTEM_EVENT views:<br />Event Name: Tuning Recomendation:<br /> <br />db file sequential read Tune SQL to do less I/O. Make sure all objects are analyzed. Redistribute I/O across disks.<br />buffer busy waits Increase DB_BLOCK_BUFFERS/ Alalyze contention from SYS.V$BH<br />log buffer space Increase LOG_BUFFER parameter or move log files to faster disks<br /><br /><br />Index Search Add FAQ Ask Question<br />Oracle Backup and Recovery FAQ<br />$Date: 28-Jan-2000 $<br />$Revision: 1.10 $<br />$Author: Frank Naudé $<br />The wise one once said: Backup early and often... database crashes can happen at any time for any reason!<br /><br />Topics<br /><br /> When and why should I backup my database?<br /> What is the difference between online and offline backups?<br /> How does one get a database in ARCHIVELOG mode?<br /> Does oracle write to data files in hot backup mode?<br /> My database was terminated while in BACKUP MODE, do I need to recover?<br /> I've lost my REDOLOG files, how can I get my DB back?<br /> I've lost some Rollback Segments, how can I get my DB back?<br /> What are EBU and RMAN?<br /> Common RMAN errors with solutions<br /> What third party tools can be used with Oracle EBU/ RMAN?<br /><br />Back to Oracle DBA Topics<br /><br /><br />When and why should I backup my database?<br />BOTTOM LINE: You loose the companies data, you could loose your job.<br />Most company won't spend the money of an elaborate backup system by a 3rd party vendor. If your company is one of these, then resort the old fashion way, TAPE using tar, dump, cpio, bar, dd. Get that data backed up!<br />If you cannot take your database down for a cold (off-line) backup. Switch your database into ARCHIVELOG mode and perform hot (on-line) backups.<br />Back to top of file<br /><br /><br />What is the difference between online and offline backups?<br />A hot backup is a backup performed while the database is online and available for read/write. This can only be done if your database is in ARCHIVELOG mode.<br />A cold backup is a backup performed while the database is off-line.<br />For questions regarding logical backups see the Import/ Export FAQ.<br />Back to top of file<br /><br /><br />How does one get a database in ARCHIVELOG mode?<br />It is necessary to enable ARCHIVELOG mode before you start to use on-line database backups. To enable ARCHIVELOG mode, simply change your database startup command script:<br /> SVRMGR> connect internal;<br /> SVRMGR> startup mount exclusive;<br /> SVRMGR> alter database archivelog;<br /> SVRMGR> archive log start;<br /> SVRMGR> alter database open;<br />NOTE1: ARCHIVELOG mode was introduced with Oracle V6 and is essential for database point-in-time recovery.<br />NOTE2: You can change the archive log destination of a database on-line with the ARCHIVE LOG START TO 'directory'; statement.<br />Back to top of file<br /><br /><br />Does oracle write to data files in hot backup mode?<br />Oracle will continue to write to the database data files even if a tablespace is in backup mode. If a tablespace is in backup mode, Oracle will write out complete changed blocks to the redo log files. Normally only deltas (changes) are logged to the redo log files. This is done to enable reconstruction of a block if only half of it was backed up (split blocks). Because of this, one should notice increased log activity and archiving during on-line backups.<br />Back to top of file<br /><br /><br />My database was terminated while in BACKUP MODE, do I need to recover?<br />If a database was terminated while one of its tablespaces was in BACKUP MODE (ALTER TABLESPACE ... BEGIN BACKUP;), it will tell you that media recovery is needed when you attempt to start it up. The DBA is then required to recover the database and apply all archived logs to the database.<br />However, from Oracle7.2, you can simply take the individual datafiles out of backup mode. Eg: ALTER DATABASE DATAFILE '...' END BACKUP; and restart the database. You can do a select from V$BACKUP to see which datafiles were in backup mode. This will save a significant amount of database downtime.<br />Back to top of file<br /><br /><br />I've lost my REDOLOG files, how can I get my DB back?<br />The following INIT.ORA parameter may be required if your current redologs are corrupted or blown away. Caution is advised when using it as you might end-up with lost or inconsistent data!!!<br /> _allow_resetlogs_corruption = true<br />Back to top of file<br /><br /><br />I've lost some Rollback Segments, how can I get my DB back?<br />Re-start your database with the following INIT.ORA parameter if one of your rollback segments is corrupted. You can then drop the corrupted rollback segments and create it from scratch. Caution is advised when using it as it will mark uncommitted transactions are committed and you will end-up with lost or inconsistent data!!!<br /> _corrupted_rollback_segments = (rbs01,rbs01,rbs03,rbs04)<br />Back to top of file<br /><br /><br />What are EBU and RMAN?<br />Enterprise Backup Utility (EBU) is a functionally rich, high performance interface for backing up Oracle databases. It is sometimes pronounced OEBU for Oracle Enterprise Backup Utility.<br />The Oracle Recovery Manager (RMAN) is the Oracle8 equivalent of EBU.<br />Back to top of file<br /><br /><br />Common RMAN errors with solutions<br />RMAN-20242: Specification does not match any archivelog in the recovery catalog.<br />Add to RMAN script: sql 'alter system archive log current';<br />RMAN-06089: archived log xyz not found or out of sync with catalog<br />Execute from RMAN: change archivelog all validate;<br />Back to top of file<br /><br /><br />What third party tools can be used with Oracle EBU/ RMAN?<br />The following Media Management Software Vendors have integrated their media management software packages with Oracle8 Recovery Manager and Oracle7 Enterprise Backup Utility. The Media Management Vendors will provide first line technical support for the integrated backup/recover solutions.<br /> Veritas NetBackup<br /> EMC DataManager<br /> HP OMNIBack II<br /> IBM's Tivoli Storage Manager - formerly ADSM<br /> Legato Networker<br /> Sterling Software's SAMS:Alexandria - formerly from Spectralogic<br /> etc...<br /><br />Index Search Add FAQ Ask Question<br />Oracle Security FAQ<br />$Date: 28-May-2000 $<br />$Revision: 1.00 $<br />$Author: Frank Naudé $<br />Secure your database and sleep well at night<br /><br />Topics<br /><br /> How does one switch to another user in Oracle?<br /> Is it true that OPS$ accounts are a security risk in a C/S environment?<br /> Who created all these users in my database?<br /><br />Back to Oracle DBA Topics<br /><br /><br />How does one switch to another user in Oracle?<br />Any DBA can switch from one database user to another. Of course it is not advisable to bridge Oracle's security, but look at this example:<br />SQL> select password from dba_users where username='SCOTT';<br />PASSWORD<br /> -----------------------------<br /> F894844C34402B67<br /><br />SQL> alter user scott identified by lion;<br />User altered.<br /><br />SQL> connect scott/lion<br />Connected.<br /><br />REM Do whatever you like...<br /><br />SQL> connect system/manager<br />Connected.<br /><br />SQL> alter user scott identified by values 'F894844C34402B67';<br />User altered.<br /><br />SQL> connect scott/tiger<br />Connected.<br />Note: Also see the su.sql script in the Useful Scripts and Sample Programs Page.<br />Back to top of file<br /><br /><br />Is it true that OPS$ accounts are a security risk in a C/S environment?<br />If you allow people to log in with OPS$ accounts from Windows95, you cannot tell who that really is. With terminals, you can rely on passwords, with Win95, you cannot.<br />If you set REMOTE_OS_AUTHENT=TRUE in your init.ora file, Oracle Assumes that the remote OS has authenticated the user.<br />If REMOTE_OS_AUTHENT is set to FALSE, you have no exposure from remote clients - you also won't be able to connect from a remote client without a password (recommended). IDENTIFIED EXTERNALLY will only be in effect from the local host. Also, if you're using OPS$ as your prefix, you'll be able to log on locally with or without a password, regardless of whether you've identified your ID with a password or defined it to be IDENTIFIED EXTERNALLY.<br /> Procedure to enable SQL trace for users on your database: =========================================================<br />1. Get the SID and SERIAL# for the process you want to trace. SQL select sid, serial# from sys.v_$session where ... SID SERIAL# ---------- ---------- 8 13607<br />1. Enable tracing for your selected process: SQL ALTER SYSTEM SET TIMED_STATISTICS = TRUE; SQL execute dbms_system.set_sql_trace_in_session(8,13607, true);<br />1. Ask user to run just the necessary to demonstrate his problem.<br />1. Disable tracing for your selected process: SQL execute dbms_system.set_sql_trace_in_session(8,13607, false); SQL ALTER SYSTEM SET TIMED_STATISTICS = FALSE;<br />1. Look for trace file in USER_DUMP_DEST $ cd /app/oracle/admin/oradba/udump $ ls -ltr total 8 -rw-r----- 1 oracle dba 2764 Mar 30 12:37 ora_9294.trc<br />1. Run TKPROF to analyse trace output $ tkprof ora_9294.trc x EXPLAIN=monitor/oramon SYS=NO<br />1. View/print output<br /><br />Index Search Add FAQ Ask Question<br />Oracle8 Database Administration FAQ<br />$Date: 01-Jun-1997 $<br />$Revision: 1.0 $<br />$Author: Frank Naudé $<br />Great 8: The database for network computing<br /><br />Topics<br /><br /> What is new in Oracle8?<br /> How does one upgrade to Oracle8?<br /> Can one exp from Oracle8 and imp into Oracle7?<br /> How does one create partitioned tables?<br /> How does one create an object?<br /><br />Back to Oracle DBA Topics<br /><br /><br />What is new in Oracle8?<br />Oracle8 will still support the standard relational stuff as in Oracle7, but some new features and object extensions (cost option!) were added. To list a few:<br /> A new object-relational database model<br /> New object extensions (create type, external libraries, new in built datatypes)<br /> Support for the ANSI SQL3 standard<br /> Addresses the large database market (512 petabytes theoretical limit up from 4 terabytes in Oracle7)<br /> Table and Index partitioning (store a table in multiple tablespaces)<br /> Up to 1000 columns per table (up from 254 in Oracle7)<br /> Provides deferred constraints (executed at commit time)<br /> LONG field size increased from 2GB to 4GB; can have many LOBs per table; can be replicated; can be stored in separate tablespace<br /> Replication through C-code built into the server instead of handling it thru DB triggers<br /> Server Managed Backup and Recovery<br /> Supports more concurrent users<br /> Connection Pooling (utilizes idle connections to support more user)<br /> Shared Database Links<br /> Oracle8 Data Cartridges (database plug-in's to creating new data types)<br /> Client-side Object Cache<br /> The ROWID field format and size changed from 6 to 10 bytes<br /> Server-side JAVA support from Oracle 8.1<br /> SQL*Net now called Net8<br /> Tablespace point-in-time recovery<br />Back to top of file<br /><br /><br />How does one upgrade to Oracle8?<br />If you are running Oracle 7.1, 7.2 or 7.3, you can use the Oracle8 Migration Utility to upgrade the data dictionary. The amount of time it takes to do the migration depends on the number of tables you have in the database, and not on the size of the database. Note that you cannot perform a migration after a patch set was installed. Migrate first, then apply the necessary patch sets.<br />For versions prior to Oracle 7.1, export your data and import it into a newly created Oracle8 database.<br />For more information, refer to the "Oracle8 Server Migration Release 8.0" manual.<br />Back to top of file<br /><br /><br />Can one exp from Oracle8 and imp into Oracle7?<br />Run catexp.sql and catexp7.sql from Server Manager on your Oracle8 database. Both these files can be found in the $ORACLE_HOME/rdbms/admin directory.<br />You can now run the Oracle7 exp utility against your Oracle8 database and import the resulting dump file back into an Oracle7 database.<br />Back to top of file<br /><br /><br />How does one create partitioned tables?<br />Oracle8's partitioning scheme will give DBA's the ability to perform maintenance on partitions without having to bring down an entire table (import/ export/ load/ etc). The SQL optimizer will bypass partitions that don't contain data pertinent to the query being solved. Look at the following example:<br />CREATE TABLE emp<br />( id NUMBER(5) PRIMARY KEY,<br /> name VARCHAR2(50) NOT NULL,<br /> address VARCHAR2(50),<br /> phone VARCHAR2(15),<br /> email VARCHAR2(100) )<br />PARTITION BY RANGE ( name )<br /> ( PARTITION p1 VALUES LESS THAN ('L') TABLESPACE ts1,<br /> PARTITION p2 VALUES LESS THAN (MAXVALUE) TABLESPACE ts2 )<br />Notes: Oracle8 sorts nulls greater than all other values except MAXVALUE.<br />Back to top of file<br /><br /><br />How does one create an object?<br /><br /> CREATE TYPE employee_type as OBJECT (<br /> name varchar2(30),<br /> ssn varchar2(11),<br /> salary number),<br /> MEMBER FUNCTION get_id RETURN number);<br /><br /> CREATE TYPE BODY emp_type (<br /> MAP MEMBER FUNCTION get_id RETURN number is<br /> BEGIN<br /> RETURN ascii_to_num(ssn);<br /> END;);<br /><br /> CREATE TABLE emp OF employee_type;<br /><br />Index Search Add FAQ Ask Question<br />DBA Tasks, Responsibilities and Skills Required<br />$Date: 23-Mar-1998 $<br />$Revision: 1.1 $<br />$Author: Frank Naudé $<br />DILBERT'S LAWS OF WORK:<br />Don't be irreplaceable, if you can't be replaced, you can't be promoted.<br /><br />Topics<br /><br /> DBA Responsibilities<br /> Required Skills<br /> Qualifications<br /> Typical Interview Questions<br /><br />Back to Oracle DBA Topics<br /><br /><br />DBA Responsibilities:<br /><br />The job of the DBA seems to be everything that everyone else either doesn't want to do or doesn't have the ability to do. We get the wonderful task of figuring out all the things too hard for everyone else to figure out.<br />More seriously though, there is a list of typical DBA responsibilities:<br /> Installation, configuration and upgrading of Oracle server software and related products<br /> Evaluate Oracle features and Oracle related products<br /> Establish and maintain sound backup and recovery policies and procedures<br /> Take care of the Database design and implementation<br /> Implement and maintain database security (create and maintain users and roles, assign priviledges)<br /> Do database tuning and performance monitoring<br /> Do application tuning and performance monitoring<br /> Setup and maintain documentation and standards<br /> Plan growth and changes (capacity planning)<br /> Work as part of a team and provide 7x24 support when required<br /> Do general technical trouble shooting and give consultation to development teams<br /> Interface with Oracle Corporation for technical support.<br />Back to top of file<br /><br /><br />Required Skills:<br /><br /> Good understanding of the Oracle database, related utilities and tools<br /> A good understanding of the underlying operating system<br /> A good knowledge of the physical database design<br /> Ability to perform both Oracle and operating system performance tuning and monitoring<br /> Knowledge of ALL Oracle backup and recovery scenarios<br /> A good knowledge of Oracle security management<br /> A good knowledge of how Oracle acquires and manages resources<br /> A good knowledge Oracle data integrity<br /> Sound knowledge of the applications systems at your site<br /> Experience in code migration, database change management and data management through the various stages of the development life cycle<br /> A sound knowledge of both database and system performance tuning<br /> A DBA should have sound communication skills with management, development teams, vendors and systems administrators<br /> Provide a strategic database direction for the organisation<br /> A DBA should have the ability to handle multiple projects and deadlines<br /> A DBA should possess a sound understanding of the business<br />Back to top of file<br /><br /><br />Qualifications:<br /> Must be certified as an Oracle DBA<br /> Preferably a BS in computer science or related engineering field<br /> Lots and lots of EXPERIENCE<br />Back to top of file<br /><br /><br />Typical Interview Questions<br /><br />General Questions<br /> Tell us about yourself/ your background.<br /> What are the three major characteristics that you bring to the job market?<br /> What motivates you to do a good job?<br /> What two or three things are most important to you at work?<br /> What qualities do you think are essential to be successful in this kind of work?<br /> What courses did you attend? What job certifications do you hold?<br /> What subjects/courses did you excel in? Why?<br /> What subjects/courses gave you trouble? Why?<br /> How does your previous work experience prepare you for this position?<br /> How do you define 'success'?<br /> What has been your most significant accomplishment to date?<br /> Describe a challenge you encountered and how you dealt with it.<br /> Describe a failure and how you dealt with it.<br /> Describe the 'ideal' job... the 'ideal' supervisor.<br /> What leadership roles have you held?<br /> What prejudices do you hold?<br /> What do you like to do in your spare time?<br /> What are your career goals (a) 3 years from now; (b) 10 years from now?<br /> How does this position match your career goals?<br /> What have you done in the past year to improve yourself?<br /> In what areas do you feel you need further education and training to be successful?<br /> What do you know about our company?<br /> Why do you want to work for this company. Why should we hire you?<br /> Where do you see yourself fitting in to this organization . . .initially? . . .in 5 years?<br /> Why are you looking for a new job?<br /> How do you feel about re-locating?<br /> Are you willing to travel?<br /> What are your salary requirements?<br /> When would you be available to start if you were selected?<br />General Oracle Questions<br /> Did you use online or off-line backups?<br /> What version of Oracle were you running?<br /> Haw many databases and what sizes?<br /> If you have to advise a backup strategy for a new application, how would you approach it and what questions will you ask?<br /> If a customer calls you about a hanging database session, what will you do to resolve it?<br /> Compare Oracle to any other database that you know. Why would you prefer to work on one and not on the other?<br /><br />Index Search Add FAQ Ask Question<br />Oracle Parallel Query Option FAQ<br />$Date: 13-Dec-1996 $<br />$Revision: 1.0 $<br />$Author: Frank Naudé $<br /><br />Topics<br /><br /> What is the Oracle Parallel Query Option?<br /> How does one invoke the Parallel Query Option?<br /> How does one disable the Parallel Query Option?<br /> What parameters can be set to control the Query Option?<br /> How does one monitor Parallel Query Execution?<br /><br />Back to Oracle FAQ Index<br /><br /><br />What is the Oracle Parallel Query Option?<br />The Oracle Parallel Query Option (PQO) allows one to parallise certain SQL statements so it can run on different processors on a multi-processor box. Typical operations that can be run in parallel: full table scans, sorts, sub-queries, data loading etc.<br />This option is mainly used for performance reasons and is commonly seen in Decision Support and Data Warehousing applications.<br />Back to top of file<br /><br /><br />How does one invoke the Parallel Query Option?<br />After setting the INIT.ORA parameters necessary for PQO to work, do the following:<br /> ALTER your table (or index) and indicating that it is a parallel table<br />ALTER TABLE TAB_XXX PARALLEL (DEGREE 7);<br /> putting hints in your SQL statement to indicate that it should be executed in parallel<br />SELECT --+ PARALLEL(table_alias, degree, nodes) * FROM table ...<br />Back to top of file<br /><br /><br />How does one disable the Parallel Query Option?<br /><br />ALTER TABLE TAB_XXX PARALLEL (DEGREE 1 INSTANCES 1); or<br />ALTER TABLE TAB_XXX NOPARALLEL;<br />ALTER INDEX IND_XXX PARALLEL (DEGREE 1 INSTANCES 1); or<br />ALTER INDEX IND_XXX NOPARALLEL;<br />You can also take out the INIT.ORA parameters that allow PQO to work.<br />Back to top of file<br /><br /><br />What parameters can be set to control the Query Option?<br />The following INIT.ORA parameters can be set to control Parallel Query execution:<br /> PARALLEL_MIN_SERVERS<br /> PARALLEL_MAX_SERVERS<br /> etc.<br />Back to top of file<br /><br /><br />How does one monitor Parallel Query Execution?<br />Prior to Oracle 8i:<br />select * from sys.v_$pq_sysstat;<br />Oracle 8i onwards:<br />select * from v_$pq_sysstat;<br />select * from v_$px_process;<br />select * from v_$px_sesstat;<br />select * from v_$px_process_sysstat;<br />Back to top of file<br /><br /><br />Index Search Add FAQ Ask Question<br />Oracle Parallel Server Option FAQ<br />$Date: 01-Dec-1998 $<br />$Revision: 2.01 $<br />$Author: Frank Naudé $<br /><br />Topics<br /><br /> What is the Oracle Parallel Server Option?<br /> What are the benefits for running in Parallel Server mode?<br /> Are all applications suited for the Parallel Server?<br /> How does one setup an Oracle Parallel Server?<br /> How does one start an Oracle Parallel Server?<br /> How can I test if a database is running is shared (parallel) mode?<br /> How can I keep track of active instances?<br /> How can one see how many PCM locks are allocated per instance?<br /> How can one see how many PCM locks are allocated per data file?<br /> What is pinging and why is it so bad?<br /> How does one monitor PCM lock activity?<br /> How does one setup a common SQL*Net connect string for all OPS instances?<br /> How does one trace DLM activity?<br /> Any other tips for using the Parallel Server?<br /><br />Back to Oracle FAQ Index<br /><br /><br />What is the Oracle Parallel Server Option?<br />A normal Oracle installation consists of a single Oracle instance that access a database on the same computer system. With the parallel server option (PSO), multiple instances on different computer systems (nodes) can access the same database files simultaneously.<br />The OPS option is mainly used for high availability reasons. The parallel server can provide improved performance by using CPU resources across multiple computer systems. However, performance can be worse if your data is not partitioned correctly.<br />In Oracle Parallel Server installations, multiple instances mount the same database files. Communication between instances are managed by the Distributed Lock Manager (DLM). Note that the DLM is hardware and operating system dependent.<br />To address the possibility of two or more instances attempting to modify the same information simultaneously, Oracle uses up to ten additional background processes, named LCK0 through LCK9, to lock a resource in use by an instance.<br />The PSO is normally used on DEC VAX Clusters, UNIX Clusters, IBM's MVS SYSPLEX etc.<br />Back to top of file<br /><br /><br />What are the benefits for running in Parallel Server mode?<br />Running Oracle in parallel mode can benefit you in the following ways:<br /> High availability and limited failover support from Oracle8.<br /> Speedup (increase transaction response time) - can be achieved for DSS applications.<br /> Scaleup (increase the transaction volume) - can be achieved for OLTP applications.<br />Back to top of file<br /><br /><br />Are all applications suited for the Parallel Server?<br />Applications that can be partitioned based on function or data are perfect candidates for the Oracle Parallel Server.<br />Applications with 'hot' rows (the same row being accessed by processes on different nodes) will not work well. This is because data will constantly be moved (pinged) from one Oracle Instance to another.<br />Back to top of file<br /><br /><br />How does one setup an Oracle Parallel Server?<br /><br />1. Shut Down your Database:<br /> SVRMGR> CONNECT INTERNAL<br /> SVRMGR> SHUTDOWN NORMAL<br />1. Enable the Parallel Server Option. On Unix this is done by relinking the Oracle software.<br />1. Make the software available on all computer systems the Parallel Server will run on. This can be done by copying the software to all systems or to a shared disk.<br />1. Each instance requires its own set of Redo Log Files. Create additional log files:<br /> SVRMGR> CONNECT INTERNAL<br /> SVRMGR> STARTUP EXCLUSIVE<br /> SVRMGR> ALTER DATABASE ADD LOGFILE THREAD 2<br /> SVRMGR> GROUP G4 ('RAW_FILE1') SIZE 500k,<br /> SVRMGR> GROUP G5 ('RAW_FILE2') SIZE 500k,<br /> SVRMGR> GROUP G6 ('RAW_FILE3') SIZE 500k;<br /> SVRMGR> ALTER DATABASE ENABLE PUBLIC THREAD 2;<br />1. Each instance requires its own set of rollback segments. Add Rollback Segments for New Nodes:<br /> SVRMGR> CREATE ROLLBACK SEGMENT RB2 TABLESPACE RBS;<br />1. Edit the INIT.ORA files and number the instances 1, 2,...:<br /> INSTANCE_NUMBER = 1<br /> THREAD = 1<br /> ROLLBACK_SEGMENTS = (r01, r02, r03, r04)<br /> PARALLEL_SERVER = TRUE<br /> # Include %T for the thread in the LOG_ARCHIVE_FORMAT string.<br /> # Set LM_PROCS to the number of nodes * PROCESSES<br /> # etc....<br />1. Create the dictionary views needed for the PSO:<br /> SVRMGR> START ?/RDBMS/ADMIN/CATPARR.SQL<br />1. On all the computer systems, startup the instances:<br /> SVRMGR> CONNECT INTERNAL;<br /> SVRMGR> STARTUP PARALLEL; or STARTUP SHARED;<br />Back to top of file<br /><br /><br />How does one start an Oracle Parallel Server?<br />Do the following from each node:<br /> SVRMGR> connect internal<br /> SVRMGR> set retries 5<br /> SVRMGR> startup parallel retry<br />You can also use the SET INSTANCE instanceN command to switch between instances (if defined in TNSNAMES.ORA).<br />Back to top of file<br /><br /><br />How can I test if a database is running is shared (parallel) mode?<br /><br /> begin<br /> if dbms_utility.is_parallel_server then<br /> dbms_output.put_line('Running in SHARED/PARALLEL mode.');<br /> else<br /> dbms_output.put_line('Running in EXCLUSIVE mode.');<br /> end if;<br /> end;<br /> /<br />Back to top of file<br /><br /><br />How can I keep track of active instances?<br />You can keep track of active parallel server instances by executing one of the following queries:<br /> SELECT * FROM SYS.V_$ACTIVE_INSTANCES;<br /> SELECT * FROM SYS.V_$THREAD;<br />Back to top of file<br /><br /><br />How can one see how many PCM locks are allocated per instance?<br /><br /> select count(*) "Number of hashed PCM locks"<br /> from v$lock_element where bitand(flags, 4) != 0<br /> /<br /> select count(*) "Number of fine grain PCM locks"<br /> from v$lock_element where bitand(flags, 4) = 0<br /> /<br />Back to top of file<br /><br /><br />How can one see how many PCM locks are allocated per data file?<br />The following statement shows how many PCM locks are allocated per file and what the ping rate on those files are:<br /> col file_name format a29<br /> col tablespace format a12<br /> col blocking format 9999999<br /> col nlocks format 99999<br /> col start_lk format 9999999<br /> select l.file_id || ' ' || l.file_name file_name,<br /> l.ts_name "TABLESPACE",<br /> start_lk, nlocks, blocking, frequency "PING COUNT"<br /> from sys.file_ping p, sys.file_lock l<br /> where l.file_id = p.file_id<br /> order by l.file_id<br /> /<br />Back to top of file<br /><br /><br />What is pinging and why is it so bad?<br />Pinging is the process whereby one Oracle Instance requests another to write a set of blocks from its SGA to disk so it can obtain it in exclusive mode. To move a data block from one instance's SGA to another is a slow process.<br />The challenge of tuning an Oracle Parallel Server is to minimize pinging.<br />Back to top of file<br /><br /><br />How does one monitor PCM lock activity?<br />Summary of PCM lock activity for the current instance:<br /> select * from sys.v$lock_activity;<br /> /<br />PCM lock activity per database object:<br /> col table format a40<br /> select file#, kind||' '||username||'.'||name "TABLE", sum(xnc) pings<br /> from sys.v$false_ping p, sys.dba_users u<br /> where u.user_id = p.owner#<br /> group by file#, kind||' '||username||'.'||name, xnc<br /> order by xnc desc<br /> /<br />Back to top of file<br /><br /><br />How does one setup a common SQL*Net connect string for all OPS instances?<br /><br />Define all Oracle System Identifiers (SIDs) to be the same on all nodes of the system. If you already have your SIDs defined, you can rename them by:<br /> Shutting down all instances of the database;<br /> Change the ORACLE_SID environment variable to the common name you have chosen;<br /> Copy the current initOLDSID.ora file to initCOMMON.ora;<br /> Restart the Oracle instances.<br />This is a sample TNSNAMES entry to connect to one of two instances in a parallel server:<br /> rprd = (DESCRIPTION=<br /> (ADDRESS_LIST=<br /> (ADDRESS=<br /> (PROTOCOL=tcp)<br /> (HOST=node_1)<br /> (PORT=1526)<br /> )<br /> (ADDRESS=<br /> (PROTOCOL=tcp)<br /> (HOST=node_2)<br /> (PORT=1526)<br /> )<br /> )<br /> (CONNECT_DATA=(SID=rprd))<br /> )<br />Back to top of file<br /><br /><br />How does one trace DLM activity?<br />Look at this example:<br /> SVRMGR> REM Dump Parallel Server DLM locks<br /> SVRMGR> oradebug lkdebug -a convlock<br /> SVRMGR> oradebug lkdebug -a convres<br /> SBRMGR> oradebug lkdebug -r <resource> (i.e 0x8066d338 from convres dump)<br />Execute the "ORADEBUG HELP" command from svrmgrl for a list of valid commands. See the Internals FAQ for more tracing events.<br />Back to top of file<br /><br /><br />Any other tips for using the Parallel Server?<br /><br /> Run the ?/rdbms/admin/catparr.sql script regularly, it creates a table called EXT_TO_OBJ which needs to be current.<br /> Re-create your tables with the FREELISTS and FREELIST GROUPS storage parameters.<br /> Know your DLM (Distributed Lock Manager) and its capacity limits.<br /> Use a blocking factor (!n) when setting up the GC_FILES_TO_LOCKS parameter. This will allocate n contiguous new blocks to a specific instance (and FREELIST GROUP) when table blocks are allocated.<br /> Choose the right mix of HASH LOCKS (gc_db_locks) and FINE GRAIN LOCKS (gc_releasable_locks). Normally HASH locking is faster but FINE GRAIN locking scales better with multiple instances.<br /> On some systems you can only create raw devices on the master node. For example, on Sequent you need to issue "vxdctl -c mode" to get the master from where to allocate database files from.<br />Back to top of file<br /><br />Index Search Add FAQ Ask Question<br />Oracle Replication FAQ<br />$Date: 27-Nov-1999 $<br />$Revision: 1.12 $<br />$Author: Frank Naudé $<br /><br />Topics<br /><br /> Can sequences be replicated?<br /> I get "NO DATA FOUND" errors. How does one handle this?<br /> How does one delete all local def errors?<br /> Any replication notes?<br /> Where can I get more info about replication?<br /><br />Back to Oracle FAQ Index<br /><br /><br />Can sequences be replicated?<br />No, the best way to handle sequences, assuming you are using them as primary key values, is to concatenate then with something unique to the site. For example, use a sequence number concatenated with the database name, site name or something similar. One could also start the sequences at one site as odd numbers (1, 3, 5, etc) and the other site as even numbers (2, 4, 6 etc).<br />Back to top of file<br /><br /><br />I get "NO DATA FOUND" errors. How does one handle this?<br />If the application is updating primary key values, you will get lots of "NO DATA FOUND" errors. Primary keys should NEVER be updated. If you do update primary keys, conflict resolution becomes extremely difficult.<br />Back to top of file<br /><br /><br />How does one delete all local def errors?<br />From sqlplus say:<br /> SQL> spool delete_errors.sql<br /> SQL> select 'exec dbms_defer_sys.delete_error(''' || deferred_tran_id ||''','''||<br /> SQL> destination || ''')'<br /> SQL> from deferror;<br /> SQL> spool off<br /> SQL> @delete_errors<br />Back to top of file<br /><br /><br />Any replication notes?<br /><br /> Must have 1 master definition site for each replication group<br /> Ensure triggers don't fire during replication by testing DBMS_SNAPSHOT.I_AM_A_REFRESH before executing a trigger body.<br /> There are 12 conflict resolution methods. None will be enabled by default.<br />Back to top of file<br /><br /><br />Where can I get more info about replication?<br /><br /> Visit the Oracle Replication Special Interest Group and join their excellent mailing list.<br /> With Redolog based replication, transactions are replicated even before they are committed in Oracle? Thought this is not possible? Visit Quest Software and look around for information about their SharePlex for Oracle product.<br /> Ever wondered how Advanced Replication works? Check out how easy it is with Nico Booyse's replication scripts.<br />Back to top of fileSumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.com0