<?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>FatLemon &#187; Oracle XE</title>
	<atom:link href="http://www.fatlemon.co.uk/tag/oracle-xe/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fatlemon.co.uk</link>
	<description>Contemplations on software development and human factors, by Andrew Freemantle</description>
	<lastBuildDate>Sun, 29 Jan 2012 13:45:36 +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>Increasing Processes, Sessions and Transactions in Oracle XE</title>
		<link>http://www.fatlemon.co.uk/2009/06/increasing-processes-sessions-and-transactions-in-oracle-xe/</link>
		<comments>http://www.fatlemon.co.uk/2009/06/increasing-processes-sessions-and-transactions-in-oracle-xe/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 20:00:29 +0000</pubDate>
		<dc:creator>Andrew Freemantle</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Oracle XE]]></category>

		<guid isPermaLink="false">http://www.fatlemon.co.uk/?p=29</guid>
		<description><![CDATA[Disclaimer: following my technical advice has been known to scratch cars, void lottery tickets and confuse guide dogs &#8211; proceed at your own risk.. Out of the box, Oracle Datatbase 10g Express Edition RDBMS is fast and powerful. The stated limitations of 2GB of maximum RAM usage and 2GB of total datafile management are plentiful [...]]]></description>
			<content:encoded><![CDATA[<div class="post-body-disclaimer">Disclaimer: following my technical advice has been known to scratch cars, void lottery tickets and confuse guide dogs &#8211; proceed at your own risk..</div>
<p><img class="alignnone size-full wp-image-126 post-image" title="Oracle Express Edition (XE)" src="http://www.fatlemon.co.uk/wp-content/uploads/oraclexe.png" alt="Oracle Express Edition (XE)" width="252" height="194" /></p>
<p>Out of the box, Oracle Datatbase 10g Express Edition <abbr title="Relational Database Management System">RDBMS</abbr> is fast and powerful. The stated limitations of 2GB of maximum RAM usage and 2GB of total datafile management are plentiful for it to easily run as the back-end for a small to medium-sized office application. However, we soon hit a connection limit as characterised by the following Oracle Errors:</p>
<p><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;">ORA-12516: TNS:listener could not find available handler with matching protocol stack</span></p>
<pre>
ORA-00020: maximum number of processes (%s) exceeded</pre>
<p><img class="alignnone size-full wp-image-127 post-image" title="ORA-00020: maximum number of processes (%s) exceeded" src="http://www.fatlemon.co.uk/wp-content/uploads/ora-00020.png" alt="ORA-00020: maximum number of processes (%s) exceeded" width="677" height="342" /></p>
<p>We can get this second message because Oracle creates Operating System processes to handle Connections (or Sessions) &#8211; which means Processes, Sessions (and as we&#8217;ll soon see..) Transactions are all related.</p>
<p>The default values in Oracle XE for these parameters are:</p>
<ul>
<li>Processes =40</li>
<li>Sessions = 49</li>
<li>Transactions = 53</li>
</ul>
<p>I was able to generate the above error message (ORA-00020) from about ~30 connections on a vanilla Oracle XE installation (on Windows 7).</p>
<p>So, let&#8217;s increase these limits to allow more connections to our Oracle Server..</p>
<h3>1. Log in as SYSDBA</h3>
<p>From the menu &#8216;Oracle Database 10g Express Edition&#8217;, find and select &#8216;Run SQL Command Line&#8217;, then type:</p>
<pre>connect sys as sysdba</pre>
<p>&nbsp;</p>
<p>and enter your SYS, or SYSTEM password at the prompt</p>
<p><img class="alignnone size-full wp-image-124 post-image" title="Oracle XE - Connected as SYSDBA, showing default values for processes, sessions and transactions" src="http://www.fatlemon.co.uk/wp-content/uploads/oraclexe-default-processes-sessions-transactions.png" alt="oraclexe-default-processes-sessions-transactions" width="677" height="414" /></p>
<h3>2. ALTER SYSTEM commands</h3>
<p>The Oracle 10g Documentation states that <a title="TRANSACTIONS - Oracle 10g Documentation" href="http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams219.htm">TRANSACTIONS</a> is derived from <a title="SESSIONS - Oracle 10g Documentation" href="http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams191.htm#sthref587">SESSIONS</a>, which in turn is derived from <a title="PROCESSES - Oracle 10g Documentation" href="http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams169.htm#sthref521">PROCESSES</a>, thus:</p>
<p>PROCESSES = 40 to Operating System Dependant</p>
<p>SESSIONS = (1.1 * PROCESSES) + 5</p>
<p>TRANSACTIONS = 1.1 * SESSIONS</p>
<p>So, what to start with for PROCESSES?  Trebling it is as good a start as any, then I&#8217;d add a few more for good measure..  Here are the values I recommend:</p>
<ul>
<li>PROCESSES = 150</li>
<li>SESSIONS = 300</li>
<li>TRANSACTIONS = 330</li>
</ul>
<p>type the following commands:</p>
<p>&nbsp;</p>
<pre>
alter system set processes = 150 scope = spfile;

alter system set sessions = 300 scope = spfile;

alter system set transactions = 330 scope = spfile;
</pre>
<p>&nbsp;</p>
<p>then to make the settings take effect, we need to bounce the database..</p>
<pre>
shutdown immediate;

startup;
</pre>
<p>&nbsp;</p>
<p><img class="alignnone size-full wp-image-123 post-image" title="OracleXE - alter system commands and restarting the database" src="http://www.fatlemon.co.uk/wp-content/uploads/oraclexe-alter-system-commands.png" alt="oraclexe-alter-system-commands" width="677" height="414" /></p>
<h3>3. Verify the new parameters</h3>
<p>with this simple select statement..</p>
<pre>
select name, value
from v$parameter
where name in ('processes', 'sessions', 'transactions');
</pre>
<p>&nbsp;</p>
<p><img class="alignnone size-full wp-image-125 post-image" title="OracleXE - showing updated processes, sessions and transactions" src="http://www.fatlemon.co.uk/wp-content/uploads/oraclexe-updated-processes-sessions-transactions.png" alt="oraclexe-updated-processes-sessions-transactions" width="677" height="318" /></p>
<p>And we&#8217;re done &#8211; a free, light and powerful Oracle RDBMS that&#8217;s able to serve more connections</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fatlemon.co.uk/2009/06/increasing-processes-sessions-and-transactions-in-oracle-xe/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

