<?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>Geospecialling &#187; Oracle</title>
	<atom:link href="http://www.geospecialling.com/index.php/tag/oracle/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geospecialling.com</link>
	<description>Being a (G)IS Developer...</description>
	<lastBuildDate>Sun, 25 Jul 2010 05:15:41 +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>NHibernate 2.1 throws System.InvalidCastException on Oracle 10g R1 client</title>
		<link>http://www.geospecialling.com/index.php/2010/04/nhibernate-2-1-throws-system-invalidcastexception-on-oracle-10g-r1-client/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/nhibernate-2-1-throws-system-invalidcastexception-on-oracle-10g-r1-client/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 21:52:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[nHibernate]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/nhibernate-2-1-throws-system-invalidcastexception-on-oracle-10g-r1-client/</guid>
		<description><![CDATA[When deploying an early build of an up and coming product on a customers machine I came across the following error:
System.InvalidCastException: Unable to cast object of type &#8216;Oracle.DataAccess.Client.OracleConnection&#8217; to type &#8216;System.Data.Common.DbConnection&#8217; 
This was one of those awesome “doesn’t happen on any of my machine” errors.&#160; After some mucking around we determined that the client machine [...]]]></description>
			<content:encoded><![CDATA[<p>When deploying an early build of an up and coming product on a customers machine I came across the following error:</p>
<p><em>System.InvalidCastException: Unable to cast object of type &#8216;Oracle.DataAccess.Client.OracleConnection&#8217; to type &#8216;System.Data.Common.DbConnection&#8217; </em></p>
<p>This was one of those awesome “doesn’t happen on any of my machine” errors.&#160; After some mucking around we determined that the client machine was using the Oracle 10g&#160; R1 client.&#160; The machines and VMs here we used for testing were all running either 11g, or 10g R2.&#160; Doh!</p>
<p>The simple resolution to this was to modify the NHhibernate config and add the following property:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">property</span> <span style="color: #ff0000">name</span><span style="color: #0000ff">=&quot;hbm2ddl.keywords&quot;</span><span style="color: #0000ff">&gt;</span>none<span style="color: #0000ff">&lt;/</span><span style="color: #800000">property</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>Depending on your underlying databases and mappings this could cause problems with your code project.&#160; Hopefully you’re not using reserved words, or bad Oracle syntax =).</p>
<p>Under the hood, the problem seems to be that the Oracle10gDialect does not provide an implementation of IDataBaseSchema for 10gR1.&#160;&#160; Fabio Maulo has provided some sample code and the steps on <a title="Create missing IDataBaseSchema for submission to NHibernate" href="http://fabiomaulo.blogspot.com/2009/06/from-where-start-to-implements.html" rel="tag">how to create the appropriate metadata</a> for your database and submit it to the NHibernate project for inclusion. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/nhibernate-2-1-throws-system-invalidcastexception-on-oracle-10g-r1-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally an Oracle x64 client that works on Vista &#8211; AKA Getting Map 2010 x64 running with Oracle&#8230;</title>
		<link>http://www.geospecialling.com/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/</link>
		<comments>http://www.geospecialling.com/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/#comments</comments>
		<pubDate>Fri, 22 May 2009 22:01:39 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://www.landoris.com/blogs/darrin/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/</guid>
		<description><![CDATA[As my legion of dedicated readers know, I’m an 64 Bit zealot.&#160; I would love to see a Windows task manager free of *32.&#160; It keeps me up at night…well not really but, whatever. =) Autodesk recently released AutoCAD Map 2010 – the first native x64 release.&#160; How could I resist installing that?&#160; I had [...]]]></description>
			<content:encoded><![CDATA[<p>As my legion of dedicated readers know, I’m an 64 Bit zealot.&#160; I would love to see a Windows task manager free of *32.&#160; It keeps me up at night…well not really but, whatever. =) Autodesk recently released <a title="AutoCAD Map 2010" href="http://usa.autodesk.com/adsk/servlet/index?id=3081357&amp;siteID=123112" target="_blank" rel="tag">AutoCAD Map 2010</a> – the first native x64 release.&#160; How could I resist installing that?&#160; I had this funny feeling I would regret this decision.&#160; Somehow, somewhere I just knew I would end up in <a title="Vista Oracle Driver Hell" href="http://www.webrade.com/blogs/darrin/2008/10/23/OracleClientODACOnVistaX64MostlyWorkingFinally.aspx" target="_blank" rel="tag">Vista Oracle Driver Hell</a> once again.&#160; So I installed Map 2010, started it up and tried to connect to my Oracle server.&#160; You guessed it.&#160; Connection Failed.</p>
<p>The problem is this.&#160;&#160; x64 Applications cannot use the x86 driver.&#160; In my previous attempts to get basic Oracle/ODP connectivity on my x64 Vista machine I ended up running the 11g x86 Oracle client.&#160; Today I was back to the Oracle download site – and lookie lookie.&#160; They’ve released an <a title="Oracle x64 Vista/Windows 2008 Client" href="http://www.oracle.com/technology/software/products/database/oracle11g/111070_win64_2008soft.html" target="_blank" rel="tag">Oracle Server 2008 x64 client</a>!&#160; 2008 is basically Vista so, maybe, just maybe – I thought Oracle will give us some x64 love.&#160; Here are some steps that will help you get running:</p>
<p>First thing is first.&#160; Backup your TNSnames.ora.&#160; Its found in the network\admin folder.&#160; </p>
<p>Next I un-installed the x86 11.1.0.6 client.&#160;&#160; Delete the leftovers with windows explorer.</p>
<p>Next download both the 11.1.0.7 client for both x86 and x64 (yes, we need to run with both…)</p>
<p>First I installed the x64 client.&#160; I like to do full runtime installations.&#160; </p>
<p>Next, I copy my backed up tnsnames.ora into the network\admin folder.</p>
<p>Now fire up Map 2010 x64 – connect to Oracle server – Success!&#160; Happy Happy Days.&#160; Unfortunately, fire up <a title="Toad for Oracle" href="http://www.quest.com/toad-for-oracle/" target="_blank" rel="tag">Toad for Oracle</a> (which is still 32 bit) and it fails with an error of “Cannot find OCI.DLL”.&#160; Doh.</p>
<p>So, I go ahead and install the Oracle 11.1.0.7&#160; x86 client.&#160; I install it to the client_2 folder.&#160; Then copy my tnsnames backup into the network\admin folder in the client_2 folder.&#160; Restart Toad, and success! </p>
<p>Now I want to check one last thing.&#160; Last time I was dealing with this fun issue – I had to set my development projects to only run in x86 mode.&#160; So, I fire up my <a title="FullCircle - Excel to Database / Database to Excel" href="http://www.landoris.com/Solutions/FullCircle/" target="_blank" rel="tag">FullCircle</a> development project and try it out.&#160; Running IIS in x86 mode works.&#160;&#160; Running IIS in x64 mode failed..</p>
<p>The &#8216;MSDAORA&#8217; provider is not registered on the local machine</p>
<p>It seems the Microsoft MSDAORA provider doesn’t exist in x64 – so change your connection to use the Oracle OraOLEDB.Oracle instead and x64 projects run no problem.&#160; It would be perfect to one day get one install that does both x86 and x64 – but for now, I’m content with this setup.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:11f220e3-6c4c-4deb-b192-94e77f7b166c" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Oracle" rel="tag">Oracle</a>,<a href="http://technorati.com/tags/Vista" rel="tag">Vista</a>,<a href="http://technorati.com/tags/x64" rel="tag">x64</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
