<?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>All Things Oracle</title>
	<atom:link href="http://allthingsoracle.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://allthingsoracle.com</link>
	<description>Content for Oracle Developers and DBAs</description>
	<lastBuildDate>Thu, 23 May 2013 14:14:51 +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>End to End Metrics: Building a performance bridge between the Developer and the DBA</title>
		<link>http://allthingsoracle.com/end-to-end-metrics-building-a-performance-bridge-between-the-developer-and-the-dba/</link>
		<comments>http://allthingsoracle.com/end-to-end-metrics-building-a-performance-bridge-between-the-developer-and-the-dba/#comments</comments>
		<pubDate>Thu, 16 May 2013 16:51:03 +0000</pubDate>
		<dc:creator>Lasse Jenssen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://allthingsoracle.com/?p=4195</guid>
		<description><![CDATA[ Weds May 29th, 2013  Central Europe: 17:00 UK: 16:00 East USA: 11.00 Central USA: 10.00 Pacific USA: 08.00 Register now End-to-end metrics bridge the gap between the developer and the DBA, the Developer and Oracle, and the DBA and the application. Most applications today are n-tiers using a connection pool on the application tier, which makes them very hard to trace. With a little... <a class="read-more" href="http://allthingsoracle.com/end-to-end-metrics-building-a-performance-bridge-between-the-developer-and-the-dba/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p><img alt="calendar icon" src="http://www.red-gate.com/assets/images/icons/calendar-icon.png" /> Weds May 29th, 2013<br />
<img alt="clock icon" src="http://www.red-gate.com/products/oracle-development/education/assets/clock-icon.png" /> Central Europe: 17:00 UK: 16:00 East USA: 11.00 Central USA: 10.00 Pacific USA: 08.00</p>
<p><a href="http://www.red-gate.com/products/oracle-development/deployment-suite-for-oracle/education/webinars/webinar-oracle-end-to-end-metrics-lasse-jenssen?utm_source=allthingsoracle&amp;utm_medium=pubLink&amp;utm_content=webinar&amp;utm_campaign=deploymentsuitefororacle" target="blank"><button class="btn"><span>Register now</span></button></a></p>
<p>End-to-end metrics bridge the gap between the developer and the DBA, the Developer and Oracle, and the DBA and the application.</p>
<p>Most applications today are n-tiers using a connection pool on the application tier, which makes them very hard to trace. With a little bit of collaboration between developers and DBAs, tracing can be turned on very easily for your specific application module, a specific user, IP-address, customer, or any other metric of your choice.</p>
<p>End-to-end metrics can also be helpful in your development process, and in the day-to-day monitoring of your application.</p>
<p>A live Q&amp;A session with Lasse Jenssen will follow the presentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://allthingsoracle.com/end-to-end-metrics-building-a-performance-bridge-between-the-developer-and-the-dba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Built-in Performance Monitoring in Oracle and SQL Server</title>
		<link>http://allthingsoracle.com/built-in-performance-monitoring-in-oracle-and-sql-server/</link>
		<comments>http://allthingsoracle.com/built-in-performance-monitoring-in-oracle-and-sql-server/#comments</comments>
		<pubDate>Thu, 16 May 2013 16:41:16 +0000</pubDate>
		<dc:creator>Jonathan Lewis</dc:creator>
				<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database Development]]></category>
		<category><![CDATA[Webinar]]></category>

		<guid isPermaLink="false">http://allthingsoracle.com/?p=4182</guid>
		<description><![CDATA[&#160; Watch now While the primary focus of both Oracle and SQL Server is on relational database management, there are a number of tools that come with each software package that are focused around monitoring and investigating the performance of the servers. These monitoring tools vary wildly between the two platforms, yet still have a lot in common because of... <a class="read-more" href="http://allthingsoracle.com/built-in-performance-monitoring-in-oracle-and-sql-server/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>&nbsp;<br />
<a href="http://www.red-gate.com/products/oracle-development/deployment-suite-for-oracle/education/webinars/webinar-oracle-sql-server-performance-monitoring?utm_source=allthingsoracle&amp;utm_medium=pubLink&amp;utm_content=webinar&amp;utm_campaign=deploymentsuitefororacle" target="blank"><button class="btn"><span>Watch now</span></button></a></p>
<p>While the primary focus of both Oracle and SQL Server is on relational database management, there are a number of tools that come with each software package that are focused around monitoring and investigating the performance of the servers. These monitoring tools vary wildly between the two platforms, yet still have a lot in common because of shared fundamentals.</p>
<p>In their latest live &#8216;Oracle vs. SQL Server&#8217; discussion, Jonathan Lewis (Oracle Ace Director, OakTable Network) and Grant Fritchey (Microsoft SQL Server MVP) will look at built-in performance monitoring mechanisms and tools.</p>
<p>As before, this will be a live discussion with <strong>no supporting slides</strong>, and will conclude with a Q+A session with Jonathan and Grant. Be prepared for a lively exchange that will not only entertain, but will teach you key concepts on Oracle and SQL Server.</p>
]]></content:encoded>
			<wfw:commentRss>http://allthingsoracle.com/built-in-performance-monitoring-in-oracle-and-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Database 12c and APEX</title>
		<link>http://allthingsoracle.com/oracle-database-12c-and-apex/</link>
		<comments>http://allthingsoracle.com/oracle-database-12c-and-apex/#comments</comments>
		<pubDate>Thu, 16 May 2013 16:02:52 +0000</pubDate>
		<dc:creator>Dimitri Gielis</dc:creator>
				<category><![CDATA[12c]]></category>
		<category><![CDATA[APEX]]></category>
		<category><![CDATA[Database Development]]></category>

		<guid isPermaLink="false">http://allthingsoracle.com/?p=4177</guid>
		<description><![CDATA[The below content is based on a David Peake&#8216;s presentation at OOW 2012 and APEX World 2013. As the Oracle Database 12c is not out yet at the time of writing, note that things might be different in the final product. The Oracle Database 12c is a major release in Oracle history, as it contains a complete redesign of the underlying architecture. Two... <a class="read-more" href="http://allthingsoracle.com/oracle-database-12c-and-apex/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>The below content is based on a <a href="http://dpeake.blogspot.com/" target="_blank">David Peake</a>&#8216;s presentation at OOW 2012 and APEX World 2013.<br />
<i><br />
</i><i>As the Oracle Database 12c is not out yet at the time of writing, note that things might be different in the final product.</i></p>
<p>The Oracle Database 12c is a major release in Oracle history, as it contains a complete redesign of the underlying architecture. Two things will come back a lot when you read about Oracle DB 12c; the Container Database (CDB) and the Pluggable Database (PDB).</p>
<p>The below image shows how it works; you have a container database which the memory and processes are attached at, and then you can have multiple other databases that you can just plugin.</p>
<div><a href="http://2.bp.blogspot.com/-dZAYZhQT8ys/UYQ0zweJlDI/AAAAAAAAHfo/6d2Bn6eHHw4/s1600/Screen+Shot+2013-05-03+at+18.05.06.png"><img alt="" src="http://2.bp.blogspot.com/-dZAYZhQT8ys/UYQ0zweJlDI/AAAAAAAAHfo/6d2Bn6eHHw4/s640/Screen+Shot+2013-05-03+at+18.05.06.png" width="640" height="288" border="0" /></a></div>
<div></div>
<p>You find more information about this architecture <a href="http://www.unbreakablecloud.com/wordpress/2012/10/06/oracle-database-12c-new-features-pluggable-databases/" target="_blank">here</a>.</p>
<p>So what does Oracle DB 12c mean for APEX? Find out on my <a title="Oracle Database 12c and APEX" href="http://dgielis.blogspot.co.uk/2013/05/oracle-database-12c-and-apex.html" target="_blank">blog post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://allthingsoracle.com/oracle-database-12c-and-apex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing your First Oracle Cloud Application</title>
		<link>http://allthingsoracle.com/developing-your-first-oracle-cloud-application/</link>
		<comments>http://allthingsoracle.com/developing-your-first-oracle-cloud-application/#comments</comments>
		<pubDate>Thu, 09 May 2013 13:01:57 +0000</pubDate>
		<dc:creator>Morten Egan</dc:creator>
				<category><![CDATA[All Things Oracle Full Articles]]></category>
		<category><![CDATA[APEX]]></category>
		<category><![CDATA[Application Development]]></category>
		<category><![CDATA[Oracle Cloud]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[PL/SQL]]></category>

		<guid isPermaLink="false">http://allthingsoracle.com/?p=3901</guid>
		<description><![CDATA[Prerequisites A local database, for development SQL Developer version 3.2.20.09.87 or higher (Download) Wallet Manager Getting started To get started, we first need an account on the Oracle cloud. So go to Oracle Cloud, login with your OTN account and request a trial period. You will need to enter a credit card for verification, but it will not get charged... <a class="read-more" href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<h2>Prerequisites</h2>
<ul>
<li>A local database, for development</li>
<li>SQL Developer version 3.2.20.09.87 or higher (<a href="http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index-098778.html" title="Download required version here" target="_blank">Download</a>)</li>
<li>Wallet Manager</li>
</ul>
<h2>Getting started</h2>
<p>To get started, we first need an account on the Oracle cloud. So go to <a href="http://cloud.oracle.com" title="Oracle Cloud" target="_blank">Oracle Cloud</a>, login with your OTN account and request a trial period. You will need to enter a credit card for verification, but it will not get charged with anything.</p>
<p>Once you have an account, we first need to setup and configure some of the basics, when dealing with the Oracle cloud. At first you should login to your cloud account at cloud.oracle.com. Here it will list the different services that you subscribe to. Note down the Identity Domain name, since we will use this throughout the entire article. This is your unique identifier at oracle. </p>
<p>Click the services link as show here:</p>
<div id="attachment_3943" class="wp-caption alignnone" style="width: 595px"><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/services_1_edit/" rel="attachment wp-att-3943"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/services_1_edit-1024x473.jpg" alt="Show screen with details" width="585" height="270" class="size-large wp-image-3943" /></a>
<p class="wp-caption-text">Service Details</p>
</div>
<p> and note down the following from the details section, of the overview tab:</p>
<p><strong><em>Service Details</em></strong></p>
<p>Host &#8211; This is the host URL assigned to your account, and we need this for our SQL Developer connection and later on, as we develop a REST service, for our demo application.</p>
<p><strong><em>Service SFTP Details</em></strong></p>
<p>We need host, port and username for the Service SFTP account. This account is used in the SQL Developer connection, when we upload tables/data/objects to the cloud database. The other SFTP account we do not need for this demo. It is for downloading datapump exports, if you choose to close your account.</p>
<p><strong><em>Changing SFTP account password</em></strong></p>
<p>On the services page click on the Identity Console button:</p>
<p><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/services_3_edit/" rel="attachment wp-att-3949"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/services_3_edit-1024x168.jpg" alt="" width="585" height="95" class="alignnone size-large wp-image-3949" /></a></p>
<p>When the identity console is loaded, click manage users link, enter a percent sign into the search box and press search. From the result list choose the username, that is equal to our SFTP details from the last paragraph. Click the change password button, and change the password to something known.</p>
<p><strong><em>Creating Cloud SQL Developer user and connection</em></strong></p>
<p>Once we changed the password we are ready to login to the database service for first time, and create the user we need for the connection from SQL Developer. Go back to the Service page, and click the &#8220;Launch Service&#8221; button:</p>
<div id="attachment_3946" class="wp-caption alignnone" style="width: 595px"><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/services_2_edit/" rel="attachment wp-att-3946"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/services_2_edit-1024x157.jpg" alt="Launch service button" width="585" height="89" class="size-large wp-image-3946" /></a>
<p class="wp-caption-text">Launch service button</p>
</div>
<p> Log in to APEX using your Identity Domain name and your cloud account.<br />
Once we are logged into APEX we need to create a user for the SQL Developer connection. Click on the &#8220;Administration&#8221; tab, and choose &#8220;Manage Users and Groups&#8221;. Click on the &#8220;Create User&#8221; button, and create a user.<br />
Fill in username, email address, a password (change requirement to change password at login, to no) and choose &#8220;SQL Developer&#8221; under user groups:</p>
<p><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/create_user_edit/" rel="attachment wp-att-3952"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/create_user_edit.jpg" alt="" width="679" height="909" class="alignnone size-full wp-image-3952" /></a></p>
<p>Now the user is created, we need to start up SQL Developer. Once started right click &#8220;Cloud Connections&#8221; and choose &#8220;New Cloud Connection&#8221;. Choose a name for your connection (I tend to use my identity domain name). The username for the Database, is the user we have just created in APEX, and the host, is the string that we noted down, from earlier, on the service details screen. It should be something like https://database-trial(identity-domain).db.(datacenter location).oraclecloudapps.com/apex/. The SFTP connection we also collected from the service details screen earlier:</p>
<div id="attachment_3955" class="wp-caption alignnone" style="width: 660px"><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/sqldev_conn_edit/" rel="attachment wp-att-3955"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/sqldev_conn_edit.jpg" alt="SQL Developer connection screenshot" width="650" height="322" class="size-full wp-image-3955" /></a>
<p class="wp-caption-text">SQL Developer connection screenshot</p>
</div>
<p>Once all that is filled in, we should be able to expand that connection, type in the password, and see some of the demo tables, that are automatically deployed to a trial account.</p>
<p><strong><em>Creating development schema in our local database</em></strong></p>
<p>Create a sys connection to a local database, that we are going to use to develop our demo application. In that database create a user defined as follows:</p>
<pre>create user localcloud identified by localcloud
default tablespace users
temporary tablespace temp;

grant create session, resource to localcloud;</pre>
<p>When the user is created, create a connection within SQL Developer to that user. </p>
<p>Let us move on to the actual demo application.</p>
<h2>Our demo application</h2>
<p>Our small demo application, is going to be a central location, to register errors from all our local databases, so we can see which type of user errors are occuring the most, and we can spot trends in application usage. For this we will develop a REST webservice that our local databases will call whenever an error occurs, and we will create a small APEX application to report on the errors and occurrences.</p>
<h2>Creating the database objects and deploying them to the cloud</h2>
<p>For this small application we will create 2 tables. One to hold information about the databases that calls our webservice, and one to contain a row for each error that occurs in our databases. Create these tables inside the localcloud schema, that was created earlier.</p>
<p><strong>DATABASES</strong> table:</p>
<pre>create table databases (
	db_id		number,
	db_name		varchar2(4000),
	db_reg		date
);

alter table databases add constraint db_pk primary key(db_id);</pre>
<p><strong>DATABASE_ERRORS</strong> table:</p>
<pre>create table database_errors (
	db_id		number		constraint db_err_id_ref references databases(db_id),
	error_num	number		,
	error_reg	date
);</pre>
<p>Once they are are created, I&#8217;ll insert a row for my local database, so I have a test database available.</p>
<p>To get the information to insert, perform the following select as sys against your local database:</p>
<pre>SQL&gt; select dbid, name from v$database;

      DBID NAME
---------- ---------
1404381942 ME11</pre>
<p>with that I will insert a row into the <strong>databases</strong> table, as the localcloud user:</p>
<pre>insert into databases values (1404381942, 'ME11', sysdate);
commit;</pre>
<h2>Transferring tables and data to your cloud database</h2>
<p>Inside SQL Developer, navigate to View-&gt;Cart, to open the &#8220;cloud shopping cart&#8221;:</p>
<p><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/cart_edit/" rel="attachment wp-att-3958"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/cart_edit.jpg" alt="" width="774" height="281" class="alignnone size-full wp-image-3958" /></a></p>
<p>This is tool we use to transfer database objects from our local database to the cloud database. We simply drag and drop the objects from our local connection tree, into the cart. When in the cart, mark the option to transfer data for the databases table and click the &#8220;Deploy Cloud&#8221; button and SQL Developer will package it into a zip file, sftp it to your services account, and deploy it to the database:</p>
<div id="attachment_3959" class="wp-caption alignnone" style="width: 595px"><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/cart_2_edit/" rel="attachment wp-att-3959"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/cart_2_edit-1024x602.jpg" alt="SQL Developer - Deploy from cart to cloud" width="585" height="343" class="size-large wp-image-3959" /></a>
<p class="wp-caption-text">SQL Developer &#8211; Deploy from cart to cloud</p>
</div>
<p>To check the status of your deployment, navigate to the &#8220;Deployments&#8221; option the cloud connection tree, and look at the status field. When it says &#8220;Processed&#8221; the deployment is finished and we should be able to see the tables we created in our local database, inside the cloud database as well.</p>
<h2>Creating a REST webservice</h2>
<p>Oracle Cloud, does not accept sqlnet connections, and you cannot deploy software to the service. So the only way to communicate with the cloud from the outside world, is using http protocol. To allow our local databases to send data to our cloud application we will create a REST webservice inside APEX, and call that to register errors happening on the local database. To create a REST webservice log into your cloud account, and launch the APEX service. Inside APEX navigate to &#8220;SQL Workshop&#8221;-&gt;&#8221;RESTful Services&#8221;.</p>
<p>Click the create button, and fill out the first form page as shown here:</p>
<div id="attachment_3962" class="wp-caption alignnone" style="width: 595px"><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/create_rest_1/" rel="attachment wp-att-3962"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/create_REST_1-1024x424.jpg" alt="Create REST Module and Template" width="585" height="242" class="size-large wp-image-3962" /></a>
<p class="wp-caption-text">Create REST Module and Template</p>
</div>
<p>What we have created here is the basic definition of a REST service. Now we need to create a handler to do something when our REST url is called. Click the &#8220;Create Handler&#8221; link below the &#8220;demo_errors/{dbid}/{errornum}&#8221; template, and fill out the form as follows:</p>
<div id="attachment_3966" class="wp-caption alignnone" style="width: 595px"><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/create_rest_2_edit-2/" rel="attachment wp-att-3966"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/create_REST_2_edit1-1024x551.jpg" alt="Create REST Handler" width="585" height="314" class="size-large wp-image-3966" /></a>
<p class="wp-caption-text">Create REST Handler</p>
</div>
<p>Now we can test the service. Click the &#8220;Set Bind Variables&#8221; button, and set the value of DBID to what you insert earlier into the <strong>databases</strong> table (in my case it was 1404381942), and set errornum to any number, and click the &#8220;Test&#8221; button. Depending on whether or not Oracle has fixed the bug, the test window might fail with the following:</p>
<p><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/rest_call_1_edit/" rel="attachment wp-att-3971"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/rest_call_1_edit.jpg" alt="" width="818" height="438" class="alignnone size-full wp-image-3971" /></a></p>
<p>As you can see, the second parameter {errornum} is not set to the value, that was typed in the set bind variables screen. To fix this copy and paste the url to a new browser window, change %7Berrornum%7D with a random number, and you should now see:</p>
<div id="attachment_3972" class="wp-caption alignnone" style="width: 799px"><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/rest_call_2_edit/" rel="attachment wp-att-3972"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/rest_call_2_edit.jpg" alt="Successful REST call " width="789" height="130" class="size-full wp-image-3972" /></a>
<p class="wp-caption-text">Successful REST call </p>
</div>
<h2>Creating a couple of APEX screens</h2>
<p>To see the data that our webservice inserts, I will just create one simple screen. I am not an APEX expert, so it will be default all the way. So click the Application Builder option, and choose &#8220;Create&#8221; to make a new application. Choose a database application. On the next screen give it a name (I chose &#8220;ATO Demo App&#8221;), and click the &#8220;Create Application&#8221; button, defaulting all other steps. When done, you should see a list of pages like the following:</p>
<div id="attachment_3977" class="wp-caption alignnone" style="width: 595px"><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/apex_app_1/" rel="attachment wp-att-3977"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/apex_app_1-1024x392.jpg" alt="Apex page list" width="585" height="223" class="size-large wp-image-3977" /></a>
<p class="wp-caption-text">Apex page list</p>
</div>
<p>Click on the home link, and when you get to the page definition, right click on &#8220;Position 01&#8243; and choose &#8220;Create&#8221;. Choose &#8220;Chart&#8221; as region type and click next. Choose a column chart and click next. Choose a simple 2D Column type, and continue. Give it a Title: &#8220;Daily Error Count&#8221; and click next. Give the same title, and just accept rest as default and click next. As the source we wil use the following SQL:</p>
<pre>select
null link,
to_char(trunc(error_reg, 'DD'),'DD-MM') value,
count(error_num)
from database_errors
group by to_char(trunc(error_reg, 'DD'),'DD-MM')
order by 2 asc;</pre>
<p>ignore the rest, and click next. Accept defaults, and click &#8220;Create Region&#8221;. Try and run the application, and you should see something like this:</p>
<div id="attachment_3986" class="wp-caption alignnone" style="width: 595px"><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/apex_2_edit/" rel="attachment wp-att-3986"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/apex_2_edit-1024x827.jpg" alt="Apex Application" width="585" height="472" class="size-large wp-image-3986" /></a>
<p class="wp-caption-text">Apex Application</p>
</div>
<p>So now we have a webservice that, when called will insert data into our <strong>database_errors</strong> table. We have a simple screen to display that data as a graph. So how do we call the webservice from outside the cloud.</p>
<h2>Calling Oracle Cloud REST Services from a local database</h2>
<p>The first thing we need to do is download the certificates from the Oracle Cloud. I used Firefox, so click on the litte lock to left of the url address bar, when you are logged into your service, and press more information. Go to the security tab and press show certificates:</p>
<div id="attachment_3991" class="wp-caption alignnone" style="width: 695px"><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/cert_1_edit/" rel="attachment wp-att-3991"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/cert_1_edit.jpg" alt="Show Certificates" width="685" height="557" class="size-full wp-image-3991" /></a>
<p class="wp-caption-text">Show Certificates</p>
</div>
<p>Now export both the certificate for the oraclecloudapps.com domain, and the Verisign certificate above that, each to a .crt file:</p>
<div id="attachment_3992" class="wp-caption alignnone" style="width: 555px"><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/cert_2_edit/" rel="attachment wp-att-3992"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/cert_2_edit.jpg" alt="Certificate Export" width="545" height="665" class="size-full wp-image-3992" /></a>
<p class="wp-caption-text">Certificate Export</p>
</div>
<p>Now we start up the Wallet Manager from our local database installation. Create a new wallet, and note down the password to the wallet, and select no to create a certificate request:</p>
<div id="attachment_3997" class="wp-caption alignnone" style="width: 745px"><a href="http://allthingsoracle.com/developing-your-first-oracle-cloud-application/wallet_1/" rel="attachment wp-att-3997"><img src="http://allthingsoracle.com/wp-content/uploads/2013/04/wallet_1.jpg" alt="Wallet Manager - create wallet" width="735" height="588" class="size-full wp-image-3997" /></a>
<p class="wp-caption-text">Wallet Manager &#8211; create wallet</p>
</div>
<p>Go to the Operations menu, and select &#8220;Import trusted certificate&#8221;, and import the certificates, that we just exported. Save the wallet, and note down the folder you saved it to.</p>
<p>Next we log into the local database as the sys user. If the database version is 11g (like mine) we first need to create an ACL for the localcloud user. Run the following logged in as sys:</p>
<pre>begin
  dbms_network_acl_admin.create_acl (
    acl         =&gt; 'cloud_http.xml',
    description =&gt; 'HTTP Access',
    principal   =&gt; 'LOCALCLOUD',
    is_grant    =&gt; TRUE,
    privilege   =&gt; 'connect',
    start_date  =&gt; null,
    end_date    =&gt; null
  );
 
  dbms_network_acl_admin.add_privilege (
    acl        =&gt; 'cloud_http.xml',
    principal  =&gt; 'LOCALCLOUD',
    is_grant   =&gt; TRUE,
    privilege  =&gt; 'resolve',
    start_date =&gt; null,
    end_date   =&gt; null
  );
 
  dbms_network_acl_admin.assign_acl (
    acl        =&gt; 'cloud_http.xml',
    host       =&gt; '*.oraclecloudapps.com',
    lower_port =&gt; 443,
    upper_port =&gt; 443
  );
  commit;
end;
/</pre>
<p>Now log into the local database as localcloud. Lets say that I saved my wallet to c:\temp and I chose the password Manager123, and I use the URL from the REST service test, to execute the following:</p>
<pre>exec utl_http.set_wallet('file:c:\temp', 'Manager123');
select utl_http.request('https://database-trialxxxxx.db.xxx.oraclecloudapps.com/apex/ato/demo_errors/1404381942/1555') from dual;</pre>
<p>You should see a result like the following:</p>
<pre>SQL&gt; select utl_http.request('https://database-trialxxxx.db.xxx.oraclecloudapps.com/apex/ato/demo_errors/1404381942/1555') from dual;

UTL_HTTP.REQUEST('HTTPS://DATABASE-TRIALXXX.DB.XXX.ORACLECLOUDAPPS.COM/APEX/ATO
--------------------------------------------------------------------------------
Error registered
</pre>
<p>Now to start registering all errors automatically, we can create a system event trigger as sys, but owned by localcloud, that will call the webservice every time an error happens:</p>
<pre>create or replace trigger localcloud.demo_errors
after servererror
on database

declare

	captured_sql_id			varchar2(1000);
	error_stack_count		number;

	sql_reg				varchar2(32000) := 'select utl_http.request(''https://database-trialxxxx.db.xxx.oraclecloudapps.com/apex/ato/demo_errors/1404381942/#ERR#'') from dual';

begin

	error_stack_count := ora_server_error_depth;

	exec utl_http.set_wallet('file:c:\temp', 'Manager123');
	for x in 1..error_stack_count loop
		execute immediate replace(sql_reg,'#ERR#', ora_server_error(x));
	end loop;

end db_ping_errors;
/</pre>
<p><em>Note: Please remember to replace the &#8220;xxxx&#8221; with the correct identity domain and serverlocation.</em></p>
<p>Now log back into your cloud service, and run the ATO Demo App, and the bar chart should show at least one more error for today.</p>
<p>So there you have it, your first litte demo application running in the Oracle cloud. In the next article, I will talk about how you manage the different services in the cloud, compared to managing a normal oracle database.</p>
]]></content:encoded>
			<wfw:commentRss>http://allthingsoracle.com/developing-your-first-oracle-cloud-application/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>RAC One Node</title>
		<link>http://allthingsoracle.com/rac-one-node/</link>
		<comments>http://allthingsoracle.com/rac-one-node/#comments</comments>
		<pubDate>Thu, 25 Apr 2013 10:48:42 +0000</pubDate>
		<dc:creator>Aman Sharma</dc:creator>
				<category><![CDATA[11g]]></category>
		<category><![CDATA[All Things Oracle Full Articles]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[RAC]]></category>

		<guid isPermaLink="false">http://allthingsoracle.com/?p=4020</guid>
		<description><![CDATA[In the past few years, technology has become a very important aspect of our lives. There isn&#8217;t any moment when we are not connected to or using technology and this is not to do some core geeky stuff but for the tasks which have become a part of our lives. Can you imagine a day when you are unable to connect to... <a class="read-more" href="http://allthingsoracle.com/rac-one-node/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>In the past few years, technology has become a very important aspect of our lives. There isn&#8217;t any moment when we are not connected to or using technology and this is not to do some core geeky stuff but for the tasks which have become a part of our lives. Can you imagine a day when you are unable to connect to your email or unable to check the latest updates from your friends from Facebook or Twitter? I don’t think that the answer would be a yes, correct? In addition to this several parts of our life are inextricably connected with technology today. When was the last time you went to a bank to withdraw the money to transfer it to your mom’s account or you stood in a queue to pay the electricity or phone bills? Again the answer would be a no I believe! Technology , in today’s time, is not a word that is limited to those  who keep on looking at their black colored terminal windows filled with weird looking texts but it’s meant for those “normal” people as well who are using it to make their lives easier and comfortable.</p>
<p><em>But there is a small issue!</em></p>
<p>Though technology is meant to make our lives simpler, faster and easier, at the end of the day it is a human invention and is therefore fallible. So you see, machines may fail, may become overloaded, may become obsolete and whenever any such thing happens, the technology running on that machine also ceases! Can you see what’s coming next? If the technology stops, you stop as well! As a result, for the past few years, the expression “high availability”(HA) has been gaining ground and is heard almost all the time by all those who are  maintaining anything that is related to a service which needs to be up and running as much as possible, not just for making operations simpler but also to keep the cash registers ringing.</p>
<p>Think about it, a closed bank branch or ATM for a bank is no good at all, doesn&#8217;t matter how small that branch would be! Hence come the numerous solutions for HA! There are a variety of solutions provided by a large number of vendors and so is done by Oracle Corp as well.  Oracle Corp provides a range of solutions under it’s <strong>Maximum Availability Architecture (MAA)</strong> stack. Notable among them is its <strong>Oracle Real Application Clusters (RAC</strong>) which takes care of node and instance crash issues.</p>
<p>&nbsp;</p>
<p>But the issue is Oracle RAC is a solution which is not affordable for quite a few shops . Though if we were to consider the cost aspect of RAC in the light of its simplicity and other benefits as compared to other technologies, it would be a worthwhile investment, however, it is always good to have more options, which can provide you similar sort of benefits, if not completely than as closely as possible and would be even better if  at  a reduced cost! This is what Oracle Corp brought out with 11.2 version (11201) and called it <strong>Oracle RAC One Node</strong>!</p>
<h2>But is it “really” a new feature?</h2>
<p>Well, yes it is –sort of! Though Oracle RAC One Node is a new offering from 11.2 on, a similar functionality was available in the previous releases of Oracle db as well. This was known as<strong><em> Cold Cluster Failover</em></strong>, a topology using which the crash of a single instance of a database could be made to do a failover to another node using the cluster services. This technique was applicable to the databases of release 11.1 and 10.2 versions using which a constant monitoring was possible  for the availability of the instance or the node and if the node or the instance running on it crashed, it was possible to failover the connections over some other node. Needless to say that the nodes were supposed to use a shared storage. Also, it was mandatory to use Application VIP to make sure that the client is unaware about the existence of such a configuration. This would provide an efficient method to ensure that any kind of crash would be result in an automatic failover to the second node and also, any sort of recovery needed for the failed resources would be also done by Oracle’s Clusterware software. In addition to this, if one was looking for a planned downtime for any kind of house-keeping or for the workloads which couldn&#8217;t be catered on the source node, then this could be manually relocated through the command CRS_RELOCATE (deprecated in 112).</p>
<p>Though the solutions seem to appear almost fool-proof, its implementation was the real challenge.   An intensive manually driven process would be required to achieve this HA of single instance.  Various steps and commands would be required to get the job done and probably, that’s why, though this technique is a published feature of Oracle’s Clusterware, it was seldom seen being implemented at any site. Obviously RAC ONE Node solved many of the challenges and made the whole process far simpler and transparent.</p>
<h2>So any significant good feature(s) of RAC One Node?</h2>
<p>As discussed, the functionality was available in the previous versions as well but it was quite challenging to implement. RAC One node, introduced in 11.2 for the first time(and getting enhanced and feature rich since then constantly) offers the same functionality but more effectively and simply.  Some of the features (but not a complete list) which make it very effective is:</p>
<ol>
<li>Online migration of the sessions from active node to the other</li>
<li>Easy conversion from RAC One Node to complete RAC and vice-versa</li>
<li>Integrated with the features like Instance Caging to provide a better resource management</li>
<li>Supported over Exadata</li>
<li>Supported over OVM(Oracle Virtualization Manager)</li>
<li>Support for Rolling Patches of RAC to provide the same interface on RAC ONE Node</li>
<li>Easy creation of One Node database using DBCA(from 11.2.0.2)</li>
<li>Supported on all those platforms where Oracle RAC is supported</li>
</ol>
<p>Oracle RAC One Node is based on the same model of the RAC but it has a major difference from it as well. Full RAC works as an Active-Active solution i.e. the number of nodes that are in the cluster, they all are active and can accept connections and workloads and work together as one single unit. But RAC One Node, as the name suggests as well, works as an Active-Passive solution where at one time, only one node is going to be active at any time with the other nodes being available and ready to accept the workload in the case of a planned or an unplanned downtime related to the first node.</p>
<h2>RAC One Node,  handling of Planned Downtime?</h2>
<p>For a planned migration, the RAC one node  works perfectly because it is going to let the users continue with their work without  impacting the business. When in 11201, the feature was first introduced by Oracle Corp, there was a need to use the utility OMOTION to achieve a transition of the instance from source node to the target node. But from 11202 this is a non-requirement and the clusterware software itself takes care of everything, including the migration of the instance from one node to another and to move the sessions along with it.</p>
<p><img class="alignnone size-full wp-image-4027" title="Three nodes belonging to one cluster, each connected to  a common, shared storage" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-three-nodes-single-cluster.png" alt="Screenshot: three nodes belonging to one cluster, each connected to  a common, shared storage" width="616" height="387" /></p>
<p>In the above diagram, we have got three nodes belonging to one cluster, each connected to  a common, shared storage. We also have a user session which is alive while being connected to the first node.</p>
<p>If a planned failover occurs, the clusterware would detect it and would start shifting the session(s) which are connected to the primary node to the target node, after their current work is finished over it.  Also, in the meantime, another instance would be up on the second node and for a small time window, there would be an Oracle instance running on both the nodes.</p>
<p><img class="alignnone size-full wp-image-4032" title="If a planned failover occurs, the clusterware would detect it and would start shifting the sessions" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-three-nodes-single-cluster-sessions.png" alt="Screenshot: If a planned failover occurs, the clusterware would detect it and would start shifting the sessions" width="583" height="418" /></p>
<p>Finally, only one node (in this example, node 2) would be active and all the sessions connected over the first node would have been migrated to the node 2 and also the instance on the node 1 would be also dismounted.</p>
<p><img class="alignnone size-full wp-image-4033" title="Only one node would be active and all the sessions connected over the first node would have been migrated to the node 2 " src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-three-nodes-single-cluster-failover.png" alt="Screenshot: Only one node would be active and all the sessions connected over the first node would have been migrated to the node 2 " width="585" height="410" /></p>
<p>Because RAC One Node offers an online migration of the instance from the source node to the target node,  the mechanism offers a transparent workaround for the issues which would involve the node being crashed or the instance being down or for those circumstances where the node is not having enough resources to cater the incoming workload. As Oracle 11.2 RAC uses the concept of SCAN(Single Client Access Name) , if the client is configured to use the SCAN name resolution method for discovering the cluster, it would be completely transparent for the client if such kind of migration would take place.  The only thing that probably may take long time is the actual migration period from the source node to the target node-it’s customizable though.</p>
<p>As shown that the RAC One node would support the online migration with minimal impact on the business, it’s important to make this fact clear that this possibility, of running two instances on two different nodes is just on a temporary basis and is also there only for the planned downtime.  The first instance along with the second instance would be only kept alive till the migration of the sessions is not completed .Once the migration of the instance on the other node is complete(along with the sessions connected on the first node) , the first instance would be closed and once again, the mode would be <em>still</em> Active-Passive only with only one instance up.  This also makes complete sense as if the option to have two instances running on two nodes would be there, RAC One Node wouldn’t be any different from a normal RAC, would it?</p>
<p>Let’s try to get the online relocation done by ourselves and see what happens to the existing and on to the target instance.</p>
<pre>[oracle@host01 ~]$ srvctl config database -d aristone
Database unique name: aristone
Database name: aristone
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +FRA/aristone/spfilearistone.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: aristone
Database instances:
Disk Groups: FRA
Mount point paths:
Services: srvc1
Type: RAC One Node
Online relocation timeout: 30
Instance name prefix: aristone
Candidate servers: host01,host02,host03
Database is administrator managed</pre>
<p>Before we start the migration, let’s check the status of the database and it’s instance right now.</p>
<pre>[oracle@host01 ~]$ srvctl status database -d aristone
 Instance aristone_1 is running on node host01
 Online relocation: INACTIVE</pre>
<p>So what we have here is a RAC One Node database with the SID <strong>aristone </strong>and it is running on the node <em>HOST01</em> with the instance <strong>aristone_1. </strong> So now, we shall try to relocate the instance from this node to the target node <em>HOST02</em>.  Also it’s shown that the online relocation is not active at the moment.</p>
<p>It’s important to mention that with the version 11201, this task was done by a utility <strong>OMOTION </strong>but from 11202 onwards, the use of this utility is not required. The release of the software used for this demo was 11203 so obviously, the utility wasn’t required.</p>
<p>The conversion is done using the command SRVCTL RELOCATE DATABASE in which we are going to pass the name of the target node and the option to be in verbose mode for the output. Below is the output of this command:</p>
<pre>[oracle@host01 ~]$ srvctl relocate database -d aristone -n host02 -w 30 -v
Configuration updated to two instances
Instance aristone_2 started
Services relocated
Waiting for up to 30 minutes for instance aristone_1 to stop ...
Instance aristone_1 stopped
Configuration updated to one instance</pre>
<p>And from another session, we can see that the migration is going on.</p>
<pre>[oracle@host01 ~]$ srvctl status database -d aristone
Instance aristone_2 is running on node host02
Online relocation: ACTIVE
Source instance: aristone_1 on host03
Destination instance: aristone_2 on host02</pre>
<p>We can see that the second instance has come up and the relocation status is also shown as ACTIVE which means that the relocation is going on. We would need to run the command couple of times as it may take longer for the instance to crash.</p>
<pre>[oracle@host01 ~]$ srvctl status database -d aristone
Instance aristone_2 is running on node host02
Online relocation: ACTIVE
Source instance: aristone_1 on host03
Destination instance: aristone_2 on host02</pre>
<p>&nbsp;</p>
<pre>[oracle@host01 ~]$ srvctl status database -d aristone
Instance aristone_2 is running on node host02
Online relocation: ACTIVE
Source instance: aristone_1 on host03
Destination instance: aristone_2 on host02</pre>
<p>&nbsp;</p>
<p>Finally when the relocation would be over, this would be shown as the output,</p>
<pre>[oracle@host01 ~]$ srvctl status database -d aristone
Instance aristone_2 is running on node host02
Online relocation: INACTIVE [oracle@host01 ~]$</pre>
<p>As we can see, one the relocation is complete only the instance “aristone_2” is going to be working and the status of ONLINE RELOCATION is going to be completed.</p>
<h2>What about Unplanned disasters?</h2>
<p>If it’s an un-planned shutdown, though the instance would be up on the second node but in this case, the online migration of the sessions will not take place.</p>
<p>In case the reason behind the instance on the initial node has come down, was unplanned, it would cause a downtime as a result of which a smooth migration of the user sessions from the source node to the target, as in case of planned downtime , won’t be possible. But since RAC One essentially is running Grid Infrastructure or using a little old terminology, the clusterware software underneath, it would be able to detect this issue-without a DBA’s intervention.  As with the normal working of the clusterware, the first attempt would be to restart the failed instance on the very same node where it was running initially. If for some reason the instance can’t be started on the same node or worse, the node itself has crashed, there would be an automatic migration of the instance to the target node.</p>
<h2>So how Do I Create a RAC One Node Database?</h2>
<p>With 11202, the option to create the RAC One Node database came up with the DBCA itself.  In the prior release (11201), this wasn’t possible to be done unless you wouldn’t apply the patch #9004119 on your installation. Starting with 11202 release onwards, the option is built in into the DBCA if it finds itself running over a clustered environment.</p>
<p><img class="alignnone  wp-image-4037" title="Creating a RAC One Node database" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-database-configuration-assistant-rac.png" alt="Screenshot: creating a RAC One Node database" width="662" height="461" /></p>
<p>As shown, the 2<sup>nd</sup> option would be creating a RAC One Node database. The process is not much different from creating a normal RAC database  and we shall see it in the below screenshots.</p>
<p>After selecting the option to create the database, next step would be choose the option to create the database and to choose the right template for the database creation.</p>
<p><img class="alignnone  wp-image-4041" title="Choose the right template for the database creation" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-create-database.png" alt="Screenshot: choose the right template for the database creation" width="628" height="445" /></p>
<p><img class="alignnone  wp-image-4042" title="Oracle rac create database template" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-create-database-template.png" alt="Screenshot:Oracle rac create database template" width="628" height="447" /></p>
<p>Next step would be to enter the details of the for the database name and SID and to define the service that would be used by this database.  Also, you can choose whether you can choose the database to be an Admin-Managed or Policy Managed.</p>
<p><img class="alignnone  wp-image-4044" title="Oracle RAC one node identification" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-one-node-identification.png" alt="Screenshot: Oracle RAC one node identification" width="628" height="444" /></p>
<p>So for our example, we have chosen both the database name and SID to be ARISTONE and it’s an Admin-Managed database and being one,  the list of the nodes are shown which we can select to define that target node where the instance would be failed over in the event of a crash. The failover can’t happen to that node which is not selected in this step of the wizard by you if the database management is of Admin-Managed type.  If you are willing to create a Policy-Managed database, the node list won’t be shown but the option to use a server pool would be there and you must ensure that in that server pool, there is a node available so that the failover can happen over it.</p>
<p>Next step would be to choose the option of Database Control or not and also to select the passwords for the system accounts.</p>
<p><img class="alignnone  wp-image-4048" title="Oracle RAC One Node management options" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-one-node-management-options.png" alt="Screenshot: Oracle RAC One Node management options" width="615" height="434" /></p>
<p><a href="http://allthingsoracle.com/rac-one-node/oracle-rac-one-node-database-credentials/" rel="attachment wp-att-4049"><img class="alignnone size-full wp-image-4049" title="Oracle RAC One Node database credentials" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-one-node-database-credentials.png" alt="Screenshot: Oracle  RAC One Node database credentials" width="628" height="444" /></a></p>
<p>The next option would be to choose the storage location which can be either ASM or file system. If you are going to choose ASM, the pop-up would ask you to give the password of the user ASMSNMP as well. We have chosen the option of ASM for the storage.</p>
<p><img class="alignnone  wp-image-4050" title="Oracle RAC One Node database file locations" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-one-node-database-file-locations.png" alt="Screenshot: Oracle RAC One Node database file locations" width="616" height="432" /></p>
<p>Next would be whether we want to use Fast Recovery Area(FRA) or not.</p>
<p><img class="alignnone  wp-image-4051" title="Oracle RAC One Node database recovery" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-one-node-database-recovery.png" alt="Screenshot: Oracle RAC One Node database recovery" width="620" height="430" /></p>
<p>Next would be the option to choose the option run any script and also to choose the memory parameters and other database options.</p>
<p><img class="alignnone  wp-image-4052" title="Oracle RAC One Node database content" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-one-node-database-content.png" alt="Screenshot: Oracle RAC One Node database content" width="609" height="438" /></p>
<p><img class="alignnone  wp-image-4053" title="Oracle RAC One Node database parameters" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-one-node-database-parameters.png" alt="" width="618" height="433" /></p>
<p>Finally it’s the option of Create Database and Summary and database creation would be started.</p>
<p><img class="alignnone  wp-image-4054" title="Oracle RAC One Node database storage" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-one-node-database-storage.png" alt="" width="610" height="432" /></p>
<p><img class="alignnone  wp-image-4055" title="Oracle RAC One Node database creation" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-one-node-database-creation.png" alt="Screenshot: Oracle RAC One Node database creation" width="623" height="454" /></p>
<p>We can see the progress of the database creation in the progress window.</p>
<p><img class="alignnone  wp-image-4056" title="Oracle RAC One Node database creation progress" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-one-node-database-creation-progress.png" alt="Screenshot: Oracle RAC One Node database creation progress" width="616" height="384" /></p>
<p>Finally, we have the database created and information about it shown in the last page.</p>
<p><img class="alignnone  wp-image-4057" title="Oracle RAC One Node database creation finished" src="http://allthingsoracle.com/wp-content/uploads/2013/04/oracle-rac-one-node-database-creation-finished.png" alt="Screenshot: Oracle RAC One Node database creation finished" width="617" height="382" /></p>
<p>So finally , we have the database ARISTAONE got created which is a RAC One Node database and we can confirm this even from it’s properties shown from the CLI too by running DBCA in the <strong>silent mode</strong>.</p>
<p>Since it’s a RAC database itself though working with one node only,</p>
<pre>oracle@host01 ~]$ srvctl config database -d aristone
Database unique name: aristone
Database name: aristone
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +FRA/aristone/spfilearistone.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: aristone
Database instances:
Disk Groups: FRA
Mount point paths:
Services: srvc1
<span style="color: #cc0000;">Type: RAC One Node Online relocation timeout: 30</span>
Instance name prefix: aristone
<span style="color: #cc0000;">Candidate servers: host01,host02,host03</span>
Database is administrator managed</pre>
<p>It is quite evident that most of the properties of the RAC One Database are similar to those of the normal RAC database but there are few differences as well and are specific to RAC One Node database. These are as follows:</p>
<ol>
<li><strong>Database Type :</strong> This shows that which type of database it is. For RAC One, the output is <em>RAC One Node</em>.</li>
<li><strong>Online Relocation Timeout :</strong> This is the time that’s going to be given to the sessions to complete their transactions and switchover to the target node without any issue. If the transactions fail to get completed in this time period, it would be aborted and session would be switched over to the target node. The default unit of this parameter is in minutes and the value is 30(minutes) . Maximum value allowed for this parameter would be 12hours (720 minutes) .</li>
<li><strong>Candidate Servers: </strong>This is the list of those nodes where the relocation can happen.</li>
</ol>
<h2>I have a single instance, non-RAC db. Can I convert it to RAC One Node database?</h2>
<p>In order to convert a single instance database into RAC One Node database, one can take the aid of  tool DBCA. All the tasks like creating the redo threads , undo tablespaces etc which are required for the RAC One Node database to function are going to be done automatically by the DBCA. So this makes the transition much easier. The only thing that’s going to be a pre-requisite is that the underlying database must be supporting all the mandatory properties or conditions that are required for a clustered database to run, for example a shared storage must be there on which the files should be placed.  Also, all the necessary software required to get the services of the RAC running must be there along with the required hardware-like a shared storage.</p>
<p>The conversion would be done with the help of the templates that can be created from the existing single instance database. Using this template, another new  RAC One Node database can be created.</p>
<h2>And what if I have a RAC One Node database and I want to convert it to a complete RAC database?</h2>
<p><em>Yes, you can do it and very easily! </em></p>
<p>If you have already got a RAC One Node database and you want to convert to a complete RAC , we can do it using the command SRVCTL  CONVERT. Since we have a database ARISTONE which is a RAC One Node database, we shall convert it to a complete RAC database which would run over three hosts. So let’s shut down it and issue the CONVERT command.</p>
<pre>[oracle@host01 ~]$ srvctl stop database -d aristone
[oracle@host01 ~]$ srvctl convert database -d aristone -c RAC</pre>
<p>Now since we have the instance 2 running on one host already, for the remaining two hosts we shall be adding the instances.</p>
<pre>[oracle@host01 ~]$ srvctl add instance -d aristone -i aristone_3 -n host03
[oracle@host01 ~]$ srvctl add instance -d aristone -i aristone_1 -n host01</pre>
<p>Now, let’s start the newly converted database and check it’s status.</p>
<pre>[oracle@host01 ~]$ srvctl start database -d aristone
[oracle@host01 ~]$ srvctl status database -d aristone
Instance aristone_1 is running on node host01
Instance aristone_2 is running on node host02
Instance aristone_3 is running on node host03</pre>
<p>So as expected the database is up and running with 3 instances on all the 3 nodes and is successfully converted. Let’s confirm that it’s a RAC database only by seeing it’s properties from the SRVCTL CONFIG command.</p>
<pre>[oracle@host01 ~]$ srvctl config database -d aristone
Database unique name: aristone
Database name: aristone
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +FRA/aristone/spfilearistone.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: aristone
Database instances: aristone_2,aristone_3
Disk Groups: FRA
Mount point paths:
Services:
Type: RAC
Database is administrator managed</pre>
<p>Since it’s a RAC database now so the TYPE is shown as RAC and also, there are no parameters like TIMOUT etc are shown which were previously visible for the RAC One Node database.</p>
<h2>Sounds good but how much is this RAC One Node  going to cost my company?</h2>
<p>Pricing is something that one should always check with the local Oracle sales available but for the record, the price of RAC One Node is <strong>US$10,000/processor </strong>with an additional pricing of <strong>US$22,00 </strong>for the support in the first year. When compared to the standard pricing of RAC which is <strong>US$23,000/processor </strong>, it’s quite affordable provided you are willing to go for an Active-Passive environment. It’s important to mention that these are the listed prices and are picked up from the Oracle’s online store at <a title="Oracle shop" href="https://shop.oracle.com/" target="_blank">https://shop.oracle.com</a> .</p>
<h2><strong>Final words</strong></h2>
<p>Oracle RAC is probably one of the most impressive technologies that have been introduced by Oracle Corp. The very nature of making the system available as an Active-Active solution gives a company a very robust solution to achieve high availability and scalability. But still for many Oracle customers, it’s very costly and for them, RAC One Node offers a great alternative. Though the solution to have an Active-Passive environment was available even before the appearance of RAC One Node as well but with it’s inception , the task has become much more easier and simpler. With the Oracle clusterware in control for doing all the tasks transparently and having a lower pricing compared to a full blown RAC environment( which can be upgraded to the same very easily too) , RAC One Node offers a unique solution for those who wants to experience the clustering but are not willing to spend a lot on it!</p>
<h3> <strong>References:</strong></h3>
<ol>
<li>Oracle® Real Application Clusters Administration and Deployment Guide 11<em>g</em> Release 2 (11.2)</li>
<li>Oracle Store – <a title="Oracle shop" href="https://shop.oracle.com/" target="_blank">https://shop.oracle.com</a></li>
<li><a title="Cold Cluster Failover 11g Whitepaper" href="http://www.oracle.com/technetwork/products/clusterware/overview/si-db-failover-11g-134623.pdf" target="_blank">Cold Cluster Failover in 11g white paper (Oracle)</a></li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://allthingsoracle.com/rac-one-node/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Hacking the Oracle Cloud</title>
		<link>http://allthingsoracle.com/hacking-the-oracle-cloud/</link>
		<comments>http://allthingsoracle.com/hacking-the-oracle-cloud/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 10:05:42 +0000</pubDate>
		<dc:creator>Morten Egan</dc:creator>
				<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database Development]]></category>
		<category><![CDATA[Oracle Cloud]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Webinar]]></category>

		<guid isPermaLink="false">http://allthingsoracle.com/?p=4014</guid>
		<description><![CDATA[ Weds June 5th, 2013  Central Europe: 17:00 UK: 16:00 East USA: 11.00 Central USA: 10.00 Pacific USA: 08.00 Register now In this webinar, Morten Egan will take a look at how to overcome some of the limitations of the Oracle Cloud – including how to stretch your storage to its full potential. Can we circumvent the communication limits, since we do not have sqlnet,... <a class="read-more" href="http://allthingsoracle.com/hacking-the-oracle-cloud/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p><img alt="calendar icon" src="http://www.red-gate.com/assets/images/icons/calendar-icon.png" /> Weds June 5th, 2013<br />
<img alt="clock icon" src="http://www.red-gate.com/products/oracle-development/education/assets/clock-icon.png" /> Central Europe: 17:00 UK: 16:00 East USA: 11.00 Central USA: 10.00 Pacific USA: 08.00</p>
<p><a href="http://www.red-gate.com/products/oracle-development/deployment-suite-for-oracle/education/webinars/webinar-hacking-oracle-cloud-morten-egan?utm_source=allthingsoracle&amp;utm_medium=article&amp;utm_content=webinar&amp;utm_campaign=deploymentsuitefororacle" target="blank"><button class="btn"><span>Register now</span></button></a></p>
<p>In this webinar, Morten Egan will take a look at how to overcome some of the limitations of the Oracle Cloud – including how to stretch your storage to its full potential. Can we circumvent the communication limits, since we do not have sqlnet, utl_tcp or any of the other communication packages normally available in the database? How is storage usage calculated and what are our options?</p>
<p>You will learn how a simple proxy setup will allow you to store vast amounts of data, and how to use an open source jquery library to create a sqlplus like environment and much more.</p>
<p>A live Q&amp;A session with Morten Egan will follow the presentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://allthingsoracle.com/hacking-the-oracle-cloud/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Analyzing and Troubleshooting Oracle Parallel Execution</title>
		<link>http://allthingsoracle.com/analyzing-and-troubleshooting-oracle-parallel-execution/</link>
		<comments>http://allthingsoracle.com/analyzing-and-troubleshooting-oracle-parallel-execution/#comments</comments>
		<pubDate>Wed, 17 Apr 2013 16:41:30 +0000</pubDate>
		<dc:creator>Randolf Geist</dc:creator>
				<category><![CDATA[Database Development]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Webinar]]></category>

		<guid isPermaLink="false">http://allthingsoracle.com/?p=3871</guid>
		<description><![CDATA[&#160; Watch video Oracle parallel execution, a feature of the Enterprise Edition, allows you to automatically distribute the processing of a SQL statement execution among multiple worker processes. This requires additional effort when analyzing and troubleshooting such parallel executions, since it adds complexity that is simply not there with normal serial execution where only a single process is involved. This webinar will... <a class="read-more" href="http://allthingsoracle.com/analyzing-and-troubleshooting-oracle-parallel-execution/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p><a href="http://www.red-gate.com/products/oracle-development/deployment-suite-for-oracle/education/webinars/webinar-oracle-parallel-execution-randolf-geist?utm_source=allthingsoracle&amp;utm_medium=article&amp;utm_content=webinar&amp;utm_campaign=deploymentsuitefororacle" target="blank"><button class="btn"><span>Watch video</span></button></a></p>
<p>Oracle parallel execution, a feature of the Enterprise Edition, allows you to automatically distribute the processing of a SQL statement execution among multiple worker processes. This requires additional effort when analyzing and troubleshooting such parallel executions, since it adds complexity that is simply not there with normal serial execution where only a single process is involved.</p>
<p>This webinar will explain what these additional challenges are and how these can be approached.</p>
<p>A live Q&amp;A session with Randolf Geist follows the presentation, if you would like to ask a question that wasn&#8217;t covered in this please add a comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://allthingsoracle.com/analyzing-and-troubleshooting-oracle-parallel-execution/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Managing &amp; Troubleshooting Cluster</title>
		<link>http://allthingsoracle.com/managing-troubleshooting-cluster-360-degrees/</link>
		<comments>http://allthingsoracle.com/managing-troubleshooting-cluster-360-degrees/#comments</comments>
		<pubDate>Mon, 15 Apr 2013 16:21:34 +0000</pubDate>
		<dc:creator>Syed Jaffer Hussain</dc:creator>
				<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Webinar]]></category>

		<guid isPermaLink="false">http://allthingsoracle.com/?p=3888</guid>
		<description><![CDATA[In this webinar, Syed Jaffar Hussain (Oracle ACE Director and Oracle Magazine Editor&#8217;s choice award (2011) for &#8216;Technologist of the year, DBA&#8217;) explains how to manage and troubleshoot various clusterware issues. View the presentation slides Watch video You will learn: Grid Infrastructure (Clusterware) startup sequence, like how things getting started after a node reboot or cluster start-up How to understand... <a class="read-more" href="http://allthingsoracle.com/managing-troubleshooting-cluster-360-degrees/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>In this <a href="http://www.red-gate.com/products/oracle-development/deployment-suite-for-oracle/education/webinars/webinar-oracle-managing-troubleshooting-cluster-syed-jaffar-hussain?utm_source=allthingsoracle&amp;utm_medium=article&amp;utm_content=webinar&amp;utm_campaign=deploymentsuitefororacle" target="blank">webinar</a>, Syed Jaffar Hussain (Oracle ACE Director and Oracle Magazine Editor&#8217;s choice award (2011) for &#8216;Technologist of the year, DBA&#8217;) explains how to manage and troubleshoot various clusterware issues. </p>
<p><a href="http://www.red-gate.com/products/oracle-development/education/assets/Managing_Troubleshooting_Cluster_360dgrees.pdf" target="blank">View the presentation slides</a></p>
<p><a href="http://www.red-gate.com/products/oracle-development/deployment-suite-for-oracle/education/webinars/webinar-oracle-managing-troubleshooting-cluster-syed-jaffar-hussain?utm_source=allthingsoracle&amp;utm_medium=article&amp;utm_content=webinar&amp;utm_campaign=deploymentsuitefororacle" target="blank"><button class="btn"><span>Watch video</span></button></a></p>
<p>You will learn:</p>
<ul>
<li>Grid Infrastructure (Clusterware) startup sequence, like how things getting started after a node reboot or cluster start-up</li>
<li>How to understand the tree structure of a cluster log directory, mechanics of log file auto maintenance, and which log file to refer to</li>
<li>Tools that can help you analyze cluster issues</li>
</ul>
<p>A Q&amp;A session with Syed Jaffar Hussain follows the presentation, if you would like to ask a question that wasn&#8217;t covered in this please add a comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://allthingsoracle.com/managing-troubleshooting-cluster-360-degrees/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Console Wrapper 1.0.4</title>
		<link>http://allthingsoracle.com/console-wrapper-1-0-4/</link>
		<comments>http://allthingsoracle.com/console-wrapper-1-0-4/#comments</comments>
		<pubDate>Thu, 11 Apr 2013 17:12:45 +0000</pubDate>
		<dc:creator>Martin Giffy DSouza</dc:creator>
				<category><![CDATA[Application Development]]></category>

		<guid isPermaLink="false">http://allthingsoracle.com/?p=3884</guid>
		<description><![CDATA[Console Wrapper 1.0.4 is officially out. You can download it from the project page: https://code.google.com/p/js-console-wrapper/ The only change for this release was to resolve an IE 9/10 issue which I previous blogged about. If you&#8217;re using any of the ClariFit plugins you may want to update the $console_wrapper.js file that&#8217;s included with each plugin. I&#8217;ll be sure to include the update file for each of... <a class="read-more" href="http://allthingsoracle.com/console-wrapper-1-0-4/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Console Wrapper 1.0.4 is officially out. You can download it from the project page: <a href="https://code.google.com/p/js-console-wrapper/" target="_blank">https://code.google.com/p/js-console-wrapper/</a></p>
<p>The only change for this release was to resolve an IE 9/10 issue which I <a href="http://www.talkapex.com/2013/03/console-wrapper-104-beta.html" target="_blank">previous blogged</a> about.</p>
<p>If you&#8217;re using any of the <a href="http://plugins.clarifit.com/" target="_blank">ClariFit plugins</a> you may want to update the $console_wrapper.js file that&#8217;s included with each plugin. I&#8217;ll be sure to include the update file for each of the plugin&#8217;s updates.</p>
<p><a href="http://www.talkapex.com/2013/04/console-wrapper-104.html" target="_blank">Martin Giffy D&#8217;Souza on Oracle APEX</a></p>
]]></content:encoded>
			<wfw:commentRss>http://allthingsoracle.com/console-wrapper-1-0-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL&#8217;s MEDIAN Function</title>
		<link>http://allthingsoracle.com/sqls-median-function/</link>
		<comments>http://allthingsoracle.com/sqls-median-function/#comments</comments>
		<pubDate>Tue, 09 Apr 2013 01:02:30 +0000</pubDate>
		<dc:creator>Jonathan Gennick</dc:creator>
				<category><![CDATA[Application Development]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database Development]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://allthingsoracle.com/?p=3874</guid>
		<description><![CDATA[Article #3 in my ongoing series covering SQL statistic functions in Oracle Database is now up. The topic is the median: MEDIAN: For When You Don&#8217;t Really Mean It Median is useful in typifying a data set when the data might be skewed, or in the presence of extreme outliers. For example, the U.S. Census Bureau reports median household income... <a class="read-more" href="http://allthingsoracle.com/sqls-median-function/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Article #3 in my ongoing series covering SQL statistic functions in Oracle Database is now up. The topic is the median:</p>
<p><a href="http://gennick.com/stats/median.html">MEDIAN: For When You Don&#8217;t Really Mean It</a></p>
<p>Median is useful in typifying a data set when the data might be skewed, or in the presence of extreme outliers. For example, the U.S. Census Bureau reports <em>median household income</em> for states and counties so as paint a picture unskewed by the presence of, say, Bill Gates or Warren Buffet living just down the street. </p>
<p>To learn more, hit the link.</p>
]]></content:encoded>
			<wfw:commentRss>http://allthingsoracle.com/sqls-median-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
