<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Jeff Kemp on Oracle</title>
	<atom:link href="http://jeffkemponoracle.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeffkemponoracle.com</link>
	<description>Oracle Database: Get it Right</description>
	<lastBuildDate>Mon, 13 Feb 2012 03:37:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jeffkemponoracle.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/6f6a6311f6d0e3d42cfdbfe19d045bac?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Jeff Kemp on Oracle</title>
		<link>http://jeffkemponoracle.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jeffkemponoracle.com/osd.xml" title="Jeff Kemp on Oracle" />
	<atom:link rel='hub' href='http://jeffkemponoracle.com/?pushpress=hub'/>
		<item>
		<title>DEFAULT NULL NULL</title>
		<link>http://jeffkemponoracle.com/2012/02/13/default-null-null/</link>
		<comments>http://jeffkemponoracle.com/2012/02/13/default-null-null/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 03:37:14 +0000</pubDate>
		<dc:creator>Jeffrey Kemp</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://jeffkemponoracle.com/?p=1217</guid>
		<description><![CDATA[Found myself running the following command today: ALTER TABLE mytable MODIFY (mycolumn DEFAULT NULL NULL); I know &#8211; I&#8217;m easily entertained :) Filed under: SQL<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1217&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Found myself running the following command today:</p>
<p>    ALTER TABLE mytable<br />
       MODIFY (mycolumn DEFAULT NULL NULL);</p>
<p>I know &#8211; I&#8217;m easily entertained :)</p>
<br />Filed under: <a href='http://jeffkemponoracle.com/category/oracle/sql/'>SQL</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffkemponoracle.wordpress.com/1217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffkemponoracle.wordpress.com/1217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffkemponoracle.wordpress.com/1217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffkemponoracle.wordpress.com/1217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffkemponoracle.wordpress.com/1217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffkemponoracle.wordpress.com/1217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffkemponoracle.wordpress.com/1217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffkemponoracle.wordpress.com/1217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffkemponoracle.wordpress.com/1217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffkemponoracle.wordpress.com/1217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffkemponoracle.wordpress.com/1217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffkemponoracle.wordpress.com/1217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffkemponoracle.wordpress.com/1217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffkemponoracle.wordpress.com/1217/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1217&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffkemponoracle.com/2012/02/13/default-null-null/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bab0ace9c953cc500a28fea281a5c55?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jeffreykemp</media:title>
		</media:content>
	</item>
		<item>
		<title>Designing a PL/SQL API &#8211; BOOLEAN or CHAR?</title>
		<link>http://jeffkemponoracle.com/2011/12/19/designing-a-plsql-api-boolean-or-char/</link>
		<comments>http://jeffkemponoracle.com/2011/12/19/designing-a-plsql-api-boolean-or-char/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 03:05:48 +0000</pubDate>
		<dc:creator>Jeffrey Kemp</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[best-practice]]></category>

		<guid isPermaLink="false">http://jeffkemponoracle.com/?p=1203</guid>
		<description><![CDATA[A simple question: you&#8217;re designing an API to be implemented as a PL/SQL package, and you don&#8217;t (yet) know the full extent to which your API may be used, so you want to cover a reasonable variety of possible usage cases. You have a function that will return a BOOLEAN &#8211; i.e. TRUE or FALSE [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1203&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A simple question: you&#8217;re designing an API to be implemented as a PL/SQL package, and you don&#8217;t (yet) know the full extent to which your API may be used, so you want to cover a reasonable variety of possible usage cases.</p>
<p><a href="http://phy240.ahepl.org/assets/images/HydrogenAtom-11_5_3.jpg"><img class="alignright" title="Booleans - you can't get much more atomic than that :)" src="http://phy240.ahepl.org/assets/images/HydrogenAtom-11_5_3.jpg" alt="" width="240" height="240" /></a>You have a function that will return a BOOLEAN &#8211; i.e. TRUE or FALSE (or perhaps NULL). Should you implement it this way, or should you return some other kind of value &#8211; e.g. a CHAR &#8211; e.g. &#8216;Y&#8217; for TRUE or &#8216;N&#8217; for FALSE; or how about a NUMBER &#8211; e.g. 1 for TRUE or 0 for FALSE?</p>
<p>This debate has raged since 2002, and probably earlier &#8211; e.g. <a href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6263249199595">http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6263249199595</a></p>
<p>Well, if I use a BOOLEAN, it makes the code simple and easy to understand &#8211; and callers can call my function in IF and WHILE statements without having to compare the return value to anything. However, I can&#8217;t call the function from a SQL statement, which can be annoyingly restrictive.</p>
<p>If I use a CHAR or NUMBER, I can now call the function from SQL, and store it in a table &#8211; but it makes the code just a little more complicated &#8211; now, the caller has to trust that I will ONLY return the values agreed on. Also, there is no way to formally restrict the values as agreed &#8211; I&#8217;d have to just document them in the package comments. I can help by adding some suitable constants in the package spec, but note that Oracle Forms cannot refer to these constants directly. Mind you, if the value is being stored in a table, a suitable CHECK constraint would be a good idea.</p>
<p>Perhaps a combination? Have a function that returns BOOLEAN, and add wrapper functions that converts a BOOLEAN into a &#8216;Y&#8217; or &#8216;N&#8217; as appropriate? That might be suitable.</p>
<p>Personally, though, I hate the NUMBER (1 or 0) idea for PL/SQL. That&#8217;s so C-from-the-1970&#8242;s. Who codes like that anymore?</p>
<br />Filed under: <a href='http://jeffkemponoracle.com/category/oracle/'>Oracle</a>, <a href='http://jeffkemponoracle.com/category/oracle/plsql/'>PL/SQL</a>, <a href='http://jeffkemponoracle.com/category/oracle/sql/'>SQL</a> Tagged: <a href='http://jeffkemponoracle.com/tag/best-practice/'>best-practice</a>, <a href='http://jeffkemponoracle.com/tag/plsql/'>PL/SQL</a>, <a href='http://jeffkemponoracle.com/tag/sql/'>SQL</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffkemponoracle.wordpress.com/1203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffkemponoracle.wordpress.com/1203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffkemponoracle.wordpress.com/1203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffkemponoracle.wordpress.com/1203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffkemponoracle.wordpress.com/1203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffkemponoracle.wordpress.com/1203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffkemponoracle.wordpress.com/1203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffkemponoracle.wordpress.com/1203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffkemponoracle.wordpress.com/1203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffkemponoracle.wordpress.com/1203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffkemponoracle.wordpress.com/1203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffkemponoracle.wordpress.com/1203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffkemponoracle.wordpress.com/1203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffkemponoracle.wordpress.com/1203/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1203&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffkemponoracle.com/2011/12/19/designing-a-plsql-api-boolean-or-char/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bab0ace9c953cc500a28fea281a5c55?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jeffreykemp</media:title>
		</media:content>

		<media:content url="http://phy240.ahepl.org/assets/images/HydrogenAtom-11_5_3.jpg" medium="image">
			<media:title type="html">Booleans - you can&#039;t get much more atomic than that :)</media:title>
		</media:content>
	</item>
		<item>
		<title>3 Reasons to Hate Hibernate</title>
		<link>http://jeffkemponoracle.com/2011/11/25/3-reasons-to-hate-hibernate/</link>
		<comments>http://jeffkemponoracle.com/2011/11/25/3-reasons-to-hate-hibernate/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 06:16:39 +0000</pubDate>
		<dc:creator>Jeffrey Kemp</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[mindset]]></category>
		<category><![CDATA[what-not-to-do]]></category>

		<guid isPermaLink="false">http://jeffkemponoracle.com/?p=1013</guid>
		<description><![CDATA[Warning: this is a rant. This is just a collection of observations of Hibernate, from the perspective of an Oracle developer/&#8221;DBA&#8221;. I&#8217;m aware of some of the benefits of using Hibernate to shield Java developers from having to know anything about the database or the SQL language, but sometimes it seems to me that we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1013&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#ff0000;"><strong><em>Warning: this is a rant.</em></strong></span></p>
<p>This is just a collection of observations of Hibernate, from the perspective of an Oracle developer/&#8221;DBA&#8221;. I&#8217;m aware of some of the benefits of using Hibernate to shield Java developers from having to know anything about the database or the SQL language, but sometimes it seems to me that we might generally be better off if they were required to learn a little about what&#8217;s going on &#8220;underneath the hood&#8221;. (Then I remind myself that it&#8217;s my job to help them get the most out of the database the client spent so much money getting.)</p>
<p>So, here are my gripes about Hibernate &#8211; just getting them off my chest so I can put them to bed.</p>
<blockquote><p><em>Disclaimer: I know every Hibernate aficionado will jump in with &#8220;but it&#8217;s easy to fix that, all you have to do is&#8230;&#8221; but these are generalizations only.</em></p></blockquote>
<h1><a href="http://farm2.static.flickr.com/1306/1041323440_a377ac2955.jpg"><img class="alignright" src="http://farm2.static.flickr.com/1306/1041323440_a377ac2955.jpg" alt="" width="300" height="225" /></a>Exhibit A: Generic Query Generators</h1>
<p>As soon as I&#8217;d loaded all the converted data into the dev and test instances, we started hitting silly performance issues. A simple search on a unique identifier would take 20-30 seconds to return at first, then settle down to 4-8 seconds a pop. Quite rightly, everyone expected these searches to be virtually instant.</p>
<p>The culprit was usually a query like this:</p>
<pre>select count(*) as y0_
from XYZ.SOME_TABLE this_
inner join XYZ.SOME_CHILD_TABLE child1_
on this_.PARENT_ID=child1_.PARENT_ID
where lower(this_.UNIQUE_IDENTIFIER) like :1
order by child1_.COLH asc, child1_.COLB asc, this_.ANOTHER_COL desc</pre>
<p>What&#8217;s wrong with this query, you might ask?</p>
<h2>Issue 1: Case-insensitive searches by default</h2>
<p>Firstly, it is calling LOWER() on the unique identifier, which will never contain any alphabetic characters, so case-insensitive searches will never be required &#8211; and so it will not use the unique index on that column. Instead of forcing the developers to <em>think about</em> whether case-insensitive searches are required or not for each column, it allows them to simply blanket the whole system with these &#8211; and quite often no-one will notice until the system goes into UAT or even Prod and someone actually decides to test searching on that particular column, and decides that waiting for half a minute is unacceptable. It&#8217;s quite likely that for some cases even this won&#8217;t occur, and these poorly performing queries (along with their associated load on the database server) will be used all the time, and people will complain about the general poor performance of the database.</p>
<h2>Issue 2: Count first, then re-query for the data</h2>
<p>Secondly, it is doing a COUNT(*) on a query which will immediately after be re-issued in order to get the actual data.  I&#8217;d much prefer that the developers were writing the SQL by hand. That way, it&#8217;d be a trivial matter to ask them to get rid of the needless COUNT(*) query; and if they simply <em>must</em> show a total record count on the page, add a COUNT(*) OVER () to the main query &#8211; thus killing two birds with one efficient stone.</p>
<h1><a href="http://fc07.deviantart.net/fs40/f/2009/027/f/d/Magic_Wand_by_mciguu.png"><img class="alignright" src="http://fc07.deviantart.net/fs40/f/2009/027/f/d/Magic_Wand_by_mciguu.png" alt="" width="307" height="307" /></a>Exhibit B: Magical Class Generators (tables only)</h1>
<h2>Issue 3: No views, no procedures, no functions</h2>
<p>When someone buys Hibernate, they might very well ask: is it possible to call an Oracle procedure or function with this product? And the answer is, of course, &#8220;yes&#8221;. Sure, you can do anything you want!</p>
<p>The day the Java developers peel off the shrinkwrap, the first thing they try is creating a Java class based on a single table. With glee they see it automagically create all the member attributes and getter/setter methods, and with no manual intervention required they can start coding the creation, modification and deletion of records using this class, which takes care of all the dirty SQL for them.</p>
<p>Then, the crusty old Oracle developer/&#8221;DBA&#8221; comes along and says: &#8220;It&#8217;d be better if you could use this API I&#8217;ve lovingly crafted in a PL/SQL package &#8211; everything you need is in there, and you&#8217;ll be shielded from any complicated stuff we might need to put in the database now or later. All you have to do is call these simple procedures and functions.&#8221; And the Java developer goes &#8220;sure, no problem&#8221; &#8211; until they discover that Hibernate cannot automatically create the same kind of class they&#8217;ve already gotten accustomed to.</p>
<p><em>&#8220;What, we actually need to read the function/procedure definition and hand-code all the calls to them? No sir, not happening.&#8221;</em> After all, they bought Hibernate to save them all that kind of work, and who&#8217;s going to blame them?</p>
<p>So, you say, &#8220;Ok, no problem, we&#8217;ll wrap the API calls with some simple views, backed by instead-of triggers.&#8221; But then they hit another wall &#8211; Hibernate can&#8217;t tell from a view definition how that view relates to other views or tables.</p>
<p>The end result is that all the Java code does is access tables directly. And you get the kind of queries (and worse) that you saw in Exhibit &#8220;A&#8221; above.</p>
<p>There. I feel so much better already.</p>
<p><span style="color:#ff0000;"><strong>/rant</strong></span></p>
<br />Filed under: <a href='http://jeffkemponoracle.com/category/oracle/sql/'>SQL</a> Tagged: <a href='http://jeffkemponoracle.com/tag/development/'>development</a>, <a href='http://jeffkemponoracle.com/tag/hibernate/'>Hibernate</a>, <a href='http://jeffkemponoracle.com/tag/mindset/'>mindset</a>, <a href='http://jeffkemponoracle.com/tag/sql/'>SQL</a>, <a href='http://jeffkemponoracle.com/tag/what-not-to-do/'>what-not-to-do</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffkemponoracle.wordpress.com/1013/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffkemponoracle.wordpress.com/1013/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffkemponoracle.wordpress.com/1013/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffkemponoracle.wordpress.com/1013/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffkemponoracle.wordpress.com/1013/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffkemponoracle.wordpress.com/1013/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffkemponoracle.wordpress.com/1013/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffkemponoracle.wordpress.com/1013/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffkemponoracle.wordpress.com/1013/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffkemponoracle.wordpress.com/1013/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffkemponoracle.wordpress.com/1013/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffkemponoracle.wordpress.com/1013/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffkemponoracle.wordpress.com/1013/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffkemponoracle.wordpress.com/1013/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1013&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffkemponoracle.com/2011/11/25/3-reasons-to-hate-hibernate/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bab0ace9c953cc500a28fea281a5c55?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jeffreykemp</media:title>
		</media:content>

		<media:content url="http://farm2.static.flickr.com/1306/1041323440_a377ac2955.jpg" medium="image" />

		<media:content url="http://fc07.deviantart.net/fs40/f/2009/027/f/d/Magic_Wand_by_mciguu.png" medium="image" />
	</item>
		<item>
		<title>Write REF CURSOR to file</title>
		<link>http://jeffkemponoracle.com/2011/11/21/write-ref-cursor-to-file/</link>
		<comments>http://jeffkemponoracle.com/2011/11/21/write-ref-cursor-to-file/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 03:00:29 +0000</pubDate>
		<dc:creator>Jeffrey Kemp</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://jeffkemponoracle.com/?p=1192</guid>
		<description><![CDATA[This is just a very simple procedure that makes writing a lot of files using UTL_FILE much simpler. It can be used to easily create simple CSVs or fixed-length files. I&#8217;ve shown it here in a package body; it&#8217;s up to you to create a package spec. To use it, all you need to do [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1192&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://img.ehowcdn.com/article-page-main/ds-photo/getty/article/129/2/78468231_xs.jpg"><img alt="http://img.ehowcdn.com/article-page-main/ds-photo/getty/article/129/2/78468231_xs.jpg" src="http://img.ehowcdn.com/article-page-main/ds-photo/getty/article/129/2/78468231_xs.jpg" class="alignright" width="225" height="220" /></a>This is just a very simple procedure that makes writing a lot of files using <a href="http://psoug.org/reference/utl_file.html" target="_blank">UTL_FILE</a> much simpler. It can be used to easily create simple CSVs or fixed-length files.</p>
<p>I&#8217;ve shown it here in a package body; it&#8217;s up to you to create a package spec.</p>
<p>To use it, all you need to do is create a query that concatenates all the data into a single string up to 4000 characters long. If you&#8217;re writing a CSV you need to concatenate commas and quotes as appropriate.</p>
<pre>CREATE OR REPLACE PACKAGE BODY packagename AS

-- If no records are found in the cursor, no file is created.
PROCEDURE write_cursor_to_file
  (outputdir   IN VARCHAR2
  ,filename    IN VARCHAR2
  ,headerline  IN VARCHAR2
  ,refcursor   IN SYS_REFCURSOR
  ) IS

  -- increase to make faster but use more memory;
  -- decrease to use less memory but run slower
  BATCHSIZE CONSTANT INTEGER := 100;
  TYPE varr_type IS TABLE OF VARCHAR2(4000) INDEX BY BINARY_INTEGER;
  varr varr_type;
  outf UTL_FILE.FILE_TYPE;
BEGIN
  -- note: don't open the file unless we actually get some
  -- records back from the cursor
  LOOP
    FETCH write_cursor_to_file.refcursor
      BULK COLLECT INTO varr
      LIMIT BATCHSIZE;
    EXIT WHEN varr.COUNT = 0;

    -- We have some records to write. Have we opened the file yet?
    IF NOT UTL_FILE.IS_OPEN (outf) THEN
      outf := UTL_FILE.fopen
        (file_location =&gt; write_cursor_to_file.outputdir
        ,file_name     =&gt; write_cursor_to_file.filename
        ,open_mode     =&gt; 'A'
        ,max_linesize  =&gt; 4000);
      UTL_FILE.put_line (outf, write_cursor_to_file.headerline);
    END IF;

    -- Write the batch of records to the file
    FOR i IN 1..varr.COUNT LOOP
      UTL_FILE.put_line (outf, varr(i));
    END LOOP;

  END LOOP;

  CLOSE write_cursor_to_file.refcursor;

  IF UTL_FILE.IS_OPEN (outf) THEN
    UTL_FILE.fclose (outf);
  END IF;
END write_cursor_to_file;

PROCEDURE sample IS
  OUTPUTDIR  CONSTANT VARCHAR2(100) := 'MY_DIR_NAME';
  FILENAME   CONSTANT VARCHAR2(100) := 'my_file_name.csv';
  HEADERLINE CONSTANT VARCHAR2(4000) := 'Name,Address,Date of Birth';
  refcursor SYS_REFCURSOR;
BEGIN
  OPEN refcursor FOR
    select '"' || name || '"'
       || ',"' || address || '"'
        || ',' || TO_CHAR(dob,'DD-Mon-YYYY')
    from persons;

  write_cursor_to_file
    (outputdir  =&gt; OUTPUTDIR
    ,filename   =&gt; FILENAME
    ,headerline =&gt; HEADERLINE
    ,refcursor  =&gt; refcursor
    );
END sample;

END packagename;
/
</pre></p>
<p>It appends to the file if it finds it. This makes it easy to write the result of several queries to the same file.</p>
<blockquote><p>Note: if you&#8217;re on Oracle 8i or earlier, you&#8217;ll need to add a replacement for <a href="http://www.oracle-base.com/articles/misc/UsingRefCursorsToReturnRecordsets.php" target="_blank">SYS_REFCURSOR</a>, e.g. TYPE my_sys_refcursor IS REF CURSOR; either at the top of the package, or if you want to make the write_cursor_to_file procedure public, put the type definition in your package spec.</BLOCKQUOTE></p>
<br />Filed under: <a href='http://jeffkemponoracle.com/category/oracle/'>Oracle</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffkemponoracle.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffkemponoracle.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffkemponoracle.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffkemponoracle.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffkemponoracle.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffkemponoracle.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffkemponoracle.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffkemponoracle.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffkemponoracle.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffkemponoracle.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffkemponoracle.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffkemponoracle.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffkemponoracle.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffkemponoracle.wordpress.com/1192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1192&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffkemponoracle.com/2011/11/21/write-ref-cursor-to-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bab0ace9c953cc500a28fea281a5c55?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jeffreykemp</media:title>
		</media:content>

		<media:content url="http://img.ehowcdn.com/article-page-main/ds-photo/getty/article/129/2/78468231_xs.jpg" medium="image">
			<media:title type="html">http://img.ehowcdn.com/article-page-main/ds-photo/getty/article/129/2/78468231_xs.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>AUSOUG Perth Conference 2011 Day Two</title>
		<link>http://jeffkemponoracle.com/2011/11/04/ausoug-perth-conference-2011-day-two/</link>
		<comments>http://jeffkemponoracle.com/2011/11/04/ausoug-perth-conference-2011-day-two/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 13:10:26 +0000</pubDate>
		<dc:creator>Jeffrey Kemp</dc:creator>
				<category><![CDATA[AUSOUG]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://jeffkemponoracle.com/?p=1182</guid>
		<description><![CDATA[The final day at Burswood was just as enjoyable as day one. Well done to all the AUSOUG committee! I started with two Apex talks &#8211; first, Scott Wesley on Apex 4.1 Security. Personally I very much enjoyed the unique presentation style. You can experience it for yourself here. After that, Mark Lancaster from Queensland [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1182&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://cache.virtualtourist.com/4/3990970-Burswood_Park_Perth.jpg"><img class="alignnone" title="Burswood" src="http://cache.virtualtourist.com/4/3990970-Burswood_Park_Perth.jpg" alt="" width="395" height="295" /></a></p>
<p>The final day at Burswood was just as enjoyable as day one. Well done to all the AUSOUG committee!</p>
<p>I started with two Apex talks &#8211; first, <strong><a href="http://triangle-circle-square.blogspot.com/" target="_blank">Scott Wesley</a></strong> on <strong><a href="http://prezi.com/89xxuz4ekmvv/oracle-apex-41-security/" target="_blank">Apex 4.1 Security</a></strong>. Personally I very much enjoyed the unique presentation style. You can experience it for yourself here. After that, <strong><a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/Dev/Lancaster_Mark_APEX.pdf" target="_blank">Mark Lancaster</a></strong> from Queensland gave his analysis of the changes from Apex 4.0 to 4.1, and commented on a number of new features that have been added or improved.</p>
<p>Just before lunch I caught <em><a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/DBA/Alvarez_Francisco%20Munoz(2)_Tips.pdf" target="_blank">&#8220;Tips and Best Practices for DBAs&#8221;</a></em> by <strong><a href="http://www.oraclecommunity.net/profile/FranciscoMunozAlvarez" target="_blank">Francisco Munoz Alvarez</a></strong>, who spoke less about actual DBA tasks (as I was expecting) but more about the &#8220;soft&#8221; skills &#8211; attitude, professionalism, working in a team, delegating tasks, and automating everything.</p>
<p>After lunch Vinod Patel moderated a discussion panel comprising <strong><a href="http://debrasoracle.blogspot.com/" target="_blank">Debra Lilley</a></strong>, <strong><a href="http://oracle-base.com/" target="_blank">Tim Hall</a></strong>, <strong><a href="http://oracledba.co.uk/" target="_blank">Connor McDonald</a></strong>, <strong><a href="http://sagecomputing.com.au/about_sage_computing_services.html#penny" target="_blank">Penny Cookson</a></strong>, <strong><a href="http://one-size-doesnt-fit-all.blogspot.com/" target="_blank">Chris Muir</a></strong>, and a guy from Oracle (whose name escapes me for the moment) &#8211; and they were plied with many questions about the art of presenting. It was encouraging to hear what they had to say, both about their success and their failure stories. I think I got away with taking this photo without them noticing :)</p>
<p><img class="size-full wp-image-1183 alignnone" title="The Panel" src="http://jeffkemponoracle.files.wordpress.com/2011/11/panel.jpg?w=497&#038;h=297" alt="" width="497" height="297" /></p>
<p>I took in <a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/DBA/Wood_Graham(2)_Exadata_Live.pdf" target="_blank"><strong>Graham Wood</strong>&#8216;s final presentation</a>, a live demo of Exadata. He demonstrated how blazingly fast it is for loading huge amounts of data in a very short time (e.g. 500GB in about 10 minutes IIRC) and running horrible queries even faster (e.g. multiple full table scans with self joins, running in mere seconds). It was very impressive, although it did highlight that to get the full benefit of Exadata, some queries may need to be rewritten. For example, a big report you&#8217;re running now might get a modest x10 or x20 speed improvement on Exadata, but after rewriting you could get on the order of x100 to x200 speed improvements! If you don&#8217;t believe me, go ask Graham yourself :)</p>
<p>The day ended with <strong><a href="http://oracledba.co.uk/" target="_blank">Connor McDonald</a></strong>&#8216;s talk, <em><strong><a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/DBA/McDonald_Connor_a%20year%20in%20purgatory.pdf" target="_blank">A Year in Purgatory &#8211; Diary of an 11.2 RAC Upgrade</a></strong></em>. It held a lot of promise, but unfortunately I was called away to an emergency at work so I missed most of it. I was quite disappointed to miss that one. By the way, Connor is now blogging &#8211; at <strong><a href="http://connormcdonald.wordpress.com/" target="_blank">connormcdonald.wordpress.com</a></strong>. Finally!</p>
<p>I&#8217;ve enjoyed each AUSOUG conference since 2000, and this year was one of the best in my opinion. It was great to catch up with colleagues, network with Oracle nerds and professionals, and get inspired by a variety of talks on topics I&#8217;m interested in.</p>
<p>In addition, the last few years I&#8217;ve also presented. This has been a good experience which I intend to continue. I hope that with practice I&#8217;ll get much better at it.</p>
<br />Filed under: <a href='http://jeffkemponoracle.com/category/other/ausoug/'>AUSOUG</a>, <a href='http://jeffkemponoracle.com/category/oracle/'>Oracle</a> Tagged: <a href='http://jeffkemponoracle.com/tag/ausoug/'>AUSOUG</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffkemponoracle.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffkemponoracle.wordpress.com/1182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffkemponoracle.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffkemponoracle.wordpress.com/1182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffkemponoracle.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffkemponoracle.wordpress.com/1182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffkemponoracle.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffkemponoracle.wordpress.com/1182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffkemponoracle.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffkemponoracle.wordpress.com/1182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffkemponoracle.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffkemponoracle.wordpress.com/1182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffkemponoracle.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffkemponoracle.wordpress.com/1182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1182&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffkemponoracle.com/2011/11/04/ausoug-perth-conference-2011-day-two/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bab0ace9c953cc500a28fea281a5c55?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jeffreykemp</media:title>
		</media:content>

		<media:content url="http://cache.virtualtourist.com/4/3990970-Burswood_Park_Perth.jpg" medium="image">
			<media:title type="html">Burswood</media:title>
		</media:content>

		<media:content url="http://jeffkemponoracle.files.wordpress.com/2011/11/panel.jpg" medium="image">
			<media:title type="html">The Panel</media:title>
		</media:content>
	</item>
		<item>
		<title>AUSOUG Perth Conference 2011 Day One</title>
		<link>http://jeffkemponoracle.com/2011/11/03/ausoug-perth-conference-2011-day-one/</link>
		<comments>http://jeffkemponoracle.com/2011/11/03/ausoug-perth-conference-2011-day-one/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 13:00:16 +0000</pubDate>
		<dc:creator>Jeffrey Kemp</dc:creator>
				<category><![CDATA[AUSOUG]]></category>

		<guid isPermaLink="false">http://jeffkemponoracle.com/?p=1170</guid>
		<description><![CDATA[I had a most enjoyable* day today at the Oracle conference at Burswood, Perth. * This is significant in light of the fact that the start of the day was quite hectic, having had to drop the car off to get a new alternator (the electrics died on the way home from work yesterday, so [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1170&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had a most enjoyable* day today at the <a href="http://www.ausoug.org.au/2020/program.html" target="_blank">Oracle conference</a> at Burswood, Perth.<a href="http://www.discoverwest.com.au/australia-images/a531c.jpg"><img class="alignright" title="Burswood" src="http://www.discoverwest.com.au/australia-images/a531c.jpg" alt="" width="250" height="166" /></a></p>
<p style="padding-left:30px;"><em>* This is significant in light of the fact that the start of the day was quite hectic, having had to drop the car off to get a new alternator (the electrics died on the way home from work yesterday, so this morning I called RAC out to get the car started and charge the battery up a bit. I managed to drive the car within 100m of Ultratune, then it died completely. So I left the car in the traffic and walked the rest of the way, borrowed some kind of block box that was like a CPR machine for cars.), thereafter going with Rosalie to drop the eldest at her school, so she could then gift me a lift to Burswood.</em></p>
<p>I got to the conference in time to hear <strong><a href="https://www.apress.com/index.php/author/author/view/id/2028" target="_blank">Graham Wood</a></strong> from Oracle talk about <strong><a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/DBA/Wood_Graham(1)_performance_tuning.pdf" target="_blank">DB Time-based Oracle Performance Tuning</a></strong>, which was excellent, then <strong><a href="http://oracle-base.com/" target="_blank">Tim Hall</a></strong> on <strong><a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/DBA/Hall_tim_Powerhouse.pdf" target="_blank">Edition-Based Redefinition</a></strong> which led to some excellent discussions with both Tim and colleagues from my current client.</p>
<p>My talk on a simple <strong><a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/Dev/Kemp_Jeffrey_Simple%20ETL.pdf" target="_blank">ETL method using just SQL</a></strong> seemed to go well and there were some good questions, comments and suggestions. If you missed something it was probably because I talk too fast &#8211; if you want to look something up from the talk you can <a href="http://jeffkemponoracle.files.wordpress.com/2011/11/etl-by-sql.pdf" target="_blank">look at the slides here</a>, or have a play with a full SQL*Plus demo [<a href="https://docs.google.com/open?id=0BzA2qXymQXV2MWEzNzZlYWUtZjRlMi00ODBhLWE0OGMtN2I0NzIyYTM4MTNm" target="_blank">ETL-by-SQL-sqlplus-demo.zip</a>]. I also <a href="http://jeffkemponoracle.com/2011/02/03/simple-data-etl-method/">blogged about this technique back in February</a>.</p>
<p>I finished the day with Graham Wood&#8217;s second talk, on <strong><a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/DBA/Wood_Graham(3)_Oracle_Hidden_Features.pdf" target="_blank">Oracle Hidden Features</a></strong> &#8211; which indeed included info on some Oracle features that I&#8217;d either not yet come across, or had forgotten about. <a href="http://oracledoug.com/serendipity/index.php?/archives/1626-Graham-Woods-Hidden-Features-Presentation.html" target="_blank">Doug Burns blogged</a> about this presentation earlier. The bit about external tables, especially the new 11g feature for <a href="http://download.oracle.com/otndocs/products/database/enterprise_edition/utilities/pdf/xtables_preproc11g_1009.pdf" target="_blank">running the source file through a preprocessor</a>, was particularly interesting.</p>
<p>I&#8217;m looking forward to the second day tomorrow.</p>
<br />Filed under: <a href='http://jeffkemponoracle.com/category/other/ausoug/'>AUSOUG</a> Tagged: <a href='http://jeffkemponoracle.com/tag/ausoug/'>AUSOUG</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffkemponoracle.wordpress.com/1170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffkemponoracle.wordpress.com/1170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffkemponoracle.wordpress.com/1170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffkemponoracle.wordpress.com/1170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffkemponoracle.wordpress.com/1170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffkemponoracle.wordpress.com/1170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffkemponoracle.wordpress.com/1170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffkemponoracle.wordpress.com/1170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffkemponoracle.wordpress.com/1170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffkemponoracle.wordpress.com/1170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffkemponoracle.wordpress.com/1170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffkemponoracle.wordpress.com/1170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffkemponoracle.wordpress.com/1170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffkemponoracle.wordpress.com/1170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1170&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffkemponoracle.com/2011/11/03/ausoug-perth-conference-2011-day-one/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bab0ace9c953cc500a28fea281a5c55?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jeffreykemp</media:title>
		</media:content>

		<media:content url="http://www.discoverwest.com.au/australia-images/a531c.jpg" medium="image">
			<media:title type="html">Burswood</media:title>
		</media:content>
	</item>
		<item>
		<title>Googlebot, Apex Session IDs, and Cookies</title>
		<link>http://jeffkemponoracle.com/2011/10/07/googlebot-apex-session-ids-and-cookies/</link>
		<comments>http://jeffkemponoracle.com/2011/10/07/googlebot-apex-session-ids-and-cookies/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 20:05:00 +0000</pubDate>
		<dc:creator>Jeffrey Kemp</dc:creator>
				<category><![CDATA[APEX]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[problem-solved]]></category>
		<category><![CDATA[search-engine-optimization]]></category>

		<guid isPermaLink="false">http://jeffkemponoracle.com/?p=1154</guid>
		<description><![CDATA[Recently I had a bit of a saga with a public-facing website running on Oracle Apex (www.foothillschurch.org.au, if you&#8217;re curious) getting hammered by Googlebot. We went live with a new version of the site, but I&#8217;d forgotten to make sure that all the links set the Session ID to 0 (zero). What is this session [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1154&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I had a bit of a saga with a public-facing website running on Oracle Apex (<a title="Foothills Church of Christ" href="http://www.foothillschurch.org.au" target="_blank">www.foothillschurch.org.au</a>, if you&#8217;re curious) getting hammered by Googlebot. We went live with a new version of the site, but I&#8217;d forgotten to make sure that all the links set the <a href="http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/sec.htm#CCHDHDCH" target="_blank">Session ID to 0 (zero)</a>.</p>
<p style="padding-left:30px;"><strong>What is this session ID?</strong></p>
<p style="padding-left:30px;"><strong></strong>Every visit to an Apex application needs to have a session. Each unique session is recorded in the database, and keeps track of the state of all the variables for the various pages you visit. Normally, the session is identified by a Session ID which is embedded in the &#8220;p&#8221; parameter of the URL.</p>
<p style="padding-left:30px;">For example, if you visit the page:</p>
<pre style="padding-left:30px;">http://www.foothillschurch.org.au/apex/f?p=102:1</pre>
<p style="padding-left:30px;">You&#8217;ll notice that <a href="http://www.oraclenerd.com/2009/06/apex-url-syntax.html" target="_blank">the &#8220;p&#8221; parameter</a> only specifies the app ID (102) and the page ID (1). What apex does is responds with a <a href="http://en.wikipedia.org/wiki/HTTP_302" target="_blank">302 temporary redirect</a>, that tells the client to redirect to a new URL containing a newly generated session ID, e.g.:</p>
<pre style="padding-left:30px;">http://www.foothillschurch.org.au/apex/f?p=102:1:45164531548964:::::</pre>
<p style="padding-left:30px;">Behind the scenes, it&#8217;s not just changing the URL &#8211; it&#8217;s also sending a cookie to the client to be used for subsequent calls. I&#8217;ll get back to this later.</p>
<p style="padding-left:30px;">Whenever you navigate around a normal apex site, the session ID gets copied into each link so that the user&#8217;s session is preserved. If you manually change or remove the session ID from the URL, apex will redirect you to a newly created session ID.</p>
<p style="padding-left:30px;"><em>In case you&#8217;re wondering, there&#8217;s no significant security risk behind the exposed session ID &#8211; no-one can &#8220;hijack&#8221; your session, even if they copy your session ID directly. That&#8217;s because there&#8217;s a cookie behind the scenes with a secret value that must match up with the session ID, and only someone with sufficient access to the database server could <a href="http://kb.dbatoolz.com/tp/2987.hacking_apex_session_model_-_wwv_custom-f_wwv_flow_sessions.html" target="_blank">get enough data to do that</a>.</em></p>
<p style="padding-left:30px;">If you store the URL containing a session ID (e.g. in your bookmarks) and re-use it much later, your session will have expired &#8211; in which case apex will create a new session, and 302 temporary redirect you to a new URL with the new session ID. Therefore, users can safely bookmark any page in apex.</p>
<p>But now we come, finally, to Googlebot, that little rascal. Now, we would like our public-facing site to be indexed by Google, so we need all the pages of the site that have relevant info to be crawlable.</p>
<p>The way Googlebot works, normally, is that it starts from a link to your page (e.g. on another website, or in a <a href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=183668&amp;ctx=cb&amp;src=cb&amp;cbid=-q644q3tvgfxn&amp;cbrank=0" target="_blank">sitemap you submit to Google</a>), e.g.</p>
<pre>http://www.foothillschurch.org.au/apex/f?p=102:1</pre>
<p>It checks that the URL is not forbidden by your <a href="http://en.wikipedia.org/wiki/Robots.txt" target="_blank">robots.txt</a>, and sends a request to your server for it. If the response is <a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes" target="_blank">200 OK</a> and has a body, Googlebot indexes the page contents, extracts any links from it, and crawls them. Actually, it doesn&#8217;t crawl them straight away &#8211; it just adds them onto the end of a queue somewhere to be crawled later.</p>
<p>If the response is a 4xx (permanent error) or 5xx (temporary error), Googlebot seems to put the URL back on the queue for a few more goes before it gives up.</p>
<p>If the response is a 3xx redirect, and this is the kicker, Googlebot does not always perform the redirect straight away. It may take the new URL and just add it onto the end of the queue to be crawled later. It seems to me (based on what I&#8217;ve seen in my apache logs) that if the URL is different from the first, Googlebot will queue it up for later; but if the URL is identical, it will usually try it straight away.</p>
<p><span id="more-1154"></span><br />
You may see the problem here: Googlebot visits:</p>
<pre>http://www.foothillschurch.org.au/apex/f?p=102:1</pre>
<p>Our site creates a session, and responds with a 302 temporary redirect to:</p>
<pre>http://www.foothillschurch.org.au/apex/f?p=102:1:48327482923832:::::</pre>
<p>Googlebot dutifully notes this new URL and queues it up to crawl later. Meanwhile, our server is waiting patiently for it to get back, but it never does &#8211; so the session automatically expires. Much later, Googlebot visits:</p>
<pre>http://www.foothillschurch.org.au/apex/f?p=102:1:48327482923832:::::</pre>
<p>Our site sees the expired session, creates a new one, and responds with another 302 temporary redirect to:</p>
<pre>http://www.foothillschurch.org.au/apex/f?p=102:1:9783829383342:::::</pre>
<p>Googlebot dutifully notes this new URL and queues it up to crawl later, etc. etc. etc. Also, it&#8217;s not even as benign as that: each URL is not tried just once, but many many times (depending on what <a href="http://www.google.com/support/webmasters/bin/answer.py?answer=48620" target="_blank">speed setting you&#8217;ve got the crawler on</a>) &#8211; and every single time, our server responds with a brand-new, unique session ID. I hope you can now see why our little site crashed under the load &#8211; it quickly filled up the apache logs, it quickly filled up the debug logs in apex, and it quickly overflowed the poorly-configured archive log.</p>
<p>The way to solve this problem is to stop exposing these session IDs in the URL &#8211; and in Apex you can do that by setting the session ID to zero, e.g.:</p>
<pre>http://www.foothillschurch.org.au/apex/f?p=CHURCH:1:0</pre>
<p>Behind the scenes, Apex still creates a session, but whenever it generates a URL with #SESSION# it substitutes zero instead of the internal session ID. This method is great for people who wish to bookmark a page in an application that doesn&#8217;t require authentication. It also seems to work for the Googlebot crawler.</p>
<p style="padding-left:30px;">The above URL will <em>still</em> cause a 302 temporary redirect, however; apex will redirect it to:</p>
<pre style="padding-left:30px;">http://www.foothillschurch.org.au/apex/f?p=CHURCH:1:0:::::</pre>
<p style="padding-left:30px;">You might think that this final URL would stop the redirects, wouldn&#8217;t you? Well, it doesn&#8217;t. You can see what happens if you open this URL in Google Chrome in incognito mode. First, open an incognito window, then choose the Tools menu, Developer Tools. Select the Network tab. Then, paste the URL into the address bar and press Enter.</p>
<p style="padding-left:30px;">You will find that the first call to <strong>apex/f</strong> receives a 302 (temporary redirect). If you click this entry and choose Headers, you&#8217;d see something like this:</p>
<pre style="padding-left:30px;">Request URL:http://www.foothillschurch.org.au/apex/f?p=CHURCH:1:0:::::
Request Method:GET
Status Code:302 Found</pre>
<pre style="padding-left:30px;">Request Headers:
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Host:www.foothillschurch.org.au
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.187 Safari/535.1</pre>
<pre style="padding-left:30px;">Response Headers:
Cache-Control:max-age=0
Connection:Keep-Alive
Content-Length:0
Content-Type:text/html; charset=UTF-8
Date:Thu, 06 Oct 2011 22:54:10 GMT
Expires:Thu, 06 Oct 2011 22:54:10 GMT
Keep-Alive:timeout=10, max=100
Location:f?p=CHURCH:1:0:::::
Server:Oracle XML DB/Oracle Database
Set-Cookie:WWV_CUSTOM-F_5238514445419534_102=D6E147387BD4C9DA
WWV_PUBLIC_SESSION_102=2140144576372238
X-DB-Content-length:0</pre>
<p style="padding-left:30px;">Notice that the request sent no cookies, and the response was a 302 including some cookies (WWV_CUSTOM-F_blablabla and WWV_PUBLIC_SESSION_102).</p>
<p style="padding-left:30px;">If you click on the next line (the second call to <strong>apex/f</strong>) and look at the Headers view, you&#8217;ll see this interaction instead:</p>
<pre style="padding-left:30px;">Request URL:http://www.foothillschurch.org.au/apex/f?p=CHURCH:1:0:::::
Request Method:GET
Status Code:200 OK</pre>
<pre style="padding-left:30px;">Request Headers:
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Cookie:WWV_CUSTOM-F_5238514445419534_102=D6E147387BD4C9DA; WWV_PUBLIC_SESSION_102=2140144576372238
Host:www.foothillschurch.org.au
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.187 Safari/535.1</pre>
<pre style="padding-left:30px;">Response Headers:
Cache-Control:max-age=0
Connection:Keep-Alive
Content-Type:text/html; charset=UTF-8
Date:Thu, 06 Oct 2011 22:54:10 GMT
Expires:Thu, 06 Oct 2011 22:54:10 GMT
Keep-Alive:timeout=10, max=99
Server:Oracle XML DB/Oracle Database
Transfer-Encoding:chunked
X-DB-Content-length:11291</pre>
<p style="padding-left:30px;">This time, the request included the cookies, and the apex engine matched them against a valid and current session; so it responds with the desired 200 (OK) response and the body of the web page.</p>
<p>Gradually, as I was working all this out, I fixed individual problems one by one &#8211; turning off debug mode in the application, setting the crawler to a slower speed, and fixing the archive logging. I also <a href="http://jeffkemponoracle.com/2009/10/26/google-indexes-duplicate-pages-from-my-apex-site-problem-solved/">added a rel=canonical link</a> in the header of every page. However, the root cause was these URLs being tried by Googlebot, which were quickly escalating as time went by. I didn&#8217;t want to use robots.txt to stop it completely, although that might be a valid solution for some cases, because that would remove our Google listing.</p>
<p>I raised <a href="http://www.google.com/support/forum/p/Webmasters/thread?tid=155d46561b783bfc&amp;hl=en" target="_blank">a question</a> on the <a href="http://www.google.com/support/forum/p/Webmasters?hl=en" target="_blank">Google webmaster forum</a> to see if there was some way to remove all these URLs from the Googlebot queue that had session IDs. The only way to remove URLs is to (a) add them to your robots.txt, and (b) submit individual URLs to be removed via Google webmaster tools.</p>
<p>In the end, with some help some contributors to the forum, I worked out how to set up Apache to stop these session IDs in their tracks, by doing a 301 (permanent redirect) to a URL with a 0 (zero) session ID. The magic words, added to my apache conf file, were:</p>
<pre>RewriteCond %{QUERY_STRING} ^p=102:([a-z0-9]*):([0-9]*):(.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^p=CHURCH:([a-z0-9]*):([1-9][0-9]*):(.*)$ [NC]
RewriteRule /apex/f /apex/f?p=CHURCH:%1:0:%3 [R=permanent,L]</pre>
<p>What these do is look for any URL with a parameter p where the app ID is 102 or &#8220;CHURCH&#8221;, and redirects to a new URL that is identical except that it uses the app alias (CHURCH) and sets the session ID to 0.</p>
<p style="padding-left:30px;">Breaking it down:</p>
<p style="padding-left:30px;"><strong>RewriteCond</strong> introduces a condition for the following RewriteRule. It&#8217;s like an &#8220;IF&#8221; test.</p>
<p style="padding-left:30px;"><strong>%{QUERY_STRING}</strong> means we want to test the query string (i.e. the part of the URL following the ?).</p>
<p style="padding-left:30px;"><strong>^p=102:([a-z0-9]*):([0-9]*):(.*)$</strong> this is the regular expression that is used to test for a match. In this case, it is looking for a query string that starts with &#8220;<strong>p=102:</strong>&#8220;, followed by a string of letters or digits (the page ID or alias), followed by &#8220;<strong>:</strong>&#8220;, followed by a string of digits (the session ID), followed by &#8220;<strong>:</strong>&#8220;, and ending with any string of characters. The parts in parentheses &#8211; i.e. <strong>([a-z0-9]*)</strong> and <strong>([0-9]*)</strong> and <strong>(.*)</strong> will be available for later reuse as substitution variables <strong>%1</strong>, <strong>%2</strong> and <strong>%3</strong>.</p>
<p style="padding-left:30px;"><strong>^p=CHURCH:([a-z0-9]*):([1-9][0-9]*):(.*)$</strong> is a similar regular expression, with a slightly different rule for the middle part (the session ID) &#8211; it only matches where the session ID is <em>not</em> zero &#8211; <strong>([1-9][0-9]*)</strong> only matches a string of digits that starts with 1-9. This is because we don&#8217;t want our rewrite rule triggering if the app alias is already &#8220;CHURCH&#8221; and the session ID is already zero.</p>
<p style="padding-left:30px;"><strong>[NC]</strong> &#8221;not case sensitive&#8221; flag &#8211; so that &#8220;church&#8221; and &#8220;Church&#8221; will match as well.</p>
<p style="padding-left:30px;"><strong>[OR]</strong> &#8221;OR&#8221; flag &#8211; the condition should be &#8220;OR&#8221;-ed with the following condition. If either of the RewriteCond directives match, then we want to use the same RewriteRule.</p>
<p style="padding-left:30px;"><strong>RewriteRule</strong> directs the engine to modify the request URI.</p>
<p style="padding-left:30px;"><strong>/apex/f</strong> identifies the part of the request to be rewritten.</p>
<p style="padding-left:30px;"><strong>/apex/f?p=CHURCH:%1:0:%3</strong> is the rewritten URL. %1 and %3 extract the page ID/alias, and the part of the query string following the session ID, respectively.</p>
<p style="padding-left:30px;"><strong>[R=permanent]</strong> &#8220;Redirect&#8221; flag &#8211; by default this would do a 302 (temporary) redirect, but we have specified &#8220;permanent&#8221; so that it will do a 301 permanent redirect.</p>
<p style="padding-left:30px;"><strong>[L]</strong> &#8220;Last&#8221; flag &#8211; no further rewrite rules (if any) should be applied.</p>
<p>It works! Everything is now back to sane levels, and I can now enjoy life.</p>
<br />Filed under: <a href='http://jeffkemponoracle.com/category/oracle/apex/'>APEX</a> Tagged: <a href='http://jeffkemponoracle.com/tag/apex/'>APEX</a>, <a href='http://jeffkemponoracle.com/tag/google/'>google</a>, <a href='http://jeffkemponoracle.com/tag/problem-solved/'>problem-solved</a>, <a href='http://jeffkemponoracle.com/tag/search-engine-optimization/'>search-engine-optimization</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffkemponoracle.wordpress.com/1154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffkemponoracle.wordpress.com/1154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffkemponoracle.wordpress.com/1154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffkemponoracle.wordpress.com/1154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffkemponoracle.wordpress.com/1154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffkemponoracle.wordpress.com/1154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffkemponoracle.wordpress.com/1154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffkemponoracle.wordpress.com/1154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffkemponoracle.wordpress.com/1154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffkemponoracle.wordpress.com/1154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffkemponoracle.wordpress.com/1154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffkemponoracle.wordpress.com/1154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffkemponoracle.wordpress.com/1154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffkemponoracle.wordpress.com/1154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1154&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffkemponoracle.com/2011/10/07/googlebot-apex-session-ids-and-cookies/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bab0ace9c953cc500a28fea281a5c55?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jeffreykemp</media:title>
		</media:content>
	</item>
		<item>
		<title>Are You Ready? Upcoming Conference in Perth</title>
		<link>http://jeffkemponoracle.com/2011/09/13/upcoming-ausoug-conference-perth-2011/</link>
		<comments>http://jeffkemponoracle.com/2011/09/13/upcoming-ausoug-conference-perth-2011/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 08:30:38 +0000</pubDate>
		<dc:creator>Jeffrey Kemp</dc:creator>
				<category><![CDATA[AUSOUG]]></category>

		<guid isPermaLink="false">http://jeffkemponoracle.com/?p=1144</guid>
		<description><![CDATA[Just a quick note to draw attention to the lineup for AUSOUG National Conference &#8211; 3-4 November at the luxurious Burswood Resort here in Perth. The usual suspects will be there, for example: Chris Muir on Angels Tim Hall on a potential Killer extension Scott Wesley with Deeper Discussions (on Apex Security) Penny Cookson helping Oracle devs [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1144&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://images.fineartamerica.com/images-medium/the-end-is-nigh-stephen-peace.jpg"><img class="alignright" title="End is Nigh?" src="http://images.fineartamerica.com/images-medium/the-end-is-nigh-stephen-peace.jpg" alt="" width="252" height="336" /></a>Just a quick note to draw attention to the lineup for <a href="http://www.ausoug.org.au/2020/program.html" target="_blank">AUSOUG National Conference &#8211; 3-4 November</a> at the luxurious Burswood Resort here in Perth. The usual suspects will be there, for example:</p>
<ul>
<li><a href="http://one-size-doesnt-fit-all.blogspot.com/" target="_blank">Chris Muir</a> on <a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/Dev/Muir_Chris_angels.pdf" target="_blank">Angels</a></li>
<li><a href="http://www.oracle-base.com/blog/" target="_blank">Tim Hall</a> on <a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/DBA/Hall_tim_Powerhouse.pdf" target="_blank">a potential Killer extension</a></li>
<li><a href="http://triangle-circle-square.blogspot.com/" target="_blank">Scott Wesley</a> with <a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/Dev/Wesley_Scott_Apex.pdf" target="_blank">Deeper Discussions (on Apex Security)</a></li>
<li><a href="http://www.sagecomputing.com.au/about_sage_computing_services.html#penny" target="_blank">Penny Cookson</a> helping Oracle devs and Java devs <a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/fmjdev/Cookson_Penny_JDev%20ADF.pdf" target="_blank">work happily together</a></li>
<li><a href="http://www.oracledba.co.uk/" target="_blank">Connor McDonald</a> on <a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/DBA/McDonald_Connor_a%20year%20in%20purgatory.pdf" target="_blank">A Year In Purgatory</a></li>
<li>and <a href="http://www.ausoug.org.au/2020/documents/SpeakerProfiles/Dev/Kemp_Jeffrey_Simple%20ETL.pdf" target="_blank">myself</a> :)</li>
</ul>
<p>Signs of the coming Apocalypse? Who knows&#8230;.</p>
<p>Plan your trip (and <a href="http://www.abc.net.au/news/2011-09-12/tourism-development-feature/2882126" target="_blank">arrange your accommodation early</a>, if you need it) and your <a href="http://www.ausoug.org.au/2020/documents/Program_20110912.pdf" target="_blank">conference schedule</a> today!</p>
<br />Filed under: <a href='http://jeffkemponoracle.com/category/other/ausoug/'>AUSOUG</a> Tagged: <a href='http://jeffkemponoracle.com/tag/ausoug/'>AUSOUG</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffkemponoracle.wordpress.com/1144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffkemponoracle.wordpress.com/1144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffkemponoracle.wordpress.com/1144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffkemponoracle.wordpress.com/1144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffkemponoracle.wordpress.com/1144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffkemponoracle.wordpress.com/1144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffkemponoracle.wordpress.com/1144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffkemponoracle.wordpress.com/1144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffkemponoracle.wordpress.com/1144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffkemponoracle.wordpress.com/1144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffkemponoracle.wordpress.com/1144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffkemponoracle.wordpress.com/1144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffkemponoracle.wordpress.com/1144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffkemponoracle.wordpress.com/1144/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1144&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffkemponoracle.com/2011/09/13/upcoming-ausoug-conference-perth-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bab0ace9c953cc500a28fea281a5c55?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jeffreykemp</media:title>
		</media:content>

		<media:content url="http://images.fineartamerica.com/images-medium/the-end-is-nigh-stephen-peace.jpg" medium="image">
			<media:title type="html">End is Nigh?</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing Oracle 11gXE on Amazon Elastic Cloud</title>
		<link>http://jeffkemponoracle.com/2011/09/08/installing-oracle-11gxe-on-amazon-elastic-cloud/</link>
		<comments>http://jeffkemponoracle.com/2011/09/08/installing-oracle-11gxe-on-amazon-elastic-cloud/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 14:30:20 +0000</pubDate>
		<dc:creator>Jeffrey Kemp</dc:creator>
				<category><![CDATA[APEX]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[amazon-ec2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[oracle-xe]]></category>

		<guid isPermaLink="false">http://jeffkemponoracle.com/?p=1102</guid>
		<description><![CDATA[There is officially now no good excuse for not running your own instance of Oracle 11g and getting into Apex 4 development, or just playing with SQL and PL/SQL. Oracle 11g XE is free. You can rent the hardware to run it by the hour, at a fraction of the cost of most online hosting [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1102&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There is officially now no good excuse for not running your own instance of Oracle 11g and getting into Apex 4 development, or just playing with SQL and PL/SQL.</p>
<ul>
<li><a href="http://www.oracle.com/technetwork/database/express-edition/overview/index.html" target="_blank">Oracle 11g XE is free</a>.</li>
<li>You can <a href="http://aws.amazon.com/solutions/global-solution-providers/oracle/" target="_blank">rent the hardware</a> to run it by the hour, at <a href="http://aws.amazon.com/ec2/pricing/" target="_blank">a fraction of the cost</a> of most online hosting services.</li>
<li>It&#8217;s easy to install &#8211; just use this step-by-step guide!</li>
</ul>
<div><em>Note: another easy-to-follow guide to this process was published back in April by Alex Gorbachev here: <a href="http://www.pythian.com/news/22045/how-to-get-started-with-amazon-ec2-oracle-11g-xe-example/" target="_blank">http://www.pythian.com/news/22045/how-to-get-started-with-amazon-ec2-oracle-11g-xe-example/</a>, which may suit your needs &#8211; although it is based on an AMI with a beta release of 11gXE pre-installed. Some of the instructions below are virtually identical to his.</em></div>
<div>
<h1>1. Gather your software.</h1>
<p>You&#8217;ll need:</p>
</div>
<div>
<ul>
<li><a href="http://www.oracle.com/technetwork/database/express-edition/downloads/index.html" target="_blank">Oracle Database Express Edition 11<em>g</em> Release 2 for Linux x64</a>.<br />
The file name will be <strong>oracle-xe-11.2.0-1.0.x86_64.rpm.zip</strong>, and is about 308MB.</li>
<li><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">PuTTY</a></li>
<li><a href="http://winscp.net/eng/download.php" target="_blank">WinSCP</a> (or any SCP/SFTP client for your OS)</li>
</ul>
<div>What, no OS, you ask? Nah &#8211; the easiest way to get started is to start with an AMI (Amazon Machine Image) that has linux installed.</div>
<div>Install PuTTY and your SCP/SFTP client on your computer, then:</div>
</div>
<div>
<h1>2. Get your Amazon EC2 account.</h1>
</div>
<div>Go to <a href="http://aws.amazon.com/">http://aws.amazon.com/</a> and click &#8220;Sign Up Now&#8221;. You&#8217;ll need an EC2 account and you&#8217;ll need to give them some credit card details.</div>
<div>Navigate to the Amazon Elastic Compute Cloud (EC2) in the AWS Management Console.</div>
<div><img class="alignnone size-full wp-image-1104" title="AWS Management Console" src="http://jeffkemponoracle.files.wordpress.com/2011/09/aws1.png?w=497&#038;h=369" alt="" width="497" height="369" /></div>
<div>
<h1>3. Launch Instance.</h1>
</div>
<div>Click the &#8220;<strong>Launch Instance</strong>&#8221; button. Go to &#8220;<strong>Community AMIs</strong>&#8220;. Change the &#8220;Viewing&#8221; filter to &#8220;<strong>64-bit</strong>&#8220;. In the search field type &#8220;<strong>oracle</strong>&#8220;. You should see a long list of AMIs to choose from. What you&#8217;re looking for is an EBS-backed AMI running Oracle Enterprise Linux 5. The actual name and AMI ID will vary from region to region, but in US-East you could use &#8220;493731438004/Oracle Linux 5.6 x86_64 &#8211; OVM&#8221;, AMI ID <strong>ami-42778a2b</strong> (you could enter this ID into the search field to go directly to it), or if you&#8217;re using the Singapore region you could use AMI ID <strong>ami-bc2f56ee</strong>.</div>
<div><img class="alignnone size-full wp-image-1105" title="Selecting an AMI" src="http://jeffkemponoracle.files.wordpress.com/2011/09/aws2.png?w=497&#038;h=361" alt="" width="497" height="361" /></div>
<div>Next, you get to choose the size of the instance. The bigger the machine, the more grunt you get, but also slightly more expensive to run. You could choose Micro, but you might find it a bit slow at times. Of course, there&#8217;s nothing stopping you from trying one, and if you don&#8217;t like what it offers, just trade up!</div>
<div><img class="alignnone size-full wp-image-1107" title="Instance Size" src="http://jeffkemponoracle.files.wordpress.com/2011/09/aws3.png?w=497&#038;h=380" alt="" width="497" height="380" /></div>
<div>On the <strong>&#8220;Advanced Instance Options&#8221;</strong> page, accept all the defaults and Continue.</div>
<div>On the next page, you can put a name on your instance if you like. This is just a label, and comes in handy when you run many instances.</div>
<div>On the <strong>&#8220;Create Key Pair&#8221;</strong> page, you need to select a Key Pair. You can create one if you don&#8217;t already have one.</div>
<div><img class="alignnone size-full wp-image-1108" title="Key Pair" src="http://jeffkemponoracle.files.wordpress.com/2011/09/aws4.png?w=497&#038;h=326" alt="" width="497" height="326" /></div>
<div>Enter a name for your key pair, then click &#8220;<strong>Create &amp; Download your Key Pair</strong>&#8220;. Make sure you keep the file (it&#8217;ll be a .PEM file) in a safe place &#8211; if you lose it, you&#8217;ll lose access to your instance (in which case you&#8217;d just have to terminate it and start again).</div>
<div>The next page is the &#8220;<strong>Configure Firewall</strong>&#8221; step, where you select a Security Group. You could create a new one if you like &#8211; open up TCP ports <strong>22, 8080 and 1521</strong> so you can upload files, access the Apex web interface, and connect to the database (e.g. from SQL Developer).</div>
<div>On the final page, click <strong>&#8220;Launch&#8221;</strong>. After maybe a minute or two, your instance will have been started and running, ready for you to connect to it and do stuff on it:</div>
<p><img class="alignnone size-full wp-image-1112" title="It's Alive!" src="http://jeffkemponoracle.files.wordpress.com/2011/09/aws51.png?w=497&#038;h=501" alt="" width="497" height="501" /></p>
<div>Here, you can find the following useful information:</div>
<div><strong>Status</strong>: this will say &#8220;Pending&#8221;, &#8220;Running&#8221;, or some other status.</div>
<div><strong>Public DNS</strong>: this is the URL you can use to connect to your instance: in my case, it is <em>ec2-72-44-48-28.compute-1.amazonaws.com</em>.</div>
<div>
<h1>4. Set up your key pair.</h1>
</div>
<div>Before you can connect to your instance with PuTTY or your SCP client, you&#8217;ll need a PPK file. You generate this from the PEM file you got before. In the folder where PuTTY is installed is a little tool called <strong>PUTTYGEN.EXE</strong>. Run this, select Conversions -&gt; Import Key, select your PEM file, then click Save Private Key. It might warn you about a passphrase &#8211; if you want to protect the key in case someone manages to steal it then you could put one in, but personally I don&#8217;t. Save it somewhere safe as a PPK file.</div>
<div>
<h1>5. Upload the Oracle installer to the instance.</h1>
</div>
<div>Open WinSCP. Click New. Copy the <strong>Public DNS</strong> into Host (e.g. <em>ec2-72-44-48-28.compute-1.amazonaws.com</em>). Set User name to <strong>root</strong>. Leave the Password blank. Select your Private Key file (PPK). Save the settings then click Login. If you get a warning about the &#8220;server&#8217;s host key not in the cache&#8221;, just click &#8220;Yes&#8221; to continue.</div>
<div>If you get timeout errors, check that port 22 has been open (and your changes saved) on your AWS Security Group.</div>
<div>Upload the Oracle installer (<strong>oracle-xe-11.2.0-1.0.x86_64.rpm.zip</strong>).</div>
<div>
<h1>6. Login to your instance.</h1>
</div>
<div>Open PuTTY. Copy the Public DNS into Host Name, and select your Private Key file (PPK) (this option is tucked away under Connection/SSH/Auth). You can save the session if you want. When you Open the connection, it will prompt for the login. Login as <strong>root</strong>.</div>
<div>
<h1>7. Install Oracle.</h1>
</div>
<div>You can follow Oracle 11g XE installation instructions to install and configure Oracle, which honestly are really easy and straightforward:<br />
<a href="http://download.oracle.com/docs/cd/E17781_01/install.112/e18802/toc.htm" target="_blank"> http://download.oracle.com/docs/cd/E17781_01/install.112/e18802/toc.htm</a></div>
<p>If you just want to know what to type, here is basically all you need (type the commands after the &#8220;#&#8221; &#8211; don&#8217;t type the &#8220;#&#8221; itself though):</p>
<pre># unzip /root/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
# rpm -ivh /root/Disk1/oracle-xe-11.2.0-1.0.x86_64.rpm
# /etc/init.d/oracle-xe configure</pre>
<p>This script will prompt you for the Apex port and the database port &#8211; just press Enter to accept the defaults (8080 and 1521, respectively). It will then ask for the password for SYS and SYSTEM. Finally, it will ask you if you want it to run on startup. Accept the default (yes).</p>
<h1>8. Disable the firewall.</h1>
<pre># chkconfig iptables off
# service iptables stop</pre>
<p>This disables the internal firewall running in your linux instance.</p>
<h1>9. Log into Apex.</h1>
<p>Open your browser and point it at your instance. Take the Public DNS and add <strong>:8080/apex/apex_admin</strong>, e.g.:</p>
<pre>http://ec2-72-44-48-28.compute-1.amazonaws.com:8080/apex/apex_admin</pre>
<p>The login name is <strong>admin</strong>, and the password is (for now) the same password you entered for the SYS and SYSTEM accounts earlier.<br />
<img class="alignnone size-full wp-image-1125" title="Login to Apex admin" src="http://jeffkemponoracle.files.wordpress.com/2011/09/aws6.png?w=497&#038;h=278" alt="" width="497" height="278" /></p>
<p>It will prompt you to change the password. It has to be a fairly secure &#8211; you&#8217;ll need at least a letter, number and symbol, and you can&#8217;t include the login name. After changing your password, you&#8217;ll need to log in again but using the new password.</p>
<p>You now have a fully-fledged Oracle Application Express environment, version 4.0.</p>
<h1>10. Create a Workspace.</h1>
<p>The last thing you need to do before you can start creating applications and stuff is to create a workspace. Click &#8220;Create Workspace&#8221; and answer the prompts to create the workspace along with its own schema and admin user account.</p>
<p><img class="alignnone size-full wp-image-1126" title="Create a workspace..." src="http://jeffkemponoracle.files.wordpress.com/2011/09/aws7.png?w=497&#038;h=324" alt="" width="497" height="324" /></p>
<p>Log out of Apex Administration, and log into the newly created workspace &#8211; and you will now be able to start creating applications, tables, and what-have-you. You can also use Apex to write code (such as procedures and packages), but I suggest you use Oracle SQL Developer for this kind of thing because it&#8217;s a bit more powerful.</p>
<p>From now on, to get back into your Apex development environment, you can use this url:</p>
<pre>http://ec2-72-44-48-28.compute-1.amazonaws.com:8080/apex</pre>
<p><img class="alignnone size-full wp-image-1127" title="Now the fun really starts!" src="http://jeffkemponoracle.files.wordpress.com/2011/09/aws8.png?w=497&#038;h=331" alt="" width="497" height="331" /></p>
<p><strong>Have fun!</strong><br />
<em>Oh, by the way: when you&#8217;ve had your fun, and you want to stop your instance (which <a href="http://aws.amazon.com/ec2/pricing/" target="_blank">at about 34c/h</a> may cost around $60 per week if you leave it running 24&#215;7), don&#8217;t forget to terminate it from AWS Management Console. Before you do, however, you can take a snapshot of it in its current state so you can restore from it later. (Before this, you might want to shut down the Oracle database within the instance first &#8211; although I&#8217;ve found it quite easy to recover an instance which was snapshotted while the database was up and running). To do that, right-click on the instance in AWS Management Console, and select &#8220;Create Image (EBS AMI)&#8221;. It may take some time for the image to be created. When the image creation is complete, you can then Terminate the instance. The AMI will take up a bit of storage that will cost a dollar or two per month; and you can now spin up as many copies of your machine whenever you want.</em></p>
<p><strong>Update:</strong></p>
<p>Lew posted an excellent introduction to <a href="http://clouddb.info/2009/05/17/a-quick-overview-of-putty-and-ssh-for-aws-newbies/" target="_blank">PuTTY and SSH for AWS Newbies</a> that I heartily recommend. It was posted in 2009 but still applies.</p>
<br />Filed under: <a href='http://jeffkemponoracle.com/category/oracle/apex/'>APEX</a>, <a href='http://jeffkemponoracle.com/category/oracle/'>Oracle</a> Tagged: <a href='http://jeffkemponoracle.com/tag/amazon-ec2/'>amazon-ec2</a>, <a href='http://jeffkemponoracle.com/tag/apex/'>APEX</a>, <a href='http://jeffkemponoracle.com/tag/linux/'>Linux</a>, <a href='http://jeffkemponoracle.com/tag/oracle-xe/'>oracle-xe</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffkemponoracle.wordpress.com/1102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffkemponoracle.wordpress.com/1102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffkemponoracle.wordpress.com/1102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffkemponoracle.wordpress.com/1102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffkemponoracle.wordpress.com/1102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffkemponoracle.wordpress.com/1102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffkemponoracle.wordpress.com/1102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffkemponoracle.wordpress.com/1102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffkemponoracle.wordpress.com/1102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffkemponoracle.wordpress.com/1102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffkemponoracle.wordpress.com/1102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffkemponoracle.wordpress.com/1102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffkemponoracle.wordpress.com/1102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffkemponoracle.wordpress.com/1102/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1102&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffkemponoracle.com/2011/09/08/installing-oracle-11gxe-on-amazon-elastic-cloud/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bab0ace9c953cc500a28fea281a5c55?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jeffreykemp</media:title>
		</media:content>

		<media:content url="http://jeffkemponoracle.files.wordpress.com/2011/09/aws1.png" medium="image">
			<media:title type="html">AWS Management Console</media:title>
		</media:content>

		<media:content url="http://jeffkemponoracle.files.wordpress.com/2011/09/aws2.png" medium="image">
			<media:title type="html">Selecting an AMI</media:title>
		</media:content>

		<media:content url="http://jeffkemponoracle.files.wordpress.com/2011/09/aws3.png" medium="image">
			<media:title type="html">Instance Size</media:title>
		</media:content>

		<media:content url="http://jeffkemponoracle.files.wordpress.com/2011/09/aws4.png" medium="image">
			<media:title type="html">Key Pair</media:title>
		</media:content>

		<media:content url="http://jeffkemponoracle.files.wordpress.com/2011/09/aws51.png" medium="image">
			<media:title type="html">It&#039;s Alive!</media:title>
		</media:content>

		<media:content url="http://jeffkemponoracle.files.wordpress.com/2011/09/aws6.png" medium="image">
			<media:title type="html">Login to Apex admin</media:title>
		</media:content>

		<media:content url="http://jeffkemponoracle.files.wordpress.com/2011/09/aws7.png" medium="image">
			<media:title type="html">Create a workspace...</media:title>
		</media:content>

		<media:content url="http://jeffkemponoracle.files.wordpress.com/2011/09/aws8.png" medium="image">
			<media:title type="html">Now the fun really starts!</media:title>
		</media:content>
	</item>
		<item>
		<title>MERGE to table with Virtual Columns + Error Log Table = ORA-03113</title>
		<link>http://jeffkemponoracle.com/2011/09/01/merge-to-table-with-virtual-columns-error-log-table-ora-03113/</link>
		<comments>http://jeffkemponoracle.com/2011/09/01/merge-to-table-with-virtual-columns-error-log-table-ora-03113/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 04:00:37 +0000</pubDate>
		<dc:creator>Jeffrey Kemp</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[problem-solved]]></category>

		<guid isPermaLink="false">http://jeffkemponoracle.com/?p=1095</guid>
		<description><![CDATA[This is just in case you come across this. It appears to be an Oracle bug. I don&#8217;t know if it&#8217;s been fixed in a later release. I haven&#8217;t isolated a simple repeatable test case yet, so I don&#8217;t know if the scenario here includes all the relevant details or not. Version: Oracle Database 11g [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1095&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is just in case you come across this. It appears to be an Oracle bug. I don&#8217;t know if it&#8217;s been fixed in a later release. I haven&#8217;t isolated a simple repeatable test case yet, so I don&#8217;t know if the scenario here includes all the relevant details or not.</p>
<p><em>Version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 &#8211; 64bit Production</em></p>
<p><span style="text-decoration:underline;">Scenario:</span></p>
<ul>
<li><strong>MERGE</strong> into a table that has one or more <strong>virtual columns</strong>.</li>
<li>The MERGE statement has a &#8220;<strong>LOG ERRORS</strong>&#8221; clause.</li>
<li>The error log table is a standard one created using <strong>DBMS_ERRLOG.create_error_log</strong>.</li>
</ul>
<p>Other factors that may or may not be involved are:</p>
<ul>
<li>the target table is in a different schema</li>
<li>the merge statement queries another table with the same name in the current schema</li>
<li>the merge statement includes WHEN MATCHED THEN UPDATE, DELETE WHERE, WHEN NOT MATCHED THEN INSERT cluases</li>
<li>the merge statement has a WHERE clause on the WHEN NOT MATCHED clause</li>
</ul>
<p><span style="text-decoration:underline;">Result:</span></p>
<p><strong>ORA-03113: end-of-file on communication channel</strong> and/or <strong>ORA-03114: not connected to ORACLE</strong></p>
<p>This happens whether the MERGE is executed or just explain-plan&#8217;ed &#8211; so it shouldn&#8217;t be related to the actual data in either the source or destination tables.</p>
<div><span style="text-decoration:underline;">Workaround:</span></div>
<p>After creating the log table, but before the merge, drop the columns from the error log that are virtual columns in the target table.</p>
<br />Filed under: <a href='http://jeffkemponoracle.com/category/oracle/sql/'>SQL</a> Tagged: <a href='http://jeffkemponoracle.com/tag/bug/'>bug</a>, <a href='http://jeffkemponoracle.com/tag/problem-solved/'>problem-solved</a>, <a href='http://jeffkemponoracle.com/tag/sql/'>SQL</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffkemponoracle.wordpress.com/1095/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffkemponoracle.wordpress.com/1095/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffkemponoracle.wordpress.com/1095/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffkemponoracle.wordpress.com/1095/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffkemponoracle.wordpress.com/1095/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffkemponoracle.wordpress.com/1095/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffkemponoracle.wordpress.com/1095/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffkemponoracle.wordpress.com/1095/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffkemponoracle.wordpress.com/1095/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffkemponoracle.wordpress.com/1095/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffkemponoracle.wordpress.com/1095/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffkemponoracle.wordpress.com/1095/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffkemponoracle.wordpress.com/1095/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffkemponoracle.wordpress.com/1095/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffkemponoracle.com&amp;blog=12972578&amp;post=1095&amp;subd=jeffkemponoracle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffkemponoracle.com/2011/09/01/merge-to-table-with-virtual-columns-error-log-table-ora-03113/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bab0ace9c953cc500a28fea281a5c55?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jeffreykemp</media:title>
		</media:content>
	</item>
	</channel>
</rss>
