<?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>Nimal&#039;s Weblog &#187; Database</title>
	<atom:link href="http://nimal.info/blog/tag/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://nimal.info/blog</link>
	<description>Nimal blogs here</description>
	<lastBuildDate>Tue, 24 Apr 2012 12:00:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Activate Oracle on XAMPP for Windows</title>
		<link>http://nimal.info/blog/2009/activate-oracle-on-xampp-for-windows/</link>
		<comments>http://nimal.info/blog/2009/activate-oracle-on-xampp-for-windows/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 04:30:00 +0000</pubDate>
		<dc:creator>Nimal</dc:creator>
				<category><![CDATA[Tech Notes]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[XAMPP]]></category>

		<guid isPermaLink="false">http://nimal.info/blog/?p=131</guid>
		<description><![CDATA[<p>PHP has got the OCI8 extension, which provides Oracle connectivity to PHP application, and OCI8 uses Oracle Instant Client Package to get Oracle specific functions. <a href="http://nimal.info/blog/2009/activate-oracle-on-xampp-for-windows/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><a href="http://nimal.info/blog/2009/activate-oracle-on-xampp-for-windows/">Activate Oracle on XAMPP for Windows</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></description>
			<content:encoded><![CDATA[<p><a style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" href="http://1.bp.blogspot.com/_QU2k3YoKpNc/SpBSHpW4wRI/AAAAAAAACyY/FU8GSbpeVK0/s1600-h/php-med-trans-light.gif"><img src="http://1.bp.blogspot.com/_QU2k3YoKpNc/SpBSHpW4wRI/AAAAAAAACyY/FU8GSbpeVK0/s320/php-med-trans-light.gif" border="0" alt="" /></a>With the default installation of <a href="http://www.apachefriends.org/en/xampp-windows.html">XAMPP for Windows</a>, we don&#8217;t get <a href="http://www.php.net/">PHP</a> <a href="http://www.oracle.com/">Oracle</a> connectivity enabled. This can be enabled easily when you need to connect to a <a href="http://en.wikipedia.org/wiki/Oracle_Database">Oracle Database</a> from your PHP application/script. <a href="http://en.wikipedia.org/wiki/PHP">PHP</a> has got the <a href="http://www.php.net/oci8">OCI8</a> extension, which provides Oracle connectivity to PHP application, and OCI8 uses <a href="http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html">Oracle Instant Client Package</a> to get Oracle specific functions.<br />
<a style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;" href="http://2.bp.blogspot.com/_QU2k3YoKpNc/SpBSNPGLzAI/AAAAAAAACyg/yYTx4wuz39E/s1600-h/database_clr.gif"><img src="http://2.bp.blogspot.com/_QU2k3YoKpNc/SpBSNPGLzAI/AAAAAAAACyg/yYTx4wuz39E/s320/database_clr.gif" border="0" alt="" /></a><br />
I had the need to connect to a Oracle Database from a PHP script in one of my recent projects, the following is what I did to enable Oracle connectivity in XAMPP for Windows.</p>
<ol>
<li>In your XAMPP Start Page, go to <strong>phpinfo, </strong>look for string <strong>oci8</strong>. If string found it indicate that connection to oracle is available, otherwise to activate connection do the following steps:</li>
<li>Open the currently used <strong>php.ini</strong> file by looking at the <strong>phpinfo</strong>, from the XAMPP folder.</li>
<li>Find string <strong>;extension=php_oci8.dll</strong>. Remove the semicolon (<strong>;</strong>) ahead of the string to activate the oracle extension.</li>
<li>Save the <strong>php.ini </strong>file.</li>
<li>Download the &#8220;Instant Client Package &#8211; Basic&#8221; for Windows from the <a href="http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html" target="_blank">OTN Instant Client page</a>. Unzip it to c:\instantclient_11_1</li>
<li>Edit the PATH environment setting and add c:\instantclient_11_1 before any other Oracle directories. For example, on Windows XP, follow <strong>Start -&gt; Control Panel -&gt; System -&gt; Advanced -&gt; Environment Variables</strong> and edit PATH in the System variables list.</li>
<li>Set desired Oracle globalization language environment variables such as NLS_LANG. If nothing is set, a default local environment will be assumed. See <a href="http://www.oracle.com/technology/tech/php/pdf/globalizing_oracle_php_applications.pdf" target="_blank">An Overview on Globalizing Oracle PHP Applications</a> for more details.</li>
<li>Unset Oracle variables such as ORACLE_HOME and ORACLE_SID, which are unnecessary with Instant Client (if they are set previously).</li>
<li>Restart XAMPP (or Start if its not already started).</li>
<li>To make sure that connection to oracle database has successfully activated, go to phpinfo. Find string: oci8. If found, then XAMPP can now communicate with Oracle Database.</li>
</ol>
<p>The steps to do the same in a Linux box are almost similar, except there you will use the Linux versions of the packages and setting PATH variables would be different.</p>
<p>You can ping me back with a comment if you run into any issues, I might be able to help you or I can learn from you.</p>
<p><strong><em>Reference:</em></strong></p>
<ul>
<li><a href="http://www.oracle.com/technetwork/articles/dsl/technote-php-instant-084410.html" target="_blank">http://www.oracle.com/technology/pub/notes/technote_php_instant.html</a></li>
</ul>
<p><a href="http://nimal.info/blog/2009/activate-oracle-on-xampp-for-windows/">Activate Oracle on XAMPP for Windows</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></content:encoded>
			<wfw:commentRss>http://nimal.info/blog/2009/activate-oracle-on-xampp-for-windows/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Renaming a MySQL database</title>
		<link>http://nimal.info/blog/2008/renaming-a-mysql-database/</link>
		<comments>http://nimal.info/blog/2008/renaming-a-mysql-database/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 09:59:00 +0000</pubDate>
		<dc:creator>Nimal</dc:creator>
				<category><![CDATA[Tech Notes]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://nimal.info/blog/?p=70</guid>
		<description><![CDATA[<p>MySQL does not support renaming a database (and prefers not to be done in the supported versions) as mentioned here. However, use of this statement could result in loss of database contents, which is why it was removed. Do not &#8230; <a href="http://nimal.info/blog/2008/renaming-a-mysql-database/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><a href="http://nimal.info/blog/2008/renaming-a-mysql-database/">Renaming a MySQL database</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></description>
			<content:encoded><![CDATA[<p><b><a href="http://en.wikipedia.org/wiki/MySQL" target="_blank">MySQL</a></b> does not support renaming a database <i>(and prefers not to be done in the supported versions)</i> as mentioned <a href="http://dev.mysql.com/doc/refman/5.1/en/rename-database.html" target="_blank">here</a>. <br clear="all">   <br />
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">However, use of this statement could result in loss of database         contents, which is why it was removed. Do not use         <code>RENAME DATABASE</code> in earlier versions in which         it is present.</p></blockquote>
<ul>
<li>But there might be times when you want to do this, and the simple workaround I use is this.</li>
<li>Just export the current database. You can use <b><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html" target="_blank">mysqldump</a></b> or any other GUI tool like <b><a href="http://en.wikipedia.org/wiki/HeidiSQL" target="_blank">HeidiSQL</a></b> or <b><a href="http://en.wikipedia.org/wiki/PhpMyAdmin" target="_blank">phpMyAdmin</a></b>.<b><code></code></b></li>
<li>The dump         typically contains SQL statements to create the table, populate         it, or both.</li>
<li>Then create a database with the name you want, the new database.</li>
<li>Then just <b><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html" target="_blank">mysqlimport</a></b> the exported SQL file to the new database you just created.</li>
<li>Final step would be to <a href="http://dev.mysql.com/doc/refman/5.0/en/drop-database.html" target="_blank">drop</a> the old database.</li>
</ul>
<p> Also note,<br />
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">         If you are doing a backup on the server and your tables all are         <code>MyISAM</code> tables, consider using the         <a href="http://dev.mysql.com/doc/refman/5.0/en/mysqlhotcopy.html" target="_blank"><span><b>mysqlhotcopy</b></span></a> instead because it can         accomplish faster backups and faster restores.</p></blockquote>
<div>&nbsp;</div>
<p><i>This is not big deal and just a matter of simple workaround, thats all.</i> So I&#39;m sure there is no way one could get doubts on this. Still if you get any I might be able to give a hand. Feedback and questions are welcome via comment or you can email me at <tt>talkout AT SPAMFREE gmail DOT com<br />   </tt><br />&nbsp;</p>
<p><a href="http://nimal.info/blog/2008/renaming-a-mysql-database/">Renaming a MySQL database</a> is a post from: <a href="http://nimal.info/blog">Nimal&#039;s Weblog</a> <br/><br/>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.</p>]]></content:encoded>
			<wfw:commentRss>http://nimal.info/blog/2008/renaming-a-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

