<?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>info.michael-simons.eu &#187; Oracle DB</title>
	<atom:link href="http://info.michael-simons.eu/tag/oracle-db/feed/" rel="self" type="application/rss+xml" />
	<link>http://info.michael-simons.eu</link>
	<description>Just another nerd blog</description>
	<lastBuildDate>Wed, 08 Feb 2012 10:26:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Oracle XE environment variables on Linux</title>
		<link>http://info.michael-simons.eu/2008/06/04/oracle-xe-environment-variables-on-linux/</link>
		<comments>http://info.michael-simons.eu/2008/06/04/oracle-xe-environment-variables-on-linux/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 08:43:20 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[Oracle DB]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=172</guid>
		<description><![CDATA[Just a quick reminder for myself: With the default installation of an Oracle Express (Oracle XE) comes two shell script with all the necessary environment variables to use sql*plus, exp, imp and the like on the command line: source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh respectively source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.csh Share This]]></description>
			<content:encoded><![CDATA[<p>Just a quick reminder for myself:</p>
<p>With the default installation of an Oracle Express (<a href="http://www.oracle.com/technology/products/database/xe/index.html">Oracle XE</a>) comes two shell script with all the necessary environment variables to use sql*plus, exp, imp and the like on the command line:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">source</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>oracle<span style="color: #000000; font-weight: bold;">/</span>xe<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>oracle<span style="color: #000000; font-weight: bold;">/</span>product<span style="color: #000000; font-weight: bold;">/</span>10.2.0<span style="color: #000000; font-weight: bold;">/</span>server<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>oracle_env.sh</pre></div></div>

<p>respectively</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">source</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>oracle<span style="color: #000000; font-weight: bold;">/</span>xe<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>oracle<span style="color: #000000; font-weight: bold;">/</span>product<span style="color: #000000; font-weight: bold;">/</span>10.2.0<span style="color: #000000; font-weight: bold;">/</span>server<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>oracle_env.csh</pre></div></div>

<p class="akst_link"><a href="http://info.michael-simons.eu/?p=172&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_172" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2008/06/04/oracle-xe-environment-variables-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JDBC: Autogenerated keys revisited.</title>
		<link>http://info.michael-simons.eu/2008/04/02/jdbc-autogenerated-keys-revisited/</link>
		<comments>http://info.michael-simons.eu/2008/04/02/jdbc-autogenerated-keys-revisited/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 12:44:07 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle DB]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=158</guid>
		<description><![CDATA[Some months ago i wrote about retrieving auto generated values with JDBC from an Oracle Database: JDBC: Get autogenerated keys on a Oracle DB. The solution i presented in the previous article doesn&#8217;t run in a Oracle Java Stored Procedure. To accomplish this, use a callable statement like this: final String sql = &#34;BEGIN INSERT [...]]]></description>
			<content:encoded><![CDATA[<p>Some months ago i wrote about retrieving auto generated values with JDBC from an Oracle Database: <a href="http://info.michael-simons.eu/2007/10/09/jdbc-get-autogenerated-keys-on-a-oracle-db/">JDBC: Get autogenerated keys on a Oracle DB</a>.</p>
<p>The solution i presented in the previous article doesn&#8217;t run in a Oracle Java Stored Procedure. </p>
<p>To accomplish this, use a callable statement like this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399;">String</span> sql <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;BEGIN INSERT INTO foobar(id, b) VALUES (id.nextval, ?) RETURNING id INTO ?; END;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #003399;">CallableStatement</span> cs <span style="color: #339933;">=</span> connection.<span style="color: #006633;">prepareCall</span><span style="color: #009900;">&#40;</span>sql<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
stmt.<span style="color: #006633;">setString</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span>, <span style="color: #0000ff;">&quot;bar&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
stmt.<span style="color: #006633;">registerOutParameter</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span>, <span style="color: #003399;">Types</span>.<span style="color: #006633;">INTEGER</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
stmt.<span style="color: #006633;">executeUpdate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>		
rv <span style="color: #339933;">=</span> rs.<span style="color: #006633;">getInt</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This way you get the id generated by the sequence id without first selecting and then using it.</p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=158&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_158" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2008/04/02/jdbc-autogenerated-keys-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Feeling dizzy&#8230;</title>
		<link>http://info.michael-simons.eu/2008/03/26/feeling-dizzy/</link>
		<comments>http://info.michael-simons.eu/2008/03/26/feeling-dizzy/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 10:45:38 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle DB]]></category>
		<category><![CDATA[Oracle Spatial]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/2008/03/26/feeling-dizzy/</guid>
		<description><![CDATA[After staring at this for about a day in various rotations and flips just to get Oracle GeoRaster work together with a homebrew GIS like application made me feel somewhat dizzy. To be cartesian or not cartesian, that is the question Otherwise, Oracle GeoRaster works quite well, at least for that bunch of german TK25 [...]]]></description>
			<content:encoded><![CDATA[<p>After staring at this</p>
<div style="text-align:center;">
<img src="/wp-content/uploads/2008/03/dummy.jpg" alt="dummy" />
</div>
<p>for about a day in various rotations and flips just to get <a href="http://www.oracle.com/technology/sample_code/products/spatial/htdocs/georaster.html">Oracle GeoRaster</a> work together with a homebrew GIS like application made me feel somewhat dizzy. To be cartesian or not cartesian, that is the question <img src='http://info.michael-simons.eu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Otherwise, Oracle GeoRaster works quite well, at least for that bunch of german TK25 maps in GK3 coordinates that used to float around in the filesystem and are now being stored in the database.</p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=154&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_154" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2008/03/26/feeling-dizzy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle 11g: Default case-sensitive passwords</title>
		<link>http://info.michael-simons.eu/2008/01/08/oracle-11g-default-case-sensitive-passwords/</link>
		<comments>http://info.michael-simons.eu/2008/01/08/oracle-11g-default-case-sensitive-passwords/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 10:18:33 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[11g]]></category>
		<category><![CDATA[Oracle DB]]></category>
		<category><![CDATA[Oracle Forms]]></category>
		<category><![CDATA[Oracle Reports]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/2008/01/08/oracle-11g-default-case-sensitive-passwords/</guid>
		<description><![CDATA[ORA-01017: invalid username/password; logon denied Yiipiee&#8230; Although i created my schema with the usually scripts we use, i got a logon denied&#8230; Switching context from Oracle Forms 6 to Reports 6&#8230; (Please, don&#8217;t say anything about legacy apps). I didn&#8217;t notify that passwords are now case-sensitive in a Oracle database (which is a good thing), [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>ORA-01017: invalid username/password; logon denied</p>
</blockquote>
<p>Yiipiee&#8230; Although i created my schema with the usually scripts we use, i got a logon denied&#8230; Switching context from Oracle Forms 6 to Reports 6&#8230; (Please, don&#8217;t say anything about legacy apps).</p>
<p>I didn&#8217;t notify that passwords are now case-sensitive in a Oracle database (which is a good thing), because of two reasons: I created the user via SQL*Plus and there is a environment variable called &#8220;sqlcase&#8221; that converts, if set to upper or lower, all SQL code to the according case. Bummer! Even quoted literals are converted&#8230; Stupid shit, i think. But in my case, this thing was set to mixed, so i ended up with a lower case password as with 11g &#8220;sec_case_sensitive_logon&#8221; is set to true as default:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SHOW</span> parameter sec_case_sensitive_logon
&nbsp;
NAME                     <span style="color: #993333; font-weight: bold;">TYPE</span>    <span style="color: #993333; font-weight: bold;">VALUE</span>
<span style="color: #808080; font-style: italic;">------------------------ ------- -----</span>
sec_case_sensitive_logon <span style="color: #993333; font-weight: bold;">BOOLEAN</span> <span style="color: #993333; font-weight: bold;">TRUE</span></pre></div></div>

<p>Now with forms things are different, again. Forms runtime don&#8217;t convert the lowercase password in the connect string so i could log in but it converts the password to uppercase if you switch contexts to Reports runtime which couldn&#8217;t connect and ended up with the ORA-01017. Weird stuff, as everything else worked as expected, although Forms and Reports 6 are ages old compared to 11g.</p>
<p>In the end, i changed to user to a an uppercase password, so the password passed from Forms to reports is the right one. I didn&#8217;t set sec_case_sensitive_logon to false, as i think, its way better to have standard password handling and to me, this means case-sensitive and nothing else.</p>
<p>I found some valuable information on this topic in the following blog: <a href="http://oradim.blogspot.com/2007/11/oracle-11g-and-ora-01017-invalid.html">Mark A. Williams :: Blog</a>, didn&#8217;t know about that sqlcase shit before.</p>
<p>For more information see:</p>
<ul>
<li><a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/initparams211.htm#I1010299">SEC_CASE_SENSITIVE_LOGON</a></li>
<li><a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b31189/ch12040.htm#i2699335">sqlcase</a></li>
<li><a href="http://download.oracle.com/docs/cd/B28359_01/network.111/b28531/authentication.htm#CHDJDCGI">Enabling or Disabling Password Case Sensitivity</a></li>
</ul>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=139&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_139" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2008/01/08/oracle-11g-default-case-sensitive-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Oracle 11g Database on OEL5</title>
		<link>http://info.michael-simons.eu/2007/12/12/installing-oracle-11g-database-on-oel5/</link>
		<comments>http://info.michael-simons.eu/2007/12/12/installing-oracle-11g-database-on-oel5/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 14:06:09 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[11g]]></category>
		<category><![CDATA[Oracle DB]]></category>
		<category><![CDATA[Oracle VM]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/2007/12/12/installing-oracle-11g-database-on-oel5/</guid>
		<description><![CDATA[As a last post in the series (1, 2, 3, 4): Installing the latest and greatest incarnation of the Oracle Database named &#8220;Oracle 11g&#8221; on Oracle Enterprise Linux 5 running as a paravirtualized machine on Oracle VM Server. Honestly, i was afraid of installing Oracle the first time under a linux environment but i must [...]]]></description>
			<content:encoded><![CDATA[<p>As a last post in the series (<a href="http://info.michael-simons.eu/2007/11/28/positive-erlebnisse/">1</a>, <a href="http://info.michael-simons.eu/2007/12/11/negative-erlebnisse/">2</a>, <a href="http://info.michael-simons.eu/2007/12/12/installing-oracle-vm-server/">3</a>, <a href="http://info.michael-simons.eu/2007/12/12/installing-oracle-enterprise-linux-5-as-a-vm-in-oracle-vm-server/">4</a>): Installing the latest and greatest incarnation of the Oracle Database named &#8220;Oracle 11g&#8221; on Oracle Enterprise Linux 5 running as a paravirtualized machine on Oracle VM Server.</p>
<p>Honestly, i was afraid of installing Oracle the first time under a linux environment but i must say, the installation was pleasantly easy, following the steps described <a href="http://download.oracle.com/docs/cd/B28359_01/install.111/b32281/toc.htm">here</a>. No surprises at all. My host has a fixed IP adress, no problem with DHCP (although a don&#8217;t quite get why this should be any problem at all).</p>
<p>Fun started after stopping the database.</p>
<p>First: SELINUX is enabled per default under OEL5. I found the <a href="http://www.oracle-base.com/articles/11g/OracleDB11gR1InstallationOnEnterpriseLinux4and5.php">following tutorial</a> which recommends turning SELINUX off. I disagree with that.</p>
<p>After installation complets, the following commands are necessary to enable Oracle to load its shared objects and to some text relocation with it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">chcon <span style="color: #660033;">-t</span> textrel_shlib_t <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>oracle<span style="color: #000000; font-weight: bold;">/</span>product<span style="color: #000000; font-weight: bold;">/</span>11.1.0<span style="color: #000000; font-weight: bold;">/</span>db_1<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libnnz11.so
chcon <span style="color: #660033;">-t</span> textrel_shlib_t <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>oracle<span style="color: #000000; font-weight: bold;">/</span>product<span style="color: #000000; font-weight: bold;">/</span>11.1.0<span style="color: #000000; font-weight: bold;">/</span>db_1<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libclntsh.so.11
chcon <span style="color: #660033;">-t</span> textrel_shlib_t <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>oracle<span style="color: #000000; font-weight: bold;">/</span>product<span style="color: #000000; font-weight: bold;">/</span>11.1.0<span style="color: #000000; font-weight: bold;">/</span>db_1<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libnque11.so
chcon <span style="color: #660033;">-t</span> textrel_shlib_t <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>oracle<span style="color: #000000; font-weight: bold;">/</span>product<span style="color: #000000; font-weight: bold;">/</span>11.1.0<span style="color: #000000; font-weight: bold;">/</span>db_1<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libsqlplus.so</pre></div></div>

<p>otherwise you&#8217;ll some errors like</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>oracle<span style="color: #000000; font-weight: bold;">/</span>product<span style="color: #000000; font-weight: bold;">/</span>11.1.0<span style="color: #000000; font-weight: bold;">/</span>db_1<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ocrconfig.bin: error <span style="color: #000000; font-weight: bold;">while</span> loading shared libraries: <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>oracle<span style="color: #000000; font-weight: bold;">/</span>product<span style="color: #000000; font-weight: bold;">/</span>11.1.0<span style="color: #000000; font-weight: bold;">/</span>db_1<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libnnz11.so: cannot restore segment prot after reloc: Permission denied</pre></div></div>

<p>(Paths may vary) when starting the database.</p>
<p>Speaking of starting, Oracle comes with no batteries included, i.e. a startup script is missing.</p>
<p>I started with the one <a href="http://www.oracle-base.com/articles/linux/AutomatingDatabaseStartupAndShutdownOnLinux.php">described here</a> and added some lines to start the enterprise manager controll, see resources below.</p>
<p>In the meantime, the first import should be finished. The performance of 11g seems ok, on a virtual machine with a minimum of 1GB Ram. Maybe i&#8217;ll post some more impressions in a few weeks.</p>
<h3>Resources</h3>
<ul>
<li><a href="http://download.oracle.com/docs/cd/B28359_01/install.111/b32002/toc.htm">Oracle® Database Installation Guide 11g Release 1 (11.1) for Linux</a></li>
<li><a href="http://www.oracle-base.com/articles/11g/OracleDB11gR1InstallationOnEnterpriseLinux4and5.php">ORACLE-BASE &#8211; Oracle Database 11g Release 1 (11.1) Installation On Enterprise Linux 4.5 and 5.0</a></li>
<li><a href="http://www.oracle-base.com/articles/linux/AutomatingDatabaseStartupAndShutdownOnLinux.php">ORACLE-BASE &#8211; Automating Database Startup and Shutdown on Linux</a></li>
<li><a href="/wp-content/uploads/2007/12/oracle">Sample Oracle Startup Script for Oracle 11G on OEL5</a></li>
</ul>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=135&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_135" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2007/12/12/installing-oracle-11g-database-on-oel5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.510 seconds -->

