<?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>Better Code &#187; Oracle</title>
	<atom:link href="http://bettercode.se/wordpress/category/oracle/feed" rel="self" type="application/rss+xml" />
	<link>http://bettercode.se/wordpress</link>
	<description>better business</description>
	<lastBuildDate>Tue, 16 Apr 2013 08:30:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Cheap Oracle virtualization</title>
		<link>http://bettercode.se/wordpress/338/cheap-oracle-virtualization</link>
		<comments>http://bettercode.se/wordpress/338/cheap-oracle-virtualization#comments</comments>
		<pubDate>Tue, 21 Jun 2011 09:42:40 +0000</pubDate>
		<dc:creator>Max Wenzin</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://bettercode.se/wordpress/?p=338</guid>
		<description><![CDATA[Summary Use multiple Oracle instances in the same machine instead of multiple virtualized hosts in the same machine. Intro I read an article in Computer Sweden today where Kappahl couldn&#8217;t do virtualization of their Oracle databases because of expensive licence costs. (article in swedish) In this article, I would like to offer a simple and [...]]]></description>
				<content:encoded><![CDATA[<h2>Summary</h2>
<p>Use multiple Oracle instances in the same machine instead of multiple virtualized hosts in the same machine.</p>
<h2>Intro</h2>
<p>I read <a href="http://computersweden.idg.se/2.2683/1.392449/kappahl-trottnar-pa-oracles-licensregler">an article in Computer Sweden today where Kappahl couldn&#8217;t do virtualization of their Oracle databases</a> because of expensive licence costs. (article in swedish) In this article, I would like to offer a simple and cheap option to Oracle virtualization.</p>
<h2>Why virtualization?</h2>
<p>Organizations want to virtualize their Oracle databases for many reasons, one being to reduce license costs. Other reasons include reducing hardware costs and making it easy to add new databases.</p>
<p>Simply put, hardware virtualization is basically about exchanging many physical servers for a single big server.</p>
<div id="attachment_345" class="wp-caption aligncenter" style="width: 222px"><a href="http://bettercode.se/wordpress/wp-content/uploads/virtualization.png"><img class="size-medium wp-image-345" title="virtualization" src="http://bettercode.se/wordpress/wp-content/uploads/virtualization-212x300.png" alt="" width="212" height="300" /></a><p class="wp-caption-text">Illustration of virtualization</p></div>
<p>You may prefer <a href="http://en.wikipedia.org/wiki/Virtualization">the wikipedia definition of virtualization</a>, but mine is short, sweet and simple.</p>
<h2>The alternative solution</h2>
<p>Instead of doing Oracle virtualization using VMWare or Oracle VM, you can install several Oracle instances in a single Oracle installation, in a single machine. This is not what people usually mean when they say virtualization, but you get many of the benefits this way, and it will reduce your Oracle license costs!</p>
<h3>Pros</h3>
<ul>
<li>Still easy to start/stop individual instances</li>
<li>Still easy to add/remove individual instances</li>
<li>Still easy to configure memory and disk usage per instance</li>
<li>No need to learn/buy any virtualization technique</li>
</ul>
<h3>Cons</h3>
<ul>
<li>All instances will run on the same Oracle binaries, meaning all will run on the same Oracle version (some may consider this a benefit, when you&#8217;ve reached it&#8230;)</li>
<li>All Oracle instances will run on the same OS.</li>
</ul>
<h2>Real world experience</h2>
<p>I have seen this work very well, especially for testing and development installations. Virtualization of databases in a production environment may not be as common, but there&#8217;s no reason it shouldn&#8217;t work there aswell.</p>
<h2>I am for hire</h2>
<p>If you want my help with your Oracle environment &#8211; don&#8217;t hesitate to <a title="Contact" href="http://bettercode.se/wordpress/en/contact">contact me</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://bettercode.se/wordpress/338/cheap-oracle-virtualization/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Repeat Yourself in PLSQL parameters</title>
		<link>http://bettercode.se/wordpress/247/dont-repeat-yourself-in-plsql-parameters</link>
		<comments>http://bettercode.se/wordpress/247/dont-repeat-yourself-in-plsql-parameters#comments</comments>
		<pubDate>Mon, 25 Apr 2011 20:46:01 +0000</pubDate>
		<dc:creator>Max Wenzin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://bettercode.se/wordpress/?p=247</guid>
		<description><![CDATA[When writing PLSQL in the Oracle database, you define parameters to a function/procedure like this: Instead of writing it like that, consider using a table.column definition as type for your parameter! This way, if you change your table, you will not also have to change your code! Example: Now, if you for some reason change [...]]]></description>
				<content:encoded><![CDATA[<p>When writing PLSQL in the Oracle database, you define parameters to a function/procedure like this:</p>
<pre class="brush: sql; title: ; notranslate">
FUNCTION getFullName(iUserId IN INTEGER) RETURN VARCHAR2
IS
BEGIN
   --TODO: Implement this
   RETURN &quot;&quot;;
END getFullname;
</pre>
<p>Instead of writing it like that, consider using a table.column definition as type for your parameter! This way, if you change your table, you will not also have to change your code!</p>
<p>Example:</p>
<pre class="brush: sql; title: ; notranslate">
FUNCTION getFullName(iUserId IN SIGNUP.ID%TYPE) RETURN VARCHAR2
IS
BEGIN
   --TODO: Implement this
   RETURN &quot;&quot;;
END getFullname;
</pre>
<p>Now, if you for some reason change the ID column in the SIGNUP table to be something other than INTEGER, you can leave the code as is! Much more DRY!</p>
]]></content:encoded>
			<wfw:commentRss>http://bettercode.se/wordpress/247/dont-repeat-yourself-in-plsql-parameters/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unit testing plsql</title>
		<link>http://bettercode.se/wordpress/200/unit-testing-plsql</link>
		<comments>http://bettercode.se/wordpress/200/unit-testing-plsql#comments</comments>
		<pubDate>Sat, 23 Apr 2011 20:30:41 +0000</pubDate>
		<dc:creator>Max Wenzin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://bettercode.se/wordpress/?p=200</guid>
		<description><![CDATA[My situation I currently have an assignment where there is a large PLSQL code base. It&#8217;s been developed actively for about 12 years and works quite well. I am not saying it&#8217;s flawless, but quite mature. There&#8217;s lots of room for improvement and lots of dead code that needs to be removed. Some of the [...]]]></description>
				<content:encoded><![CDATA[<h2>My situation</h2>
<p>I currently have an assignment where there is a large PLSQL code base. It&#8217;s been developed actively for about 12 years and works quite well. I am not saying it&#8217;s flawless, but quite mature. There&#8217;s lots of room for improvement and lots of dead code that needs to be removed.</p>
<p>Some of the plsql is called from the Java DAO layer of a front-end web application, but most of it is used for backoffice functionality. The parts that are accessed from the Java layer are tested through integration tests based on JUnit, but the large part that is only used from the backoffice has no unit test coverage.</p>
<h2>Doing something about it</h2>
<p>I&#8217;ve known about the utPLSQL framework for many years, but never gotten around to actually use it in a Continuous Integration environment. I decided it was time to do something about it and started by adding the installation of utPLSQL to the already in place automated database reinstallation build. The installation part was quite easy, I just dropped the utPLSQL install scripts into our own source control repository and made it part of our db install. Uninstalling utPLSQL was a bit tricker since it creates public synonyms and those are not dropped when the Oracle db user/schema is dropped. (And that&#8217;s how we &#8220;uninstall&#8221; our other schemas normally.) And if I let those public synonyms stay there, I would get errors on the next install. So I simply need to create a small script that dropped those public synonyms as part of the uninstall/install (reinstall <img src='http://bettercode.se/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) process.</p>
<p>After utPLSQL was part of our db installation, I created a couple of sample utPLSQL tests and tried them out. No problems there. I could run them from the SQL prompt without problem. But what I really wanted was to make them part of the build process in Hudson. So I started writing a JUnit test that would wrap the utPLSQL tests and then it would be runnable from Hudson.</p>
<p>After I while it struck me that I was writing something that someone else had probably written already and after a quick google I found the maven-utplsql-plugin. (insert holy graal sound here) Since we use Maven for the builds, this seemed like a perfect match. However, there were some pitfalls.</p>
<h2>Some pitfalls</h2>
<p>The maven-utplsql-plugin is currently not available in any public Maven repository. So, I had to download it and install it add it manually to our local Maven repo. The only problem was that our Maven repo was setup not to accept SNAPSHOT releases, and since we didn&#8217;t want to change that, I had to HACK the source files in the zip file and replace SNAPSHOT with STABLE in order for our Maven repo to accept the new artifact. In fact, this may lead to that I have to do some contributions to the dev team of the maven-utplsql-plugin to get it up to a RELEASE version and maybe even up on a public repository?</p>
<h2>The happy ending</h2>
<p>Finally, I added a new task to our db-reinstall profile in Maven. The new task simply calls the plugin which runs the tests. SUCCESS!</p>
<h2>My sources</h2>
<p>This guy got around to doing this a lot sooner than me: <a href="http://www.theserverlabs.com/blog/2009/05/18/continuous-integration-with-oracle-plsql-utplsql-and-hudson/">http://www.theserverlabs.com/blog/2009/05/18/continuous-integration-with-oracle-plsql-utplsql-and-hudson/</a></p>
<p>Here&#8217;s the Maven plugin for utplsql: <a href="http://code.google.com/p/maven-utplsql-plugin/">http://code.google.com/p/maven-utplsql-plugin/</a></p>
<p>The utPLSQL project: <a href="https://sourceforge.net/projects/utplsql/">https://sourceforge.net/projects/utplsql/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bettercode.se/wordpress/200/unit-testing-plsql/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Oracle Business Intelligence 11g Launch</title>
		<link>http://bettercode.se/wordpress/78/oracle-business-intelligence-11g-launch</link>
		<comments>http://bettercode.se/wordpress/78/oracle-business-intelligence-11g-launch#comments</comments>
		<pubDate>Wed, 01 Sep 2010 19:14:57 +0000</pubDate>
		<dc:creator>Max Wenzin</dc:creator>
				<category><![CDATA[eGaming]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://bettercode.se/wordpress/?p=78</guid>
		<description><![CDATA[Tomorrow I will be attending the &#8220;Oracle Business Intelligence 11g Launch&#8221; at the Hilton Hotel Slussen, Stockholm, Sweden. Hoping it will give me some good insights and opportunities related to a BI project at Expekt.com. Will let you know if Oracle are evil bastards or just misunderstood capitalists.]]></description>
				<content:encoded><![CDATA[<p>Tomorrow I will be attending the &#8220;Oracle Business Intelligence 11g Launch&#8221; at the Hilton Hotel Slussen, Stockholm, Sweden.</p>
<p>Hoping it will give me some good insights and opportunities related to a BI project at Expekt.com.</p>
<p>Will let you know if Oracle are evil bastards or just misunderstood capitalists. <img src='http://bettercode.se/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://bettercode.se/wordpress/78/oracle-business-intelligence-11g-launch/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
