<?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>Java Thinking &#187; Database</title>
	<atom:link href="http://www.javathinking.com/category/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javathinking.com</link>
	<description>Java and software development related thoughts</description>
	<lastBuildDate>Thu, 02 Feb 2012 12:16:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Could not complete schema update</title>
		<link>http://www.javathinking.com/2011/11/could-not-complete-schema-update/</link>
		<comments>http://www.javathinking.com/2011/11/could-not-complete-schema-update/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 02:34:42 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[jpa]]></category>
		<category><![CDATA[view]]></category>

		<guid isPermaLink="false">http://www.javathinking.com/?p=598</guid>
		<description><![CDATA[I recently mapped a JPA entity to a view, and encountered this error while using hibernate to update the database schema:
ORA-01702: a view is not appropriate here
[SchemaUpdate.execute] could not complete schema update
I was using the Oracle JDBC drivers 10.1.3.3 &#8211; luckily, the solution was to upgrade the drivers &#8211; when using 11.2.0.2.0 it works fine.
Download [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I recently mapped a JPA entity to a view, and encountered this error while using hibernate to update the database schema:</p>
<blockquote><p>ORA-01702: a view is not appropriate here</p>
<p>[SchemaUpdate.execute] could not complete schema update</p></blockquote>
<p>I was using the Oracle JDBC drivers 10.1.3.3 &#8211; luckily, the solution was to upgrade the drivers &#8211; when using 11.2.0.2.0 it works fine.</p>
<div id="_mcePaste">Download ojdbc6.jar from here:</div>
<blockquote>
<div><a href="http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html " target="_blank"> http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html </a></div>
</blockquote>
<blockquote>
<div id="_mcePaste">ojdbc6.jar (2,152,051 bytes) &#8211; Classes for use with JDK 1.6. It contains the JDBC driver classes except classes for NLS support in Oracle Object and Collection types.</div>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.javathinking.com/2011/11/could-not-complete-schema-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple task queue</title>
		<link>http://www.javathinking.com/2009/11/a-simple-task-queue/</link>
		<comments>http://www.javathinking.com/2009/11/a-simple-task-queue/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 11:15:13 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[queue]]></category>
		<category><![CDATA[task]]></category>

		<guid isPermaLink="false">http://www.javathinking.com/?p=413</guid>
		<description><![CDATA[I&#8217;m working on a little sample framework &#8211; really only to keep my sanity and practice my chosen craft &#8211; that allows you to string together tasks in a pipeline for processing. To exercise that framework &#8211; to flush out the pros and cons of the implementation &#8211; I&#8217;m writing a sample application.
The basic idea [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;m working on a little sample framework &#8211; really only to keep my sanity and practice my chosen craft &#8211; that allows you to string together tasks in a pipeline for processing. To exercise that framework &#8211; to flush out the pros and cons of the implementation &#8211; I&#8217;m writing a sample application.</p>
<p>The basic idea is that each task is interested in an event. That event could be the arrival of a file, or the completion of another task etc. To string tasks together, I&#8217;ve created a simple database queue system &#8211; as a task completes, it writes to the queue and then other tasks which are interested will see that event and then begin. Tasks complete either successfully (by returning no errors) or unsuccessfully (by returning more than one error).</p>
<p>An important concept is to be able to add (or remove) tasks from the pipeline programmatically and without changing the database schema. So, quite simply, when a task completes, that event is written to the queue &#8211; but how do we find which events another task is interested in? And how do we do this in a way that won&#8217;t take longer over time?</p>
<p>So, lets assume Job2 is interested in the successful completion of Job1. We need to find all successful Job1 events which haven&#8217;t already been processed by Job2 (successfully or otherwise):</p>
<pre name="code" class="sql">

SELECT * FROM QUEUE where job=&#039;job1&#039; and result=&#039;SUCCEEDED&#039; and task not in (SELECT task FROM QUEUE where job=&#039;job2&#039; and result is not null)
</pre>
<p>I&#8217;m no SQL ninja, so this is my first simple solution. It works, but it doesn&#8217;t scale. With a thousand rows, it completes pretty quickly, but with tens of thousands of rows it takes way too long (nearly 8 minutes with 40000 rows running on my Dell Inspiron laptop).</p>
<p>Pragmatically, we can restrict the query based on time &#8211; we don&#8217;t need to search the whole table, just the more recent events:</p>
<pre name="code" class="sql">

SELECT * FROM QUEUE where tstamp &gt;= ? and job=&#039;job1&#039; and result=&#039;SUCCEEDED&#039; and task not in (SELECT task FROM QUEUE where tstamp &gt;= ? and  job=&#039;job2&#039; and result is not null)
</pre>
<p>You could easily just look over the events in the last hour if your tasks are short running and you get less than a thousand events an hour &#8211; it&#8217;d probably perform okay. To give an indication of performance I&#8217;ve written a little <a href="http://groovy.codehaus.org/">groovy</a> script to show some basic trends &#8211; included below.<br />
<code><br />
paul@paul-laptop:~$ groovy sqltest<br />
2005 rows took: 4<br />
4005 rows took: 5<br />
6005 rows took: 3<br />
8005 rows took: 3<br />
10005 rows took: 2<br />
12005 rows took: 3<br />
14005 rows took: 3<br />
16005 rows took: 4<br />
18005 rows took: 5<br />
20005 rows took: 3<br />
</code></p>
<p>Notice though, that this is a great example of where indexes really help &#8211; without the index times get larger as the rowcount gets larger:<br />
<code><br />
paul@paul-laptop:~$ groovy sqltest<br />
2005 rows took: 13<br />
4005 rows took: 34<br />
6005 rows took: 123<br />
8005 rows took: 134<br />
10005 rows took: 229<br />
12005 rows took: 237<br />
14005 rows took: 330<br />
16005 rows took: 342<br />
18005 rows took: 428<br />
20005 rows took: 442<br />
</code></p>
<p>Its a pity I have to worry about the time restriction, but it does make the solution workable and at least in my intended application, appropriate. I was hoping to use the <a href="http://www.techonthenet.com/sql/minus.php">SQL MINUS</a> function, but it appears <a href="http://dev.mysql.com/">MYSQL</a> doesn&#8217;t support it.</p>
<p>Here&#8217;s the groovy script I used to generate the results. The difference between using the time restriction and the index is so dramatic and obvious, it is a great example.</p>
<pre name="code" class="java">

import groovy.sql.Sql
import groovy.grape.Grape

Grape.grab(group:&#039;mysql&#039;, module:&#039;mysql-connector-java&#039;, version:&#039;5.1.10&#039;, classLoader: this.class.classLoader.rootLoader)

enum STATUS { SUCCEEDED, FAILED }

def go() {
	def sql = Sql.newInstance(&quot;jdbc:mysql://localhost:3306/spike&quot;, &quot;spike&quot;,&quot;password&quot;, &quot;com.mysql.jdbc.Driver&quot;)
	try {
	   sql.execute(&quot;drop table QUEUE&quot;)
	} catch(Exception e){}

	sql.execute(&quot;CREATE TABLE QUEUE (id INTEGER  NOT NULL,job varchar (20) NOT NULL,task varchar (20) NOT NULL,result VARCHAR (20) NOT NULL, tstamp timestamp, PRIMARY KEY (id)) ENGINE = MyISAM&quot;)
	sql.execute(&quot;create index idx1 on QUEUE(tstamp, job, result)&quot;)

	(1..10).each() {
		def d = createHistory(sql,1000*it)
		findJobsToProcess(sql, d)
	}
}

def findJobsToProcess(sql, d) {
	def rowcount = 0
	sql.eachRow(&quot;select count(*) from QUEUE&quot;) { row -&gt;
		rowcount = row[0]
	}

	long start, end

	start = System.currentTimeMillis()
	// now find the &#039;job1&#039; items that haven&#039;t been processed by &#039;job2&#039;
	sql.eachRow(&quot;SELECT * FROM QUEUE where tstamp &gt;= ? and job=&#039;job1&#039; and result=? and task not in (SELECT task FROM QUEUE where tstamp &gt;= ? and  job=&#039;job2&#039; and result is not null) order by tstamp asc&quot;, [d,STATUS.SUCCEEDED.name(),d]) {
//	    println &quot;${it.id} ${it.job} ${it.task} ${it.result} ${it.tstamp}&quot;
	}
	end = System.currentTimeMillis()
	println &quot;${rowcount} rows took: ${end-start}&quot;

}

def createHistory(sql, count) {
	sql.execute(&quot;truncate table QUEUE&quot;)
	int id = 1
	int task = 1
	// create a &quot;history&quot; of previous jobs
	STATUS.each() { status -&gt;
		(1..count/2).each() {
			sql.execute(&quot;insert into QUEUE (id,job,task,result,tstamp) values (?,?,?,?,?)&quot;, [id++,&#039;job1&#039;,task.toString(),status.name(), new Date()])
			sql.execute(&quot;insert into QUEUE (id,job,task,result,tstamp) values (?,?,?,?,?)&quot;, [id++,&#039;job2&#039;,task.toString(),status.name(), new Date()])
			task++
		}
	}
	sleep(1000)
	def d = new Date()
	// insert some successful &#039;job1&#039; items which &#039;job2&#039; hasn&#039;t processed
	(1..5).each() {
		sql.execute(&quot;insert into QUEUE (id,job,task,result,tstamp) values (?,?,?,?,?)&quot;, [id++,&#039;job1&#039;,task.toString(),STATUS.SUCCEEDED.name(), new Date()])
		task++
	}
	return  d
}

go()
</pre>
<p>In running this test, I used:</p>
<ul>
<li>Dell Inspiron 1525, Intel(R) Core(TM)2 Duo Processor T5550, 1.83 GHz, 2MB Cache, 667 MHz FSB, 2GB (2 X 1024MB) 667MHz Dual Channel DDR2 SDRAM, 160GB 7200RPM Performance Hard Drive</li>
<li>Ubuntu 9.10 32 bit desktop edition</li>
<li>Groovy Version: 1.6.5</li>
<li>JVM: 1.6.0_03</li>
<li>mysql  Ver 14.14 Distrib 5.1.37, for debian-linux-gnu (i486)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.javathinking.com/2009/11/a-simple-task-queue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sharing data between applications</title>
		<link>http://www.javathinking.com/2009/07/sharing-data-between-applications/</link>
		<comments>http://www.javathinking.com/2009/07/sharing-data-between-applications/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 11:13:23 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://www.javathinking.com/?p=156</guid>
		<description><![CDATA[Sometimes applications need access to data from another application. Here is one approach you could take:

Define a view in the database that owns the data &#8211; this view should expose the data that the external application needs
Grant select permissions so that the external application can select from the view
Create a synonym in the external applications [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Sometimes applications need access to data from another application. Here is one approach you could take:</p>
<ol>
<li>Define a view in the database that owns the data &#8211; this view should expose the data that the external application needs</li>
<li>Grant select permissions so that the external application can select from the view</li>
<li>Create a synonym in the external applications database for the view so that it appears as a local resource</li>
</ol>
<p>This has the advantage that the owner of the data defines what is exposed. Handy if the data is sensitive in any way. </p>
<p>This solution also assumes that the external application only wants to read the data. If it wanted to write to the database, then the application that owns the data should probably publish an API (eg web services et al).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javathinking.com/2009/07/sharing-data-between-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding constraints in Oracle</title>
		<link>http://www.javathinking.com/2009/05/finding-constraints-in-oracle/</link>
		<comments>http://www.javathinking.com/2009/05/finding-constraints-in-oracle/#comments</comments>
		<pubDate>Wed, 13 May 2009 00:18:13 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[constraint]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://www.javathinking.com/?p=298</guid>
		<description><![CDATA[It can be quite frustrating when you get exceptions like those below &#8211; constraint violations where the constraint has a system generated name which means nothing to you:

2009-03-23 23:30:43 ERROR [AbstractFlushingEventListener.performExecutions] Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
&#8230;
Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (SAMPLE.SYS_C00123456) violated
&#8230;

The easiest way to find [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>It can be quite frustrating when you get exceptions like those below &#8211; constraint violations where the constraint has a system generated name which means nothing to you:</p>
<blockquote><p>
2009-03-23 23:30:43 ERROR [AbstractFlushingEventListener.performExecutions] Could not synchronize database state with session<br />
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update<br />
&#8230;<br />
Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (SAMPLE.SYS_C00123456) violated<br />
&#8230;
</p></blockquote>
<p>The easiest way to find out which table this constraint is associated with is to issue a statement as shown:</p>
<pre name="code" class="sql">

select constraint_name, table_name from user_constraints where constraint_name=&#039;SYS_C00123456&#039;;
</pre>
<p>Now you know the table involved, you can easily find out the exact nature of the constraint in various ways &#8211; my tool of choice is <a href="http://www.oracle.com/technology/products/database/sql_developer/index.html">SqlDeveloper</a> &#8211; a GUI interface to Oracle (and other) database.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javathinking.com/2009/05/finding-constraints-in-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playlists with MythTV</title>
		<link>http://www.javathinking.com/2009/03/playlists-with-mythtv/</link>
		<comments>http://www.javathinking.com/2009/03/playlists-with-mythtv/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 11:28:24 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Media center]]></category>
		<category><![CDATA[mythtv]]></category>

		<guid isPermaLink="false">http://www.javathinking.com/?p=291</guid>
		<description><![CDATA[I&#8217;ve been wanting a way to use playlists on my media center either from within MythTV or with any other player. The reason is I have a bunch of short videos (music and documentaries) that I&#8217;d like to be able to play consecutively.
It turns out to be a case of just RTFM. You can create [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;ve been wanting a way to use playlists on my media center either from within MythTV or with any other player. The reason is I have a bunch of short videos (music and documentaries) that I&#8217;d like to be able to play consecutively.</p>
<p>It turns out to be a case of just <a href="http://www.mythtv.org/wiki/MythVideo#Mplayer_Playlists">RTFM</a>. You can create playlists for MPlayer from directory listings, and then associate playlists with a particular mplayer command.</p>
<p>To generate the playlist from all files in a directory, I use the following:</p>
<blockquote><pre>dir * | sed 's/\\//g' > all_videos.pls</pre>
</blockquote>
<p>The sed part of this command removes the \ from escaped spaces&#8230; i.e. a file &#8216;Hello world&#8217; is output from the dir command as &#8216;Hello\ world&#8217; &#8211; the space is escaped. We need to generate a file without these escaped spaces for it to work properly.</p>
<p>I use the following mplayer command associated with the pls extension:</p>
<blockquote><p>mplayer -shuffle -fs -zoom -quiet -vo xv -playlist %s</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.javathinking.com/2009/03/playlists-with-mythtv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ST_Intersects performance</title>
		<link>http://www.javathinking.com/2008/10/st_intersects-performance/</link>
		<comments>http://www.javathinking.com/2008/10/st_intersects-performance/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 21:35:27 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[arcgis]]></category>
		<category><![CDATA[arcsde]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.javathinking.com/?p=127</guid>
		<description><![CDATA[I was just using a query which made use of the ST_INTERSECTS function:


select * from table1 where st_intersects(st_point( ?, ?, 1),shape)=1

With the data I had, this query took 30 seconds! Before launching into an investigation to find out why, I just decided to swap the parameters &#8211; this made all the difference:


select * from table1 [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I was just using a query which made use of the <a href="http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=ST_Intersects">ST_INTERSECTS</a> function:</p>
<pre name="code" class="sql">

select * from table1 where st_intersects(st_point( ?, ?, 1),shape)=1
</pre>
<p>With the data I had, this query took 30 seconds! Before launching into an investigation to find out why, I just decided to swap the parameters &#8211; this made all the difference:</p>
<pre name="code" class="sql">

select * from table1 where st_intersects(shape, st_point( ?, ?, 1))=1
</pre>
<p>Now the query returns instantly! I&#8217;m no database expert, so investigating why the first version of the query took so long would have been a waste of valuable time &#8211; when such a simple solution was at hand.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javathinking.com/2008/10/st_intersects-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding table differences in Oracle</title>
		<link>http://www.javathinking.com/2008/10/finding-table-differences-in-oracle/</link>
		<comments>http://www.javathinking.com/2008/10/finding-table-differences-in-oracle/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 00:48:23 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.javathinking.com/?p=125</guid>
		<description><![CDATA[Often there is a need to compare two databases and see the differences. I come across this a lot when releasing a new build into an existing environment &#8211; the new code runs on the development database, but the test environment needs a schema upgrade before the code will run.
There are tools that will compare [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Often there is a need to compare two databases and see the differences. I come across this a lot when releasing a new build into an existing environment &#8211; the new code runs on the development database, but the test environment needs a schema upgrade before the code will run.</p>
<p>There are tools that will compare schemas for you, but sometimes I just need to quickly find out what columns are missing from the target schema (this is particularly useful when comparing different development schemas and you want to quickly implement changes &#8211; production releases need much better quality control than this).</p>
<p>The sql below provides one solution &#8211; showing the columns that are missing from &#8216;owner1&#8242; when compared to &#8216;owner2&#8242; for tables that match the prefix:</p>
<pre name="code" class="sql">

 SELECT table_name, column_name, data_type FROM all_tab_cols
  WHERE lower(owner)=lower(:owner1)
AND table_name LIKE :prefix
AND column_name NOT LIKE &#039;SYS%&#039;
AND table_name||&#039;-&#039;||column_name NOT IN
  (SELECT table_name||&#039;-&#039;||column_name FROM all_tab_cols
    WHERE lower(owner)=lower(:owner2)
  )
ORDER BY table_name, column_name;
</pre>
<p>This will ofcourse identify missing tables. It&#8217;s primative, but its an easy way to see basic structural differences using SQL &#8211; without the need for expensive tools. Since it is basic sql, you could include this as part of an environment verification test suite, or include in your application startup procedure &#8211; providing you have access to a reference schema for comparison.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javathinking.com/2008/10/finding-table-differences-in-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Displaying dates and times with Oracle</title>
		<link>http://www.javathinking.com/2008/09/displaying-dates-and-times-with-oracle/</link>
		<comments>http://www.javathinking.com/2008/09/displaying-dates-and-times-with-oracle/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 02:02:35 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://www.javathinking.com/?p=103</guid>
		<description><![CDATA[I use SQLDeveloper when interacting with Oracle. When viewing tables with date columns it can be frustrating that the default display does not show time (just day, month and year).
To change this behaviour, you can set the date format for your current session:


alter session set NLS_DATE_FORMAT=&#039;DD-Mon-YYYY HH24:MI:SS&#039;

Now, when you view tables or resultsets, you&#8217;ll have [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I use <a href="http://www.oracle.com/technology/products/database/sql_developer/index.html">SQLDeveloper</a> when interacting with <a href="http://www.oracle.com/technology/products/database/index.html">Oracle</a>. When viewing tables with date columns it can be frustrating that the default display does not show time (just day, month and year).</p>
<p>To change this behaviour, you can set the date format for your current session:</p>
<pre name="code" class="sql">

alter session set NLS_DATE_FORMAT=&#039;DD-Mon-YYYY HH24:MI:SS&#039;
</pre>
<p>Now, when you view tables or resultsets, you&#8217;ll have a more precise view of the data:</p>
<pre name="code" class="sql">

04-Sep-2008 09:07:51
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.javathinking.com/2008/09/displaying-dates-and-times-with-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle types</title>
		<link>http://www.javathinking.com/2008/08/oracle-types/</link>
		<comments>http://www.javathinking.com/2008/08/oracle-types/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 06:16:11 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://www.javathinking.com/?p=93</guid>
		<description><![CDATA[It frequently surprises me when seemingly simple things are missing from mature products. For example, Oracle doesn&#8217;t have a boolean type. Strange but apparently true.
Never mind, this article describes how to work around this.
]]></description>
			<content:encoded><![CDATA[<p></p><p>It frequently surprises me when seemingly simple things are missing from mature products. For example, Oracle doesn&#8217;t have a boolean type. Strange but apparently true.</p>
<p>Never mind, <a href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6263249199595" target="_blank">this article</a> describes how to work around this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javathinking.com/2008/08/oracle-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle version information</title>
		<link>http://www.javathinking.com/2008/07/oracle-version-information/</link>
		<comments>http://www.javathinking.com/2008/07/oracle-version-information/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 22:54:01 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://www.javathinking.com/?p=90</guid>
		<description><![CDATA[When making support requests it is always helpful to include version information about the product in question. Rather than just stating &#8216;version X&#8217; I like to get the software to display the version information and just copy and paste it &#8211; this way there can be no confusion, and there may even be extra useful [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>When making support requests it is always helpful to include version information about the product in question. Rather than just stating &#8216;version X&#8217; I like to get the software to display the version information and just copy and paste it &#8211; this way there can be no confusion, and there may even be extra useful information.</p>
<p>So, how to display the oracle version information? I came across <a href="http://dba.ipbhost.com/index.php?showtopic=4899" target="_blank">this useful post</a> which suggests:</p>
<pre name="code" class="sql">
select banner from v$version;
</pre>
<p>which on the instance I&#8217;m looking at produces:</p>
<pre name="code" class="sql">

BANNER----------------------------------------------------------------
Oracle10g Enterprise Edition Release 10.2.0.3.0 - Production
PL/SQL Release 10.2.0.3.0 - Production
CORE    10.2.0.3.0       Production
TNS for Solaris: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
</pre>
<p>Being an SQL query is even more useful than a command line, since you can run this within your applications if you need to display such data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javathinking.com/2008/07/oracle-version-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

