<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Oracle Tales &#187; eBS</title>
	<atom:link href="http://www.stijf.com/wordpress/category/oracle/ebs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stijf.com/wordpress</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Mon, 28 Jun 2010 16:58:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New website and article</title>
		<link>http://www.stijf.com/wordpress/2010/06/new-website-and-article/</link>
		<comments>http://www.stijf.com/wordpress/2010/06/new-website-and-article/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 15:38:19 +0000</pubDate>
		<dc:creator>Arian Stijf</dc:creator>
				<category><![CDATA[Flexfields]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[eBS]]></category>
		<category><![CDATA[checkbox]]></category>
		<category><![CDATA[descriptive]]></category>
		<category><![CDATA[flexfield]]></category>
		<category><![CDATA[oa-framework]]></category>
		<category><![CDATA[personalization]]></category>

		<guid isPermaLink="false">http://www.stijf.com/wordpress/?p=453</guid>
		<description><![CDATA[It&#39;s been a while since I last posted an article here.&#160;
A long vacation, and testing different CMS&#39;s for the website account for the lost time. So I decided to give Joomla a try. I just finished installing the components that I want to use. And I wrote a short article, to see how it goes.
I&#39;ll [...]]]></description>
			<content:encoded><![CDATA[<p>It&#39;s been a while since I last posted an article here.&nbsp;</p>
<p>A long vacation, and testing different CMS&#39;s for the website account for the lost time. So I decided to give Joomla a try. I just finished installing the components that I want to use. And I wrote a short article, to see how it goes.</p>
<p>I&#39;ll be transferring the articles from this website to the new one in the days to come.&nbsp;</p>
<p>For now, take a look at the new website:&nbsp;<a href="http://www.stijf.com/joomla">http://www.stijf.com/joomla</a></p>
<p>The article that I wrote is about adding a column to OA-Framework without using jDeveloper to change the VO. I describe how to use a descriptive flexfield to add a checkbox to the framework page.</p>
<p>You can read the article here:&nbsp;<a href="http://www.stijf.com/joomla/index.php/flexfield-articles/46-personalization-using-flexfield-columns.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stijf.com/wordpress/2010/06/new-website-and-article/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Special and Pair validation types</title>
		<link>http://www.stijf.com/wordpress/2010/04/special-and-pair-validation-types/</link>
		<comments>http://www.stijf.com/wordpress/2010/04/special-and-pair-validation-types/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 17:55:27 +0000</pubDate>
		<dc:creator>Arian Stijf</dc:creator>
				<category><![CDATA[Flexfields]]></category>
		<category><![CDATA[Internals]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Validation]]></category>
		<category><![CDATA[eBS]]></category>
		<category><![CDATA[loadid]]></category>
		<category><![CDATA[loadidr]]></category>
		<category><![CDATA[pair validation]]></category>
		<category><![CDATA[popid]]></category>
		<category><![CDATA[popidr]]></category>
		<category><![CDATA[special validation]]></category>
		<category><![CDATA[valid]]></category>
		<category><![CDATA[validation type]]></category>
		<category><![CDATA[validr]]></category>

		<guid isPermaLink="false">http://www.stijf.com/wordpress/?p=445</guid>
		<description><![CDATA[Tutorial on special and pair validation types]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">I am working on an article about flexfields and flexfield validation. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Even though the article is not yet finished, I thought the part about &lsquo;SPECIAL&rsquo; and &lsquo;PAIR&rsquo; validation types might be interesting enough. Many people seem to think they can only use the seeded validation sets. However, you can also create your own validation sets. And their options are very powerful. So I wanted to publish this part of the article as a prelude to the full story. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 12pt 0cm 3pt"><span lang="EN-US" style="mso-ansi-language: en-us"><em><font size="5"><font face="Cambria"><font color="#000000">Special Validation<o:p></o:p></font></font></font></em></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Special validation is used to provide flexfield functionality for a single value. What that means is that you can have for example a concurrent program parameter that will be filled with a Key flexfield value, or a range of flexfield values. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Let&rsquo;s go back to the Key Flexfield. We know that they are combinations of different segment values that are stored in a separate combination table. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">When you want to submit a key-flexfield combination as a parameter to a concurrent program, you can code your own validation for the separate values. But you&rsquo;ll be missing the nice functionality that gives you pop-ups, a validation over the resulting combination and if needed the ID-value for the flexfield combination.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">That is possible with a &lsquo;Special&rsquo; validation type.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">The special validation uses a number of user exits to enter, validate and query keyflex segments. With special validation, you will be able to enter one or more segment values for a key flexfield. To enter these segment values, 3 user exits can be used. They are: &lsquo;POPID&rsquo;, &lsquo;VALID&rsquo; and &lsquo;LOADID&rsquo;.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">POPID is used to enable the user to enter the flexfield segment value. It is called when the users cursor enters the segment value field. With this user exit, you decide which segment values should be shown, and how they should be shown.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;</span>VALID is called when the user exits the segment value, or confirms the chosen flexfield combination. It validates the entered value against the values existing in the key flexfield table. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">LOADID is optional, and it can be used to choose which information will be returned as flexfield value. This can be the concatenated segments, or the id-value for the flexfield combination or segment values. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">These 3 user exits can be assigned to 3 &lsquo;events&rsquo;. There are more events possible, but they are either not yet in use, or their use is not yet supported. So we will only use &lsquo;Validate&rsquo;, &lsquo;Edit&rsquo; and &lsquo;Load&rsquo;. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Sounds complicated, so far? Don&rsquo;t worry; this is not an easy validation. But we&rsquo;ll build some examples to give you an idea. First we start with building a very easy special validation. This will be built on our Code Combination key flexfield. We&rsquo;ll be using a concurrent program &lsquo;Test Flex Validation&rsquo; program to see our different options. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">This program is based on the following procedure: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">CREATE OR REPLACE PROCEDURE XXX_TEST_FLEXFIELD_PARAMS<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">( errbuf<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>out varchar2<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">, retcode <span style="mso-spacerun: yes">&nbsp;</span>out varchar2<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">, p_flex<span style="mso-spacerun: yes">&nbsp; </span><span style="mso-spacerun: yes">&nbsp;</span>in<span style="mso-spacerun: yes">&nbsp; </span>varchar2<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">, p_flex2<span style="mso-spacerun: yes">&nbsp; </span>in<span style="mso-spacerun: yes">&nbsp; </span>varchar2 := &lsquo;XXX&rsquo;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">, p_flex3<span style="mso-spacerun: yes">&nbsp; </span>in<span style="mso-spacerun: yes">&nbsp; </span>varchar2 := &lsquo;XXX&rsquo;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">, p_flex4<span style="mso-spacerun: yes">&nbsp; </span>in<span style="mso-spacerun: yes">&nbsp; </span>varchar2 := &lsquo;XXX&rsquo;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">, p_flex5<span style="mso-spacerun: yes">&nbsp; </span>in<span style="mso-spacerun: yes">&nbsp; </span>varchar2 := &lsquo;XXX&rsquo;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">) IS<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">BEGIN<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>FND_FILE.PUT_LINE(FND_FILE.OUTPUT,p_flex);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>FND_FILE.PUT_LINE(FND_FILE.OUTPUT,p_flex2);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>FND_FILE.PUT_LINE(FND_FILE.OUTPUT,p_flex3);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>FND_FILE.PUT_LINE(FND_FILE.OUTPUT,p_flex4);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>FND_FILE.PUT_LINE(FND_FILE.OUTPUT,p_flex5);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">END;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">This will only write the parameter value to the output of the request. To use flexfields as parameters for concurrent programs, we need to define a value set based on them. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">We will start with the barest setup to enter a key-flexfield combination. For this article, we use the accounting flexfield, with code &lsquo;GL#&rsquo;<span style="mso-spacerun: yes">&nbsp; </span>and id-num &lsquo;101&rsquo;. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">In this case, we have the following definition:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shape id="Picture_x0020_4" o:spid="_x0000_i1042" style="width: 453.75pt; height: 288.75pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="481" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special1.jpg" width="755" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">So what does this mean? <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">The first box is for the edit event. This will be triggered when the user enters the cursor into the field with this value set.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">FND POPID<span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>This is the user exit to pop up a flexfield screen, and let the user enter the flexfield values. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">CODE=&quot;GL#&quot;<span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>This is the flexfield code for the key flexfield that we will be using.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">APPL_SHORT_NAME=&quot;SQLGL&quot;<span style="mso-tab-count: 1"> </span>The short name for the application the flexfield belongs too. Together with &lsquo;Code&rsquo;, this will identify the flexfield itself. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">NUM=&quot;101&quot;<span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>The id-number for the flexfield structure. If you have only a single structure flexfield, it is optional. For flexfields enabled for multiple structures, you need to enter the id-number.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">VALIDATE=&quot;PARTIAL&quot;<span style="mso-tab-count: 1">&nbsp;&nbsp; </span>Validate can be &lsquo;None&rsquo;, &lsquo;Partial&rsquo; or &lsquo;Full&rsquo;. None means the combination is not validated. Partial means that the separate segments are validated, there is no validation if the combination exists. Full means that segments and combination will be checked, and if a new value is entered, this will be inserted into the key flexfield table.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">SEG=&quot;:!VALUE&quot;<span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>This is the forms field that will be used to store the value of the segments. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">The second box is for the &lsquo;Validation&rsquo; event. This code will be called when the user navigates out of the field, or submits the entire combination.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Now when we set this value set as a parameter for our concurrent program, we can see how the validation works:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_7" o:spid="_x0000_i1041" style="width: 453.75pt; height: 303pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="504" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special2.jpg" width="755" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Now when we run the program, we get this pop-up: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_10" o:spid="_x0000_i1040" style="width: 453.75pt; height: 244.5pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image005.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="414" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special3.jpg" width="769" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">We have all the functionality of the key flexfield. We can use the &lsquo;Combinations&rsquo; button to search for existing combinations, and all separate segments will be validated, as will be the final combination. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">When we submit a value to our program, it will show the concatenated segments as the value of our parameter: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_13" o:spid="_x0000_i1039" style="width: 453.75pt; height: 45pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image007.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="73" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special4.jpg" width="732" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Now let&rsquo;s see some more features of this validation. For example, we&rsquo;d like to have the value of the combination id. (CODE_COMBINATION_ID in our case, since we use the Accounting Flexfield). <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">To get that, we need to add the LOADID user exit: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;<img alt="" height="596" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special5.jpg" width="730" /></font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_22" o:spid="_x0000_i1038" style="width: 453.75pt; height: 378pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image009.png"></v:imagedata></v:shape></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">The &lsquo;Load&rsquo; event will get the combination-id from the flexfield table. This is only possible for the &lsquo;VALIDATE=&rdquo;FULL&rdquo;, since it will validate the whole combination. Also we need to set the ID=&rdquo;:!ID&rdquo;. This will populate the :!ID column with the ID value of the combination.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Finally, I added the &lsquo;DINSERT=&rdquo;NO&rdquo; &lsquo;, because we don&rsquo;t want to allow insertion of new code combinations from this value set. (And Validation=&rdquo;FULL&rdquo; by default inserts new combinations into the flexfield column). <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Now when we run the concurrent request, we see that the parameter value is the code_combination_id instead of the concatenated segments:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_19" o:spid="_x0000_i1037" style="width: 453.75pt; height: 43.5pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image011.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="69" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special6.jpg" width="722" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><br />
	<font size="3"><font face="Calibri"><font color="#000000">With these user exits it is also possible to select just a number of segments, instead of the whole combination. For this we remove the &lsquo;Load&rsquo; / &lsquo;LOADID&rsquo; part again. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Then we add a &lsquo;DISPLAY=&rdquo;x&rdquo; &lsquo; to the &lsquo;Edit&rsquo; and &lsquo;Validate&rsquo; user exits. The &ldquo;display&rdquo; parameter is defaulting to &lsquo;ALL&rsquo;. But you can also specify separate segments by their sequence number or names. In our case, we display the first 2 segments: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_25" o:spid="_x0000_i1036" style="width: 453.75pt; height: 258.75pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image013.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="405" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special8.jpg" width="710" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Now when we run the concurrent program, we get a pop-up for only the first 2 values:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_28" o:spid="_x0000_i1035" style="width: 453.75pt; height: 126.75pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image015.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="174" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special9.jpg" width="623" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">A very nice feature (at least as far as I&rsquo;m concerned) is the use of a where clause on the combination values. Consider the following &lsquo;Enter&rsquo; code:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-size: 8pt; mso-ansi-language: en-us"><font face="Calibri"><font color="#000000">FND POPID<o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-size: 8pt; mso-ansi-language: en-us"><font face="Calibri"><font color="#000000">CODE=&quot;GL#&quot;<o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-size: 8pt; mso-ansi-language: en-us"><font face="Calibri"><font color="#000000">NUM=&quot;101&quot;<o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-size: 8pt; mso-ansi-language: en-us"><font face="Calibri"><font color="#000000">APPL_SHORT_NAME=&quot;SQLGL&quot;<o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-size: 8pt; mso-ansi-language: en-us"><font face="Calibri"><font color="#000000">VALIDATE=&quot;FULL&quot;<o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-size: 8pt; mso-ansi-language: en-us"><font face="Calibri"><font color="#000000">TITLE=&quot;Special Validation Key&quot;<o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-size: 8pt; mso-ansi-language: en-us"><font face="Calibri"><font color="#000000">ID=&quot;:!ID&quot;<o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-size: 8pt; mso-ansi-language: en-us"><font face="Calibri"><font color="#000000">SEG=&quot;:!VALUE&quot;<o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="line-height: 115%; font-size: 8pt; mso-ansi-language: en-us"><font face="Calibri"><font color="#000000">DESC=&quot;:!MEANING&quot;<o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="line-height: 115%; font-size: 8pt; mso-ansi-language: en-us"><font face="Calibri"><font color="#000000">WHERE=&quot;segment2 not like &#39;1%&#39; &quot;<o:p></o:p></font></font></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">The &ldquo;WHERE&rdquo; clause prevents us from choosing combinations that have a segment2 starting with &lsquo;1&rsquo;. When we run our concurrent program with this, and choose the combinations: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_31" o:spid="_x0000_i1034" style="width: 220.5pt; height: 328.5pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image017.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="438" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special10.jpg" width="294" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">There is no Dpt starting with 1. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">When we add the &ldquo;WHERE&rdquo;-clause to the validation event too, it will prevent us from entering the values manually:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_34" o:spid="_x0000_i1033" style="width: 330.75pt; height: 105pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image019.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="140" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special11.jpg" width="441" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">The last feature that we&rsquo;ll look into is the use of a pl/sql validation through the special validation routines. By using the user-exit PLSQL, we can call an anonymous PL/SQL block in our &lsquo;Validation&rsquo; event. I created a value set with the following function for the &lsquo;Validation&rsquo; event:</font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000"><o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000"><img alt="" height="404" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special12.jpg" width="712" /></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">FND PLSQL &quot; declare<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>v_value varchar2( 10 ) := :!value ;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>v_sum number;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>v_valid boolean;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">begin<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>v_sum:=0;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>for i in 1..length(v_value) loop<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>v_sum :=v_sum+(length(v_value)+1-i)*substr(v_value,i,1);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>end loop;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>if mod(v_sum,11)=0 then<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>v_valid := TRUE;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>else<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>v_valid:=FALSE;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>end if;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>if not v_valid then<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>fnd_message.set_name(&#39;FND&#39;,&#39;FND_GENERIC_MESSAGE&#39; );<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>fnd_message.set_token(&#39;MESSAGE&#39;,&#39;This is not a valid bank account&#39;);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>fnd_message.raise_error;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>end if;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><font color="#000000"><span lang="EN-US" style="font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us">END; &quot; </span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p></o:p></span></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_46" o:spid="_x0000_i1032" style="width: 453.75pt; height: 257.25pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image021.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">This PL/SQL procedure validates a (Dutch) bank account number. If it does need pass the test, a message will be displayed. This gives you almost unlimited possibilities for validating entered data. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">As you can see, it is only a &lsquo;Validate&rsquo; event. Because we don&rsquo;t need any special functionality for entering the data. We can limit the entry to numbers only on the &lsquo;Validation Set&rsquo; main page. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Now when we use this value set for our concurrent program, we can only enter valid dutch bank accounts:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_49" o:spid="_x0000_i1031" style="width: 343.5pt; height: 120.75pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image023.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="161" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special13.jpg" width="458" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">And<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_52" o:spid="_x0000_i1030" style="width: 453.75pt; height: 44.25pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image025.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><font size="3"><font face="Calibri"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us"><img alt="" height="69" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special14.jpg" width="713" /></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><br />
	<font size="3"><font face="Calibri"><font color="#000000">The list of parameters for the user exits is longer than this. So we won&rsquo;t be going through all the possibilities. You can check the Developers Guide and the Flexfield guide for a complete listing of options. (Did you notice the flexfield title that I sneaked into the pop-up? Try and find the option for that!)<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Please try the different options for yourself, and realize the possibilities of the special validation. <o:p></o:p></font></font></font></span></p>
<h2 style="margin: 12pt 0cm 3pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><em><font color="#000000" face="Cambria" size="5">&nbsp;</font></em></o:p></span></h2>
<h2 style="margin: 12pt 0cm 3pt"><span lang="EN-US" style="mso-ansi-language: en-us"><em><font size="5"><font face="Cambria"><font color="#000000">Pair Validation<o:p></o:p></font></font></font></em></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Meanwhile, we&rsquo;ll continue to the &lsquo;Pair&rsquo; validation. The pair validation is very much like the &lsquo;special&rsquo; validation. It uses the same kind of user exits, but this time, a range of segment values or combinations is selected. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Let&rsquo;s first create a range of the account segment. Instead of using POPID and VALID, we use POPIDR and VALIDR. The R-version of the user-exits automatically create a range. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Of course we need 2 parameters to set the range. However, we need only one validation set. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">I created the validation set &lsquo;XXX_PAIR_VAL&rsquo;. I entered only the edit and validate events: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font color="#000000"><font face="Calibri"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_58" o:spid="_x0000_i1029" style="width: 453.75pt; height: 4in; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image027.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="480" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special16.jpg" width="755" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The next step is to set the parameters for both the low and high value. Both parameters have the validation set &lsquo;XXX_PAIR_VAL&rsquo;.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font color="#000000"><font face="Calibri"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_61" o:spid="_x0000_i1028" style="width: 453.75pt; height: 192.75pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image029.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="317" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special18.jpg" width="747" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Now when we run the program, we can enter a range. This includes validation that the high value is indeed higher or equal to the low value. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font color="#000000"><font face="Calibri"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_55" o:spid="_x0000_i1027" style="width: 453.75pt; height: 102.75pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image031.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="174" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special15.jpg" width="769" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Of course the concurrent program will receive the values for 2 parameters. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">When we use the full validation we can enter a range of the whole account combination. Note that we cannot use the FULL validation for pair-validation. Because that would mean the use of the combination-id from the flexfield table and based on the combination-id&rsquo;s you cannot build a range.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">So we can only use PARTIAL and NONE for the validation. For that same reason, I have not yet had a reason to use a LOAD event for PAIR validation. It is however allowed to use one. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">I created a PAIR validation for the whole accounting range as follows: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><font size="3"><font color="#000000"><font face="Calibri"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_64" o:spid="_x0000_i1026" style="width: 453.75pt; height: 4in; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image033.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p></o:p></span></font></font></font></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt">&nbsp;<img alt="" height="479" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special19.jpg" width="755" /></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">When used in the concurrent program, it will indeed allow us to enter a range of all segments:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><font size="3"><font color="#000000"><font face="Calibri"><span style="mso-fareast-language: nl; mso-no-proof: yes"><v:shape id="Picture_x0020_67" o:spid="_x0000_i1025" style="width: 265.5pt; height: 201.75pt; visibility: visible; mso-wrap-style: square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image035.png"></v:imagedata></v:shape></span><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><img alt="" height="269" src="http://www.stijf.com/wordpress/wp-content/uploads/image/Flex_special20.jpg" width="354" /></o:p></span></font></font></font></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">That completes the chapter on PAIR validation too. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stijf.com/wordpress/2010/04/special-and-pair-validation-types/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oracle eBS 11i Infrastructure</title>
		<link>http://www.stijf.com/wordpress/2010/04/oracle-ebs-11i-infrastructure/</link>
		<comments>http://www.stijf.com/wordpress/2010/04/oracle-ebs-11i-infrastructure/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 09:58:05 +0000</pubDate>
		<dc:creator>Arian Stijf</dc:creator>
				<category><![CDATA[Internals]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[eBS]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[concurrent]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[forms server]]></category>
		<category><![CDATA[iAS]]></category>
		<category><![CDATA[infrastructure]]></category>

		<guid isPermaLink="false">http://www.stijf.com/wordpress/?p=423</guid>
		<description><![CDATA[Oracle eBS 11i Infrastructure
&#160;
In this article we will describe the infrastructure of Oracle eBusiness Suite (eBS). In its simplest form, eBS is a 3-tier application with a client tier, Application-tier and DB-tier. 
Database-Tier
Let&#8217;s start with the DB-Tier. Surprisingly, the database tier has only very little eBS specific features. 
Of course we need a database (instance) [...]]]></description>
			<content:encoded><![CDATA[<h1 style="margin: 24pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font color="#365f91"><font face="Cambria">Oracle eBS 11i Infrastructure<o:p></o:p></font></font></span></h1>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">In this article we will describe the infrastructure of Oracle eBusiness Suite (eBS). In its simplest form, eBS is a 3-tier application with a client tier, Application-tier and DB-tier. <o:p></o:p></font></font></font></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">Database-Tier<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Let&rsquo;s start with the DB-Tier. Surprisingly, the database tier has only very little eBS specific features. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Of course we need a database (instance) and therefore an ORACLE_HOME. But the database can either be a single-instance or a RAC-installation and all Oracle RDBMS features are transparently available for eBS. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The management of the RDBMS Installation is also independent of eBS.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">DB-Tier filesystem<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Let&rsquo;s start with the filesystem on the DB-Tier. Of course there is an Oracle_home installation needed, for the RDBMS-Instance. This will be installed during installation of eBS. But also a fresh installed ORACLE_HOME can be used, with an eBS database.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">In the ORACLE_HOME, an extra directory is added. The Appsutil directory. This directory contains the software and data needed for running Autoconfig and Rapidclone. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">All other directories are at the discretion of the eBS DBA. <o:p></o:p></font></font></font></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">Oracle Instance<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">When we look at the instance to run eBS, we find a number of mandatory parameters for eBS. These are found in Metalink notes 216205.1 and 396009.1 (At the time of writing. Please verify these notes for yourself).<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">These parameters are recommended or mandatory based on testing by Oracle Corp. They will automatically be set by the eBS installer. But you should take note of them when you use a fresh installed ORACLE_HOME.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Then we finally come to the contents of the database. <o:p></o:p></font></font></font></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">The eBS Database<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Let&rsquo;s start with the schemas in the database. Oracle eBS creates a separate schema for every module. The schema is named as the short_name of the module, for example AP (Oracle Payables / Accounts Payable), AR (Oracle Receivables / Oracle Receivables). <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">There is a separate schema for the Application owner APPS. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The Application schemas contain the tables, indexes and sequences for the different applications. All objects in these schemas (except indexes, of course) have a synonym in the APPS Schema. In the APPS Schema we also find all PL/SQL objects, views and Materialized Views. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">A major part of eBS is written in PL/SQL. All PL/SQL objects are also installed in the APPS Schema. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">User sessions within eBS will usually run in the APPS Schema as well. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">That brings us to an extra schema in the database: APPLSYSPUB. This schema has access to some of the eBS tables and packages, that allow it to validate eBS logins and start an APPS-session based on that login information. We will see the details of this later on. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Before release 11.5.2 every schema had its own tablespace. However, the number of modules for eBS (and with that the number of schemas) is ever increasing. So managing the database became more and more complex. In 11.5.2 Oracle introduced the Oracle Applications Tablespace Model (OATM). Within this model, the tablespaces in eBS are based on functionality, rather than schemas. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">In this model, we see the following tablespaces: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">APPS_TS_TX_DATA &ndash; Containing all transaction tables, Materialized Views and IOT&rsquo;s<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">APPS_TS_TX_IDX &ndash; Containing all indexes for transaction tables<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">APPS_TS_SEED &ndash; Containing the tables and indexes with seeded data (as opposed to transaction data).<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">APPS_TS_INTERFACE &ndash; For Open Interface tables<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">APPS_TS_SUMMARY &ndash; Contains summary tables for several modules (AR, PA, BIM, etc)<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">APPS_TS_NOLOGGING &ndash; For tables and objects that are created with the NOLOGGING option<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">APPS_TS_ARCHIVE &ndash; Containing archive and history tables (and indexes)<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">APPS_TS_QUEUES &ndash; Containing the AQ (Advanced Queuing) objects<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">APPS_TS_MEDIA &ndash; Containing tables with LOB&rsquo;s. For media objects or documents.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The Undo and Temp tablespaces are not part of the tablespace model.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">Application Tier<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Now it&rsquo;s time to look at the Application Tier. In fact the Application Tier consists of 3 different services: Web service, Forms service and Concurrent Processing. In 11i installations, there is also an Administration service.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The Application Tier significantly changed from R11i to R12. We&rsquo;ll discuss the 11i Apps Tier shortly, and then discuss the R12 tier in more detail.<o:p></o:p></font></font></font></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">The 11i infrastructure<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Both the R11 and R12 infrastructure consist of a Web-service, a Forms Service and a Concurrent Processing part. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">We will be discussing the different services here. The following picture shows all components and their communications. You might want to keep it for reference during this article. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us; mso-no-proof: yes"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shape id="Object_x0020_1" o:gfxdata="UEsDBBQABgAIAAAAIQC75U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kwHii0k6zSF2ugbSL6Ek/2f7&#13;&#10;YZgUnr16WHT5RwTLpRcWoIwGMwdKV2edNS1dgYmGff0m3gAAAP//AwBQSwECLQAUAAYACAAAACEA&#13;&#10;u+VIlAUBAAAeAgAAEwAAAAAAAAAAAAAAAAAAAAAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLAQItABQA&#13;&#10;BgAIAAAAIQCtMD/xwQAAADIBAAALAAAAAAAAAAAAAAAAADYBAABfcmVscy8ucmVsc1BLAQItABQA&#13;&#10;BgAIAAAAIQDt7BmgzAkAAOOWAAAfAAAAAAAAAAAAAAAAACACAABjbGlwYm9hcmQvZHJhd2luZ3Mv&#13;&#10;ZHJhd2luZzEueG1sUEsBAi0AFAAGAAgAAAAhAOFRNx/PBgAA5hsAABoAAAAAAAAAAAAAAAAAKQwA&#13;&#10;AGNsaXBib2FyZC90aGVtZS90aGVtZTEueG1sUEsBAi0AFAAGAAgAAAAhAJxmRkG7AAAAJAEAACoA&#13;&#10;AAAAAAAAAAAAAAAAMBMAAGNsaXBib2FyZC9kcmF3aW5ncy9fcmVscy9kcmF3aW5nMS54bWwucmVs&#13;&#10;c1BLBQYAAAAABQAFAGcBAAAzFAAAAAA=&#13;&#10;" o:spid="_x0000_i1030" style="width: 453.75pt; height: 277.5pt; visibility: visible" type="#_x0000_t75"><v:imagedata cropbottom="-130f" croptop="-119f" o:title="" src="file:///C:\DOCUME~1\ARIANS~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.png"></v:imagedata><o:lock aspectratio="f" v:ext="edit"></o:lock></v:shape></span><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;</span><o:p></o:p></font></font></font></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><o:p><font color="#4f81bd" face="Cambria" size="4">&nbsp;</font></o:p></span></h2>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">R11i Web Service<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font color="#000000"><font face="Calibri"><font size="3">For 11i, the web tier is built on Oracle iAS 9i. The iAS installation provides webservices (Apache HTTP/HTTPS), a Java Runtime Engine (JSERV) and a PL/SQL engine (modplsql).<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font color="#000000"><font face="Calibri"><font size="3">The web service also acts a gateway for the Concurrent Request log and output files. And it is the first point of access when starting a forms session. (When using a socket forms connection, when using a forms servlet the web tier will host the forms process).<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font color="#000000"><font face="Calibri"><font size="3">A detail from the picture above shows the iAS structure.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font color="#000000"><font face="Calibri"><font size="3"><span style="mso-ansi-language: en-us; mso-no-proof: yes"><v:shape id="Object_x0020_2" o:gfxdata="UEsDBBQABgAIAAAAIQC75UiUBQEAAB4CAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKSRvU7DMBSF&#13;&#10;dyTewfKKEqcMCKEmHfgZgaE8wMW+SSwc27JvS/v23KTJgkoXFsu+P+c7Ol5vDoMTe0zZBl/LVVlJ&#13;&#10;gV4HY31Xy4/tS3EvRSbwBlzwWMsjZrlprq/W22PELHjb51r2RPFBqax7HCCXIaLnThvSAMTP1KkI&#13;&#10;+gs6VLdVdad08ISeCho1ZLN+whZ2jsTzgcsnJwldluLxNDiyagkxOquB2Knae/OLUsyEkjenmdzb&#13;&#10;mG/YhlRnCWPnb8C898bRJGtQvEOiVxjYhtLOxs8AySiT4JuDystlVV4WPeM6tK3VaILeDZxIOSsu&#13;&#10;ti/jidNGNZ3/J08yC1dNv9v8AAAA//8DAFBLAwQUAAYACAAA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DezTfuy&#13;&#10;M3liTJN3HGpaAUGnvJ6c4XDrL7sjkJSl03L2DjksmKAV201zxVnmcpTGKSRSKC5xGHMOJ8aSGtHK&#13;&#10;RH1AVzaDj1bmIqNhQaq7NMj2VXVg8ZMB4otJOs0hdroG0i+hJP9n+2GYFJ69elh0+UcEy6UXFqCM&#13;&#10;BjMHSldnnTUtXYGJhn39Jt4AAAD//wMAUEsBAi0AFAAGAAgAAAAhALvlSJQFAQAAHgIAABMAAAAA&#13;&#10;AAAAAAAAAAAAAAAAAFtDb250ZW50X1R5cGVzXS54bWxQSwECLQAUAAYACAAAACEArTA/8cEAAAAy&#13;&#10;AQAACwAAAAAAAAAAAAAAAAA2AQAAX3JlbHMvLnJlbHNQSwECLQAUAAYACAAAACEAg6Vi6mUIAAB3&#13;&#10;VgAAHwAAAAAAAAAAAAAAAAAgAgAAY2xpcGJvYXJkL2RyYXdpbmdzL2RyYXdpbmcxLnhtbFBLAQIt&#13;&#10;ABQABgAIAAAAIQDhUTcfzwYAAOYbAAAaAAAAAAAAAAAAAAAAAMIKAABjbGlwYm9hcmQvdGhlbWUv&#13;&#10;dGhlbWUxLnhtbFBLAQItABQABgAIAAAAIQCcZkZBuwAAACQBAAAqAAAAAAAAAAAAAAAAAMkRAABj&#13;&#10;bGlwYm9hcmQvZHJhd2luZ3MvX3JlbHMvZHJhd2luZzEueG1sLnJlbHNQSwUGAAAAAAUABQBnAQAA&#13;&#10;zBIAAAAA&#13;&#10;" o:spid="_x0000_i1029" style="width: 453.75pt; height: 114.75pt; visibility: visible" type="#_x0000_t75"><v:imagedata cropbottom="-345f" cropright="-210f" croptop="-288f" o:title="" src="file:///C:\DOCUME~1\ARIANS~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image003.png"></v:imagedata><o:lock aspectratio="f" v:ext="edit"></o:lock></v:shape></span><span style="mso-ansi-language: en-us"><o:p></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font color="#000000"><font face="Calibri"><font size="3">The core of iAS is the web server. This is the front-end for the client. Requests can also be forwarded to and from the forms server and the concurrent processing. We&rsquo;ll see that in the next paragraphs. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font color="#000000"><font face="Calibri"><font size="3">Within the iAS Jserv and modplsql are plugins. They are the only components that communicate with the database. When they are called, they execute java (Jserv) or PL/SQL (modplsql) and return an html page. This page is then sent to the client through the HTTP service. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font color="#000000"><font face="Calibri"><font size="3">The Jserv delivers a Java Runtime Environment. In the Jserv, java servlets can be run. Also the JSP-files are executed in the Jserv. A JSP-file (Java Server Page) is a page with java code that returns an html-page (similar to the way scripting languages like PhP work). The java part is executed in Jserv, which returns the html to the webserver. The webserver redirects the html to the client. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font color="#000000"><font face="Calibri"><font size="3">Let&rsquo;s take a closer look at the components and their executions: <o:p></o:p></font></font></font></span></p>
<h3 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><o:p><font color="#4f81bd" face="Cambria" size="3">&nbsp;</font></o:p></span></h3>
<h3 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font color="#4f81bd"><font face="Cambria"><font size="3">Webserver<o:p></o:p></font></font></font></span></h3>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The webserver is based on the regular Apache 2 webserver. The configuration file is also equal to the Apache config file. The configuration is set in httpd.conf (or httpds.conf for SSL). <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Instead of starting the webserver through $APACHE_HOME/bin/httpdctl, we start through $APACHE_HOME/apachectl. The default port number used for eBS 11i is 8000. This is part of port-pool 0. For different port-pools, the port number is increased. So for port-pool 1 the webserver runs on port 8001. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The root directory for the webserver is set to $OA_HTML, which is by default $COMMON_TOP/html. This directory contains all *.html files for eBS. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">A number of virtual directories are set up within eBS. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">JServ<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">As mentioned before, java code is executed by Jserv. Jserv is a java servlet engine. That means that it can run both servlets and jsp-files.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">These servlets are mostly located in the $JAVA_TOP. The *.jsp files are located in the $OA_HTML directory. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">One of the options of Jserv is to create a database connection to the rdbms database. This is done by a JDBC Thin Client connection. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Before we look at the configuration for Jserv, examine the following picture. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-ansi-language: en-us; mso-no-proof: yes"><v:shape id="Object_x0020_3" o:gfxdata="UEsDBBQABgAIAAAAIQC75UiUBQEAAB4CAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKSRvU7DMBSF&#13;&#10;dyTewfKKEqcMCKEmHfgZgaE8wMW+SSwc27JvS/v23KTJgkoXFsu+P+c7Ol5vDoMTe0zZBl/LVVlJ&#13;&#10;gV4HY31Xy4/tS3EvRSbwBlzwWMsjZrlprq/W22PELHjb51r2RPFBqax7HCCXIaLnThvSAMTP1KkI&#13;&#10;+gs6VLdVdad08ISeCho1ZLN+whZ2jsTzgcsnJwldluLxNDiyagkxOquB2Knae/OLUsyEkjenmdzb&#13;&#10;mG/YhlRnCWPnb8C898bRJGtQvEOiVxjYhtLOxs8AySiT4JuDystlVV4WPeM6tK3VaILeDZxIOSsu&#13;&#10;ti/jidNGNZ3/J08yC1dNv9v8AAAA//8DAFBLAwQUAAYACAAAACEArTA/8cEAAAAyAQAACwAAAF9y&#13;&#10;ZWxzLy5yZWxzhI/NCsIwEITvgu8Q9m7TehCRpr2I4FX0AdZk2wbbJGTj39ubi6AgeJtl2G9m6vYx&#13;&#10;jeJGka13CqqiBEFOe2Ndr+B03C3WIDihMzh6RwqexNA281l9oBFTfuLBBhaZ4ljBkFLYSMl6oAm5&#13;&#10;8IFcdjofJ0z5jL0MqC/Yk1yW5UrGTwY0X0yxNwri3lQgjs+Qk/+zfddZTVuvrxO59CNCmoj3vCwj&#13;&#10;Mf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#13;&#10;CAAAACEA4VE3H88GAADmGwAAGgAAAAAAAAAAAAAAAAD3DAAAY2xpcGJvYXJkL3RoZW1lL3RoZW1l&#13;&#10;MS54bWxQSwECLQAUAAYACAAAACEAnGZGQbsAAAAkAQAAKgAAAAAAAAAAAAAAAAD+EwAAY2xpcGJv&#13;&#10;YXJkL2RyYXdpbmdzL19yZWxzL2RyYXdpbmcxLnhtbC5yZWxzUEsFBgAAAAAFAAUAZwEAAAEVAAAA&#13;&#10;AA==&#13;&#10;" o:spid="_x0000_i1028" style="width: 453.75pt; height: 329.25pt; visibility: visible" type="#_x0000_t75"><v:imagedata cropbottom="-123f" croptop="-1771f" o:title="" src="file:///C:\DOCUME~1\ARIANS~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image005.png"></v:imagedata><o:lock aspectratio="f" v:ext="edit"></o:lock></v:shape></span><span style="mso-ansi-language: en-us"><o:p></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Within Jserv, we can define different java environments, called zones. These zones are configured with different servlets or java archives (jar-files). Each zone is configured with its own configuration file. Within the zone the startup parameters (initargs) for the servlet are defined. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">On the other side of the picture, you see a group. All java processes within Jserv are grouped together. You must define at least one group. The default group is &lsquo;OACoreGroup&rsquo;. Within each group, we create one or more processes that will be mapped to our zones.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">This mapping is done by mounting the zones and the groups to different logical directories. In the picture, a mountpoint is created: /oa_servlets/. It refers to the group &lsquo;OACoreGroup&rsquo;, which holds 3 java processes. And it is mapped to zone &lsquo;root&rsquo;, which includes the servlet &lsquo;dummy&rsquo; with a set of startup parameters. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">When iAS receives a call to the virtual directory /oa_servlets/ it will be recognized as a Jserv mount point and the request will be forwarded to Jserv. In this example Jserv has 3 java processes in the group for this mount point. And they will be able to run all the servlets in the zone. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Sounds complicated? Take a look at the following configurations:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Jserv.conf:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">ApJServGroup OACoreGroup 3 1 /etc/oracle/iAS/Jserv/etc/jserv.properties<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">ApJServGroupMount /oa_servlets balance://OACoreGroup/root<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Jserv.properties:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">wrapper.bin=/opt/oracle/iAS/Apache/Apache/bin/java.sh<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">zones=root&lt;host&gt;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">root&lt;host&gt;.properties = /etc/oracle/iAS/Jserv/etc/zone.properties<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Zone.properties<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">servlet.Dummy.initArgs=message=I&#39;m a dummy servlet<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Within jserv.conf we define a group called OACoreGroup. This group is running 3 Java processes. And the definition of the group is in the jserv.properties file. The 1 indicates the weight for load-balancing with multiple groups.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Then we mount the zone &lsquo;root&rsquo; to the group &lsquo;OACoreGroup&rsquo;. This mount point is linked to the virtual directory /oa_servlets/. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The virtual directory is used for redirection to the JServ. When a request is made to the virtual directory Jserv will be called. The part of the URL after the virtual directory is the path to the servlet. This path will be searched for in the $CLASSPATH.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">When the java servlets need to connect to the database, they can build a connection using JDBC. The access information is stored in a *.dbc file in $FND_TOP/secure. The dbc-file is referred to in the parameters for the zone. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">Modplsql<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Let&rsquo;s take a look at the modplsql module. This module is designed to run pl/sql procedures within the database. The connection is based on the wdbsvr.app file. This file contains the DAD (Database Access Descriptor), including the access data to the eBS database. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The module is also called through a virtual directory. For example http://&lt;host&gt;:&lt;port&gt;/pls/TESTDB/ dummy. /pls/ is the virtual directory that refers to modplsql. TESTDB is the name of the DAD and dummy is the name of a pl/sql procedure accessible for the db-user from the DAD.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;</span><o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">That concludes the 9i iAS module for now. <o:p></o:p></font></font></font></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><o:p><font color="#4f81bd" face="Cambria" size="4">&nbsp;</font></o:p></span></h2>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">Formsserver<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Let&rsquo;s take a look at the forms server. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Oracle forms can be set up in two ways, socket connection and servlet. The default is socket connection. With a socket connection, a separate forms server and dedicated forms processes are used. For the servlet connection, a java servlet is called within the iAS. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The formsserver itself is installed in the 8.0.9 ORACLE_HOME. Forms has a forms server, and one or more client processes. The forms server is started with f60svr. It will spawn a f60webmx process for every client session connecting.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">On the server side, forms are run in the forms client processes. On the client side, they are run in a java applet. When the client clicks a forms based function in the Personal Home Page, it calls an URL that refers to the forms client executable in the 8.0.6 ORACLE_HOME. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">This URL is taken from the profile option &lsquo;ICX: Forms Launcher&rsquo;, and the default value is like &lsquo;http://&lt;server&gt;:&lt;port&gt;/dev60cgi/f60cgi&rsquo;. The parameters referring to the function being clicked are added to this URL as parameters. (i.e. the name of the form to be started)<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">When this URL is called, the webserver will execute the executable f60cgi. This executable returns a HTML page to the client. This page is called the &lsquo;Base HTML&rsquo; for this forms server. (by default this is $OA_HTML/US/appsbase.htm)<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">This HTML page calls the J-initiator plugin (or the native JVM when configured). It also includes the parameters to connect to the forms server and the name of the form to start. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The J-initiator will start an applet on the client, which connects to the forms listener process. The forms listener process then assigns a dedicated forms client process. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">At this point the whole chain looks like this: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font color="#000000"><font face="Calibri"><span style="mso-ansi-language: en-us; mso-no-proof: yes"><v:shape id="Object_x0020_5" o:gfxdata="UEsDBBQABgAIAAAAIQC75UiUBQEAAB4CAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKSRvU7DMBSF&#13;&#10;dyTewfKKEqcMCKEmHfgZgaE8wMW+SSwc27JvS/v23KTJgkoXFsu+P+c7Ol5vDoMTe0zZBl/LVVlJ&#13;&#10;gV4HY31Xy4/tS3EvRSbwBlzwWMsjZrlprq/W22PELHjb51r2RPFBqax7HCCXIaLnThvSAMTP1KkI&#13;&#10;+gs6VLdVdad08ISeCho1ZLN+whZ2jsT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AAAAAUA&#13;&#10;BQBnAQAA1RgAAAAA&#13;&#10;" o:spid="_x0000_i1027" style="width: 453.75pt; height: 309.75pt; visibility: visible" type="#_x0000_t75"><v:imagedata cropbottom="-142f" croptop="-1991f" o:title="" src="file:///C:\DOCUME~1\ARIANS~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image007.png"></v:imagedata><o:lock aspectratio="f" v:ext="edit"></o:lock></v:shape></span><span style="mso-ansi-language: en-us"><o:p></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The configuration for the forms server is in the appsweb.cfg file in ($OA_HTML/bin). This file contains the basic coloring scheme for the forms server, the forms settings and the referral information to the J-Initiator plugin. The plugin on the client side is called through its class-id, which is also set in the appsweb.cfg.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">Concurrent Managers<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The last part of the application tier is the concurrent processing part. The concurrent managers are used to execute background and batch processes.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Different executables including host-command files, pl/sql procedures, Oracle Reports, SQL*Loader control files and Binary executables can be defined to be run as concurrent programs. Parameters are also optionally defined with the concurrent programs. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The executable files are defined separate from the concurrent programs. So an executable can be run as different programs with different parameters.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The programs are executed through &lsquo;Requests&rsquo;. A request is started as a concurrent program and the values of its parameters. It can be scheduled to start at a specific time, or in a specific schedule. The output of the program can be sent to a printer. It is also available through the application. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">This picture shows the relation between programs, requests and managers. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font color="#000000"><font face="Calibri"><span style="mso-ansi-language: en-us; mso-no-proof: yes"><v:shape id="Object_x0020_6" o:gfxdata="UEsDBBQABgAIAAAAIQA0Ev94FAEAAFACAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKSSy07DMBBF&#13;&#10;90j8g+UtSpyyQAg16YLHEliUDxjsSWLhl2y3tH/PJE0kqEo33Vj2zNy5x2MvVztr2BZj0t7VfFFW&#13;&#10;nKGTXmnX1fxj/VLcc5YyOAXGO6z5HhNfNddXy/U+YGKkdqnmfc7hQYgke7SQSh/QUab10UKmY+xE&#13;&#10;APkFHYrbqroT0ruMLhd56MGb5RO2sDGZPe8ofCAJruPs8VA3WNVc20E/xMVJRUSTjiQQgtESMt1N&#13;&#10;bJ064iomppKUY03qdUg3BP6Pw5D5y/TbYNK90TCjVsjeIeZXsEQupNHh00NUQkX4ptGmebMozzc9&#13;&#10;Qe3bVktUXm4szbCcOs7Y5+0zvQ+Kcb3ceWwz+4rxPzQ/AAAA//8DAFBLAwQUAAYACAAAACEArTA/&#13;&#10;8cEAAAAyAQAACwAAAF9yZWxzLy5yZWxzhI/NCsIwEITvgu8Q9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;&#10;Fj8B1o9eXA1vhmvv0+yFghaskLXXrVu3efPLUIu96EF6PFQNEahiSsPo8vGQ3rxFF7G1eFspu1jo&#13;&#10;Fu6F1v2t779+suUfCMwoWdTc+JWetmMXj1JhDgcet8EDv/ahm+GBliagWUJyfe2117Zu3Qb51Yve&#13;&#10;Xo+b3IB5KK2sHTOhPlw02jJkzKQGKBjA2nHiUzxNg+cmgBJYAfGS7eDDFStW5P9FjGygrvrAg/xo&#13;&#10;EVXhoboc1udI3QCxslL/0AskRrF5MLarsfQlccgfmYE/8gw0Fq537V4eOh4+wF904AGmQp66GsZC&#13;&#10;HJbB7M124XpX8J49ezBCPH8HpwvTyuuw2v8fybM9dpDzEDUAAAAASUVORK5CYIJQSwMECgAAAAAA&#13;&#10;AAAhAHmepYcFEwAABRMAABoAAABjbGlwYm9hcmQvbWVkaWEvaW1hZ2UyLnBuZ4lQTkcNChoKAAAA&#13;&#10;DUlIRFIAAAC9AAAAcwgCAAAAQleUowAAAAFzUkdCAK7OHOkAABK/SURBVHhe7Z17tE3VF8d/+UkN&#13;&#10;Q0OG6CVCqOgpyqNCiaSSShSlJK8xxBgIo6TkVZ6lIvJIpXvTi4iE8is1VPzKM0TlUXrRu/T6fTT9&#13;&#10;1lhj7XPOPffcc8+Ze5+1/jhjn73XY665vnvOudaea65D/v7773/5ZHHg119/feeddxyWnHzyyccc&#13;&#10;c4znk+HAIbmJm//+kz766COByBdffLFp06YkYQGAgBGZ+a1Vq9aZZ5553nnnHX744UkWj0a2nMCN&#13;&#10;iBCA8sEHH4CPoDgxY3nYYYfVrVs35tCuX7/+u+++izfqYIh0xhlngCGQFHnhFGXcIEVefPHFl156&#13;&#10;adGiRc54A45TTz2VkT7ppJMqVKhQvXr1QomBjz/++Kuvvtq6devGjRu3bdu2cuXKoF677rrr2rdv&#13;&#10;L5IpeimCuPnkk0+AS15enpErIkVO+SfVrl0bxKR9IDds2CAwQqq9//77v/32mzRx4okntmnT5qab&#13;&#10;bkIIpb3RLFYYHdwgXSZPngxcjKUCXFq2bNm8efMWLVpwnUkuL168eMmSJfwa1YbmAkB33HEHSMok&#13;&#10;JcXUVhRwA2JGjx4NaLBjYFPZsmUBygUXXJB5uAQH6e2333755ZcB0JdffilPO3fufPfdd4cdPeHG&#13;&#10;jYOYhg0b3nLLLcClmF6yolSLWT19+vT8/PxooCesuAkipk+fPg0aNCjK0Gag7M6dO8ePHx8B9IQS&#13;&#10;N5i9N9988759+xhpZEzfvn31I8YG5Y4dOyZMmIApJjdRW0OHDs0AatPYRMhwgwUDSjBlQoqYeOhh&#13;&#10;1eeFF14I0apPmHDDROmqq67il8nRqFGj2rVrl8YXKFtVrV69umfPnkigI488csaMGcy5skVJodoN&#13;&#10;DW6QMUga5E2dOnUeeeQR1usK1U/Nmb///vuBAweifCGye/fuGED6v1qEADdgpUOHDsLWrl27Dh48&#13;&#10;OMOLMZnBHOYO6GHBkBVCdJbyibp23AAadBMfCliVefTRR5s2bZqZUcxKK6w49+jRY926dYBm+fLl&#13;&#10;mqGjGjc2aJ577jk+EWRlODPZKDrr6quv1g8d1bhB0qCekDSABrMmk+OXxbZQVawyLFu2DHmzZs0a&#13;&#10;7OUsEhOv6RIKaRKSmDEBGkyZnAINHafLTKx4T/hAC4B0DpBSefP666+LKTNz5sxLL71UJ++KlSpm&#13;&#10;5hdddBGfRUeOHIm9XKxtpVC5Rtxg1rD+i0NCv379+vfvn0KvolEEtx40NXPy7du3a1sS1KinWKoB&#13;&#10;NDVq1Lj99tsPyeHUqFEjPL94i5hkaXsT1Mkb2FS1alU+Wz7zzDPNmjXTxq8M04P3BehBW2Egq/L8&#13;&#10;UidvEDaApnHjxmj3HJY1B7t+9NFHd+vWDbDec889GYZs4ubUyZuzzjoLJfXEE0+0atVKFaeyRQwi&#13;&#10;5+yzz6Z1VVaOLnkj21N4yTxoDEwrVqwIN1DfKO5sYTfYri7cMP2GRK+hHAUtdt4bb7zhcRObA8Ia&#13;&#10;XLH0MEgDJZjGkCEvlZKkS95gEcOXevXqeYvY5kCVKlXQ3fg3iuO9hqQRN2h0DaxRRYN45Mh7pSHp&#13;&#10;ws3u3bthCl/yvLxxOHDcccd53MR9Yfbv38/Xbw3vkzYafvjhB0jyeiruuBAfwwubIAd4o1RBWZee&#13;&#10;gjV//vmnKgYpIcZsOFdCjzrcwCAvb4Ic+Omnn5QgRshQh5s//viDTY0eOg4H9u7d63GTiAPw6623&#13;&#10;3lLFo6wTg7uxNvWtTt6wUPHUU095eWNzgC9T2qaZ6nBTqlQpVnF4w7L+lishgLk3gSyOOuooJfQo&#13;&#10;tW8g64YbbmDbvRc5woFZs2bxPZwLj5sCOHDxxRdv3rzZWzmwCeebsWPHsvlXFWg0zqeEQXgWE93D&#13;&#10;z8nZEt+7d290t8dNUhzAKf3cc8/V5hyZFOnpy4RZU6JECQLOpa/KtNWkzi42PSOOK+Fen3766dw0&#13;&#10;dAhKyu475G7ahjqtFenFDd0k+iaxBJYuXZrWLoegss8++4ygOMOGDVOoofTOp8zAwrWJEyeOGTMG&#13;&#10;6OSO1GGnJjPK++67r3z58moxrlrewDWgM3z4cOYUOaKw3nzzzWuuuWbIkCHHHnusWtDonU/ZLAM6&#13;&#10;I0aMIMYAUcclFmRUE1NItoIjX5WDJhy4EalDxE02LF544YXvvvtu9HQWuqlJkyY///zzY489plk9&#13;&#10;mTdWu56yRQsBrceNG9erVy/eyCiJnGeffbZ169YYwmqjlgS5HSbcQD1utrNnz+YIFjC0du3asAse&#13;&#10;xMyNN9745JNPPv7446effnqIXoaQ4UY4y6oG7O7YseO111774YcfhojdhlRm2sS4RO2ec845999/&#13;&#10;/xFHHBGuXoQSN7CYPVbE4eJLFughkHGIZI9BTM2aNV999dWQRoUKK27k7WRHMCFbOSkoFLLn008/&#13;&#10;vfXWW5ExHGb22muvERMpXDLGpjbcuJGeIHU41O6SSy7p1KnTaaedxooZB2fqMX2Ay0MPPQS4mTFx&#13;&#10;ZBoBZtu2bRtexAjlUcCN9ISBmT9/PiPEGs+VV15JQHXCv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2Ge/A/477T3Wl0i&#13;&#10;KAAAAABJRU5ErkJgglBLAQItABQABgAIAAAAIQA0Ev94FAEAAFACAAATAAAAAAAAAAAAAAAAAAAA&#13;&#10;AABbQ29udGVudF9UeXBlc10ueG1sUEsBAi0AFAAGAAgAAAAhAK0wP/HBAAAAMgEAAAsAAAAAAAAA&#13;&#10;AAAAAAAARQEAAF9yZWxzLy5yZWxzUEsBAi0AFAAGAAgAAAAhAB2fWFa+DgAA2scAAB8AAAAAAAAA&#13;&#10;AAAAAAAALwIAAGNsaXBib2FyZC9kcmF3aW5ncy9kcmF3aW5nMS54bWxQSwECLQAUAAYACAAAACEA&#13;&#10;6rGwJdoAAAAyAgAAKgAAAAAAAAAAAAAAAAAqEQAAY2xpcGJvYXJkL2RyYXdpbmdzL19yZWxzL2Ry&#13;&#10;YXdpbmcxLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAOFRNx/PBgAA5hsAABoAAAAAAAAAAAAAAAAA&#13;&#10;TBIAAGNsaXBib2FyZC90aGVtZS90aGVtZTEueG1sUEsBAi0ACgAAAAAAAAAhAACHAIOeEwAAnhMA&#13;&#10;ABoAAAAAAAAAAAAAAAAAUxkAAGNsaXBib2FyZC9tZWRpYS9pbWFnZTEucG5nUEsBAi0ACgAAAAAA&#13;&#10;AAAhAHmepYcFEwAABRMAABoAAAAAAAAAAAAAAAAAKS0AAGNsaXBib2FyZC9tZWRpYS9pbWFnZTIu&#13;&#10;cG5nUEsFBgAAAAAHAAcA9wEAAGZAAAAAAA==&#13;&#10;" o:spid="_x0000_i1026" style="width: 453.75pt; height: 297pt; visibility: visible" type="#_x0000_t75"><v:imagedata cropbottom="-524f" croptop="-111f" o:title="" src="file:///C:\DOCUME~1\ARIANS~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image009.png"></v:imagedata><o:lock aspectratio="f" v:ext="edit"></o:lock></v:shape></span><span style="mso-ansi-language: en-us"><o:p></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">The managers<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">We&rsquo;ll take a closer look at the concurrent programs later. Let&rsquo;s first look at the concurrent managers. There are concurrent managers and transaction managers. Also a number of control managers are defined. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">We&rsquo;ll start with the &lsquo;Internal Manager&rsquo;. This is the first manager to be started. Its purpose is to control the stopping and (re-)starting of the other managers. When Generic Service Management is enabled (default as of 11.5.7), it delegates to the &lsquo;Service Managers&rsquo;. On every node where concurrent processing is enabled, a &lsquo;Service Manager&rsquo; is started. However, only one Internal Manager is running at any time.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The other concurrent managers are defined with a work shift that controls how many processes a concurrent manager should have at certain times. The work shifts consist of a time-range and a number of processes. The Service Managers (or Internal Manager) will start and stop processes according to these work shifts. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Another part of the setup of concurrent managers is their specialization rules. The specialization rules indicate which programs are valid for a concurrent manager, or are excluded for that manager. They work on an include/exclude principle. When programs are included for that manager, the manager can only run those programs. When programs are excluded, the manager can run any program except the excluded ones.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">When a request (to run a program) is submitted from eBS, it will be placed in FND_CONCURRENT_REQUESTS with a status_code &lsquo;I&rsquo; (The eBS forms have fewer statuses than the codes in the table). The manager processes will query this table for requests that they are eligible to run. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Once a manager process finds a request with status_code &lsquo;I&rsquo;, which it is eligible to run then it will put the request on its own queue. It will then run the executable with the defined parameters. The logfile and outputfile are written to the filesystem in $APPLCSF/$APPLLOG resp. $APPLCSF/$APPLOUT. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">There are some special cases that need to be discussed. The first is the incompatibility. Concurrent Programs can be made incompatible with each other. That means that they cannot run at the same time. Once a program is started that is defined as incompatible with another, it will be automatically put on the queue for the &lsquo;Conflict Resolution Manager&rsquo;. This special manager will check if any incompatible program is running or &lsquo;Pending&rsquo; with code &lsquo;I&rsquo;. If so, it will hold the request on its own queue. If no incompatible program is running or &lsquo;Pending&rsquo;, then it will set the status of the request to &lsquo;Pending&rsquo;. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Another special case are the &lsquo;Transaction Managers&rsquo;. They are started and stopped the same way as the other concurrent managers. But they do not use the request queue. Transaction managers are called online from the eBS forms. And they execute a limited number of programs. These programs defined within their executables. They are called through the &lsquo;FND_TRANSACTION.SYNCHRONOUS&rsquo; procedure, which uses the &lsquo;DBMS_PIPE&rsquo; package.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">The programs<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">It&rsquo;s time to look at the concurrent programs. As mentioned before, a concurrent program is an instantiation of an executable. The executable is defined with a short name, an application (module), a filename and a method. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The short name will uniquely identify the executable. The other data is needed to determine what should be run for this executable. If the executable is an OS-based program, the application will be used to derive the directory on the file system where the executable is found. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">When the executable is defined as PL/SQL, the filename will contain the procedure that needs to be run.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The concurrent program is defined as the executable with an (optional) set of parameters. It also has some properties for the printing of the output (print-style, pre-defined printer, size of the output). <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Depending on the type of executable that needs to be run, the parameters will be sent to the executable ordered or named. For PL/SQL and host files, the parameters are ordered. And the order in which they are defined in the form defines how they will be sent to the executable. For reports the parameters are named, which means they are sent as &lt;parameter&gt;=&lt;value&gt;, &hellip;.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">After the request has finished, the request table &lsquo;FND_CONCURRENT_REQUESTS&rsquo; will be updated with the status information and a reference to the log- and output file. During the execution of the request, a status_code and phase_code are updated. The exact values of these fields are described in one of the next articles. That will go deeper into concurrent processing. <o:p></o:p></font></font></font></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">The output<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The log- and output file from the requests are written to the directories $APPLCSF/$APPLLOG and $APPLCSF/$APPLOUT. But they of course also need to be made available to the user. This is done through the &lsquo;Applications Report Review Agent&rsquo;.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">There is quite a lot of setup that can be done for the whole process. But within the scope of this article, we&rsquo;ll only look at the basic architecture. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">From the eBS form the log and output file are available from 2 buttons. These buttons call the web server for &lsquo;FNDWRR.exe&rsquo; (.exe on both Windows and Unix). <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">FNDWRR.exe is a cgi-executable that will call the &lsquo;FNDFS listener&rsquo;. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">This is an 8.0.6 TNS-listener in the eBS ORACLE_HOME on the eBS application tier. One of the less known features of the TNS-listeners is that they can do more than create database connections. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">In the listener.ora, you can define a program to be called when a connection is made on a certain tns-entry. That feature is used for the FNDFS listener. When it is called, it will redirect traffic to the &lsquo;FNDFS&rsquo; (FND File System) executable. This executable will read the requested file from the file-system and send it to FNDWRR.exe. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Again, we have a schema to show the whole flow: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font color="#000000"><font face="Calibri"><span style="mso-ansi-language: en-us; mso-no-proof: yes"><v:shape id="Object_x0020_7" o:gfxdata="UEsDBBQABgAIAAAAIQA0Ev94FAEAAFACAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKSSy07DMBBF&#13;&#10;90j8g+UtSpyyQAg16YLHEliUDxjsSWLhl2y3tH/PJE0kqEo33Vj2zNy5x2MvVztr2BZj0t7VfFFW&#13;&#10;nKGTXmnX1fxj/VLcc5YyOAXGO6z5HhNfNddXy/U+YGKkdqnmfc7hQYgke7SQSh/QUab10UKmY+xE&#13;&#10;APkFHYrbqroT0ruMLhd56MGb5RO2sDGZPe8ofCAJruPs8VA3WNVc20E/xMVJRUSTjiQQgtESMt1N&#13;&#10;bJ064iomppKUY03qdUg3BP6Pw5D5y/TbYNK90TCjVsjeIeZXsEQupNHh00NUQkX4ptGmebMozzc9&#13;&#10;Qe3bVktUXm4szbCcOs7Y5+0zvQ+Kcb3ceWwz+4rxPzQ/AAAA//8DAFBLAwQUAAYACAAAACEArTA/&#13;&#10;8cEAAAAyAQAACwAAAF9yZWxzLy5yZWxzhI/NCsIwEITvgu8Q9m7TehCRpr2I4FX0AdZk2wbbJGTj&#13;&#10;39ubi6AgeJtl2G9m6vYxjeJGka13CqqiBEFOe2Ndr+B03C3WIDihMzh6RwqexNA281l9oBFTfuLB&#13;&#10;BhaZ4ljBkFLYSMl6oAm58IFcdjofJ0z5jL0MqC/Yk1yW5UrGTwY0X0yxNwri3lQgjs+Qk/+zfddZ&#13;&#10;TVuvrxO59CNCmoj3vCwjMfaUFOjRhrPHaN4Wv0VV5OYgm1p+LW1eAAAA//8DAFBLAwQUA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TcfzwYAAOYbAAAaAAAAAAAAAAAAAAAAAHkQAABjbGlwYm9hcmQvdGhlbWUvdGhlbWUxLnht&#13;&#10;bFBLAQItAAoAAAAAAAAAIQAMnJlOGA8AABgPAAAaAAAAAAAAAAAAAAAAAIAXAABjbGlwYm9hcmQv&#13;&#10;bWVkaWEvaW1hZ2UxLnBuZ1BLAQItAAoAAAAAAAAAIQC2CpwwcQcAAHEHAAAaAAAAAAAAAAAAAAAA&#13;&#10;ANAmAABjbGlwYm9hcmQvbWVkaWEvaW1hZ2UyLnBuZ1BLBQYAAAAABwAHAPcBAAB5LgAAAAA=&#13;&#10;" o:spid="_x0000_i1025" style="width: 453.75pt; height: 273pt; visibility: visible" type="#_x0000_t75"><v:imagedata cropbottom="-145f" croptop="-121f" o:title="" src="file:///C:\DOCUME~1\ARIANS~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image011.png"></v:imagedata><o:lock aspectratio="f" v:ext="edit"></o:lock></v:shape></span><span style="mso-ansi-language: en-us"><o:p></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">This complex retrieval is of course needed because the concurrent processing tier can be separate from the forms and web-tiers.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stijf.com/wordpress/2010/04/oracle-ebs-11i-infrastructure/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>eBS Troubleshooting</title>
		<link>http://www.stijf.com/wordpress/2010/04/ebs-troubleshooting/</link>
		<comments>http://www.stijf.com/wordpress/2010/04/ebs-troubleshooting/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 19:46:33 +0000</pubDate>
		<dc:creator>Arian Stijf</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Workflow]]></category>
		<category><![CDATA[eBS]]></category>
		<category><![CDATA[concurrent]]></category>
		<category><![CDATA[fix ebs]]></category>
		<category><![CDATA[mailer]]></category>
		<category><![CDATA[notification]]></category>
		<category><![CDATA[notification_mailer]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[wf_notification_out]]></category>

		<guid isPermaLink="false">http://www.stijf.com/wordpress/?p=416</guid>
		<description><![CDATA[Oracle eBS troubleshooting
&#160;
On this webpage, I&#8217;ll make a FAQ on common eBS problems and troubleshooting. Probably the format will change over time. But I&#8217;ll just start. I use basic flow diagrams, to give an overview of the process. Under the diagrams is an explanation of all the steps. 
&#216; My concurrent manager does not start
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<h1 style="margin: 24pt 0cm 0pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font color="#365f91"><font face="Cambria">Oracle eBS troubleshooting<o:p></o:p></font></font></span></h1>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-US" style="mso-ansi-language: en-us"><font color="#000000"><font face="Calibri"><font size="3">On this webpage, I&rsquo;ll make a FAQ on common eBS problems and troubleshooting. Probably the format will change over time. But I&rsquo;ll just start. I use basic flow diagrams, to give an overview of the process. Under the diagrams is an explanation of all the steps. <o:p></o:p></font></font></font></span></p>
<p class="MsoSubtitle" style="text-indent: -18pt; margin: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo1"><font color="#4f81bd"><span lang="EN-US" style="font-style: normal; font-family: wingdings; mso-ansi-language: en-us; mso-fareast-font-family: wingdings; mso-bidi-font-family: wingdings; mso-bidi-font-style: italic"><span style="mso-list: ignore"><font size="3">&Oslash;</font><span style="font: 7pt 'times new roman'"> </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><em><font face="Cambria"><font size="3">My concurrent manager does not start<o:p></o:p></font></font></em></span></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img alt="" height="370" src="http://www.stijf.com/wordpress/wp-content/uploads/Concurrent.jpg" width="360" /></span><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"><v:stroke joinstyle="miter"></v:stroke></v:shapetype></font></font></font></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l1 level1 lfo2"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">1)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">Check if the Internal Manager is running. On Unix, you can run: ps &ndash;ef | grep &lsquo;FNDLIBR FND CPMGR&rsquo;. If this returns a process, check the start time for the process to make sure it is the correct process.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l1 level1 lfo2"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">2)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">If a process is returned, and it started at the time you started the managers, the ICM is running.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l1 level1 lfo2"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">3)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">The ICM is not running. First check the adcmctl.txt file. It is found in the process_log directory. (Check your autoconfig xml file or the adcmctl.sh script). It will show the logs for the start-up scripts of the ICM.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l1 level1 lfo2"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">4)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">The ICM is running, but can&rsquo;t start the other managers. Most common cause is<span style="mso-spacerun: yes">&nbsp; </span>the APPS Listener is down. Check for it running with: ps &ndash;ef<span style="mso-spacerun: yes">&nbsp; </span>| grep &lsquo;tnslsnr APPS_&lt;SID&gt;&rsquo;<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l1 level1 lfo2"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">5)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">If no process is returned, start the apps listener with adalnctl.sh. Wait a minute afterwards, for the ICM to retry starting the managers.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l1 level1 lfo2"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">6)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font face="Calibri"><font size="3">The ICM is running, or was started successfully before it died. Check the logfile from the ICM in $APPLCSF/$APPLLOG. By default the file is named &lt;SID&gt;_&lt;proc&gt;.mgr, where proc is the process_id from adcmctl.txt.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 10pt 36pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoSubtitle" style="text-indent: -18pt; margin: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo1"><font color="#4f81bd"><span lang="EN-US" style="font-style: normal; font-family: wingdings; mso-ansi-language: en-us; mso-fareast-font-family: wingdings; mso-bidi-font-family: wingdings; mso-bidi-font-style: italic"><span style="mso-list: ignore"><font size="3">&Oslash;</font><span style="font: 7pt 'times new roman'"> </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><em><font face="Cambria"><font size="3">Notifications are not being sent by the notification mailer </font></font></em></span></font></p>
<p class="MsoSubtitle" style="text-indent: -18pt; margin: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo1"><font color="#4f81bd"><span lang="EN-US" style="mso-ansi-language: en-us"><em><font face="Cambria"><font size="3"><o:p></o:p></font></font></em></span></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font face="Calibri"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img alt="" height="993" src="http://www.stijf.com/wordpress/wp-content/uploads/Notifications.jpg" width="493" /></span><v:shape id="_x0000_i1026" o:ole="" style="width: 334.5pt; height: 672.75pt" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\Arian\AppData\Local\Temp\msohtmlclip1\01\clip_image003.emz"></v:imagedata></v:shape></font></font></font></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">1)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">Look for the notification in &lsquo;wf_notifications&rsquo;. Check the status, mail_status, recipient_role and notification_id. <o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">2)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">If Mail_status = &lsquo;SENT&rsquo;, the message has been mailed already. If status&lt;&gt;&rsquo;OPEN&rsquo; (Note the difference between status and mail_status), the notification is not eligible to be mailed anymore. <o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">3)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">The Notification Mailer has already sent this message. Maybe it was sent to the TEST_ADDRESS<span style="mso-spacerun: yes">&nbsp; </span>from the Notification Mailer.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">4)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">Check the mail_preference for the recipient_role from wf_roles. <o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">5)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">If the preference is &lsquo;QUERY&rsquo;, &lsquo;SUMHTML&rsquo;, &lsquo;SUMMARY&rsquo; or &lsquo;DISABLED&rsquo; then the recipient will not receive notifications by mail. <o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">6)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">Change the preference in the Users preferences. Or test with a different user.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpLast" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-add-space: auto; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us; mso-fareast-font-family: 'courier new'"><span style="mso-list: ignore">7)<span style="font: 7pt 'times new roman'">&nbsp; </span></span></span><font size="3"><font face="Calibri"><span lang="EN-US" style="mso-ansi-language: en-us">The Notification Mailer reads notifications to send from the queue WF_NOTIFICATION_OUT. Select from the queue-view: </span><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">select notification_id,msg_state,msg_id,role,corrid,enq_time,deq_time <o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">from<span style="mso-spacerun: yes">&nbsp; </span>(select msg_id, o.enq_time, o.deq_time, msg_state<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>,(select str_value<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>from<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>table (o.user_data.header.properties)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>where<span style="mso-spacerun: yes">&nbsp; </span>name = &#39;NOTIFICATION_ID&#39;) notification_id<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>, (select str_value<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>from<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>table (o.user_data.header.properties)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>where<span style="mso-spacerun: yes">&nbsp; </span>name = &#39;ROLE&#39;) role<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>, (select str_value<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>from<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>table (o.user_data.header.properties)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>where<span style="mso-spacerun: yes">&nbsp; </span>name = &#39;Q_CORRELATION_ID&#39;) corrid<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>from<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>applsys.aq$wf_notification_out o)<span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">where notification_id=&lt;notification_id&gt;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">and rownum=1;<o:p></o:p></font></span></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-add-space: auto; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3"> <img src='http://www.stijf.com/wordpress/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> </font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">If you received a result on the query, the notification is in the queue.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpLast" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-add-space: auto; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">9)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">The status of the notification in the queue should be &lsquo;READY&rsquo;. If it is &lsquo;PROCESSED&rsquo;, or &lsquo;ERROR&rsquo;, the notification is already dequeued or errored. Otherwise check the status of the queue with:<o:p></o:p></font></font></span></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">select name,enqueue_enabled,dequeue_enabled<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">from dba_queues <o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><font color="#000000"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us">where name=&#39;WF_NOTIFICATION_OUT&#39;;</span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"> <o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">10)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">The status of the message should be &lsquo;READY&rsquo;. The &lsquo;ENQUEUE_ENABLED&rsquo; and &lsquo;DEQUEUE_ENABLED&rsquo; columns should be &lsquo;YES&rsquo;. <o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">11)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">Reprocess the message with the conc. Request. Or stop/start the queue with dbms_aqadm.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">12)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">Check the Notification Mailer logfile. The notification is ready for the mailer, but it is unable to pick it up. Check if the mailer shut down due to too many errors.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpLast" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-add-space: auto; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">13)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">The message is not in &lsquo;WF_NOTIFICATION_OUT&rsquo;. It can still be queued on the &lsquo;WF_DEFERRED&rsquo; queue. Check this queue with: <o:p></o:p></font></font></span></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">select v.msg_id,v.msg_state,v.enq_time,v.deq_time,v.corr_id<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">from<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>applsys.aq$wf_deferred v<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">,<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>table(v.user_data.parameter_list) t<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">where v.corr_id like &#39;APPS:oracle.apps.wf.notification.%&#39;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">and name =&#39;NOTIFICATION_ID&#39; <o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span lang="EN-US" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">and value = &lt;Notification_id&gt;;<o:p></o:p></font></span></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">14)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">If the query returned results and the msg_state is &lsquo;READY&rsquo;, the notification is still being processed. Skip to 16<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">15)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">Unfortunately, your notification seems to have gone missing. Consult Oracle Support. Please inform us of the solution in this case, so we can extend the FAQ.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">16)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">The notification is still in the deferred queue, waiting to be picked up by the &lsquo;Workflow Deferred Notification Agent Listener&rsquo;. Check the status of this listener. And if needed, check its logfile. <o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">17)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">If the Deferred Notification Agent Listener is not running, or erroring<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">18)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">(re)start it.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">19)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">Check if the Business Event &lsquo;oracle.apps.wf.notification.denormalize&rsquo; is enabled and has a subscription to procedure &lsquo;Wf_Notification_Util.Denormalize_RF&rsquo;.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">20)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">If either the Business event is disabled, or the subscription non-existent or disabled, go to 21.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">21)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">Make sure that the Business event is enabled and the subscription is valid and enabled. You will still have to reprocess the notification with the concurrent program to resubmit notifications.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l2 level1 lfo3"><font color="#000000"><span lang="EN-US" style="mso-ansi-language: en-us; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><font face="Calibri" size="3">22)</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">Unfortunately, we can&rsquo;t locate the issue yet. If you manage to solve the issue please inform us, so we can update this FAQ.<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 10pt 36pt"><span lang="EN-US" style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stijf.com/wordpress/2010/04/ebs-troubleshooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing efficient SQL</title>
		<link>http://www.stijf.com/wordpress/2010/03/writing-efficient-sql/</link>
		<comments>http://www.stijf.com/wordpress/2010/03/writing-efficient-sql/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 15:30:04 +0000</pubDate>
		<dc:creator>Arian Stijf</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[eBS]]></category>
		<category><![CDATA[cardinality]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[efficient]]></category>
		<category><![CDATA[full table scan]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[join]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[nested loop]]></category>
		<category><![CDATA[optimizer]]></category>
		<category><![CDATA[rowid]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.stijf.com/wordpress/?p=402</guid>
		<description><![CDATA[The other day I gave a presentation on &#8216;Efficient SQL&#8217;. It was the first of a number of presentations, so I started with explaining some basic concepts. 
Maybe it will be interesting for other people too. So here is the summary of it. 
&#160;
MAIN RULES OF EFFICIENT SQL
&#160;
The main rules of efficient SQL are:
&#183;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Less [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">The other day I gave a presentation on &lsquo;Efficient SQL&rsquo;. It was the first of a number of presentations, so I started with explaining some basic concepts. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Maybe it will be interesting for other people too. So here is the summary of it. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">MAIN RULES OF EFFICIENT SQL<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font face="Calibri"><font size="3"><font color="#000000">The main rules of efficient SQL are:<o:p></o:p></font></font></font></span></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l1 level1 lfo1"><font color="#000000"><span style="font-family: symbol; mso-ansi-language: en-us; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><font size="3">&middot;</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="mso-ansi-language: en-us"><font face="Calibri"><font size="3">Less is better<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpLast" style="text-indent: -18pt; margin: 0cm 0cm 10pt 36pt; mso-list: l1 level1 lfo1"><font color="#000000"><span style="font-family: symbol; mso-ansi-language: en-us; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><font size="3">&middot;</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">More is better<o:p></o:p></font></font></span></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">That seems easy, since everything is better. But let me explain. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font face="Calibri"><font color="#000000"><b style="mso-bidi-font-weight: normal"><span style="mso-ansi-language: en-us">Less is better</span></b><span style="mso-ansi-language: en-us">: The less I/O generated the better your statement will perform. Even though somebody might be able to think of some exceptions. It is safe to keep this as a rule of thumb.<o:p></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Avoid unnecessary work for your query. You can do that by selecting only the rows that you need. (That sounds obvious, but I&rsquo;ll give an example soon). In complex queries, make sure that you select the smallest possible set in every part of your query. Rather than collecting a huge amount of data and then selecting what you need, select the smallest set possible before you join.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Also select only the columns that you need. One argument is that it might give Oracle a chance to skip the table access, and use an index-only access. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Think about the use of &lsquo;select *&rsquo;. Most often this is a complete waste of resources. In packaged software, it can easily lead to bugs when the table definition changes. In all situations, it will cost extra resources to collect the data, send them to the client and then filter out the data that is not needed. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><font size="3"><font face="Calibri"><font color="#000000"><b style="mso-bidi-font-weight: normal"><span style="mso-ansi-language: en-us">More is better</span></b><span style="mso-ansi-language: en-us">: This is of course not about I/O. It is about the information that you give Oracle about your data and your query. Add as many predicates as possible, since it can help the optimizer do a better job. When 2 tables are joined on an ID-column. But you know, from your knowledge of the data, that another column can also be used as a join-condition then use both join conditions. <o:p></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">It will help the optimizer work out the relationship between the tables, and select the optimal plan. If 2 columns have related data, and the predicate on one column means that the other column is restricted too, put a predicate on both columns. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Consider the following: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; create table Xxx_inner <o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp; </span>as select * from dba_objects<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>3<span style="mso-spacerun: yes">&nbsp; </span>where object_type=&#39;TABLE&#39;;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Table created.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; create index xxx_inner_n1 on xxx_inner(object_id,object_type);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Index created.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; create index xxx_inner_n2 on xxx_inner(Object_type);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Index created.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; create table xxx_outer <o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp; </span>as select * from dba_objects;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Table created.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; insert into<span style="mso-spacerun: yes">&nbsp; </span>xxx_outer <o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp; </span>select * from dba_objects;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">71136 rows created.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; create index xxx_outer_n1 on xxx_outer(Object_id,object_type);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Index created.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; create index xxx_outer_n2 on xxx_outer(object_type);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Index created.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; analyze table xxx_inner compute statistics;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Table analyzed.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; analyze table xxx_outer compute statistics;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Table analyzed.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; set autotrace traceonly;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; select o.*<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp; </span>from xxx_outer o<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>3<span style="mso-spacerun: yes">&nbsp; </span>where o.object_id in (select object_id from xxx_inner i)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>4<span style="mso-spacerun: yes">&nbsp; </span>and o.object_type=&#39;PROCEDURE&#39;;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">no rows selected<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Statistics<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>113<span style="mso-spacerun: yes">&nbsp; </span>consistent gets<o:p></o:p></font></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1064<span style="mso-spacerun: yes">&nbsp; </span>bytes sent via SQL*Net to client<o:p></o:p></font></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><i style="mso-bidi-font-style: normal"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Consistent gets is the number of times data was read from the buffer cache into our session memory. It is therefore a good measure of the amount of work a session needed to do while executing a query. <o:p></o:p></font></font></font></span></i></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; select o.*<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp; </span>from xxx_outer o<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>3<span style="mso-spacerun: yes">&nbsp; </span>where o.object_id in (select object_id<o:p></o:p></font></span></p>
<p class="MsoNormal" style="text-indent: 36pt; margin: 0cm 0cm 0pt 72pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>from xxx_inner i <o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 108pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>where i.object_type=o.object_type)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>4<span style="mso-spacerun: yes">&nbsp; </span>and o.object_type=&#39;PROCEDURE&#39;;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">no rows selected<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Statistics<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>15<span style="mso-spacerun: yes">&nbsp; </span>consistent gets<o:p></o:p></font></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1064<span style="mso-spacerun: yes">&nbsp; </span>bytes sent via SQL*Net to client<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; select o.object_id<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp; </span>from xxx_outer o<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>3<span style="mso-spacerun: yes">&nbsp; </span>where o.object_id in (select object_id<o:p></o:p></font></span></p>
<p class="MsoNormal" style="text-indent: 36pt; margin: 0cm 0cm 0pt 72pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>from xxx_inner i <o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 108pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>where i.object_type=o.object_type)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>4<span style="mso-spacerun: yes">&nbsp; </span>and o.object_type=&#39;PROCEDURE&#39;;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">no rows selected<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Statistics<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>15<span style="mso-spacerun: yes">&nbsp; </span>consistent gets<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>254<span style="mso-spacerun: yes">&nbsp; </span>bytes sent via SQL*Net to client<o:p></o:p></font></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Here we see two tables created from &lsquo;DBA_OBJECTS&rsquo;. We join these tables on &lsquo;OBJECT_ID&rsquo;. In this case, we have some information that the Oracle Optimizer does not have. The object_id,object_type combination is the same in both tables. Unaware of this fact, Oracle has to search all object_id&rsquo;s for &lsquo;XXX_INNER&rsquo;. When we tell Oracle that the object_type is the same, it can skip most of the records resulting in less I/O. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">When we finally tell Oracle that we&rsquo;re only interested in the object_id, we also reduce the network traffic by 75%.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">The concepts<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font color="#000000"><font face="Calibri"><font size="3">For every query, Oracle will have to collect some data. And in most cases, it will have to join one or more data-sets. Let&rsquo;s see what options Oracle has for collecting data and joining the data together. In this presentation we only look at the basic options, not the more sophisticated features. So don&rsquo;t expect this list to be complete. We will see how data can be retrieved from the database, and how tables / data-sets can be joined together. We will not yet go into the most efficient way to do it, because the most efficient way to retrieve data depends on many factors. Only when you have a basic understanding of the concepts, we can start thinking about the most efficient way to do things. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h3 style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><font color="#4f81bd"><font face="Cambria"><font size="3">Collecting data<o:p></o:p></font></font></font></span></h3>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font face="Calibri"><font size="3"><font color="#000000">To gather data from a table, Oracle can use 3 different options, called &lsquo;Access Paths&rsquo;:<o:p></o:p></font></font></font></span></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo2"><font color="#000000"><span style="font-family: symbol; mso-ansi-language: en-us; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><font size="3">&middot;</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="mso-ansi-language: en-us"><font face="Calibri"><font size="3">Full Table Scan<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt; margin: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo2"><font color="#000000"><span style="font-family: symbol; mso-ansi-language: en-us; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><font size="3">&middot;</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="mso-ansi-language: en-us"><font face="Calibri"><font size="3">Index Scan / Table Access by Rowid<o:p></o:p></font></font></span></font></p>
<p class="MsoListParagraphCxSpLast" style="text-indent: -18pt; margin: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo2"><font color="#000000"><span style="font-family: symbol; mso-ansi-language: en-us; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><font size="3">&middot;</font><span style="font: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri">Index Scan<o:p></o:p></font></font></span></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">The Full Table Scan (FTS) is exactly as the name implies, a full scan of the table. All the records of the table are read into memory, and checked against the predicates in the query (where clause or Join condition). The blocks of the table don&rsquo;t have to be read in any particular order. Oracle will just try to get the blocks of the table as quickly as possible. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">When a sizable part of the table needs to be selected, this will be the most efficient access path. It will be the only one available, if there is no predicate available that matches (part of) an index. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">The &lsquo;Index Scan / Table Access by Rowid&rsquo;, will use an index to decide which rows need to be read into memory. Then based on the rowid in the index, the correct row will be retrieved. The rowid refers directly to the position on disk where the row is located.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">And the last option is the &lsquo;Index Scan&rsquo;. The difference with the previous option is that Oracle does not need to get the table data anymore. The data in the index is sufficient to answer the query. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">So which one of these is the most efficient? <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">As usual, it depends. Many people think a FTS is less efficient than an Index Scan. But consider this: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; create table xxx_access as select * from dba_objects;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Table created.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; create index xxx_access_n1 on xxx_access (object_id);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Index created.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; select object_id,object_name from xxx_access where object_id&gt;0;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">71139 rows selected.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Elapsed: 00:00:08.02<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Execution Plan<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>SELECT STATEMENT Optimizer=ALL_ROWS (Cost=287 Card=78799 Bytes=6225121)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal">TABLE ACCESS (FULL)</b> OF &#39;XXX_ACCESS&#39; (TABLE) (Cost=287 Card=78799 Bytes=6225121)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Statistics<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>5803<span style="mso-spacerun: yes">&nbsp; </span>consistent gets<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>2727442<span style="mso-spacerun: yes">&nbsp; </span>bytes sent via SQL*Net to client<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>71139<span style="mso-spacerun: yes">&nbsp; </span>rows processed<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; select /*+ INDEX (xxx_access) */ object_id, object_name from xxx_access where object_id&gt;0;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">71139 rows selected.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Elapsed: 00:00:10.05<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Execution Plan<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">0<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>SELECT STATEMENT Optimizer=ALL_ROWS (Cost=1290 Card=78799 Bytes=6225121)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">1<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>0 <span style="mso-spacerun: yes">&nbsp;</span><span style="mso-spacerun: yes">&nbsp;</span><b style="mso-bidi-font-weight: normal">TABLE ACCESS (BY INDEX ROWID)</b> OF &#39;XXX_ACCESS&#39; (TABLE) (Cost=1290 Card=78799 By=6225121)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">2<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal">INDEX (RANGE SCAN)</b> OF &#39;XXX_ACCESS_N1&#39; (INDEX) (Cost=161 Card=78799)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Statistics<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10771<span style="mso-spacerun: yes">&nbsp; </span>consistent gets<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>2727442<span style="mso-spacerun: yes">&nbsp; </span>bytes sent via SQL*Net to client<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>71139<span style="mso-spacerun: yes">&nbsp; </span>rows processed<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">The FTS needs 5803 I/O operations. While the Index Scan takes almost double at 10771 I/O&rsquo;s and 2 seconds more. (out of 10 sec&rsquo;s!)<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">Imagine what will happen, when you try this with a multi-million row table. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">But for sure an Index Scan will be the most efficient when it can be done? Again, it depends. Consider this: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; create table test1 (l number, txt varchar2(500));<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Table created.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; create index test1_idx on test1(l,txt);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Index created.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; Begin<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp; </span>For I In (Select<span style="mso-spacerun: yes">&nbsp; </span>Level L, Rpad(&#39;ABC&#39;,500,To_char(Level)) Txt <o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>3<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>From Dual Connect By Level &lt;= 50000) Loop<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>4<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>Insert Into Test1 Values (I.L,I.Txt);<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>5<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>If Mod(I.L,5)!=0 Then<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>6<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Delete From Test1 Where L=I.L;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>7<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>End If;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>8<span style="mso-spacerun: yes">&nbsp; </span>End Loop;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp; </span>9<span style="mso-spacerun: yes">&nbsp; </span>Commit;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;</span>10<span style="mso-spacerun: yes">&nbsp; </span>end;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;</span>11<span style="mso-spacerun: yes">&nbsp; </span>/<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">PL/SQL procedure successfully completed.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; analyze table test1 compute statistics;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Table analyzed.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; set autotrace traceonly;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; select l from test1 t where l&gt;0;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">10000 rows selected.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Execution Plan<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>SELECT STATEMENT Optimizer=ALL_ROWS (<b style="mso-bidi-font-weight: normal">Cost=773</b> Card=10000 Bytes=40000)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>TABLE ACCESS (FULL) OF &#39;TEST1&#39; (TABLE) (Cost=773 Card=10000 Bytes=40000)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Statistics<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal">1393<span style="mso-spacerun: yes">&nbsp; </span>consistent gets<o:p></o:p></b></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>140549<span style="mso-spacerun: yes">&nbsp; </span>bytes sent via SQL*Net to client<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10000<span style="mso-spacerun: yes">&nbsp; </span>rows processed<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; select /*+ INDEX(t,test1_idx) */ l from test1 t where l&gt;0;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">10000 rows selected.<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Execution Plan<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>SELECT STATEMENT Optimizer=ALL_ROWS (<b style="mso-bidi-font-weight: normal">Cost=3338</b> Card=10000 Bytes=40000)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>INDEX (RANGE SCAN) OF &#39;TEST1_IDX&#39; (INDEX) (Cost=3338 Card=10000 Bytes=40000)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">Statistics<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>4003<span style="mso-spacerun: yes">&nbsp; </span>consistent gets<o:p></o:p></font></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>140549<span style="mso-spacerun: yes">&nbsp; </span>bytes sent via SQL*Net to client<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10000<span style="mso-spacerun: yes">&nbsp; </span>rows processed<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">How can the Full Table Scan be more efficient?<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Good question. To answer it, we have to look at the amount of work that Oracle has to do to get the data. We start with the FTS:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">As mentioned, a FTS needs to scan all the blocks in a table. In my system, the table XXX_ACCESS was created with 1152 blocks. So basically Oracle will read 1152 blocks. However Oracle has optimized this process. One of the most noticeable optimizations is the db_file_multiblock_readcount, which tells Oracle to read multiple blocks in one I/O operation. So instead of doing 1152 reads, Oracle reads 4 (on my system) blocks at a time in 288 reads. (Take a look at the explain plan above again, and notice the cost of the Full Table Scan!). <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">Now how much work does an Index Scan / Table Access rowid need to do? <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">To answer that question, you need to know the structure of an index. An index in Oracle is a B-Tree structure. It looks like an inverted tree, with the top being the &lsquo;Root-block&rsquo;. The lowest level contains the &lsquo;Leaf blocks&rsquo;, that hold the index keys and the matching rowid&rsquo;s. The index keys in the leaf blocks are sorted. So the lowest value will be in the utter-left block, the highest in the far right block.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">All upper level blocks show the ranges that the lower level blocks contain. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">To find a range of data, Oracle starts at the root block, and follows the pointers to the first leaf block containing an index key within the range. From here Oracle can walk the leaf blocks from left to right (or right to left, if needed). <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">See the following picture: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri"><o:p><img alt="" height="282" src="http://www.stijf.com/wordpress/wp-content/uploads/Index(1).jpg" width="906" /></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">That means that Oracle has to walk the &lsquo;height&rsquo; of the index (Index level). Then read a number of leaf blocks. And for every entry in the leaf-block, it needs to retrieve the data from the table.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">In the worst case scenario, the data is spread throughout the table. And for every index key, Oracle has to retrieve a different table block. In that case, the amount of work is: (index level &ndash; 1) + number of index leaf blocks + (Number of keys * Number of table blocks). <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">It will be obvious that is a lot more I/O than just reading the table once. The formula is not completely correct, because Oracle does not read the same table block twice, when the next rowid from the index is in the same block.<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font color="#000000"><font face="Calibri">But the formula should make it clear that with more data being retrieved, the cost of the index access / Table Rowid, is increasing faster than the cost of the Full Table Scan. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span style="mso-ansi-language: en-us"><font size="4"><font color="#4f81bd"><font face="Cambria">What happened to Index Only Access?<o:p></o:p></font></font></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">The example showed that a Full Table Scan is still more efficient than using only an index. Even though Oracle would only have to walk through the index to retrieve all the data. <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font size="3"><font face="Calibri"><font color="#000000">This is caused by a feature of the index structure and the way the data was entered into the table. This caused the index to grow bigger than the actual table:<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; select table_name,num_rows,blocks from dba_Tables where table_name=&#39;TEST1&#39;;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">TABLE_NAME<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>NUM_ROWS<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>BLOCKS<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">TEST1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10000<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal">772</b><o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">SQL&gt; select index_name, distinct_keys, leaf_blocks from dba_indexes where index_name=&#39;TEST1_IDX&#39;;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">INDEX_NAME<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>DISTINCT_KEYS LEAF_BLOCKS<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8211;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><font color="#000000">TEST1_IDX<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10000<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal">3334</b><o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="line-height: 115%; font-family: 'courier new'; font-size: 8pt; mso-ansi-language: en-us"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font color="#000000"><font size="3"><font face="Calibri">This situation can occur when a lot of inserts and deletes are taking place in the same transaction. The space for the deleted table rows can be reused immediately. But the space for the deleted index keys only comes available after the commit. NOTE: The space in the index will be reusable after the commit!<o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us"><font color="#000000"><font size="3"><font face="Calibri">Another situation where this can happen is with an index key based on a sequence. So new data is only inserted at the end of the range. When you delete a lot of values on the lower end of the range (but not all). Richard Foote has some excellent material on his website about Deleted Index Keys: <o:p></o:p></font></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><a href="http://en.wordpress.com/tag/index-delete-operations/"><font face="Calibri" size="3">http://en.wordpress.com/tag/index-delete-operations/</font></a></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span lang="EN-CA"><font color="#4f81bd" face="Cambria" size="4">Join Mechanisms</font></span></h2>
<h2 style="margin: 10pt 0cm 0pt"><span lang="EN-CA"><o:p><font color="#4f81bd" face="Cambria" size="4">&nbsp;</font></o:p></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">I hope you&rsquo;re not yet in despair. Because so far we have only retrieved data from single tables. In most cases, we need to join tables together to get our data. Now we will look at 3 basic forms of joining data-sets together. Note that it is not necessarily only tables that we join. It can also be a result set from an earlier part of your query. For example we might collect some data from an Index Only Access and then join it to data from a Full Table Scan. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">Oracle has 3 mechanisms to perform Joins: Nested Loops, Hash Join, Merge Join. Let&rsquo;s take a look at them.</font></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span lang="EN-CA"><font color="#4f81bd" face="Cambria" size="4">Nested Loops</font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">The Nested Loop join loops over a smaller data set, and for every record in that set, it searches a matching record in the second data set. Visually, it looks like this:</font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3"><img alt="" height="347" src="http://www.stijf.com/wordpress/wp-content/uploads/Nested Loops.jpg" width="575" />&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">You can see that the first set is fully scanned. This is the Outer or Driving Set. For every record in this set, we look up a matching record in the second set. Usually this will be done through an index, even though this is not mandatory.</font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">The efficiency of this mechanism depends on the size of Set A, and the number of records we need to<span style="mso-spacerun: yes">&nbsp; </span>retrieve from Set B.</font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">We will see some situations where a Nested Loops join is more or less efficient. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">The second join mechanism is the</font></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span lang="EN-CA"><font color="#4f81bd" face="Cambria" size="4">Hash Join</font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">For a Hash Join, Oracle builds a hash table from a (preferably) smaller data set (Build set), where the key is a hash value derived from the join columns. Then Oracle reads the second data set (Probe set), derives the hash value on the join columns and probes the hash table for a match. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">Schematically, it looks like this: </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><img alt="" height="311" src="http://www.stijf.com/wordpress/wp-content/uploads/Hash.jpg" width="660" /></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">For the Hash Join, it is not relevant if the data is retrieved through an index, or from a Table scan. Both data sets need to be read fully. One of the features of hashing is that collisions may occur. A collision means that 2 different values result in the same hash value. Therefore, the full data set is stored in the hash table. When a match is found on the hash values, Oracle double-checks the actual values of the join columns to see if they match. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">There is a major drawback for this mechanism. When the hash table does not fit into the available memory (hash_area_size). Then Oracle will dump parts of the hash table to disk (Temp tablespace). A bitmap of all possible hash values is kept in memory with a bit indicating if a hash-value is used or not. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">So while scanning the Probe set, Oracle can check if there is a possible match. If that part of the hash table is not in memory, Oracle will set aside the records from the probe table. When finished with the probe set, the next part of the hash table is loaded into memory, and the records that were set aside are tested again. This is called a &lsquo;Multipass Hash Join&rsquo;, instead of the &lsquo;Onepass Hash Join&rsquo; where the entire hash table is held in memory.</font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">You can imagine that the hash join can be very efficient even without index access. However it can deteriorate quickly when a &lsquo;Multipass Hash Join&rsquo;<span style="mso-spacerun: yes">&nbsp; </span>is needed. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">That brings us to the </font></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span lang="EN-CA"><font color="#4f81bd" face="Cambria" size="4">Merge Join</font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">A Merge Join is possible when 2 datasets are both ordered on their join columns. The datasets can then be read in an alternating way. You start reading the first dataset, then you read the second dataset until you find a matching value, or exceed the value. If it is a matching value, you can start building your result set. If you pass the join value, you continue reading the first dataset again. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">Schematically, it looks like this: </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span style="mso-ansi-language: en-us; mso-no-proof: yes"><v:shape id="Object_x0020_5" o:gfxdata="UEsDBBQABgAIAAAAIQC75UiUBQEAAB4CAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKSRvU7DMBSF<br />
dyTewfKKEqcMCKEmHfgZgaE8wMW+SSwc27JvS/v23KTJgkoXFsu+P+c7Ol5vDoMTe0zZBl/LVVlJ<br />
gV4HY31Xy4/tS3EvRSbwBlzwWMsjZrlprq/W22PELHjb51r2RPFBqax7HCCXIaLnThvSAMTP1KkI<br />
+gs6VLdVdad08ISeCho1ZLN+whZ2jsTzgcsnJwldluLxNDiyagkxOquB2Knae/OLUsyEkjenmdzb<br />
mG/YhlRnCWPnb8C898bRJGtQvEOiVxjYhtLOxs8AySiT4JuDystlVV4WPeM6tK3VaILeDZxIOSsu<br />
ti/jidNGNZ3/J08yC1dNv9v8AAAA//8DAFBLAwQUAAYACAAAACEArTA/8cEAAAAyAQAACwAAAF9y<br />
ZWxzLy5yZWxzhI/NCsIwEITvgu8Q9m7TehCRpr2I4FX0AdZk2wbbJGTj39ubi6AgeJtl2G9m6vYx<br />
jeJGka13CqqiBEFOe2Ndr+B03C3WIDihMzh6RwqexNA281l9oBFTfuLBBhaZ4ljBkFLYSMl6oAm5<br />
8IFcdjofJ0z5jL0MqC/Yk1yW5UrGTwY0X0yxNwri3lQgjs+Qk/+zfddZTVuvrxO59CNCmoj3vCwj<br />
MfaUFOjRhrPHaN4Wv0VV5OYgm1p+LW1eAAAA//8DAFBLAwQUAAYACAAAACEA2cWVB4UTAAB7egEA<br />
HwAAAGNsaXBib2FyZC9kcmF3aW5ncy9kcmF3aW5nMS54bWzsXV1zm0gWfd+q/Q8Ur1vZGCH04RrN<br />
lOOJs1vlybqizM5zGyGJSQ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n3bF48cJzZa5r3Kcp4eKJR<br />
w2qA14tWAySLjhNlW3MRkn2dZbGgWwmXIssjethllysax/xjlbyKhLa5ML+3I8xroAhBhZlBSqG9<br />
kT0GbSWyy4mrbIQfukILEE5cxnYPhIybgdCvIVTvHCB8nBUybgbCfg2h5/MkARg+DkMGzmAYNDAc<br />
9UYjYPjI3pCBMxgOagxpgkpm2LRD6uY/iuvpZzO00i4aKdUYE4nL5E32SY2eqg83H+mQJY1ZxCau<br />
bpKQOnA9Uh7deMGwGISGDYRo/sqDXT1g/HURYlgMQqMaIYanD4RoWreRDItBaNxAaBAMd3v7v64N<br />
MSx6htaYBKu5f40XvW00Wfugep04mUWJmhV+7Rt4b05ME2uadz7cZ0me6vPza06ZPeogybz1XLx5<br />
xEGn19c3RNw+bhWrur6Zfq42L2hqX314T1zMEK/rikQZm4uS2ZXIBHOITzereJX+SfINQdkkFE5O<br />
HbunRs1rDa/6e1OyvLzI4k+K803VlmGhmgImrB/J+HP0L/UjZhoyZimKLpKvinMZCaIGmhdotpeU<br />
zLbifztU9B5h3cMXmpSRXrLHsAe6XI2GsjayMPqyppc3eTRds2ygH6vmn4oX6cfPf5PN1EBba0sk<br />
fGhtqZYclHah9Cc+XJ+v/mnOZn1QycHrk0KjdA5qb6ldlHrCIyWHhx6DCEN649qpG+QJyBOQJ7hz<br />
iCBPTNw9Pfaj+ugDQAh5orMVQp7o/iZDnuiOIeQJpYU/oMVCnrAhBHnChhDkCRtCkCd46bhUO0gG<br />
Mat/kCf2TXZflDwx/lKeKP1T3is1o7s8EZyc+CfGzaLNI+IQ8kSlG7HbADwi4BEBjwhIDtqBBZKD<br />
UrLrkfno1lkhOXSny5AcumMIycFGhiA52BCC5GBDCJKDDSFIDpAc9rjw75nsvijJwSPvj/suEWPj<br />
qX0ozWHQ972RCaN5Ls0BLhE7sR3kW4KIDRWDwqv9iNhAxMZRBL3AJQIuETyd2jNz+FaeOdAnoE9w<br />
9OjzRvhBn7BxS+gTNoSgT9gQgj4BfeKY9QkK9r+vT5BmoaJoKK7jMDEblAhj7JtEGBAoKCeFxhcp<br />
JZBSoi31BFJK7IYYNvzt6qDCHzMrBwQKCBQQKNpcbI/OkQcOFDbqBIHChhAEChtCEChsCEGggEDx<br />
wgUKWk2vsnhWG3vSeXLqTC1Y6Hyenl+JFe90ttIyiMN85AVqdVKde6ZMCWHymFJqnpP+mHKEcj5S<br />
ldDTiB/7dYpSHXliRk8dAVJymraMpvtTenqU+PILtabMMHootaaZlNSCwtNTbCCGBVk96cU0s/pm<br />
Eh79+tKOqypZFLJ6Iqvn41IbIW2GSm78nf0bEMPS3b8BPiLdMYQEYyOHkGBsCEGCsSEECcaGECQY<br />
SDAvXILhFdd9WT29qoRKndaTlIjD+og8TnXgiz5ddEAQC4JY6hIlypJQdkRXx/lWru8s5aiQIZQd<br />
4eouT6ncAh8R+IjARwQ+IoyAg7IjlFSf6lTResFftDALBAob/YZAYUMIAgUEimMWKFpKnZJocViB<br />
IkBmT9Q6pQJIZQW3WkhArVNm9A+Ja995PRqiQ2fGDNGhM4Twiui+og+viO4YwivCRofgFWFDCKKD<br />
DSGIDjaEIDpAdDhm0aGl2Kl36GqnSO35q8iXuraBIpha1EHmDGTOQOYMWvniKtOuUl/WYZ0bow2a<br />
ei8yZ9C66b3y54BQbiQEiu7kGgJFdwwhUNioEwQKG0IQKGwIQaCwIQSBAgLFMQsULeVOvUPXO0Vq<br />
TwgUTlbI81QVRnZEEi7TbOIWECjaWDhSeyK1pybazkpklxN37PUpBRG9LHKhHZnpXVKO3RAoONBP<br />
54dRkVoQKFik6uyFAoGiO4YQKGzUCQKFDSEIFDaEIFDYEIJAAYHiiAWKXkttVO/AxVH9ntcfjEws<br />
yP5slsgr4XBBsomLEA+EeNR5OT9FGbFSr0cMFSEe8KBQkdYQKFbJqzA3IwYEiqXI8qgw6RggUGhf<br />
xe8c8AaBwkadIFDYEIJAYUMIAoUNIQgUECiOWaBoKY5KosVB80r4lFei7xu3DAgUKI4KD4p5Ydz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GpaAUGnvJ6c4XDrL7sjkJSl03L2DjksmKAV201zxVnmcpTGKSRSKC5xGHMOJ8aS<br />
GtHKRH1AVzaDj1bmIqNhQaq7NMj2VXVg8ZMB4otJOs0hdroG0i+hJP9n+2GYFJ69elh0+UcEy6UX<br />
FqCMBjMHSldnnTUtXYGJhn39Jt4AAAD//wMAUEsBAi0AFAAGAAgAAAAhALvlSJQFAQAAHgIAABMA<br />
AAAAAAAAAAAAAAAAAAAAAFtDb250ZW50X1R5cGVzXS54bWxQSwECLQAUAAYACAAAACEArTA/8cEA<br />
AAAyAQAACwAAAAAAAAAAAAAAAAA2AQAAX3JlbHMvLnJlbHNQSwECLQAUAAYACAAAACEA2cWVB4UT<br />
AAB7egEAHwAAAAAAAAAAAAAAAAAgAgAAY2xpcGJvYXJkL2RyYXdpbmdzL2RyYXdpbmcxLnhtbFBL<br />
AQItABQABgAIAAAAIQDG3/841AYAAOkbAAAaAAAAAAAAAAAAAAAAAOIVAABjbGlwYm9hcmQvdGhl<br />
bWUvdGhlbWUxLnhtbFBLAQItABQABgAIAAAAIQCcZkZBuwAAACQBAAAqAAAAAAAAAAAAAAAAAO4c<br />
AABjbGlwYm9hcmQvZHJhd2luZ3MvX3JlbHMvZHJhd2luZzEueG1sLnJlbHNQSwUGAAAAAAUABQBn<br />
AQAA8R0AAAAA" o:spid="_x0000_i1025" style="width: 405pt; height: 146.25pt; visibility: visible" type="#_x0000_t75"><font size="3"><font color="#000000"><font face="Calibri"><v:imagedata cropbottom="-5377f" cropleft="-1129f" cropright="-1551f" croptop="-4705f" o:title="" src="file:///C:\DOCUME~1\ARIANS~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image005.png"></v:imagedata><o:lock aspectratio="f" v:ext="edit"><img alt="" height="231" src="http://www.stijf.com/wordpress/wp-content/uploads/Merge.jpg" width="597" /></o:lock></font></font></font></v:shape></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">The main requirement is of course that both data sets are ordered, before the join takes place. If that is the case, this is probably the most efficient join mechanism. It can handle all kinds of join comparisons, including range comparisons. </font></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span lang="EN-CA"><font color="#4f81bd" face="Cambria" size="4">Back to efficient SQL</font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">Now it is time to go back to the main focus of this article. How to write efficient SQL. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">We have seen how Oracle can access data and join it together. It is the job of the Oracle Optimizer to find out the most efficient way to do that, for a given query. It does this based on statistics on the tables and indexes. It is not in the scope of this article to discuss how to gather statistics. But we will see the use of several of the statistics. These statistics include (but are not limited to) the number of rows in the table, the number of blocks, the average row length, etc. For an index, they include (but are not limited to) the number of leaf blocks, the number of keys per leaf block, the number of datablocks in the table per key, etc. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">In an ideal world, we would be able to trust the optimizer to do the right thing all the time. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">However, we live in an imperfect world, and the Oracle Optimizer does not always have perfect information about the data or your query. Either the statistics might not be up to date, or they might not include some dependencies within the data. Also your query might not give the optimizer all the information that you have. (see the first example in this article, where we can give the optimizer extra information by adding a predicate). </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">Consider this query: </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">Select * From<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">Tiny<span style="mso-spacerun: yes">&nbsp; </span>T, &#8211;7089 rec<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">Small S<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>&#8211; 71151 Rec<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">Where t.Object_id = s.Object_id;<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">Which explain plan is more efficient: </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">0 SELECT STATEMENT<span style="mso-spacerun: yes">&nbsp;&nbsp; </span><o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">1<span style="mso-spacerun: yes">&nbsp; </span>HASH JOIN<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">2<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>TABLE ACCESS FULL <span style="mso-spacerun: yes">&nbsp;</span>TINY <o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">3<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>TABLE ACCESS FULL <span style="mso-spacerun: yes">&nbsp;</span>SMALL<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><font size="3"><font face="Calibri"><font color="#000000"><span lang="EN-CA">Or:</span><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p></o:p></span></font></font></font></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">0 SELECT STATEMENT<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">1<span style="mso-spacerun: yes">&nbsp; </span>TABLE ACCESS BY INDEX ROWID SMALL<span style="mso-spacerun: yes">&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;</span><o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">2<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>NESTED LOOPS<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">3<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>TABLE ACCESS FULL<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TINY<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><font color="#000000">4<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>INDEX RANGE SCAN<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>SMALL_IDX<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">The first explain plan uses a Hash Join, with Tiny as the Build Table. The second uses a Nested Loops Join, with Tiny as the Inner Table. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">I hope you have decided that you don&rsquo;t know which one is the most efficient. Because you cannot know based on the information you have. If I selected 2 non-overlapping sets of data, the Nested Loop Join might be more efficient.<span style="mso-spacerun: yes">&nbsp; </span>It would scan Tiny for 7089 records, then do 7089 index lookups on Small (without result), so it would need to read approximately 7089+7089=14178 blocks.</font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">If the 2 sets would have a 1-n relationship, and every occurrence of object_id in Small is also in Tiny, both tables would need to be read fully and the Hash Join would be more efficient. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3">That means that to write efficient SQL, you&rsquo;ll need to have an understanding of the data. And you must have considered the optimal execution plan for your query. When you write your query, keep in mind the mantra in first part of this article. Less is Better, More is Better. You want to give Oracle as much information as possible, and you want to get as small as possible result sets. </font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">The last part that we will do in this part, is to look at the</span></font></span></p>
<h2 style="margin: 10pt 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA"><font color="#4f81bd" face="Cambria" size="4">Explain plan</font></span></font></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">To see what Oracle will do when executing a query, you can make an explain plan. Many tools have built-in options to show explain plans on queries. Alternatively, you can use the Oracle commands:</span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">SQL&gt; Explain plan for<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><span style="mso-spacerun: yes">&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp; </span>Select * From<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><span style="mso-spacerun: yes">&nbsp; </span>3<span style="mso-spacerun: yes">&nbsp; </span>Tiny<span style="mso-spacerun: yes">&nbsp; </span>T, &#8211;7089 rec<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><span style="mso-spacerun: yes">&nbsp; </span>4<span style="mso-spacerun: yes">&nbsp; </span>Small S<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>&#8211; 71151 Rec<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><span style="mso-spacerun: yes">&nbsp; </span>5<span style="mso-spacerun: yes">&nbsp; </span>Where t.Object_id = s.Object_id;<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">Explained.<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">SQL&gt; select * from table( dbms_xplan.display() );<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">PLAN_TABLE_OUTPUT<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">Plan hash value: 803478362<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">| Id<span style="mso-spacerun: yes">&nbsp; </span>| Operation<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>| Name<span style="mso-spacerun: yes">&nbsp; </span>| Rows<span style="mso-spacerun: yes">&nbsp; </span>| Bytes | Cost (%CPU)| Time<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>|<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">|<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>0 | SELECT STATEMENT<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>|<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>|<span style="mso-spacerun: yes">&nbsp; </span>7089 |<span style="mso-spacerun: yes">&nbsp; </span>1287K|<span style="mso-spacerun: yes">&nbsp; </span>1264<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>(1)| 00:00:16 |<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">|*<span style="mso-spacerun: yes">&nbsp; </span>1 |<span style="mso-spacerun: yes">&nbsp; </span>HASH JOIN<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>|<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>|<span style="mso-spacerun: yes">&nbsp; </span>7089 |<span style="mso-spacerun: yes">&nbsp; </span>1287K|<span style="mso-spacerun: yes">&nbsp; </span>1264<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>(1)| 00:00:16 |<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">|<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>2 |<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>TABLE ACCESS FULL| TINY<span style="mso-spacerun: yes">&nbsp; </span>|<span style="mso-spacerun: yes">&nbsp; </span>7089 |<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>650K|<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>213<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>(0)| 00:00:03 |<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">|<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>3 |<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>TABLE ACCESS FULL| SMALL | 71151 |<span style="mso-spacerun: yes">&nbsp; </span>6392K|<span style="mso-spacerun: yes">&nbsp; </span>1049<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>(1)| 00:00:13 |<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">PLAN_TABLE_OUTPUT<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">Predicate Information (identified by operation id):<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>1 &#8211; access(&quot;T&quot;.&quot;OBJECT_ID&quot;=&quot;S&quot;.&quot;OBJECT_ID&quot;)<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">15 rows selected.</span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">I took the previous query, and ran an explain plan on it. First I should tell you how I created tiny and small, so you can verify: </span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">create table tiny as select * from dba_objects where mod(object_id,10)=0;<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">create table small as select * from dba_objects;<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">create index tiny_idx on tiny(object_id);<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">create index small_idx on small(object_id);<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">Analyze Table Tiny Compute Statistics;<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt">analyze table small compute statistics;<o:p></o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">You can see that both tables were created from dba_objects and tiny is a subset of small. Therefore a Hash Join makes most sense. </span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">Let&rsquo;s take a closer look at the explain plan now. Keep in mind that all the numbers are estimates from the optimizer. They are based on the statistics available, and the runtime numbers might be completely different. </span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">The execution starts at the rows furthest right. And top down. In this case that means that we start with a Full Table Scan of Tiny. Then we do a Full Table Scan of Small, and finally we Hash join the 2 sets together. </span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">The result of the Hash Join is returned, and becomes the result of the query (Select).</span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">Let&rsquo;s take a closer look at the Full Table Scans. After the name of the table, we see &lsquo;Rows&rsquo;,&rsquo;Bytes&rsquo;,&rsquo;Cost&rsquo; and &lsquo;Time&rsquo;. </span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">The &lsquo;Time&rsquo; is an estimate of the amount of time it will take to complete this step. It is useful in query tuning<span style="mso-spacerun: yes">&nbsp; </span>to see which step will take the most time.</span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">The &lsquo;Bytes&rsquo; are an estimate of the amount of data used to complete this step. I find it useful when a hash join is involved. Because when it exceeds my hash_area_size, Oracle will need a &lsquo;Multi-Pass Hash Join&rsquo;. </span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">The &lsquo;Cost&rsquo; is often used for query tuning, and people will try to &lsquo;tune down&rsquo; the cost. This makes sense, because the cost is an estimate for the amount of I/O Oracle needs to do for this step. However, there is a logical trap in this. </span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">Oracle has used the cost of different explain plans for the original query to decide the most efficient one. Now when we change the query, the cost can no longer be compared to the original query. After all, it is a different query. It will return a different result. Unless, of course there is some information about the data we are selecting, that we didn&rsquo;t give the optimizer initially. </span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">To me, it makes more sense to look at the &lsquo;Rows&rsquo;. This is the number of records Oracle expects from that step in the query. If this is very different from the number you are expecting, something is wrong. Either the statistics are outdated, or the Optimizer is missing some information that you have, or you are not selecting the data you are expecting. </span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA"><o:p>&nbsp;</o:p></span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><font color="#000000" face="Calibri" size="3"><span lang="EN-CA">In the query above, we see that Oracle has made the perfect assumptions. Tiny will return 7089 rows, Small will return 71151 rows and there is a 1-1 relationship<span style="mso-spacerun: yes">&nbsp; </span>between them. So the join will return one record for each record in Tiny. No use looking for a more efficient plan here. Unless again, we did not query what we are looking for.</span></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA"><o:p><font color="#000000" face="Calibri" size="3">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-CA" style="line-height: 115%; font-family: 'courier new'; font-size: 8pt"><o:p><font color="#000000">&nbsp;</font></o:p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stijf.com/wordpress/2010/03/writing-efficient-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selecting from custom types in (workflow) tables</title>
		<link>http://www.stijf.com/wordpress/2010/02/selecting-from-custom-types-in-workflow-tables/</link>
		<comments>http://www.stijf.com/wordpress/2010/02/selecting-from-custom-types-in-workflow-tables/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 10:16:44 +0000</pubDate>
		<dc:creator>Arian Stijf</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Workflow]]></category>
		<category><![CDATA[eBS]]></category>
		<category><![CDATA[collection]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[payload]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[type]]></category>
		<category><![CDATA[user_data]]></category>
		<category><![CDATA[wf_notification_out]]></category>

		<guid isPermaLink="false">http://www.stijf.com/wordpress/?p=389</guid>
		<description><![CDATA[&#160;
After a long silence, it&#8217;s time to write another blog entry. I received a request to write about Oracle Reports. And I think that will be a new series (Even though I didn&#8217;t finish the workflow series yet).&#160;
&#160;
But the last few days, I&#8217;ve been working on cleaning up workflow tables.&#160;
Most of these tables are very [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>After a long silence, it&rsquo;s time to write another blog entry. I received a request to write about Oracle Reports. And I think that will be a new series (Even though I didn&rsquo;t finish the workflow series yet).&nbsp;</p>
<p>&nbsp;</p>
<p>But the last few days, I&rsquo;ve been working on cleaning up workflow tables.&nbsp;</p>
<p>Most of these tables are very straightforward and you can find queries and descriptions in the workflow series. However, there are some more complex cases. There are the advanced queuing (aq) tables. And also some data hidden in wf_item_attribute_values for items started by the Business Event System (BES) (reminder to self: Write that article about BES too).</p>
<p>&nbsp;</p>
<p>In the aq-tables, the payload of the message (i.e. the data transferred by the message) is stored in a custom type.&nbsp;The same goes for &nbsp;the event_data in wf_item_attribute_values.&nbsp;In this article we&rsquo;ll see how we can get the data from those &lsquo;strange&rsquo; columns.&nbsp;</p>
<p>&nbsp;</p>
<p>Let us start with wf_item_attribute_values. Processes that are started from a business event, store the data from the originating business event in the column &lsquo;EVENT_VALUE&rsquo;. This has a type &lsquo;WF_EVENT_T&rsquo;. When you query it in a sql*plus session, you will see a huge column filled with something like:&nbsp;</p>
<p>&nbsp;</p>
<pre>EVENT_VALUE(PRIORITY, SEND_DATE, RECEIVE_DATE, CORRELATION_ID, PARAMETER_LIST(NAME, VALUE), EVENT_NA
----------------------------------------------------------------------------------------------------
WF_EVENT_T(0, &#39;17-SEP-09&#39;, NULL, NULL, WF_PARAMETER_LIST_T(WF_PARAMETER_T(&#39;TASK_ID&#39;, &#39;16719879&#39;), WF(&#39;ABORT_WORKFLOW&#39;, &#39;N&#39;), WF_PARAMETER_T(&#39;SUB_GUID&#39;, &#39;73BAB9A51BAF5307E04400144F687CA0&#39;)), &#39;oracle.ap, NULL, NULL)</pre>
<p>&nbsp;</p>
<p>The problem that many ebs-dba&rsquo;s are facing is how to select the data inside this column. In this case, it would be the task_id that we are interested in. Oracle delivers several API&#39;s for use in PL/SQL. But sometimes you want plain SQL.&nbsp;</p>
<p>One way to do it is to use a clever substr/instr construction or a regular expression. But the efficient way to do it, is to tell Oracle which info you want.&nbsp;</p>
<p>Let&rsquo;s take a look at the custom type. As mentioned, it is WF_EVENT_T. We can find the description in the DBA_TYPES table.</p>
<p>&nbsp;</p>
<pre>select owner,type_name,typecode,attributes,methods
from dba_types
where type_name=&#39;WF_EVENT_T&#39;;

OWNER                          TYPE_NAME                      TYPECODE                       ATTRIBUTES    METHODS
------------------------------ ------------------------------ ------------------------------ ---------- ----------
APPS                           WF_EVENT_T                     OBJECT                                 13         31</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>This tells us that the WF_EVENT_T is an object type.&nbsp;</p>
<p>We can find its attributes in DBA_TYPE_ATTRS:&nbsp;</p>
<pre>select owner,type_name,attr_name,attr_type_owner,attr_type_name,length
from dba_type_attrs
where type_name=&rsquo;WF_EVENT_T&rsquo;;

OWNER		TYPE_NAME	ATTR_NAME         	ATTR_TYPE_OWNER		ATTR_TYPE_NAME
---------	------------	-------------------	----------------	--------------
APPS   		WF_EVENT_T      CORRELATION_ID					VARCHAR2
APPS     	WF_EVENT_T      ERROR_MESSAGE       				VARCHAR2
APPS     	WF_EVENT_T      ERROR_STACK         				VARCHAR2
APPS     	WF_EVENT_T      ERROR_SUBSCRIPTION  				RAW
APPS     	WF_EVENT_T      EVENT_DATA          				CLOB
APPS     	WF_EVENT_T      EVENT_KEY					VARCHAR2
APPS     	WF_EVENT_T      EVENT_NAME          				VARCHAR2
APPS     	WF_EVENT_T      FROM_AGENT         	APPS			WF_AGENT_T
APPS     	WF_EVENT_T      PARAMETER_LIST    	APPS			WF_PARAMETER_LIST_T
APPS     	WF_EVENT_T      PRIORITY         				NUMBER
APPS     	WF_EVENT_T      RECEIVE_DATE     				DATE
APPS     	WF_EVENT_T     	SEND_DATE        				DATE
APPS     	WF_EVENT_T     	TO_AGENT         	APPS			WF_AGENT_T<span class="Apple-style-span" style="white-space: normal;">
</span></pre>
<p>You see that the attributes are defined including their datatype, which can be a seeded datatype (VARCHAR2) or a custom one (WF_PARAMETER_LIST_T). Now that we now the attributes of the type, we can select them directly. To select the &lsquo;PRIORITY&rsquo;, just use an extra qualifier:&nbsp;</p>
<pre>select v.event_value.priority
from   wf_item_attribute_values v
where  ROWNUM = 1;

EVENT_VALUE.PRIORITY
--------------------
                   0<span class="Apple-style-span" style="white-space: normal;">
</span></pre>
<p>But how about the &lsquo;PARAMETER_LIST&rsquo;? That is where the task_id was stored. Let&rsquo;s check the WF_PARAMETER_LIST_T definition:&nbsp;</p>
<pre>select owner,type_name,typecode,attributes,methods
from   dba_types
where  type_name =&#39;WF_PARAMETER_LIST_T&#39;;

OWNER	  TYPE_NAME         	TYPECODE  		ATTRIBUTES  METHODS
--------- -------------------	-------------------	----------- -------
APPS      WF_PARAMETER_LIST_T	COLLECTION       		  0       0
</pre>
<p>&nbsp;</p>
<p>This time, the type is a collection. We can find more info about a collection with:&nbsp;</p>
<pre>select type_name,coll_type,elem_type_owner,elem_type_name
from 	 dba_coll_types
where  type_name=&#39;WF_PARAMETER_LIST_T&#39;;

TYPE_NAME                      COLL_TYPE                      ELEM_TYPE_OWNER                ELEM_TYPE_NAME
------------------------------ ------------------------------ ------------------------------ --------------
WF_PARAMETER_LIST_T            VARYING ARRAY                  APPS                           WF_PARAMETER_T
</pre>
<p>&nbsp;</p>
<p>So the WF_PARAMETER_LIST_T is a Varray of WF_PARAMETER_T. Before we look at selecting from Varrays, we first check what WF_PARAMETER_T looks like:</p>
<pre>select owner,type_name,typecode,attributes,methods
from   dba_types
where  type_name =&#39;WF_PARAMETER_T&#39;;

OWNER	  TYPE_NAME           TYPECODE	ATTRIBUTES METHODS
--------- ------------------- ---------	---------- ----------
APPS  	  WF_PARAMETER_T      OBJECT             2          4
</pre>
<p>&nbsp;</p>
<p>That is an object type again. So we select:&nbsp;</p>
<pre>select owner,type_name,attr_name,attr_type_owner,attr_type_name
from   dba_type_attrs
where  type_name=&#39;WF_PARAMETER_T&#39;;

OWNER	TYPE_NAME             ATTR_NAME	ATTR_TYPE_OWNER	    ATTR_TYPE_NAME
--------- ------------------- --------- ------------------- --------------
APPS	WF_PARAMETER_T        NAME			    VARCHAR2
APPS	WF_PARAMETER_T	      VALUE			    VARCHAR2
</pre>
<p>&nbsp;</p>
<p>Ok. We now know the whole structure of the parameter list. Back to the Varray. &nbsp;A Varray (Varying Array) is of course an array structure. Since this is similar to a table structure, you can cast the Varray into a table. Then you use the casted table to select your data. Let&rsquo;s do that to get the names from the parameter list.</p>
<pre>select t.name
from   wf_item_attribute_values v
,      table(v.event_value.parameter_list) t
Where  v.event_value IS NOT NULL
And    ROWNUM = 1;

NAME
------------------------------
TASK_ID
</pre>
<p>&nbsp;</p>
<p>Now that&rsquo;s a neat trick. We can join our table to its own column!&nbsp;</p>
<p>In our case, we only have a task_id parameter. We could do the same again, to get the value of the parameter from the value column.</p>
<p>But to join wf_item_attribute_values to itself is a very expensive operation. Take a look at the explain plan:&nbsp;</p>
<pre>PLAN_TABLE_OUTPUT

-----------------------------------------------------------------------------------------------------------------
| Id  | Operation                           |  Name                     | Rows  | Bytes | Cost  | Pstart| Pstop |
-----------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT                    |                           |     1 |    62 |   432M|       |       |
|*  1 |  COUNT STOPKEY                      |                           |       |       |       |       |       |
|   2 |   NESTED LOOPS                      |                           |   207G|    11T|   432M|       |       |
|   3 |    PARTITION RANGE ALL              |                           |       |       |       |     1 |    77 |
|   4 |     PARTITION HASH ALL              |                           |       |       |       |     1 |     8 |
|*  5 |      TABLE ACCESS FULL              | WF_ITEM_ATTRIBUTE_VALUES  |    25M|  1453M|   948K|     1 |   616 |
|   6 |    COLLECTION ITERATOR PICKLER FETCH|                           |       |       |       |       |       |
-----------------------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   1 - filter(ROWNUM=1)
   5 - filter(SYS_OP_NOEXPAND(&quot;V&quot;.&quot;EVENT_VALUE&quot;) IS NOT NULL)

Note: cpu costing is off
</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>That can kind of hurt if it,were it not for the NL with a COUNT STOPKEY (Because of the rownum=1). The reason for the expensive plan, is because for every row from wf_item_attribute_values, Oracle needs to get the data from event_value. It basically does a carthesian join with itself.</p>
<p>So here is another way to get your data:&nbsp;</p>
<pre>select v.item_key
,      (select value
        from table(v.event_value.parameter_list) t
        where t.name=&#39;TASK_ID&#39; ) task_id
from   wf_item_attribute_values v
where  v.event_value is not null
and    rownum=1;

ITEM_KEY						TASK_ID
-------------------------------------------------	--------
oracle.apps.jtf.cac.task.createTask-155563676		16719879
</pre>
<p>&nbsp;</p>
<p>Now we use a scalar subquery, where Oracle will access only the event_value for the rows that will be returned to the user. You can see this in the explain plan by the collection iterator picklefetch (= the operation that collects the data from a collection type) being pushed up to just before the select.&nbsp;</p>
<pre>PLAN_TABLE_OUTPUT

---------------------------------------------------------------------------------------------------------------
| Id  | Operation                         |  Name                     | Rows  | Bytes | Cost  | Pstart| Pstop |
---------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT                  |                           |     1 |    60 |   948K|       |       |
|*  1 |  COLLECTION ITERATOR PICKLER FETCH|                           |       |       |       |       |       |
|*  2 |  COUNT STOPKEY                    |                           |       |       |       |       |       |
|   3 |   PARTITION RANGE ALL             |                           |       |       |       |     1 |    77 |
|   4 |    PARTITION HASH ALL             |                           |       |       |       |     1 |     8 |
|*  5 |     TABLE ACCESS FULL             | WF_ITEM_ATTRIBUTE_VALUES  |    25M|  1453M|   948K|     1 |   616 |
---------------------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   1 - filter(SYS_OP_ATG(VALUE(KOKBF$),1,2,2)=&#39;TASK_ID&#39;)
   2 - filter(ROWNUM=1)
   5 - filter(SYS_OP_NOEXPAND(&quot;SYS_ALIAS_1&quot;.&quot;EVENT_VALUE&quot;) IS NOT NULL)

Note: cpu costing is off
</pre>
<p>&nbsp;</p>
<p>Still expensive. But much better.</p>
<p>&nbsp;</p>
<p>So that will let us peek into the &nbsp;event_value column on wf_item_attribute values. Be aware that different processes will enter different parameters into the event_value column. But with the information above you should be able to understand how to select the data and use it in your own queries.&nbsp;</p>
<p>&nbsp;</p>
<p>Now let&rsquo;s take a look at the AQ-tables?&nbsp;</p>
<p>As I mentioned, they carry their payloads in custom types too. One that most ebs-dba&rsquo;s will have seen is WF_NOTIFICATION_OUT. When the workflow engine generates a notification, it will be stored in &lsquo;WF_NOTIFICATIONS&rsquo;. However, a message will be posted on &lsquo;WF_NOTIFICATION_OUT&rsquo; too. This message will be read by the workflow notification mailer, which will use it to get the relevant data from WF_NOTIFICATIONS.</p>
<p>&nbsp;</p>
<p>If you haven&rsquo;t run the notification mailer for a long time, you might want to clean up WF_NOTIFICATION_OUT a bit. There is a script available from Metalink to do the job. (There is also a quicker but unsupported way). But you might want to see the records in WF_NOTIFICATION_OUT related to WF_NOTIFICATIONS to decide if a cleanup is appropriate.&nbsp;</p>
<p>&nbsp;</p>
<p>Let&rsquo;s look at WF_NOTIFICATION_OUT:</p>
<pre>Name                    Null?    Type
----------------------- -------- ----------------
Q_NAME                           VARCHAR2(30)
MSGID                   NOT NULL RAW(16)
CORRID                           VARCHAR2(128)
PRIORITY                         NUMBER
STATE                            NUMBER
DELAY                            DATE
EXPIRATION                       NUMBER
TIME_MANAGER_INFO                DATE
LOCAL_ORDER_NO                   NUMBER
CHAIN_NO                         NUMBER
CSCN                             NUMBER
DSCN                             NUMBER
ENQ_TIME                         DATE
ENQ_UID                          NUMBER
ENQ_TID                          VARCHAR2(30)
DEQ_TIME                         DATE
DEQ_UID                          NUMBER
DEQ_TID                          VARCHAR2(30)
RETRY_COUNT                      NUMBER
EXCEPTION_QSCHEMA                VARCHAR2(30)
EXCEPTION_QUEUE                  VARCHAR2(30)
STEP_NO                          NUMBER
RECIPIENT_KEY                    NUMBER
DEQUEUE_MSGID                    RAW(16)
SENDER_NAME                      VARCHAR2(30)
SENDER_ADDRESS                   VARCHAR2(1024)
SENDER_PROTOCOL                  NUMBER
USER_DATA                        SYS.AQ$_JMS_TEXT _MESSAGE
</pre>
<p>&nbsp;</p>
<p>The regular AQ-information is there. And our payload in USER_DATA. This time it&rsquo;s an AQ-type.&nbsp;</p>
<p>Let&rsquo;s follow the same procedure:&nbsp;</p>
<pre>select type_name,typecode,attributes,methods
from   dba_types
where  type_name=&#39;AQ$_JMS_TEXT_MESSAGE&#39;;

TYPE_NAME                      TYPECODE                       ATTRIBUTES    METHODS
------------------------------ ------------------------------ ---------- ----------
AQ$_JMS_TEXT_MESSAGE           OBJECT                                  4         34
</pre>
<p>An object type. So let&rsquo;s see its attributes:&nbsp;</p>
<pre>select type_name,attr_name,attr_type_owner,attr_type_name
from   dba_type_attrs
where  type_name=&#39;AQ$_JMS_TEXT_MESSAGE&#39;;

TYPE_NAME                      ATTR_NAME                      ATTR_TYPE_OWNER                ATTR_TYPE_NAME
------------------------------ ------------------------------ ------------------------------ --------------
AQ$_JMS_TEXT_MESSAGE           HEADER                         SYS                            AQ$_JMS_HEADER
AQ$_JMS_TEXT_MESSAGE           TEXT_LEN                                                      INTEGER
AQ$_JMS_TEXT_MESSAGE           TEXT_LOB                                                      CLOB
AQ$_JMS_TEXT_MESSAGE           TEXT_VC                                                       VARCHAR2
</pre>
<p>&nbsp;</p>
<p>We can already read the text_len, text_lob and text_vc. The last 2 contain an XML with a reference to the notification. But the information that I want to show you is in the header. This is a type &lsquo;AQ$_JMS_HEADER&rsquo;. When we check this one, we see that it again is an object with these attributes:</p>
<pre>select type_name,typecode,attributes,methods
from   dba_types
where  type_name=&#39;AQ$_JMS_HEADER&#39;;

TYPE_NAME                      TYPECODE                       ATTRIBUTES    METHODS
------------------------------ ------------------------------ ---------- ----------
AQ$_JMS_HEADER                 OBJECT                                  7         31

select type_name,attr_name,attr_type_owner,attr_type_name
from   dba_type_attrs
where  type_name=&#39;AQ$_JMS_HEADER&#39;;

TYPE_NAME                      ATTR_NAME                      ATTR_TYPE_OWNER                ATTR_TYPE_NAME
------------------------------ ------------------------------ ------------------------------ -------
AQ$_JMS_HEADER                 APPID                                                         VARCHAR2
AQ$_JMS_HEADER                 GROUPID                                                       VARCHAR2
AQ$_JMS_HEADER                 GROUPSEQ                                                      INTEGER
AQ$_JMS_HEADER                 PROPERTIES                     SYS                            AQ$_JMS_USERPROPARRAY
AQ$_JMS_HEADER                 REPLYTO                        SYS                            AQ$_AGENT
AQ$_JMS_HEADER                 TYPE                                                          VARCHAR2
AQ$_JMS_HEADER                 USERID                                                        VARCHAR2
</pre>
<p>&nbsp;</p>
<p>As you can imagine, we need to drill down into &lsquo;PROPERTIES&rsquo;. The other attributes might or might not contain any data, depending on the notification. properties is a Varray of &lsquo;AQ$_JMS_USERPROPERTY&rsquo;:</p>
<pre>select type_name,typecode,attributes,methods
from   dba_types
where  type_name=&#39;AQ$_JMS_USERPROPARRAY&#39;;

TYPE_NAME                      TYPECODE                       ATTRIBUTES    METHODS
------------------------------ ------------------------------ ---------- ----------
AQ$_JMS_USERPROPARRAY          COLLECTION                              0          0

select type_name,coll_type,elem_type_owner,elem_type_name
from 	 dba_coll_types
where  type_name=&#39;AQ$_JMS_USERPROPARRAY&#39;;

TYPE_NAME                      COLL_TYPE                      ELEM_TYPE_OWNER                ELEM_TYPE_NAME
------------------------------ ------------------------------ ------------------------------ --------------------
AQ$_JMS_USERPROPARRAY          VARYING ARRAY                  SYS                            AQ$_JMS_USERPROPERTY
</pre>
<p>&nbsp;</p>
<p>One more level to check:&nbsp;</p>
<pre>select type_name,typecode,attributes,methods
from   dba_types
where  type_name=&#39;AQ$_JMS_USERPROPERTY&#39;;

TYPE_NAME                      TYPECODE                       ATTRIBUTES    METHODS
------------------------------ ------------------------------ ---------- ----------
AQ$_JMS_USERPROPERTY           OBJECT                                  5          0

select type_name,attr_name,attr_type_owner,attr_type_name
from   dba_type_attrs
where  type_name=&#39;AQ$_JMS_USERPROPERTY&#39;;

TYPE_NAME                      ATTR_NAME                      ATTR_TYPE_OWNER                ATTR_TYPE_NAME
------------------------------ ------------------------------ ------------------------------ -------
AQ$_JMS_USERPROPERTY           JAVA_TYPE                                                     INTEGER
AQ$_JMS_USERPROPERTY           NAME                                                          VARCHAR2
AQ$_JMS_USERPROPERTY           NUM_VALUE                                                     NUMBER
AQ$_JMS_USERPROPERTY           STR_VALUE                                                     VARCHAR2
AQ$_JMS_USERPROPERTY           TYPE                                                          INTEGER<span class="Apple-style-span" style="white-space: normal;">
</span></pre>
<p>&nbsp;</p>
<p>So let&rsquo;s see what properties we have. I just query the whole contents of properties for the first row in wf_notification_out (This particular system doesn&rsquo;t have a WF-mailer running. If it is running, chances are that you won&rsquo;t have any records in WF_NOTIFICATION_OUT).</p>
<pre>select p.*
from   (select *
        from wf_notification_out
        where rownum=1) n
,      table(n.user_data.header.properties) p;

NAME	              	TYPE  STR_VALUE	                                   NUM_VALUE JAVA_TYPE
----------------------- ----- -------------------------------------------- --------- ---------
BES_EVENT_NAME	      	  100 oracle.apps.wf.notification.send                              27
BES_EVENT_KEY	      	  100                                               39388680        27
BES_PRIORITY	      	  200                                                     50        23
BES_SEND_DATE	       	  100 2009/03/06 01:12:23		                            27
BES_RECEIVE_DATE	  100 2009/03/06 01:12:34		                            27
BES_FROM_AGENT	      	  100 WF_NOTIFICATION_OUT@TESTDB.STIJF.COM                          27
BES_ERROR_SUBSCRIPTION    100 C10E7C2EF71253C1E0340800208D03E1		           	    27
NOTIFICATION_ID	      	  100 39388680		                                            27
ROLE		       	  100 FND_RESP535:21704		                                    27
GROUP_ID		  100 39388680		                                            27
Q_CORRELATION_ID	  100 XDPWFSTD		                                            27
</pre>
<p>There you go. Among others, the &lsquo;NOTIFICATION_ID&rsquo; is there. It maps to the notification_id on &lsquo;WF_NOTIFICATIONS&rsquo;. And by now, we have seen enough to select it directly in our queries:</p>
<pre>select n.msgid,(select str_value
                from   table(n.user_data.header.properties)
		where  name=&#39;NOTIFICATION_ID&#39;) notification_id
from   wf_notification_out n
where  rownum=1;

MSGID			    	 NOTIFICATION_ID
-------------------------------- ---------------
64672D4985E57075E04400144F687CA0	39388680<span class="Apple-style-span" style="white-space: normal;">
</span></pre>
<p>That concludes this article. Based on the above, you will be able to select the data you want.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stijf.com/wordpress/2010/02/selecting-from-custom-types-in-workflow-tables/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New article on custom types available</title>
		<link>http://www.stijf.com/wordpress/2010/02/new-article-on-custom-types-available/</link>
		<comments>http://www.stijf.com/wordpress/2010/02/new-article-on-custom-types-available/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 17:57:57 +0000</pubDate>
		<dc:creator>Arian Stijf</dc:creator>
				<category><![CDATA[Internals]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Workflow]]></category>
		<category><![CDATA[eBS]]></category>

		<guid isPermaLink="false">http://www.stijf.com/wordpress/?p=384</guid>
		<description><![CDATA[I just wrote an item about selecting from the special column types in the workflow tables. (for example EVENT_VALUE in WF_ITEM_ATTRIBUTE_VALUE and how to select notification_id from the USER_DATA in WF_NOTIFICATION_OUT)
Didn&#39;t have any time to format it in HTML format yet. So for the moment it is only available in PDF format from the link-page [...]]]></description>
			<content:encoded><![CDATA[<p>I just wrote an item about selecting from the special column types in the workflow tables. (for example EVENT_VALUE in WF_ITEM_ATTRIBUTE_VALUE and how to select notification_id from the USER_DATA in WF_NOTIFICATION_OUT)</p>
<p>Didn&#39;t have any time to format it in HTML format yet. So for the moment it is only available in PDF format from the <a href="http://www.stijf.com/wordpress/about/link-page/">link-page</a> and from <a href="http://www.stijf.com/wordpress/PDF/Workflow object types.pdf">here</a>.&nbsp;</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stijf.com/wordpress/2010/02/new-article-on-custom-types-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle workflow for eBS DBA&#8217;s (Part 4b ;-)</title>
		<link>http://www.stijf.com/wordpress/2009/07/oracle-workflow-for-ebs-dbas-part-4b/</link>
		<comments>http://www.stijf.com/wordpress/2009/07/oracle-workflow-for-ebs-dbas-part-4b/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 17:15:54 +0000</pubDate>
		<dc:creator>Arian Stijf</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Workflow]]></category>
		<category><![CDATA[eBS]]></category>
		<category><![CDATA[abort]]></category>
		<category><![CDATA[abortprocess]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[resume]]></category>
		<category><![CDATA[resumeprocess]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[suspend]]></category>
		<category><![CDATA[suspendprocess]]></category>

		<guid isPermaLink="false">http://www.stijf.com/wordpress/?p=369</guid>
		<description><![CDATA[&#160;A reader pointed out that I didn&#8217;t fulfill my promise to write about suspend, resume and abort in part 4 of &#8216;Oracle workflow for eBS DBA&#8217;s.
&#160;
So to make up for that omission, I will first write a separate note about it here. Then I&#8217;ll incorporate it in the article at a later time.&#160;
&#160;
Let&#8217;s start with [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;A reader pointed out that I didn&#8217;t fulfill my promise to write about suspend, resume and abort in part 4 of &#8216;Oracle workflow for eBS DBA&#8217;s.</p>
<div>&nbsp;</div>
<div>So to make up for that omission, I will first write a separate note about it here. Then I&#8217;ll incorporate it in the article at a later time.&nbsp;</div>
<div>&nbsp;</div>
<div>Let&#8217;s start with the abort.&nbsp;</div>
<div>In part 3, we saw that we can get workflows in a state where they will never be able to continue again. We did this by setting the &#8216;On Revisit&#8217; property to ignore.&nbsp;</div>
<div>&nbsp;</div>
<div>The correct way to handle these workflows is to run a workflow background engine with parameter &#8216;process_stuck&#8217; set to &#8216;TRUE&#8217;. That will set the item status to &#8216;Error&#8217; and run the appropriate error process.&nbsp;</div>
<div>&nbsp;</div>
<div>But there may be reasons where you want to just abort the item, without error processing.&nbsp;</div>
<div>&nbsp;</div>
<div>For those situations Oracle provides the &#8216;wf_engine.abortprocess&#8217; API.&nbsp;</div>
<div>The API will set the status of the process to complete. If a result is needed, you can set this on the call to the API. It defaults to &#8216;#FORCE&#8217; (wf_engine.eng_force constant).</div>
<div>&nbsp;</div>
<div>Let&#8217;s see how this works. First I used the &#8216;MAIN_DBA_PROCESS&#8217; from part 3 of the series, and I set the &#8216;On Revisit&#8217; for the &#8216;LOOP_COUNTER&#8217; to &#8216;Ignore&#8217;.</div>
<div>Now when I run the process, we get this result:&nbsp;</div>
<div>&nbsp;</div>
<div>
<pre language="SQL">
INSTANCE_LABEL   FUNCTION                      BEGIN_DATE         END_DATE           STATUS   RESULT   OUTBOUND_QUEUE_ID
DBA_MAIN_PROCESS &nbsp;                             31-7-2009 12:36:58                   &nbsp;ACTIVE   #NULL&nbsp;
START            START                         31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE #NULL&nbsp;
INITIALIZE_FLOW  XXX_WF_DBA.init               31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE COMPLETE&nbsp;
COMPARETEXT      WF_STANDARD.COMPARE           31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE EQ&nbsp;
CHECK_INVALIDS   XXX_CHECK_INVALIDS            31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE Y&nbsp;
GET_INVALIDS     XXX_WF_UTILS.get_invalids     31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE &nbsp;
LOOPCOUNTER      WF_STANDARD.LOOPCOUNTER       31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE LOOP&nbsp;
PROCESS_INVALIDS XXX_WF_UTILS.process_invalids 31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE &nbsp;
DEFER            WF_STANDARD.DEFER             31-7-2009 12:37:33 31-7-2009 12:37:33 COMPLETE #NULL&nbsp;
AND              WF_STANDARD.ANDJOIN           31-7-2009 12:37:33                   &nbsp;WAITING &nbsp;
TRACK_FLOW-1     TRACK_FLOW_PROGRESS           31-7-2009 12:37:42 31-7-2009 12:37:42 COMPLETE &nbsp;</pre>
</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Now we can abort the item with the API:</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>
<pre language="SQL">
begin
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; wf_engine.abortprocess(itemtype=&gt;'DBA_TYPE'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,itemkey=&gt;'30'
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,process=&gt;'ROOT:DBA_MAIN_PROCESS');
end;</pre>
</div>
<div>&nbsp;</div>
<div>Note how we have to indicate that we want to abort the root process of the DBA_MAIN_PROCESS. The workflow engine needs to know unambiguously which process to abort. The way to do that is to set &#8216;process:&lt;activity&gt;&#8217; to indicate the process. In our case this would be &#8216;ROOT:DBA_MAIN_PROCESS&#8217;.</div>
<div>&nbsp;</div>
<div>And this is the result afterwards.&nbsp;</div>
<div>&nbsp;</div>
<div>
<pre language="SQL">
INSTANCE_LABEL FUNCTION BEGIN_DATE END_DATE STATUS RESULT OUTBOUND_QUEUE_ID
DBA_MAIN_PROCESS &nbsp;                             31-7-2009 12:36:58 31-7-2009 12:39:10 COMPLETE #FORCE&nbsp;
START            START                         31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE #NULL&nbsp;
INITIALIZE_FLOW  XXX_WF_DBA.init               31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE COMPLETE&nbsp;
COMPARETEXT      WF_STANDARD.COMPARE           31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE EQ&nbsp;
CHECK_INVALIDS   XXX_CHECK_INVALIDS            31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE Y&nbsp;
GET_INVALIDS     XXX_WF_UTILS.get_invalids     31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE &nbsp;
LOOPCOUNTER      WF_STANDARD.LOOPCOUNTER       31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE LOOP&nbsp;
PROCESS_INVALIDS XXX_WF_UTILS.process_invalids 31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE &nbsp;
DEFER            WF_STANDARD.DEFER             31-7-2009 12:37:33 31-7-2009 12:37:33 COMPLETE #NULL&nbsp;
AND              WF_STANDARD.ANDJOIN           31-7-2009 12:37:33 31-7-2009 12:39:10 COMPLETE #FORCE&nbsp;
TRACK_FLOW-1     TRACK_FLOW_PROGRESS           31-7-2009 12:37:42 31-7-2009 12:37:42 COMPLETE &nbsp;</pre>
</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Compare this with the result from running a background engine with parameter &#8216;process_stuck=&gt;TRUE&#8217;:</div>
<div>&nbsp;</div>
<div>
<pre language="SQL&gt;INSTANCE_LABEL FUNCTION BEGIN_DATE END_DATE STATUS RESULT OUTBOUND_QUEUE_ID
DBA_MAIN_PROCESS &nbsp;31-7-2009 12:36:58 &nbsp;ERROR #STUCK&nbsp;
START START 31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE #NULL&nbsp;
INITIALIZE_FLOW XXX_WF_DBA.init 31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE COMPLETE&nbsp;
COMPARETEXT WF_STANDARD.COMPARE 31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE EQ&nbsp;
CHECK_INVALIDS XXX_CHECK_INVALIDS 31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE Y&nbsp;
GET_INVALIDS XXX_WF_UTILS.get_invalids 31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE &nbsp;
LOOPCOUNTER WF_STANDARD.LOOPCOUNTER 31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE LOOP&nbsp;
PROCESS_INVALIDS XXX_WF_UTILS.process_invalids 31-7-2009 12:36:58 31-7-2009 12:36:58 COMPLETE &nbsp;
DEFER WF_STANDARD.DEFER 31-7-2009 12:37:33 31-7-2009 12:37:33 COMPLETE #NULL&nbsp;
AND WF_STANDARD.ANDJOIN 31-7-2009 12:37:33 &nbsp;WAITING &nbsp;
TRACK_FLOW-1 TRACK_FLOW_PROGRESS 31-7-2009 12:37:42 31-7-2009 12:37:42 COMPLETE &nbsp;&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&nbsp;&lt;/div&gt;
&lt;div&gt;&nbsp;&lt;/div&gt;
&lt;div&gt;The 'wf_engine.abortprocess' will also complete any subprocesses. Since ATG RUP7 a parameter &nbsp;is added to the API: Cascade. Be aware that the default value is 'False'. So when using the API with cascade=&gt;FALSE, you might have some child items hanging around.&nbsp;&lt;/div&gt;
&lt;div&gt;&nbsp;&lt;/div&gt;
&lt;div&gt;Now what would happen to processes that have a long running query or function still running at the time of the 'abortprocess'.&nbsp;&lt;/div&gt;
&lt;div&gt;&nbsp;&lt;/div&gt;
&lt;div&gt;You might be in for a less pleasant surprise. Since the engine running the item, will hold a lock on the wf_ tables involved. So the 'wf_engine.abortprocess'&nbsp;will wait on the lock. Which is probably not desirable.&lt;/div&gt;
&lt;div&gt;&nbsp;&lt;/div&gt;
&lt;div&gt;You can avoid this waittime with the last parameter for this function (verify_lock). When verify_lock=&gt;TRUE, then the abortprocess will check if there is&nbsp;a lock on the items involved, and come back with an error if that is the case:&nbsp;&lt;/div&gt;
&lt;div&gt;&nbsp;&lt;/div&gt;
&lt;div&gt;&lt;pre language=">
ORA-20002: 3150: Process 'DBA_TYPE/33' is being worked upon. Please retry the current request on the process later.
ORA-06512: at &quot;APPS.WF_CORE&quot;, line 300
ORA-06512: at &quot;APPS.WF_ENGINE&quot;, line 4528
ORA-06512: at line 2</pre>
</div>
<div>&nbsp;</div>
<div>Of course this error can be captured and handled as we saw in &#8216;Oracle workflow for eBS DBA&#8217;s (Part 4)&#8217;</div>
<div>&nbsp;</div>
<div>Then lets take a look at the &#8216;wf_engine.Suspend&#8217; function. This is basically a &#8216;pause&#8217;-API for a workflow item. It sets the active process to &#8216;SUSPEND&#8217;.&nbsp;</div>
<div>&nbsp;</div>
<div>The workflow engine will not pick it up any more until the wf_engine.resume API is called.&nbsp;</div>
<div>&nbsp;</div>
<div>Let&#8217;s see the resume and suspend with a small example. I used the same dba_control_process. After launching it, it will be deferred. Instead of running a background engine, we suspend it.&nbsp;</div>
<div>&nbsp;</div>
<div>
<pre language="SQL">
begin
&nbsp;&nbsp; &nbsp; wf_engine.suspend(itemtype=&gt;'DBA_TYPE',itemkey=&gt;'34');
end;</pre>
</div>
<div>&nbsp;</div>
<div>And the status becomes:</div>
<div>&nbsp;</div>
<div>
<pre language="SQL">
INSTANCE_LABEL      FUNCTION          BEGIN_DATE         END_DATE           STATUS   RESULT OUTBOUND_QUEUE_ID
DBA_CONTROL_PROCESS &nbsp;                 31-7-2009 18:30:45 &nbsp;                  SUSPEND  #NULL&nbsp;
START               START             31-7-2009 18:30:45 31-7-2009 18:30:45 COMPLETE #NULL&nbsp;
DEFER               WF_STANDARD.DEFER 31-7-2009 18:31:02 &nbsp;                  DEFERRED #NULL  6FFEFFF31C2604F5E0440003BAB3AD6B</pre>
</div>
<div>&nbsp;</div>
<div>The interesting thing is that the deferred status is still there. Including its queue_id. So when we run a background engine. We&#8217;ll see that it indeed picks up the item. It dequeues the message but leaves the status on deferred.&nbsp;</div>
<div>&nbsp;</div>
<div>Now when we resume the process:</div>
<div>&nbsp;</div>
<div>
<pre language="SQL">
begin
&nbsp;&nbsp; &nbsp;wf_engine.resume(itemtype=&gt;'DBA_TYPE',itemkey=&gt;'34');
end;</pre>
</div>
<div>&nbsp;</div>
<div>The function is performed, and the item continues as usual.</div>
<div>&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.stijf.com/wordpress/2009/07/oracle-workflow-for-ebs-dbas-part-4b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Workflow for eBS DBA&#8217;s (Part 1)</title>
		<link>http://www.stijf.com/wordpress/2009/07/oracle-workflow-for-ebs-dbas-part-1/</link>
		<comments>http://www.stijf.com/wordpress/2009/07/oracle-workflow-for-ebs-dbas-part-1/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 20:22:57 +0000</pubDate>
		<dc:creator>Arian Stijf</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Workflow]]></category>
		<category><![CDATA[eBS]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[definition]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[itemkey]]></category>
		<category><![CDATA[itemtype]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[workflow builder]]></category>

		<guid isPermaLink="false">http://www.stijf.com/wordpress/?p=349</guid>
		<description><![CDATA[For many Oracle eBS-DBA&#8217;s workflow is a strange and hardly understood module.Still it is widely used in 11i and 12i. So let&#8217;s dive into its workings in more detail.
This is part one of a so far unlimited series. Don&#8217;t be put off by the lack of code in this part. We first need to go [...]]]></description>
			<content:encoded><![CDATA[<p>For many Oracle eBS-DBA&rsquo;s workflow is a strange and hardly understood module.Still it is widely used in 11i and 12i. So let&rsquo;s dive into its workings in more detail.</p>
<p>This is part one of a so far unlimited series. Don&rsquo;t be put off by the lack of code in this part. We first need to go through the basics. In the next parts we&rsquo;ll get more action.<br />
During this series, I used an 11.5.10 instance on a 9.2.0.8 database. The basic statements in these articles will still hold for earlier and later versions, but small modifications may be needed. <br />
In this first part we go into the definitions and the basics of the Workflow engine. We start with some definitions, and then we build a simple basic workflow. <br />
We&rsquo;ll see how this relates to the wf_tables in the database.</p>
<address>The basic terminology <br />
&nbsp;</address>
<p>First. What is a workflow? A workflow is a sequence of functions and events that follow a certain path based on decisions made during the progress of the sequence. <br />
Most of us know the pictures from workflow builder. With the pictograms for functions joined together with lines. <br />
That set is a definition of a workflow. In the Oracle workflow world it is called a &lsquo;process&rsquo;. The nodes in the process can be functions, processes or notifications.</p>
<p>All these are grouped together in containers that Oracle called an &lsquo;Itemtype&rsquo;.&nbsp;The itemtype is very important, since it will become part of the primary key in the underlying tables.<br />
The actual workflows that are running according to the definition of the itemtype are called &lsquo;Items&acute;. The item is started as a specific process within an &lsquo;itemtype&rsquo;. And it is uniquely identified by the &lsquo;itemtype&rsquo; and an &lsquo;itemkey&rsquo;.</p>
<p>Every process consists of 2 or more nodes, which are joined together by transitions. At least 2 nodes are required, because a process needs a &rsquo;start&rsquo; and a &rsquo;stop&rsquo;-node. <br />
Ok. We talked enough for now. Let&rsquo;s build a process and find out the rest along the way. <br />
By the way, all the definitions above will be linked to a glossary later on.</p>
<address>Getting Started</address>
<p>To start building our process, we first need the itemtype. To create an itemtype, we use &lsquo;Workflow builder&rsquo;. In workflow builder, when we click the new button we are greeted with this screen:</p>
<p><img class="alignnone size-full wp-image-24" title="wf builder start" alt="wf builder start" width="389" height="159" src="http://www.stijf.com/wordpress/wp-content/uploads/2009/07/wf-builder-start.JPG" /></p>
<p>On right clicking the &lsquo;untitled&rsquo; map, we can create a new itemtype.</p>
<p><img class="alignnone size-full wp-image-26" title="New_item_type" alt="New_item_type" width="544" height="362" src="http://www.stijf.com/wordpress/wp-content/uploads/2009/07/New_item_type.JPG" /></p>
<p>Internal name is the unique name that will be used in the table keys for this itemtype and its items. It is limited to 8 characters. So choose wisely! <br />
Display name is the name that will be shown to users when they need to interact with items from this itemtype. <br />
The description&hellip;&hellip;.. you can guess that one. <br />
We will discuss the other three fields in a later article.</p>
<address>My first Itemtype</address>
<p>I choose to start building a flow that will do some DBA checks and tries to fix problems or notify the DBA if there is a problem. <br />
During the course of building this flow, we&rsquo;ll stumble on different features of the workflow engine. <br />
The first step is to build the itemtype. <br />
I called it: DBA_TYPE. <br />
With a display name: DBA Itemtype <br />
And a description: Itemtype to hold DBA processes and functions.</p>
<p><img class="alignnone size-full wp-image-27" title="dba_item_type" alt="dba_item_type" width="540" height="358" src="http://www.stijf.com/wordpress/wp-content/uploads/2009/07/dba_item_type.JPG" /></p>
<p>When you open your newly created itemtype, you see the components that can be created within this itemtype. <br />
You&rsquo;ll remember that the flow definition was called a process. So next we create a new &lsquo;Process&rsquo;:&nbsp;</p>
<p><img class="alignnone size-full wp-image-28" title="dba_main_process" alt="dba_main_process" width="536" height="354" src="http://www.stijf.com/wordpress/wp-content/uploads/2009/07/dba_main_process1.JPG" /></p>
<p>Because this is a process that we will only be calling from our client, we have no use for the result type at the moment. <br />
Later on, we&rsquo;ll see nested processes, where the result of a process will determine the direction of the calling process. <br />
When we go to the Process Detail (right click the process). We again have a virgin drawing board. <br />
This will be where the actual flow is created. Every process consists of activities (functions, notifications and processes) and the transitions between them (based on the results of the activities). <br />
Also every process has to start with a &lsquo;Start&rsquo; Activity and finish with an &lsquo;End&rsquo; activity. (Take care to avoid loose ends, since the end finalizes the flow and gives back control, or makes the flow purgeable). <br />
So first we create a new function to start our flow.</p>
<p><img class="alignnone size-full wp-image-29" title="start_1" alt="start_1" width="536" height="355" src="http://www.stijf.com/wordpress/wp-content/uploads/2009/07/start_1.jpg" /></p>
<p>Note the wf_standard.noop for the function. This is a dummy function because the only purpose of this node is to indicate the starting point for the process. <br />
Even though we named this function &lsquo;START&rsquo;, we still need to flag it as a &lsquo;Start&rsquo; function. That is in the node tab.</p>
<p><img class="alignnone size-full wp-image-30" title="start_2" alt="start_2" width="536" height="354" src="http://www.stijf.com/wordpress/wp-content/uploads/2009/07/start_2.JPG" /></p>
<p>We then create an &lsquo;END&rsquo; function in the same way.<br />
Finally we create our own function.<br />
&nbsp;</p>
<p>Now we have an item_type with 1 process, and 3 functions. It&rsquo;s time to connect the functions together.<br />
Right click START, and drag to INITIALIZE_FLOW. Then right click there and drag to END. The result should be like:&nbsp;&nbsp;</p>
<p><img class="alignnone size-full wp-image-32" title="process-1" alt="process-1" width="311" height="105" src="http://www.stijf.com/wordpress/wp-content/uploads/2009/07/process-1.JPG" /></p>
<p>Now we have a runnable flow.</p>
<p>You can even start it already, if you create an empty packaged function: &lsquo; XXX_WF_DBA.init&rsquo;.</p>
<p>But there is more work to be done.<br />
&nbsp;</p>
<p>First we are going to see how this is recorded in the wf_ tables in our database in part 2 of our series.<br />
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stijf.com/wordpress/2009/07/oracle-workflow-for-ebs-dbas-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Oracle Workflow for eBS DBA&#8217;s (Part 4)</title>
		<link>http://www.stijf.com/wordpress/2009/07/oracle-workflow-for-ebs-dbas-part-4/</link>
		<comments>http://www.stijf.com/wordpress/2009/07/oracle-workflow-for-ebs-dbas-part-4/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 15:37:40 +0000</pubDate>
		<dc:creator>Arian Stijf</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Workflow]]></category>
		<category><![CDATA[eBS]]></category>
		<category><![CDATA[background process]]></category>
		<category><![CDATA[continueflow]]></category>
		<category><![CDATA[defer]]></category>
		<category><![CDATA[launch]]></category>
		<category><![CDATA[wait]]></category>
		<category><![CDATA[waitforflow]]></category>

		<guid isPermaLink="false">http://www.stijf.com/wordpress/?p=329</guid>
		<description><![CDATA[&#160;Welcome to Part 4 of the series Oracle Workflow for eBS DBA&#8217;s.
The previous articles can be found here: 1, 2, 3
&#160;
In this part we will look at the controls for the workflow items. This includes &#8216;Defer thread&#8217;, &#8216;Block&#8217;, &#8216;Wait for flow&#8217; and &#8216;Wait&#8217;. Also we will see the suspend and abort functions from the workflow [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;Welcome to Part 4 of the series Oracle Workflow for eBS DBA&rsquo;s.</p>
<div>The previous articles can be found here: <a href="http://www.stijf.com/wordpress/2009/07/workflow-for-ebs-dbas-part-1/">1</a>, <a href="http://www.stijf.com/wordpress/2009/07/workflow-for-ebs-dbas-part-2/">2</a>, <a href="http://www.stijf.com/wordpress/2009/07/workflow-for-ebs-dbas-part-3/">3</a></div>
<div>&nbsp;</div>
<div>In this part we will look at the controls for the workflow items. This includes &lsquo;Defer thread&rsquo;, &lsquo;Block&rsquo;, &lsquo;Wait for flow&rsquo; and &lsquo;Wait&rsquo;. Also we will see the suspend and abort functions from the workflow engine.</div>
<div>These functions allow the execution of a workflow item to be halted, delayed or taken over from online processing to background processing. The &#8216;Wait for Flow&#8217; allows some interaction between different items.</div>
<div>&nbsp;</div>
<div>The first function we will look into is the &lsquo;Defer Thread&rsquo; (or short &lsquo;Defer&rsquo;).</div>
<div>&nbsp;</div>
<div>By default the session that starts an item executes all functions in that item. That means that long running activities are also executed online. The &lsquo;Defer&rsquo; function makes it possible to queue those long running activities to be executed by a background process.</div>
<div>&nbsp;</div>
<div>Let&rsquo;s start with a small process to show how this works. We create an item with only a function &lsquo;Defer&rsquo; (copied from the STANDARD itemtype). I created the following process:</div>
<p>&nbsp;<img class="alignnone size-full wp-image-330" title="process_defer" height="105" alt="process_defer" width="462" src="http://www.stijf.com/wordpress/wp-content/uploads/2009/07/process_defer.JPG" /></p>
<p>The &#8216;Defer Thread&#8217; has no node attributes.</p>
<p>When we run this process, and check the activity_statuses we get the following result:<br />
&nbsp;</p>
<pre language="SQL">
<div><span style="font-family: Courier New">select wpa.instance_label
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case when wpa.start_end is not null then wpa.start_end else wa.function end function
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wias.begin_date
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wias.end_date
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wias.activity_status status
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wias.activity_result_code result
,&nbsp;&nbsp;&nbsp;&nbsp; outbound_queue_id
from&nbsp; wf_item_activity_statuses wias
join&nbsp; wf_process_activities wpa
 &nbsp;&nbsp;&nbsp;&nbsp; on (wias.process_activity=wpa.instance_id)
join&nbsp; wf_activities wa
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on (wpa.activity_item_type=wa.item_type
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and wpa.activity_name=wa.name
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and wa.end_date is null)
join&nbsp; wf_activities_tl wat 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on (wa.item_type=wat.item_type 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and wa.name=wat.name 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and wa.version=wat.version 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and wat.language='US')
where wias.item_type='DBA_TYPE'
and&nbsp;&nbsp; wias.item_key='14'
order by wias.begin_date,wias.execution_time;
&nbsp;</span></div>
</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre language="SQL">
INSTANCE_LABEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BEGIN_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp; RESULT OUTBOUND_QUEUE_ID
------------------- ----------------- ------------------ ------------------ -------- ------ -----------------
DBA_CONTROL_PROCESS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009 14:02:46&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACTIVE&nbsp;&nbsp; #NULL 
START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009 14:02:46 24-7-2009 14:02:46 COMPLETE #NULL 
DEFER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WF_STANDARD.DEFER 24-7-2009 14:02:46&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEFERRED #NULL&nbsp; 6F728D74CA8142E6E0440003BAB3AD6B&nbsp;</pre>
<p>&nbsp;</p>
<p>Even though control was given back to the client, the item did not complete yet. The root is still active and the second function got status &lsquo;Deferred&rsquo;. This function is waiting to be processed by a background engine.<br />
Before we start a background engine, we first take a look at the deferring mechanism.</p>
<p>The WF_STANDARD.DEFER function only sets the result_code of the process_activity to &lsquo;DEFERRED&rsquo;. To be precise it is set to the constant &lsquo;wf_engine.eng_deferred&rsquo;. When the engine encounters this result_code, it will queue a message to the &lsquo;WF_DEFERRED_QUEUE_M&rsquo;queue with a payload of item_type, item_key and process_activity.&nbsp;<br />
&nbsp;</p>
<p>The table for the &lsquo;WF_DEFERRED_QUEUE_M&rsquo; is &lsquo;WF_DEFERRED_TABLE_M&rsquo;. The queue table can be queried directly or through the queuing view. (Which shows some translated columns). The key is the outbound_queue_id from the wf_item_activity_statuses:<br />
&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre language="SQL">
select queue
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; corr_id
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msg_priority
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msg_state
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enq_time
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def.user_data.itemtype
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def.user_data.itemkey
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def.user_data.actid
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; consumer_name
from applsys.AQ$WF_DEFERRED_TABLE_M def
where msg_id=(select outbound_queue_id
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      from wf_item_activity_statuses
&nbsp;&nbsp;&nbsp;           where item_type='DBA_TYPE'
&nbsp;&nbsp;&nbsp;           and item_key='14'
&nbsp;&nbsp;&nbsp;           and activity_status='DEFERRED');</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre language="SQL">
QUEUE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CORR_ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PRIO MSG_STATE ENQ_TIME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE&nbsp;&nbsp;&nbsp;&nbsp; KEY ACTID&nbsp; CONSUMER_NAME
------------------- ------------ ---- --------- ------------------ -------- --- ------ -------------
WF_DEFERRED_QUEUE_M APPSDBA_TYPE&nbsp;&nbsp;&nbsp; 1 READY&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009 14:02:44 DBA_TYPE 14&nbsp; 245513 APPS</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>No surprises there. The message is queued, and ready to be picked up.</p>
<p>The queue is read by the &lsquo;Workflow Background Process&rsquo;. In eBS this is a concurrent request under the &lsquo;System Administrator&rsquo; responsibility. We will discuss the parameters later in this article.</p>
<p>An alternative is to run a background engine directly from SQL. That is what we will do now.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre language="SQL">
Begin
&nbsp;&nbsp;&nbsp; Wf_engine.background (itemtype=&gt;&rsquo;DBA_TYPE&rsquo;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,process_deferred=&gt;TRUE
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,process_timeout=&gt;FALSE
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,process_stuck=&gt;FALSE);
End;</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>We will discuss the timeout and stuck parameters later in this article. And idem for 2 parameters for &lsquo;Treshold&rsquo;.</p>
<p>The background engine will dequeue the message from the queue, and process the workflow item as of that process_activity.</p>
<p>When we look at the &lsquo;wf_item_activity_statuses&rsquo; we notice something strange.</p>
<p>&nbsp;</p>
<pre language="SQL">
INSTANCE_LABEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BEGIN_DATE END_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp; RESULT
DBA_CONTROL_PROCESS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009&nbsp; 14:02:46 24-7-2009 14:20:43 COMPLETE #NULL 
START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009&nbsp; 14:02:46 24-7-2009 14:02:46 COMPLETE #NULL 
DEFER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WF_STANDARD.DEFER 24-7-2009&nbsp; 14:20:43 24-7-2009 14:20:43 COMPLETE #NULL 
END&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009&nbsp; 14:20:43 24-7-2009 14:20:43 COMPLETE #NULL</pre>
<p>&nbsp;</p>
<p>The begin_date for the &lsquo;Defer&rsquo; is the time that it was run by the background engine. This is because after dequeueing the workflow engine will restart the process starting with this process_activity. So it will actually be re-executed at that time. <br />
We can see that more clearly with an adjusted &lsquo;Track_flow_progress&rsquo; function (see part 2 of this series for the original). This version will return a completion code of &lsquo;wf_engine.eng_deferred&rsquo; to defer the item. We then replace the original &lsquo;Defer&rsquo; function with our &lsquo;track_flow_progress&rsquo; function.</p>
<p>&nbsp;</p>
<pre language="SQL">
CREATE OR REPLACE Procedure track_flow_progress (p_item_type IN VARCHAR2
&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;,p_item_key IN VARCHAR2
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;,p_actid IN NUMBER
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;,p_funcmode IN VARCHAR2
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;,p_result OUT VARCHAR2) IS
v_activity_name varchar2(30);
v_activity_version number;
v_process_name varchar2(30);
v_instance_label varchar2(30);
v_count number;
begin
&nbsp;&nbsp;&nbsp; select activity_name,wa.version,process_name,instance_label
&nbsp;&nbsp;&nbsp; into&nbsp;&nbsp; v_activity_name, v_activity_version, v_process_name, v_instance_label
&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; wf_process_activities wpa 
&nbsp;&nbsp;&nbsp; join&nbsp;&nbsp; wf_activities wa
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;     on (wpa.activity_item_type=wa.item_type 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    and wpa.activity_name=wa.name 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    and wa.end_date is null)
&nbsp;&nbsp;&nbsp; where&nbsp; wpa.instance_id=p_actid;
&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; insert into xxx_track_flow (id
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,item_type
&nbsp;                              ,item_key
                              &nbsp;,activity_name
                              &nbsp;,activity_version
                              &nbsp;,process_name
                              &nbsp;,instance_id
                              &nbsp;,instance_label
                              &nbsp;,funcmode)
&nbsp;&nbsp; values (xxx_track_flow_s.nextval
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,p_item_type        &nbsp; ,p_item_key
&nbsp;         ,v_activity_name
&nbsp;         ,v_activity_version
&nbsp;         ,v_process_name
&nbsp;         ,p_actid
&nbsp;         ,v_instance_label
&nbsp;         ,p_funcmode
          );

&nbsp;&nbsp;&nbsp; select count(*)
&nbsp;&nbsp;&nbsp; into&nbsp;&nbsp; v_count 
&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; xxx_track_flow x
&nbsp;&nbsp;&nbsp; where&nbsp; item_type=p_item_type
&nbsp;&nbsp;&nbsp; and&nbsp;&nbsp;&nbsp; item_key=p_item_key
&nbsp;&nbsp;&nbsp; and&nbsp;&nbsp;&nbsp; instance_id=p_actid;

&nbsp;&nbsp;&nbsp; if v_count=1 then
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; p_result:=wf_engine.eng_deferred;
&nbsp;&nbsp;&nbsp; end if;
&nbsp; end;
/</pre>
<p>&nbsp;</p>
<p>Let&rsquo;s see what happens when we put this instead of the standard &lsquo;Defer&rsquo;<br />
&nbsp;</p>
<p>&nbsp;<img class="alignnone size-full wp-image-331" title="process_defer2" height="105" alt="process_defer2" width="393" src="http://www.stijf.com/wordpress/wp-content/uploads/2009/07/process_defer2.JPG" /></p>
<p>&nbsp;</p>
<pre language="SQL">
begin
&nbsp; wf_engine.launchprocess(itemtype=&gt;'DBA_TYPE',itemkey=&gt;'15',process=&gt;'DBA_CONTROL_PROCESS');
end;</pre>
<p>&nbsp;</p>
<p>We can confirm that the process is deferred:</p>
<p>&nbsp;</p>
<pre language="SQL">
INSTANCE_LABEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BEGIN_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp; RESULT 
DBA_CONTROL_PROCESS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009 17:44:32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACTIVE&nbsp;&nbsp; #NULL 
START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009 17:44:32 24-7-2009 17:44:32 COMPLETE #NULL 
TRACK_FLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TRACK_FLOW_PROGRESS 24-7-2009 17:44:32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEFERRED #NULL</pre>
<p>&nbsp;</p>
<p>The track_flow_progress function has executed once:</p>
<p>&nbsp;</p>
<pre language="SQL">
select count(*)
from&nbsp;&nbsp; xxx_track_flow
where&nbsp; item_type=&rsquo;DBA_TYPE&rsquo; 
and&nbsp;&nbsp;&nbsp; item_key=&rsquo;15&rsquo;;</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre language="SQL">
COUNT(*)
--------
1</pre>
<p>&nbsp;</p>
<p>Now when we run the background engine. And check again:</p>
<p>&nbsp;</p>
<pre language="SQL">
INSTANCE_LABEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BEGIN_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp; RESULT 
DBA_CONTROL_PROCESS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009 17:44:32 24-7-2009 17:57:56 COMPLETE #NULL 
START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009 17:44:32 24-7-2009 17:44:32 COMPLETE #NULL 
TRACK_FLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TRACK_FLOW_PROGRESS 24-7-2009 17:57:56 24-7-2009 17:57:56 COMPLETE #NULL 
END&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009 17:57:56 24-7-2009 17:57:56 COMPLETE #NULL</pre>
<p>&nbsp;</p>
<p>And &lsquo;track_flow_progress&rsquo;:</p>
<p>&nbsp;</p>
<pre language="SQL">
ID ITEM_TYPE KEY ACTIVITY_NAME VERSION PROCESS_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INSTANCE INSTANCE_LABEL FUNCMODE
174 DBA_TYPE 15&nbsp; TRACK_FLOW&nbsp;&nbsp;&nbsp; 35&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBA_CONTROL_PROCESS 245549&nbsp;&nbsp; TRACK_FLOW&nbsp;&nbsp;&nbsp;&nbsp; RUN175 DBA_TYPE 15&nbsp; TRACK_FLOW&nbsp;&nbsp;&nbsp; 35&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBA_CONTROL_PROCESS 245549&nbsp;&nbsp; TRACK_FLOW&nbsp;&nbsp;&nbsp;&nbsp; RUN</pre>
<p>&nbsp;</p>
<p>The flow has completed now, and you can see the 2 calls to Track_flow_progress. <br />
This is something that you need to be aware of, whenever an issue arises with a function that defers itself.</p>
<p>Now let&rsquo;s look at the &lsquo;costing&rsquo;-model for the workflow engine. The goal of the background engines is to process activities with a long runtime, or that need heavy resources. <br />
As we saw, the call to the background engine picks up all deferred items for a certain item_type. Especially with multiple or complex processes within an item_type, it might be convenient to make a further split.<br />
This is done by assigning costs to different activities. Originally the cost is meant to be the runtime of an activity in seconds. (In workflow builder. It is stored in microseconds in the database). <br />
When calling the background process, you can enter 2 parameters: <br />
Mintreshold and maxtreshold.<br />
The background engine will only process activities until the next defer. It does not matter if it is within the cost range of the background engine. The item will be deferred, and wait for the next run of an eligible background engine.</p>
<p>This is a good time to show the versioning of the workflow engine in action. We investigated the versioning system of the workflow in part 1 (and 2). Where we saw that the workflow will always follow the same process definition. <br />
We can now see that this also goes for the activity_level. When we update the cost of an activity, while an item is active, the&nbsp;background engine will still use the original cost. Consider this:</p>
<p>I put a cost of 10 (seconds) to our&nbsp; &lsquo;Track_flow_progress&rsquo; activity:<br />
&nbsp;</p>
<input type="image" height="354" width="536" src="http://www.stijf.com/wordpress/wp-content/uploads/item_cost1.JPG" />
<p>When we run an item now, it is deferred on the &lsquo;Track_flow_progress&rsquo; activity. Deferring an item automatically means that the workflow engine will commit. (After all, the queue message needs to be visible to the background engine).</p>
<p>&nbsp;</p>
<pre language="SQL">
INSTANCE_LABEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COST FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BEGIN_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp; RESULT
------------------- ---- ------------------- ------------------ ------------------ -------- ------
DBA_CONTROL_PROCESS 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009 20:12:51&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACTIVE&nbsp;&nbsp; #NULL 
START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009 20:12:51 24-7-2009 20:12:51 COMPLETE #NULL 
TRACK_FLOW-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1000 TRACK_FLOW_PROGRESS 24-7-2009 20:12:51&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEFERRED</pre>
<p>&nbsp;</p>
<p>While the first item is deferred, I increased the cost of the activity to 20:</p>
<p>
<input type="image" height="354" width="536" src="http://www.stijf.com/wordpress/wp-content/uploads/item_cost2.JPG" />&nbsp;</p>
<p>And started another item. This item is also deferred:</p>
<p>&nbsp;</p>
<pre language="SQL">
INSTANCE_LABEL      COST ITEM_KEY FUNCTION            BEGIN_DATE         END_DATE           STATUS   RESULT
DBA_CONTROL_PROCESS    0 17&nbsp;                          24-7-2009 20:13:01&nbsp;                   ACTIVE   #NULL
START                  0 17       START               24-7-2009 20:13:01 24-7-2009 20:13:01 COMPLETE #NULL
TRACK_FLOW          2000 17       TRACK_FLOW_PROGRESS 24-7-2009 20:13:01&nbsp;                   DEFERRED
&nbsp;</pre>
<p>&nbsp;</p>
<p>Now when I run a background engine with minthreshold 0 and maxthreshold 1100 it nicely picks up the item with key &#8216;16&#8242;. Only when the background engine is run with a maxthreshold of 2000 or more, it runs the item with key &#8216;17&#8242;.</p>
<p>One final thing to mention about cost, is that the &lsquo;online&rsquo; workflow engine will not defer activities with a cost under 50 microseconds.&nbsp; (0.50 in workflow builder). <br />
You can change this threshold by adjusting wf_engine.threshold. In a pl/sql procedure call: wf_engine.threshold:= n;</p>
<p>All items launched with this setting, will use the adjusted threshold. Anything above this threshold needs to be picked up by the background engine.</p>
<p>Let&rsquo;s take a look at the background engine then. We already saw that it uses the WF_DEFERRED_QUEUE_M to select activities to process.</p>
<p>But a common problem in eBS environments is the long run time of the background processes. <br />
The first point of action would be to purge your obsolete workflow data. Try to use the concurrent program from eBS to do that. In a later part of this series, we will look at the purging mechanism and suggest some ways to optimize it. <br />
But if after the purging the background engine still runs for a long time, some other factors might be involved. <br />
A common issue is with processes that are dependent on some checks. For example, you might check if a condition is true. And if not, defer the process without a timeout. Every time the workflow background engine runs this function, it will be deferred again. Causing it to be re-queued for the background engine. Ultimately causing the background engine to get in a loop on this activity. Rather than deferring these activities, the developer should use a &lsquo;Block&rsquo;, or preferably the &lsquo;Business Event System&rsquo;. Using a &lsquo;Wait&rsquo; with sufficient time-out time might also be an option.</p>
<p>A similar thing can happen with time-out values with very short wait times.</p>
<p>When you notice a high CPU usage for QMON (QMNx), it might be time to coalesce the AQ IOT&rsquo;s (Index Organized Tables). At the time of writing Oracle published note: 271855.1 on Metalink to do this.</p>
<p>&nbsp;</p>
<p>So far for the deferred function. Let&rsquo;s take a look at the next control function: Block. <br />
The block function is also available from the &lsquo;STANDARD&rsquo; itemtype. It holds your item until the wf_engine.completeactivity API is called. <br />
Originally this was developed to let the item wait for a call from an external system. But with the arrival of BES (Business Event System), which we&rsquo;ll discuss later in this series, it&rsquo;s usefulness has decreased.</p>
<p>However, the function is still found in lots of places. So we&rsquo;ll look at the internals. <br />
The block function is a call to &lsquo;WF_STANDARD.BLOCK&rsquo;. This procedure returns a resultcode of wf_engine.eng_notified. In wf_item_activity_statuses the activity_status of the process_activity will be &lsquo;NOTIFIED&rsquo;.<br />
This status is also used for Notifications (see next part in the series), when a reply from the user is expected. Since there is no notification, the process_activity cannot continue.</p>
<p>I changed the &lsquo;Control Process&rsquo; to include a &lsquo;Block&rsquo; activity as follows:&nbsp;<br />
&nbsp;</p>
<input type="image" height="105" width="397" src="http://www.stijf.com/wordpress/wp-content/uploads/item_block.JPG" />
<p>Now when we launch an item, we see that it will hold on the block.</p>
<p>&nbsp;</p>
<pre language="SQL">
INSTANCE_LABEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COST FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BEGIN_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp; RESULT
DBA_CONTROL_PROCESS 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009 20:55:00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACTIVE&nbsp;&nbsp; #NULL 
START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24-7-2009 20:55:00 24-7-2009 20:55:00 COMPLETE #NULL 
BLOCK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; WF_STANDARD.BLOCK 24-7-2009 20:55:00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NOTIFIED&nbsp;</pre>
<p>&nbsp;</p>
<p>To progress this item we now have to call the API: &lsquo;wf_engine.completeactivity&rsquo;. This API will initiate a workflow engine to continue the item.</p>
<p>The parameters for the API besides itemtype and itemkey are activity and result. <br />
Activity is a concatenation of the process_name, &lsquo;:&rsquo; and the instance_label from wf_process_activities.</p>
<p>In our case the call would be:</p>
<p>&nbsp;</p>
<pre language="SQL">
begin
wf_engine.completeactivity(itemtype=&gt;'DBA_TYPE'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,itemkey=&gt;'20'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,activity=&gt;'DBA_CONTROL_PROCESS:BLOCK'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,result=&gt;wf_engine.eng_completed);
end;</pre>
<p>&nbsp;</p>
<p>When the activity has a result type, the result has to match one of the lookup codes in the result type. Otherwise any value is allowed, even tough it is a good habit to use the result codes in use by the wf_engine.</p>
<p>So what happens when an item does not get&nbsp; the &lsquo;CompleteActivity&rsquo; call? Since the &lsquo;Block&rsquo; is designed for External Completion, it is not unlikely that an error in the external system will cause the &lsquo;CompleteActivity&rsquo; not to be called. In that case the item will be in the &lsquo;Notified&rsquo; state forever.</p>
<p>For these situations, you can put a &lsquo;TimeOut&rsquo; on the process activity. A Time-out is either an absolute timestamp obtained from an item_attribute or a relative time set on the process_activity. <br />
For this example, I set a relative time of 5 minutes on the &lsquo;Block&rsquo; activity:<br />
&nbsp;</p>
<p>&nbsp;<br />
<input type="image" height="355" width="537" src="http://www.stijf.com/wordpress/wp-content/uploads/timeout1.JPG" /></p>
<p>And of course an extra transition for the &lsquo;Time out&rsquo;, to a second &lsquo;End&rsquo;&nbsp; node.</p>
<p>Now when we run the process, we see that the &lsquo;Due_date&rsquo; column in WF_ITEM_ACTIVITY_STATUSES has been set:<br />
&nbsp;</p>
<p>&nbsp;</p>
<pre language="SQL">
INSTANCE_LABEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COST FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BEGIN_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp; RESULT DUE_DATE
DBA_CONTROL_PROCESS 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25-7-2009 17:26:05&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACTIVE&nbsp;&nbsp; #NULL 
START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25-7-2009 17:26:05 25-7-2009 17:26:05 COMPLETE #NULL 
BLOCK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; WF_STANDARD.BLOCK 25-7-2009 17:26:05&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NOTIFIED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25-7-2009 17:31:05</pre>
<p>&nbsp;</p>
<p>&nbsp;<br />
It is set for exactly 5 minutes after the begin_date of the process_activity.</p>
<p>&nbsp;</p>
<p>After 5 minutes we can start a background process. With parameter &lsquo;process_timeout=&gt;TRUE&rsquo;, or no parameter, since TRUE is the default.</p>
<p>Then we see that it has ran through the timeout transition:<br />
&nbsp;</p>
<p>&nbsp;</p>
<pre language="SQL">
INSTANCE_LABEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COST FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BEGIN_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp; RESULT&nbsp;&nbsp; DUE_DATE
DBA_CONTROL_PROCESS 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25-7-2009 17:26:05 25-7-2009 17:31:55 COMPLETE #NULL 
START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25-7-2009 17:26:05 25-7-2009 17:26:05 COMPLETE #NULL 
BLOCK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; WF_STANDARD.BLOCK 25-7-2009 17:26:05 25-7-2009 17:31:55 COMPLETE #TIMEOUT 25-7-2009 17:31:05
END-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; END&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25-7-2009 17:31:55 25-7-2009 17:31:55 COMPLETE #NULL</pre>
<p>&nbsp;</p>
<p>Note that this time, the begin_date of the &lsquo;block&rsquo; activity did not change. This is because the activity was not rerun. It was just cut-off, and the engine picked up at the &lsquo;timeout&rsquo; transition.</p>
<p>Even when the timeout period has expired, it is still possible to call the &lsquo;CompleteActivity&rsquo; API. In that case, the workflow engine will still take the default transition, instead of the timeout one. <br />
But once the item has gone through the timeout transition, it is not possible to call the &lsquo;CompleteActivity&rsquo; API anymore. Trying to do so will result in a</p>
<p>&lsquo;ORA-20002: 3133: Activity instance &lsquo;DBA_CONTROL_PROCESS:BLOCK&rsquo; is not a notified activity for item &lsquo;DBA_TYPE/21&rsquo;.</p>
<p>This&nbsp; error is usually innocent. It just means that the item has progressed beyond the process activity that is called to be completed. And a time-out is the most common cause. Of course all programs calling the &lsquo;CompleteActivity&rsquo; API need error handling for this.</p>
<p>At this point, I&rsquo;ll give a short example of the error handling. In a later part in this series, we&rsquo;ll go deeper into workflow troubleshooting and error handling.</p>
<p>Now when we call the &lsquo;CompleteActivity&rsquo; API for the item above, we run the following:</p>
<p>&nbsp;</p>
<pre language="SQL">
declare
&nbsp;&nbsp;&nbsp; v_errorname varchar2(30);
&nbsp;&nbsp;&nbsp; v_errormsg&nbsp; varchar2(2000);
&nbsp;&nbsp;&nbsp; v_errorstack varchar2(32000);
&nbsp;&nbsp;&nbsp; invalid_action EXCEPTION;
&nbsp;&nbsp;&nbsp; PRAGMA EXCEPTION_INIT(invalid_action, -20002);
begin
&nbsp;&nbsp;&nbsp;&nbsp; wf_engine.completeactivity(itemtype=&gt;'DBA_TYPE'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,itemkey=&gt;'21'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,activity=&gt;'DBA_CONTROL_PROCESS:BLOCK'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,result=&gt;wf_engine.eng_completed);
exception 
&nbsp;&nbsp;&nbsp; when invalid_action THEN
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wf_core.get_error(v_errorname,v_errormsg,v_errorstack);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dbms_output.put_line(v_errorname);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dbms_output.put_line(v_errormsg);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dbms_output.put_line(v_errorstack);
end;
/</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre language="SQL">
WFENG_NOT_NOTIFIED3133: Activity instance 'DBA_CONTROL_PROCESS:BLOCK' is not a notified activityfor item 'DBA_TYPE/21'.

&nbsp;

Wf_Engine.CompleteActivity(DBA_TYPE, 21, DBA_CONTROL_PROCESS:BLOCK, COMPLETE)
</pre>
<p>&nbsp;</p>
<p>Let&rsquo;s go through the procedure. <br />
First we see a declaration of a custom exception for ORA-20002. This is the custom error that workflow will issue. It is optional in this case, since any error can only occur from the API-call. But that might not always be the case.</p>
<p>In the exception block we first call &lsquo;wf_core.get_error&rsquo; to retrieve the information about this error. If needed we can parse this error further. But the error_name already tells us that we tried to complete a process_activity that is not in a notified state. Based on this the caller should be able to decide what needs to be done.</p>
<p>With that we can move to the next function in this article. <br />
That will be the &lsquo;WAIT&rsquo; function. The &lsquo;WAIT&rsquo; is used to postpone further processing of the item to a time set by an item_attribute or relative to the start of the process_activity. <br />
It works differently from the way the &lsquo;timeout&rsquo; worked on the &lsquo;Block&rsquo; activity. That was only picked up by a background engine with parameter &lsquo;process_timeout=&gt;TRUE&rsquo;. <br />
Let&rsquo;s replace the block in our process with a &lsquo;Wait&rsquo; function. The &lsquo;Wait&rsquo; can be copied from the &lsquo;STANDARD&rsquo; itemtype. It also needs a lookup type &lsquo;Wait Mode&rsquo;. This lookup type defines how to determine the timestamp to complete the process activity. <br />
The possible values are &lsquo;Day of the week&rsquo;, &lsquo;Day of the month&rsquo;, &lsquo;Absolute date&rsquo; and &lsquo;Relative time&rsquo;.</p>
<p>When you add the &lsquo;Wait&rsquo; function to your item, this will be the first &lsquo;node attribute&rsquo; to set. As usual this can be set with a constant, or an item attribute value. When you choose to set it to a fixed date, you can also set the &lsquo;Time of day&rsquo; attribute to set the timestamp. This is of course not needed for the &lsquo;Relative time&rsquo; mode.</p>
<p>All node attributes can be set to a constant or an item_attribute_value. In our sample we will first set a relative time, based on an item attribute value. (for a change).</p>
<p>We use one function to set a new item_attribute:&nbsp;<br />
&nbsp;<br />
<input type="image" height="355" width="537" src="http://www.stijf.com/wordpress/wp-content/uploads/delay_time_assign.JPG" /></p>
<p>And the second node is a &#8216;Wait&#8217; till the requested time:</p>
<input type="image" height="354" width="536" src="http://www.stijf.com/wordpress/wp-content/uploads/wait_relative.JPG" />
<p>The relative time is in {days} . {fraction of day}. So 5/(24*60) is 5 minutes. 0.03 is just about 4.5 minutes therefore.&nbsp;</p>
<p>When we launch a new item, and check the status:</p>
<p>&nbsp;</p>
<pre language="SQL">
INSTANCE_LABEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COST FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BEGIN_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp; RESULT DUE_DATE
DBA_CONTROL_PROCESS 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25-7-2009 20:23:22&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACTIVE&nbsp;&nbsp; #NULL 
START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25-7-2009 20:23:22 25-7-2009 20:23:22 COMPLETE #NULL 
ASSIGN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; WF_STANDARD.ASSIGN 25-7-2009 20:23:22 25-7-2009 20:23:22 COMPLETE #NULL 
WAIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; WF_STANDARD.WAIT&nbsp;&nbsp; 25-7-2009 20:27:41&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEFERRED #NULL</pre>
<p>&nbsp;</p>
<p>So the &lsquo;Wait&rsquo; activity is deferred. But it does not get a due_date. Instead the begin_date is set to the time till which the activity has to wait. <br />
Since the status=&rsquo;DEFERRED&rsquo;, we also have a record in the wf_deferred_queue_m:</p>
<p>&nbsp;</p>
<pre language="SQL">
select queue
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; corr_id
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msg_state
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enq_time 
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delay
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; deq_time
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def.user_data.itemtype itemtype
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def.user_data.itemkey itemkey
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def.user_data.actid actid
&nbsp;from applsys.AQ$WF_DEFERRED_TABLE_M def
where msg_id=(select outbound_queue_id
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp; from wf_item_activity_statuses
      &nbsp;&nbsp;&nbsp;     where item_type='DBA_TYPE'
&nbsp;&nbsp;&nbsp;           and item_key='22'
&nbsp;&nbsp;&nbsp;           and activity_status='DEFERRED');</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre language="SQL">
QUEUE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CORR_ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSG_STATE ENQ_TIME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DELAY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ITEMTYPE ITEMKEY ACTID
WF_DEFERRED_QUEUE_M APPSDBA_TYPE WAIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25-7-2009 20:23:19 25-7-2009 20:27:39 DBA_TYPE 22&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 245973</pre>
<p>&nbsp;</p>
<p>So the message has been queued with a delay till the start_time of the process_activity.</p>
<p>Note that the msg_state=&rsquo;WAIT&rsquo;. This means that the message cannot be dequeued yet. One or more QMON processes need to be running. (Set with &lsquo;alter system set aq_tm_processes=x scope=both;). These processes are responsible for moving messages from the &lsquo;WAIT&rsquo; state to the &lsquo;READY&rsquo; state at the designated moment.<br />
Depending on the load on your system and the number of messages to be handled, you can put more QMON processes. But for most systems one QMON process will be sufficient for the workflow activity. If you need more than one QMON process, you&rsquo;ll also have to be running multiple background engines.</p>
<p>Only messages with msg_state &lsquo;READY&rsquo; can be dequeued and processed by the background engine. <br />
When the message is&nbsp; eligible to be dequeued, you can run a background engine to process the process_activity as any &lsquo;Deferred&rsquo; activity. The begin_date of the process_activity will then be updated to the time it was processed by the background engine.</p>
<p>Now let&rsquo;s change the process to use a &lsquo;Wait&rsquo; till a day of the week. In this case we&rsquo;ll wait till Monday morning. First we set the attribute to the &lsquo;Date&rsquo; type.&nbsp;<br />
&nbsp;</p>
<input type="image" height="354" width="536" src="http://www.stijf.com/wordpress/wp-content/uploads/delay_time2.JPG" />
<p>Then we change the &lsquo;Assign activity&rsquo;. Here we set the value to any date with the timestamp that we want. The date-part of the assignment will be ignored by the &lsquo;Wait&rsquo; function.</p>
<input type="image" height="354" width="536" src="http://www.stijf.com/wordpress/wp-content/uploads/delay_time_assign2.JPG" />
<p>&nbsp;</p>
<p>Finally we update the Node attributes on the &lsquo;Wait&rsquo; activity to be &lsquo;Day of the Week&rsquo;, a &lsquo;Monday&rsquo;, and the &lsquo;Delay time&rsquo; attribute for &lsquo;Time of the Day&rsquo;.</p>
<p>Now when we launch a process, we can see that the activity is indeed postponed till the next Monday. (In this case 27th july 2009). At 8.00AM.</p>
<p>&nbsp;</p>
<pre language="SQL">
INSTANCE_LABEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COST FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BEGIN_DATE&nbsp;&nbsp;&n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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEFERRED #NULL</pre>
<p>&nbsp;</p>
<p>
At this point it&rsquo;s time to look at a special &lsquo;feature&rsquo; of the &lsquo;DEFERRED&rsquo; status. Before I said that you can put an activity in &lsquo;DEFER&rsquo; mode just by returning a result_code of wf_engine.eng_defer. <br />
There is a bit more to that. The WF_STANDARD.DEFER procedure checks whether it is being executed for the first or second time. The first time it is executed, it is to set the status to &lsquo;DEFERRED&rsquo;. That time, the result_code from wf_item_activity_statuses has not been set yet. So the procedure returns the result_code &lsquo;wf_engine.eng_defer&rsquo;. When it is being called, while the result_code in wf_item_activity_statuses has been set, it will assume it is being called from a background process and return &lsquo;wf_engine.eng_completed&rsquo;. Which will then signal the workflow engine to continue with the item.</p>
<p>We can use this mechanism to our own advantage. When an item is deferred,&nbsp; and we want it to be run immediately, without the background process, then we can retry the process activity. The workflow engine has an API for this:</p>
<p>&nbsp;</p>
<pre language="SQL">
Begin
Wf_engine.handleerror(itemtype=&gt;&rsquo;DBA_TYPE&rsquo;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,itemkey=&gt;&rsquo;21&rsquo;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,activity=&gt;&rsquo;DBA_CONTROL_PROCESS:DEFER&rsquo;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,command=&gt;&rsquo;RETRY&rsquo;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );
End;</pre>
<p>&nbsp;</p>
<p>We will see more about the handleerror API in a later part. With the command &lsquo;RETRY&rsquo;, it will re-execute the indicated process_activity. In the case of a &lsquo;DEFER&rsquo;, it will therefore complete the activity. And continue the process.<br />
The same mechanism also applies to the &lsquo;WAIT&rsquo; function, since it basically only defers an activity.</p>
<p>Be aware of this, when activities are re-executed. Since it may not always be the desired result to complete the activity.</p>
<p>Now let&rsquo;s move on to the last controls that we are discussing in this part.</p>
<p>We start with the &lsquo;Launch Process&rsquo; function. You can copy it from the &lsquo;STANDARD&rsquo; item_type. Including the lookup_type &lsquo;YES/NO&rsquo;, if you don&rsquo;t already have that. The lookup_type is required for one of&nbsp; it&rsquo;s activity_attributes.</p>
<p>It will be clear what this function is doing from the name. It launches another item from the current item. There is no restriction on the item_type. The function will perform the same &lsquo;wf_engine.launch&rsquo;, that we execute from sql*plus during this series.</p>
<p>The function has six activity_attributes, one of which is mandatory (2 in our case, since we don&rsquo;t have an automatic selection for the process yet.). <br />
The first attribute is item_type. This shouldn&rsquo;t require a further explanation.<br />
Item_key is optional. If no item_key is provided, the function will build an item of the &lsquo;&lt;current item_type&gt;: &lt;current item_key&gt;-n&rsquo; where n is a sequence number for the number of items launched by the current item. The sequence is stored in a new item_attribute: &lsquo;LAUNCH_COUNT&rsquo;. <br />
Then comes the process_name. It is possible to use a selector function to automatically start the right process within an item_type. But when this is not used, you need to provide the process_name.<br />
User_key and owner are optional, and refer to a user-defined reference key and a workflow role that will assume ownership of this item. <br />
The last attribute is &lsquo;Defer Immediate&rsquo;, with a lookup_type of &lsquo;YES/NO&rsquo;. When set to no, the new item will be launched immediately, and be executed by the current workflow engine. <br />
When &lsquo;Defer Immediate&rsquo; is set to &lsquo;Yes&rsquo;, the activity will be deferred. And both the &lsquo;Launch Process&rsquo; activity as the new item will be executed by a background engine.</p>
<p>After the &lsquo;Launch Process&rsquo; activity, the item will continue it&rsquo;s own processing. (Without the &lsquo;Defer Immediate&rsquo; attribute set to &lsquo;Yes&rsquo;, the engine will first process the new item as far as possible, before returning to the original item). There is no further relationship between the two items.</p>
<p>The last two controls do create a relationship between two or more items. It is possible to create parent/child relationships on the item-level.</p>
<p>We are going to create a sample of this by using &lsquo;DBA_CONTROL_PROCESS&rsquo; to launch &lsquo;DBA_MAIN_PROCESS&rsquo; and wait for it&rsquo;s completion. <br />
On the &lsquo;Launch Process&rsquo; function it is not possible to specify the parent/child relationship. So we have to use the &lsquo;wf_engine.CreateProcess&rsquo; and &lsquo;wf_engine.StartProcess&rsquo; functions. The first one only creates an item, without executing it. <br />
After the&nbsp; &lsquo;CreateProcess&rsquo;, we can call the &lsquo;SetItemParent&rsquo; API to set the parent/child relationship.</p>
<p>So we have to create a new procedure:</p>
<p>&nbsp;</p>
<pre language="SQL">
CREATE OR REPLACE PROCEDURE XXX_LAUNCH_CHILD (p_item_type IN VARCHAR2
&nbsp;                                   &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;,p_item_key IN VARCHAR2
                                    &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;,p_actid IN NUMBER
                         &nbsp;           &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;,p_funcmode IN VARCHAR2
                                    &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;,p_result OUT VARCHAR2) IS
BEGIN
&nbsp; if p_funcmode='RUN' then
&nbsp;&nbsp;&nbsp; wf_engine.CreateProcess(itemtype=&gt;p_item_type
                &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,itemkey=&gt;p_item_key||'-1'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                    ,process=&gt;'DBA_MAIN_PROCESS');
&nbsp;&nbsp;&nbsp; wf_engine.SetItemParent(itemtype=&gt;p_item_type
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;               &nbsp;&nbsp;&nbsp;&nbsp; ,itemkey=&gt;p_item_key||'-1'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                   ,parent_itemtype=&gt;p_item_type
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                   ,parent_itemkey=&gt;p_item_key
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                   ,parent_context=&gt;NULL
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                   ,masterdetail=&gt;TRUE);
&nbsp;&nbsp;&nbsp; wf_engine.StartProcess(itemtype=&gt;p_item_type
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                ,itemkey=&gt;p_item_key||'-1');
&nbsp;end if;
&nbsp;p_result:=wf_engine.eng_completed;
END XXX_LAUNCH_CHILD;
/</pre>
<p>&nbsp;</p>
<p>The &lsquo;CreateProcess&rsquo; and &lsquo;StartProcess&rsquo; should be obvious in their usage. In the &lsquo;SetItemParent, you can indicate a &lsquo;parent_context&rsquo;.&nbsp; This is a free text value, that can be referenced again in the &lsquo;WaitforFlow&rsquo; and &lsquo;ContinueFlow&rsquo; functions. In case you launch multiple child items, you use the context value to know which items should continue. We will come back to this at the end of the example.</p>
<p>First we are going to build our process with the new function:</p>
<input type="image" height="354" width="536" src="http://www.stijf.com/wordpress/wp-content/uploads/launch_child.JPG" />
<p>The process will look like this:</p>
<input type="image" height="105" width="415" src="http://www.stijf.com/wordpress/wp-content/uploads/item_wait_flow1.JPG" />
<p>And of course we need to put the &lsquo;ContinueFlow&rsquo; in the &lsquo;DBA_MAIN_PROCESS&rsquo;. Actually twice, since I want to put it in front of the &lsquo;End&rsquo; and we have 2 exits.&nbsp;</p>
<input type="image" height="624" width="785" src="http://www.stijf.com/wordpress/wp-content/uploads/main_with_continue.JPG" />
<p>Now when we start the &lsquo;DBA_CONTROL_PROCESS&rsquo; we can see what happens:</p>
<p>&nbsp;</p>
<pre language="SQL">
select wpa.instance_label
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wias.item_key
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case when wpa.start_end is not null then wpa.start_end else wa.function end function
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wias.begin_date
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wias.end_date
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wias.activity_status status
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wias.activity_result_code result
from&nbsp;&nbsp; wf_item_activity_statuses wias
join&nbsp;&nbsp; wf_process_activities wpa 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on (wias.process_activity=wpa.instance_id)
join&nbsp;&nbsp; wf_activities wa 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on (wpa.activity_item_type=wa.item_type 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and wpa.activity_name=wa.name 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and wa.end_date is null)
join&nbsp;&nbsp; wf_activities_tl wat 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on (wa.item_type=wat.item_type 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and wa.name=wat.name 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and wa.version=wat.version 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and wat.language='US')
where&nbsp; wias.item_type='DBA_TYPE'
and&nbsp;&nbsp;&nbsp; wias.item_key like '20%' 
order by wias.begin_date,wias.execution_time;</pre>
<p>&nbsp;</p>
<p>&nbsp;</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-2009 14:26:37&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACTIVE&nbsp;&nbsp; #NULL
START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37 26-7-2009 14:26:37 COMPLETE #NULL
INITIALIZE_FLOW&nbsp;&nbsp;&nbsp;&nbsp; 20-1 XXX_WF_DBA.init&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37 26-7-2009 14:26:37 COMPLETE COMPLETE
COMPARETEXT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 WF_STANDARD.COMPARE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37 26-7-2009 14:26:37 COMPLETE EQ
CHECK_INVALIDS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 XXX_CHECK_INVALIDS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37 26-7-2009 14:26:37 COMPLETE Y
DEFER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 WF_STANDARD.DEFER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEFERRED #NULL
GET_INVALIDS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 XXX_WF_UTILS.get_invalids 26-7-2009 14:26:37 26-7-2009 14:26:38 COMPLETE 
LOOPCOUNTER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 WF_STANDARD.LOOPCOUNTER&nbsp;&nbsp; 26-7-2009 14:26:38 26-7-2009 14:26:38 COMPLETE EXIT
AND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 WF_STANDARD.ANDJOIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:38&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WAITING 
WAITFORFLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20&nbsp;&nbsp; WF_STANDARD.WAITFORFLOW&nbsp;&nbsp; 26-7-2009 14:26:38&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NOTIFIED</pre>
<p>&nbsp;</p>
<p>I purposely left the &lsquo;Defer&rsquo; in the &lsquo;DBA_MAIN_PROCESS&rsquo; so we can see the status while the &lsquo;DBA_MAIN_PROCESS&rsquo; is running. When the workflow engine could not process &lsquo;DBA_MAIN_PROCESS&rsquo; further, it returned to the original item, and executed &lsquo;WAITFORFLOW&rsquo;, which of course got the &lsquo;NOTIFIED&rsquo; status. <br />
We can also see the parent_child relationship by querying &lsquo;WF_ITEMS&rsquo;:</p>
<p>&nbsp;</p>
<pre language="SQL">
select item_type
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; item_key key
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; begin_date
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parent_item_type parent_type
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parent_item_key&nbsp; parent_key
from&nbsp;&nbsp; wf_items 
where&nbsp; item_type='DBA_TYPE'
and&nbsp;&nbsp;&nbsp; item_key like '20%'</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre language="SQL">
ITEM_TYPE KEY&nbsp; BEGIN_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PARENT_TYPE PARENT_KEY
DBA_TYPE&nbsp; 20-1 26-7-2009 14:26:37 DBA_TYPE&nbsp;&nbsp;&nbsp; 20
DBA_TYPE&nbsp; 20&nbsp;&nbsp; 26-7-2009 14:26:37&nbsp;&nbsp;</pre>
<p>&nbsp;</p>
<p>Now when we run a background engine, and check again:</p>
<p>&nbsp;</p>
<pre language="SQL">
INSTANCE_LABEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KEY&nbsp; FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BEGIN_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp; RESULT
DBA_CONTROL_PROCESS 20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37 26-7-2009 14:38:40 COMPLETE #NULL
START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20&nbsp;&nbsp; START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37 26-7-2009 14:26:37 COMPLETE #NULL
XXX_LAUNCH_CHILD&nbsp;&nbsp;&nbsp; 20&nbsp;&nbsp; xxx_launch_child&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37 26-7-2009 14:26:38 COMPLETE COMPLETE
DBA_MAIN_PROCESS&nbsp;&nbsp;&nbsp; 20-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37 26-7-2009 14:38:40 COMPLETE #NULL
START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37 26-7-2009 14:26:37 COMPLETE #NULL
INITIALIZE_FLOW&nbsp;&nbsp;&nbsp;&nbsp; 20-1 XXX_WF_DBA.init&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37 26-7-2009 14:26:37 COMPLETE COMPLETE
COMPARETEXT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 WF_STANDARD.COMPARE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37 26-7-2009 14:26:37 COMPLETE EQ
CHECK_INVALIDS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 XXX_CHECK_INVALIDS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:26:37 26-7-2009 14:26:37 COMPLETE Y
GET_INVALIDS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 XXX_WF_UTILS.get_invalids 26-7-2009 14:26:37 26-7-2009 14:26:38 COMPLETE 
LOOPCOUNTER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 WF_STANDARD.LOOPCOUNTER&nbsp;&nbsp; 26-7-2009 14:26:38 26-7-2009 14:26:38 COMPLETE EXIT
WAITFORFLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20&nbsp;&nbsp; WF_STANDARD.WAITFORFLOW&nbsp;&nbsp; 26-7-2009 14:26:38 26-7-2009 14:38:40 COMPLETE #NULL
DEFER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 WF_STANDARD.DEFER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:38:40 26-7-2009 14:38:40 COMPLETE #NULL
AND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 WF_STANDARD.ANDJOIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:38:40 26-7-2009 14:38:40 COMPLETE #NULL
CONTINUEFLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 WF_STANDARD.CONTINUEFLOW&nbsp; 26-7-2009 14:38:40 26-7-2009 14:38:40 COMPLETE #NULL
END&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20&nbsp;&nbsp; END&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:38:40 26-7-2009 14:38:40 COMPLETE #NULL
END-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20-1 END&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26-7-2009 14:38:40 26-7-2009 14:38:40 COMPLETE #NULL</pre>
<p>&nbsp;</p>
<p>The ContinueFlow nicely completed the &lsquo;WaitforFlow&rsquo; and both items&nbsp; completed successfully.</p>
<p>So how does the &lsquo;ContinueFlow&rsquo; activity know which process_activity to continue? The first check being done is&nbsp; whether the activity_attribute &lsquo;Waiting Flow&rsquo; is set to Master or Detail. When it is set to &lsquo;Detail, the ContinueFlow is a parent process. So it will look for it&rsquo;s children in wf_items, and complete all activities that have the instance_label from the &lsquo;Waiting Activity Label&rsquo; activity_attribute.</p>
<p>When it is set to &lsquo;Master&rsquo;, this is just one of the (possibly) multiple children that have completed. So it will count the number of children for the parent item. And check all of them to see if they have reached the&nbsp; &lsquo;ContinueFlow&rsquo; process_activity. When all children have reached the &lsquo;ContinueFlow&rsquo;, the last item will complete the activity on the parent item.</p>
<p>Of course it is possible for a parent item to have multiple &lsquo;WaitforFlow&rsquo; activities, for different child items. In this case, you need to distinguish the different parent/child relationships.&nbsp; That is where the &lsquo;parent_context&rsquo; parameter from the &lsquo;SetItemParent&rsquo; function comes in. <br />
The parent_context can be used to group together all child items that were started from the same process_activity.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stijf.com/wordpress/2009/07/oracle-workflow-for-ebs-dbas-part-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
