<?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>An Ingres Blog &#187; drivers</title>
	<atom:link href="http://blogs.planetingres.org/grant/category/drivers/feed" rel="self" type="application/rss+xml" />
	<link>http://blogs.planetingres.org/grant</link>
	<description>(Other blogs about Ingres are available...)</description>
	<lastBuildDate>Wed, 11 Aug 2010 10:15:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PECL ingres-2.2.2 released</title>
		<link>http://blogs.planetingres.org/grant/302-pecl-ingres-2-2-2-released</link>
		<comments>http://blogs.planetingres.org/grant/302-pecl-ingres-2-2-2-released#comments</comments>
		<pubDate>Thu, 10 Jun 2010 07:28:03 +0000</pubDate>
		<dc:creator>Grant Croker</dc:creator>
				<category><![CDATA[pecl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ingres]]></category>
		<category><![CDATA[update]]></category>
		<guid isPermaLink="false">http://blogs.planetingres.org/grant/?p=302</guid>
		<description><![CDATA[Yesterday I pushed out an update to the PHP driver for Ingres into the PHP Extension Community Library (PECL). Whilst it&#8217;s been labelled as a minor update there have been 15 fixes/additions to the driver: - Update the unit tests to be more independent - Add support for the Ingres BOOLEAN type - Add ingres_fetch_assoc() [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I pushed out an update to the PHP driver for Ingres into the <a href="http://pecl.php.net/ingres">PHP Extension Community Library</a> (PECL). Whilst it&#8217;s been labelled as a minor update there have been 15 fixes/additions to the driver:</p>
<p>- Update the unit tests to be more independent<br />
- Add support for the Ingres BOOLEAN type<br />
- Add ingres_fetch_assoc()<br />
- Allow for a 0 offset in all ingres field functions<br />
- Update build scripts for OpenVMS CSWS PHP 2.0<br />
- Fix bug 17556 &#8211; Handle errors for non-result returning statements<br />
- Fix bug 16960 &#8211; SEGV when fetching the results from a row producing procedure<br />
- Fix bug 16990 &#8211; SEGV when executing a database procedure<br />
- Fix bug 17510 &#8211; Fix php_ii_set_connect_options so they work as documented<br />
- Fix bug 17302 &#8211; _close_statement is unable to free active statements<br />
- Fix bug 17207 &#8211; Under certain conditions the driver can SEGV when doing cleaning up<br />
- Fix bug 17198 &#8211; Unable to close non-result statements<br />
- Fix bug 17092 &#8211; SIGBUS when fetching data on 64-bit Solaris<br />
- IIapi_getDescriptor() should only be called for SELECT statements<br />
- Fix bug 16752 &#8211; Send all string values as IIAPI_VCH_TYPE</p>
<p>You can download the source code from <a href="http://pecl.php.net/get/ingres">http://pecl.php.net/get/ingres</a> or install directly from the command line using the command:</p>
<pre class="brush: bash;">
sudo pecl install ingres-2.2.2
</pre>
<p>Pre-built Windows binaries are available from <a href="http://esd.ingres.com/product/drivers/PHP/Windows_32-Bit/PHP_Driver">ESD</a> for PHP 5.1.6, 5.2.13 and 5.3.2. An OpenVMS binary for CSWS PHP 2.0 will be updated today.  You can raise questions/problems via the <a href="http://community.ingres.com/forum/php">Ingres Community Forums</a>, the project <a href="http://pecl.php.net/package/ingres">home page</a> or via <a href="https://servicedesk.ingres.com">Service Desk</a>.<br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://blogs.planetingres.org/grant/179-php-ingres-221-released" title="PHP Ingres 2.2.1 released">PHP Ingres 2.2.1 released</a></li>
<li><a href="http://blogs.planetingres.org/grant/168-php-ingres-220-released" title="PHP Ingres 2.2.0 released">PHP Ingres 2.2.0 released</a></li>
<li><a href="http://blogs.planetingres.org/grant/147-php-ingres-210-released" title="PHP Ingres 2.1.0 released">PHP Ingres 2.1.0 released</a></li>
</ul>
<img src="http://blogs.planetingres.org/grant/?ak_action=api_record_view&id=302&type=feed" alt="" /><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blogs.planetingres.org/grant/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.planetingres.org/grant/302-pecl-ingres-2-2-2-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ingres and Apache on Redhat Enterprise Server</title>
		<link>http://blogs.planetingres.org/grant/253-ingres-and-apache-on-redhat-enterprise-server</link>
		<comments>http://blogs.planetingres.org/grant/253-ingres-and-apache-on-redhat-enterprise-server#comments</comments>
		<pubDate>Wed, 14 Apr 2010 07:22:12 +0000</pubDate>
		<dc:creator>Grant Croker</dc:creator>
				<category><![CDATA[drivers]]></category>
		<category><![CDATA[ingres]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[redhat]]></category>
		<guid isPermaLink="false">http://blogs.planetingres.org/grant/?p=253</guid>
		<description><![CDATA[Introduction Getting web applications to connect to Ingres via Apache on UNIX/Linux can be quite fiddly. Here is a simple guide on the setup steps needed to allow the Ingres PHP, Python and Ruby drivers to work with Apache on RedHat Enterprise Linux, CentOS and Fedora Linux. I&#8217;ve also published articles on doing the same [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>Getting web applications to connect to Ingres via Apache on UNIX/Linux can be quite fiddly. Here is a simple guide on the setup steps needed to allow the Ingres PHP, Python and Ruby drivers to work with Apache on RedHat Enterprise Linux, CentOS and Fedora Linux. I&#8217;ve also published articles on doing the same for <a href="http://community.ingres.com/wiki/Ingres_with_Apache_on_Debian_and_Ubuntu">Debian/Ubunutu</a> and <a href="http://community.ingres.com/wiki/Ingres_with_Apache_on_SUSE_Linux">Novell SLES/OpenSUSE</a> in the Ingres <a href="http://community.ingres.com/wiki">Community Wiki</a>.</p>
<h2>Pre-requisites</h2>
<p>It is assumed that you have the following installed:</p>
<ul>
<li>Ingres 2006 or newer ( Ingres &gt;= 9.0.4 )</li>
<li>RedHat Enterprise Linux 5.4, CentOS 5.4 and Fedora Linux 11
<ul>
<li>These steps might apply to earlier releases as well</li>
</ul>
</li>
<li>Apache 2.2.8
<ul>
<li>The steps here apply to other releases of Apache from 1.3 onwards</li>
<li>mod_env &#8211; An Apache module which modifies the environment which is passed to CGI scripts and SSI pages</li>
</ul>
</li>
</ul>
<h2>Disabling SELinux</h2>
<p>As of writing this Ingres and SELinux do not interact very well. To use Ingres on an SELinux enabled system, SELinux needs to be placed in <i>permissive</i> or <i>disabled</i> modes. To determine the current state of SELinux run the following:</p>
<pre class="brush: bash;">
sestatus
</pre>
<p>sample output:</p>
<pre>$ sudo /usr/sbin/sestatus
SELinux status:                 disabled
</pre>
<p>If the status is <code>enforcing</code> then SELinux must be disabled using the command:</p>
<pre class="brush: bash;">
setenforce 0
# or to disable SELinux but log exceptions to policy to /var/log/secure
setenforce Permissive
</pre>
<p>This will only disable SELinux until the next reboot of the server. To make the change permanent edit <code>/etc/sysconfig/selinux</code>, changing <code>SELINUX</code> to <code>disabled</code> or <code>permissive</code>.</p>
<h2>Enabling Ingres for Apache</h2>
<p>Any user that connects to Ingres must be a known (defined) user. Specifically a user account must be created within Ingres using <code>CREATE USER ...</code>. In the case of web applications served by Apache, Tomcat or whatever, the server process owner is the user that Ingres will initially see. To determine the process owner for Apache execute the following:</p>
<pre class="brush: bash;">
ps -fe | grep httpd | grep -v grep
</pre>
<p>On my system I get the following:</p>
<pre>[grant@uksl-grant-rhel64 ~]$ ps -fe | grep httpd | grep -v grep
root      3331     1  0 Apr08 ?        00:00:02 /usr/sbin/httpd
apache   23356  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23357  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23358  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23359  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23360  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23361  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23362  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23363  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
</pre>
<p>Which shows two user accounts for Apache. The <i>root</i> account can be ignored since it is a monitor/control process that starts up and shuts down servers as required. The processes run under the <i>apache</i> account will be used to connect to Ingres. </p>
<p>To add <i>apache</i> to Ingres run the following, as the <i>ingres</i> administrator:</p>
<pre>
sql iidbdb &lt;&lt;EOSQL
create user apache\g
commit\g
\q
EOSQL
</pre>
<p>You should see something similar to:</p>
<pre>
ingres@esva-suse:~&gt; sql iidbdb &lt;&lt;EOSQL
&gt; create user apache\g
&gt; commit\g
&gt; \q
&gt; EOSQL
INGRES TERMINAL MONITOR Copyright 2008 Ingres Corporation
Ingres Linux Version II 9.2.0 (a64.lnx/143)NPTL login
Tue Apr 13 23:33:18 2010
continue
* Executing . . .
continue
* Executing . . .
continue
* Ingres Version II 9.2.0 (a64.lnx/143)NPTL logout
Tue Apr 13 23:33:18 2010
</pre>
<p>Now the Ingres DBMS is setup for the Apache web server.</p>
<h2>Enabling Apache for Ingres</h2>
<ol>
<li>Edit, (as root), <code>/etc/sysconfig/httpd</code> to include the following:
<pre class="brush: bash;">
 II_SYSTEM=/opt/Ingres/IngresII
 LD_LIBRARY_PATH=/opt/Ingres/IngresII/ingres/lib:/opt/Ingres/IngresII/ingres/lib/lp32
 ODBCSYSINI=/opt/Ingres/IngresII/ingres/files
 export II_SYSTEM LD_LIBRARY_PATH ODBCSYSINI</pre>
<p><strong>Note</strong> &#8211; <code>ODBCSYSINI</code> is only needed for the Python driver or applications based on ODBC</li>
<li>Create a new config file (as root), <code>/etc/httpd/conf.d/ingres.conf</code>, adding the following:</li>
<pre class="brush: bash;">PassEnv II_SYSTEM LD_LIBRARY_PATH ODBCSYSINI</pre>
<li>Restart apache (as root):
<pre class="brush: bash;">service httpd restart</pre>
</li>
</ol>
<h2>Verifying the setup</h2>
<p>To see that the environment variables are visible the following code snippets can be executed through Apache through <a href="http://php.net/">PHP</a> and <a href="http://www.modpython.org/">mod_python</a>.</p>
<h3>PHP</h3>
<ul>
<li>Code:
<pre class="brush: php;">
&lt; ?php
  echo &quot;II_SYSTEM is :&quot; .$_SERVER[&quot;II_SYSTEM&quot;] . &quot;&lt;br/&gt;\n&quot;;
  echo &quot;LD_LIBRARY_PATH is :&quot; .$_SERVER[&quot;LD_LIBRARY_PATH&quot;] . &quot;&lt;br /&gt;\n&quot;;
?&gt;</pre>
</li>
<li>Sample Output:
<pre>
II_SYSTEM is :/opt/Ingres/IngresII
LD_LIBRARY_PATH is :/opt/Ingres/IngresII/ingres/lib:/opt/Ingres/IngresII/ingres/lib/lp32
</pre>
</li>
</ul>
<h3>Python</h3>
<ul>
<li>Code, save as <code>python_env.py</code>:</li>
<pre class="brush: python;">
from mod_python import apache
def environment(req):
    req.content_type = &quot;text/html&quot;
    req.add_common_vars()
    env_vars = req.subprocess_env.copy()
    req.write('&lt; !DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;')
    req.write('&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; lang=&quot;en&quot; xml:lang=&quot;en&quot;&gt;')
    req.write('&lt;head&gt;&lt;title&gt;mod_python.publisher&lt;/title&gt;&lt;/head&gt;')
    req.write('&lt;body&gt;')
    req.write('&lt;h2&gt;Environment Variables&lt;/h2&gt;')
    req.write('&lt;table border=&quot;1&quot;&gt;')
    req.write('&lt;tr&gt;&lt;td&gt;%s&lt;/td&gt;&lt;td&gt;%s&lt;/td&gt;&lt;/tr&gt;' % (&quot;II_SYSTEM&quot;, env_vars['II_SYSTEM']))
    req.write('&lt;tr&gt;&lt;td&gt;%s&lt;/td&gt;&lt;td&gt;%s&lt;/td&gt;&lt;/tr&gt;' % (&quot;LD_LIBRARY_PATH&quot;, env_vars['LD_LIBRARY_PATH']))
    req.write('&lt;/table&gt;')
    req.write('&lt;/body&gt;')
    req.write('&lt;/html&gt;')
</pre>
<li>Ouput from http://localhost/env.py/environment:
<pre>
 Environment Variables
 II_SYSTEM	/opt/Ingres/II
 LD_LIBRARY_PATH	/lib:/usr/lib:/usr/local/lib:/opt/Ingres/II/ingres/lib:/opt/Ingres/II/ingres/lib/lp32
</pre>
</li>
</ul>
<p>If you have any comments feel free to post them below.</p>
<p><strong>Updated Apr 14, 2010 9:50</strong> to include SELinux information</p>
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://blogs.planetingres.org/grant/345-improving-the-improved-docs-ingres-com" title="Improving the Improved &#8211; docs.ingres.com">Improving the Improved &#8211; docs.ingres.com</a></li>
<li><a href="http://blogs.planetingres.org/grant/332-ingres-vectorwise-webinars" title="Ingres VectorWise Webinars">Ingres VectorWise Webinars</a></li>
<li><a href="http://blogs.planetingres.org/grant/308-iua-vectorwise-demo-video" title="IUA VectorWise Demo Video">IUA VectorWise Demo Video</a></li>
</ul>
<img src="http://blogs.planetingres.org/grant/?ak_action=api_record_view&id=253&type=feed" alt="" /><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blogs.planetingres.org/grant/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.planetingres.org/grant/253-ingres-and-apache-on-redhat-enterprise-server/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Maven driver repository updated</title>
		<link>http://blogs.planetingres.org/grant/226-maven-driver-repository-updated</link>
		<comments>http://blogs.planetingres.org/grant/226-maven-driver-repository-updated#comments</comments>
		<pubDate>Thu, 03 Dec 2009 15:02:23 +0000</pubDate>
		<dc:creator>Grant Croker</dc:creator>
				<category><![CDATA[drivers]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[ingres]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>
		<guid isPermaLink="false">http://blogs.planetingres.org/grant/?p=226</guid>
		<description><![CDATA[Following on from my earlier post, a new JDBC driver has been published to our external Maven repository by Alan Raison. In the next 24 hours the updated driver will be propagated to the central Maven repostory. For more information about obtaining the Ingres JDBC driver using Maven see Alan&#8217;s original post. Related Posts Ingres [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from my <a href="http://blogs.planetingres.org/grant/2009/12/03/new-ingres-ruby-driver-and-rails-adapter-posted/">earlier post</a>, a new JDBC driver has been published to our external <a href="http://code.ingres.com/apps/maven">Maven repository</a> by Alan Raison. In the next 24 hours the updated driver will be propagated to the central Maven repostory. For more information about obtaining the Ingres JDBC driver using Maven see Alan&#8217;s original <a href="http://community.ingres.com/forum/blogs/alan-raison/9-ingres-jdbc-maven.html">post</a>.<br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://blogs.planetingres.org/grant/185-ingres-jdbc-driver-available-through-maven" title="Ingres JDBC Driver available through Maven">Ingres JDBC Driver available through Maven</a></li>
<li><a href="http://blogs.planetingres.org/grant/203-using-ingres-with-grails-via-a-hibernate-dao" title="Using Ingres with Grails via a Hibernate DAO">Using Ingres with Grails via a Hibernate DAO</a></li>
<li><a href="http://blogs.planetingres.org/grant/88-logging-ingres-jdbc-connections-under-tomcat" title="Logging Ingres JDBC connections under tomcat">Logging Ingres JDBC connections under tomcat</a></li>
</ul>
<img src="http://blogs.planetingres.org/grant/?ak_action=api_record_view&id=226&type=feed" alt="" /><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blogs.planetingres.org/grant/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.planetingres.org/grant/226-maven-driver-repository-updated/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Ingres Ruby driver and Rails adapter posted</title>
		<link>http://blogs.planetingres.org/grant/223-new-ingres-ruby-driver-and-rails-adapter-posted</link>
		<comments>http://blogs.planetingres.org/grant/223-new-ingres-ruby-driver-and-rails-adapter-posted#comments</comments>
		<pubDate>Thu, 03 Dec 2009 12:10:11 +0000</pubDate>
		<dc:creator>Grant Croker</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[ingres]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[release]]></category>
		<guid isPermaLink="false">http://blogs.planetingres.org/grant/?p=223</guid>
		<description><![CDATA[It&#8217;s been a quiet few months here on the blog, however it&#8217;s been any but quiet in the office. Since my last update I&#8217;ve been busy updating the Ingres Ruby driver and Ruby on Rails adapter to support multiple connections as well as Rails/ActiveRecord 2.3.x (2.3.5 was released this week). For a complete run down [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a quiet few months here on the blog, however it&#8217;s been any but quiet in the office. Since my last update I&#8217;ve been busy updating the Ingres Ruby driver and Ruby on Rails adapter to support multiple connections as well as Rails/ActiveRecord 2.3.x (2.3.5 was released this week). For a complete run down of the changes made take a look at the <a href="http://code.ingres.com/ingres/drivers/ruby/tags/ingres-ruby-1.4.0/doc/files/CHANGELOG.html">CHANGELOG</a>. See my <a href="http://http://community.ingres.com/forum/ruby-driver-ruby-rails-adapter/11433-updated-ruby-driver-ruby-rails-adapter-posted-1-4-0-a.html#post28891">forum post</a> for more information regarding downloading the source or the pre-built binaries for Windows.</p>
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://blogs.planetingres.org/grant/89-ingres-ruby-driver-and-ruby-on-rails-adapter-version-130" title="Ingres Ruby Driver and Ruby on Rails Adapter version 1.3.0">Ingres Ruby Driver and Ruby on Rails Adapter version 1.3.0</a></li>
<li><a href="http://blogs.planetingres.org/grant/82-ruby-122-released" title="Ruby 1.2.2 released">Ruby 1.2.2 released</a></li>
<li><a href="http://blogs.planetingres.org/grant/179-php-ingres-221-released" title="PHP Ingres 2.2.1 released">PHP Ingres 2.2.1 released</a></li>
</ul>
<img src="http://blogs.planetingres.org/grant/?ak_action=api_record_view&id=223&type=feed" alt="" /><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blogs.planetingres.org/grant/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.planetingres.org/grant/223-new-ingres-ruby-driver-and-rails-adapter-posted/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Ingres with Grails via a Hibernate DAO</title>
		<link>http://blogs.planetingres.org/grant/203-using-ingres-with-grails-via-a-hibernate-dao</link>
		<comments>http://blogs.planetingres.org/grant/203-using-ingres-with-grails-via-a-hibernate-dao#comments</comments>
		<pubDate>Wed, 30 Sep 2009 14:56:17 +0000</pubDate>
		<dc:creator>Grant Croker</dc:creator>
				<category><![CDATA[drivers]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[dao]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[ingres]]></category>
		<guid isPermaLink="false">http://blogs.planetingres.org/grant/?p=203</guid>
		<description><![CDATA[The following is a (rough) translation of a post by Fátima Casaú Pérez I picked up via twitter. To see the original post go to http://blogs.salenda.es/fatima_casau/2009/09/30/inyectar-un-datasource-ingres-en-grails/: Recently I found the need to use a DAO data source based on an external library in my application. In fact a different data source from my application against [...]]]></description>
			<content:encoded><![CDATA[<p>The following is a (rough) translation of a post by <a href="http://blogs.salenda.es/fatima_casau/">Fátima Casaú Pérez</a> I picked up via <a href="http://twitter.com/fatimacasau/statuses/4492215981">twitter</a>. To see the original post go to <a href="http://blogs.salenda.es/fatima_casau/2009/09/30/inyectar-un-datasource-ingres-en-grails/">http://blogs.salenda.es/fatima_casau/2009/09/30/inyectar-un-datasource-ingres-en-grails/</a>:</p>
<p>Recently I found the need to use a DAO data source based on an external library in my application. In fact a different data source from my application against which I needed to connect an Ingres database. First off it sounded quite difficult but in the end it was really easy to do.</p>
<p>The fact that it was Ingres and not another RDBMS such as Oracle or MySQL presented no problems. Not even if it&#8217;s going to be the database administration for the application. I&#8217;ve come across this sort of situation before and haven&#8217;t had any problems apart from some data-type incompatibilities, nothing serious. </p>
<p>It was no problem that I needed to use different data source in my application, Just give the source a different name and that&#8217;s it. How and where to install? I edited <em>resources.xml</em> adding the new data source and the bean that references the DAO, like so:</p>
<pre class="brush: xml;">
&lt;!--- resources.xml --&gt;
&lt; ?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd&quot;&gt;
    &lt;bean id=&quot;dataSourceIngres&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;ca.ingres.jdbc.IngresDriver&quot; /&gt;
        &lt;property name=&quot;url&quot; value=&quot;jdbc:ingres://DATABASE&quot; /&gt;
        &lt;property name=&quot;username&quot; value=&quot;USERNAME&quot; /&gt;
        &lt;property name=&quot;password&quot; value=&quot;PASSWORD&quot; /&gt;
    &lt;/bean&gt;
    &lt;bean id=&quot;ingresDao&quot; factory-method=&quot;getInstance&quot;&gt;
       &lt;property name=&quot;dataSource&quot;&gt;&lt;ref local=&quot;dataSourceIngres&quot;/&gt;&lt;/property&gt;
    &lt;/bean&gt;
&lt;/beans&gt;
</pre>
<p>After that you call <em>getInstance()</em> for the DAO in the application which in turn calls the corresponding method passing the necessary arguments.</p>
<p>&#8212;&#8211;</p>
<p><strong>Editor&#8217;s note</strong>: Fátima is using the driver class <em>ca.ingres.jdbc.IngresDriver</em> and not <em>com.ingres.jdbc.IngresDriver</em> since the client is using Ingres 2.6.<br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://blogs.planetingres.org/grant/226-maven-driver-repository-updated" title="Maven driver repository updated">Maven driver repository updated</a></li>
<li><a href="http://blogs.planetingres.org/grant/185-ingres-jdbc-driver-available-through-maven" title="Ingres JDBC Driver available through Maven">Ingres JDBC Driver available through Maven</a></li>
<li><a href="http://blogs.planetingres.org/grant/88-logging-ingres-jdbc-connections-under-tomcat" title="Logging Ingres JDBC connections under tomcat">Logging Ingres JDBC connections under tomcat</a></li>
</ul>
<img src="http://blogs.planetingres.org/grant/?ak_action=api_record_view&id=203&type=feed" alt="" /><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blogs.planetingres.org/grant/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.planetingres.org/grant/203-using-ingres-with-grails-via-a-hibernate-dao/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ingres PHP support for HP OpenVMS CSWS 2.0</title>
		<link>http://blogs.planetingres.org/grant/191-ingres-php-support-for-hp-openvms-csws-20</link>
		<comments>http://blogs.planetingres.org/grant/191-ingres-php-support-for-hp-openvms-csws-20#comments</comments>
		<pubDate>Fri, 17 Jul 2009 06:22:10 +0000</pubDate>
		<dc:creator>Grant Croker</dc:creator>
				<category><![CDATA[OpenVMS]]></category>
		<category><![CDATA[drivers]]></category>
		<category><![CDATA[ingres]]></category>
		<category><![CDATA[pecl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[inrges]]></category>
		<guid isPermaLink="false">http://blogs.planetingres.org/grant/?p=191</guid>
		<description><![CDATA[For those of you who are interested in running PHP on OpenVMS with Ingres, I have published a pre-built binary to http://esd.ingres.com/product/drivers/PHP/HP_OpenVMS_Alpha/PHP_Driver. Installation instructions are available via http://bit.ly/InstallPHPIngresOpenVMS or in the README.VMS file contained within the download. The supplied PHP_INGRES.EXE has been built against Ingres 9.2.0 (axm.vms/143). If you want this extension for a different [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who are interested in running PHP on OpenVMS with Ingres, I have published a pre-built binary to<br />
<a href="http://esd.ingres.com/product/drivers/PHP/HP_OpenVMS_Alpha/PHP_Driver">http://esd.ingres.com/product/drivers/PHP/HP_OpenVMS_Alpha/PHP_Driver</a>. Installation instructions are available via <a href="http://bit.ly/InstallPHPIngresOpenVMS">http://bit.ly/InstallPHPIngresOpenVMS</a> or in the <a href="http://svn.php.net/viewvc/pecl/ingres/tags/ingres-2.2.1-vms/README.VMS?view=co">README.VMS</a> file contained within the download. The supplied <em>PHP_INGRES.EXE</em> has been built against Ingres 9.2.0 (axm.vms/143). If you want this extension for a different version of Ingres drop me a mail via <a href="mailto:grantc@php.net">grantc@php.net</a>.</p>
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://blogs.planetingres.org/grant/302-pecl-ingres-2-2-2-released" title="PECL ingres-2.2.2 released">PECL ingres-2.2.2 released</a></li>
<li><a href="http://blogs.planetingres.org/grant/179-php-ingres-221-released" title="PHP Ingres 2.2.1 released">PHP Ingres 2.2.1 released</a></li>
<li><a href="http://blogs.planetingres.org/grant/175-php-530-released" title="PHP 5.3.0 released">PHP 5.3.0 released</a></li>
</ul>
<img src="http://blogs.planetingres.org/grant/?ak_action=api_record_view&id=191&type=feed" alt="" /><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blogs.planetingres.org/grant/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.planetingres.org/grant/191-ingres-php-support-for-hp-openvms-csws-20/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ingres JDBC Driver available through Maven</title>
		<link>http://blogs.planetingres.org/grant/185-ingres-jdbc-driver-available-through-maven</link>
		<comments>http://blogs.planetingres.org/grant/185-ingres-jdbc-driver-available-through-maven#comments</comments>
		<pubDate>Thu, 09 Jul 2009 10:50:37 +0000</pubDate>
		<dc:creator>Grant Croker</dc:creator>
				<category><![CDATA[drivers]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[ingres]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>
		<guid isPermaLink="false">http://blogs.planetingres.org/grant/?p=185</guid>
		<description><![CDATA[I am pleased to announce that the Ingres JDBC driver is now available via the central Maven repository. For those who don’t know, Maven is a dependency management and project lifecycle tool for Java projects. The hosting of the Ingres JDBC driver in the central repository raises the profile of the Ingres Database and should [...]]]></description>
			<content:encoded><![CDATA[<p>I am pleased to announce that the Ingres JDBC driver is now <a href="http://jira.codehaus.org/browse/MAVENUPLOAD-2415">available</a> via the central Maven <a href="http://repo1.maven.org/maven2/com/ingres/">repository</a>.</p>
<p>For those who don’t know, Maven is a dependency management and project lifecycle tool for Java projects.  The hosting of the Ingres JDBC driver in the central repository raises the profile of the Ingres Database and should make it even easier and appealing for new developers to pick up Ingres as their development database.</p>
<p>Alan Raison has written up some notes in our <a href="http://community.ingres.com/wiki/Ingres_JDBC_With_Maven">community wiki</a> and in his <a href="http://community.ingres.com/forum/blogs/alan-raison/9-ingres-jdbc-maven.html">blog</a>.</p>
<p>I would like to express my thanks for all those who made this possible, especially to Alan who pushed for this in the first place.<br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://blogs.planetingres.org/grant/226-maven-driver-repository-updated" title="Maven driver repository updated">Maven driver repository updated</a></li>
<li><a href="http://blogs.planetingres.org/grant/203-using-ingres-with-grails-via-a-hibernate-dao" title="Using Ingres with Grails via a Hibernate DAO">Using Ingres with Grails via a Hibernate DAO</a></li>
<li><a href="http://blogs.planetingres.org/grant/88-logging-ingres-jdbc-connections-under-tomcat" title="Logging Ingres JDBC connections under tomcat">Logging Ingres JDBC connections under tomcat</a></li>
</ul>
<img src="http://blogs.planetingres.org/grant/?ak_action=api_record_view&id=185&type=feed" alt="" /><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blogs.planetingres.org/grant/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.planetingres.org/grant/185-ingres-jdbc-driver-available-through-maven/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Ingres 2.2.1 released</title>
		<link>http://blogs.planetingres.org/grant/179-php-ingres-221-released</link>
		<comments>http://blogs.planetingres.org/grant/179-php-ingres-221-released#comments</comments>
		<pubDate>Tue, 30 Jun 2009 17:40:57 +0000</pubDate>
		<dc:creator>Grant Croker</dc:creator>
				<category><![CDATA[ingres]]></category>
		<category><![CDATA[pecl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[release]]></category>
		<guid isPermaLink="false">http://blogs.planetingres.org/grant/?p=179</guid>
		<description><![CDATA[The last release of the PHP driver introduced a regression where by the &#8220;EXECUTE PROCEDURE&#8221; or &#8220;CALL&#8221; SQL statements would fail to execute (PECL bug 16688). The bug slipped through the net due to missing tests for database procedures. This oversight has now been resolved and the fix has been rolled into a new release, [...]]]></description>
			<content:encoded><![CDATA[<p>The last release of the PHP driver introduced a regression where by the &#8220;EXECUTE PROCEDURE&#8221; or &#8220;CALL&#8221; SQL statements would fail to execute (<a href="http://pecl.php.net/bugs/bug.php?id=16688">PECL bug 16688</a>). The bug slipped through the net due to missing tests for database procedures. This oversight has now been resolved and the fix has been rolled into a new release, 2.2.1. If you build the driver from source you can get the updated code from <a href="http://pecl.php.net/get/ingres">http://pecl.php.net/get/ingres</a>. Windows users can download the php_ingres.dll from <a href="http://esd.ingres.com/product/drivers/PHP/Windows_32-Bit/PHP_Driver/">http://esd.ingres.com/product/drivers/PHP/Windows_32-Bit/PHP_Driver/</a>. The Windows download includes the DLLs for PHP 5.3.0, released <a href="http://blogs.planetingres.org/grant/2009/06/30/php-530-released/">earlier</a> today.<br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://blogs.planetingres.org/grant/168-php-ingres-220-released" title="PHP Ingres 2.2.0 released">PHP Ingres 2.2.0 released</a></li>
<li><a href="http://blogs.planetingres.org/grant/147-php-ingres-210-released" title="PHP Ingres 2.1.0 released">PHP Ingres 2.1.0 released</a></li>
<li><a href="http://blogs.planetingres.org/grant/124-php-driver-202-released" title="PHP driver 2.0.2 released">PHP driver 2.0.2 released</a></li>
</ul>
<img src="http://blogs.planetingres.org/grant/?ak_action=api_record_view&id=179&type=feed" alt="" /><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blogs.planetingres.org/grant/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.planetingres.org/grant/179-php-ingres-221-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 5.3.0 released</title>
		<link>http://blogs.planetingres.org/grant/175-php-530-released</link>
		<comments>http://blogs.planetingres.org/grant/175-php-530-released#comments</comments>
		<pubDate>Tue, 30 Jun 2009 14:28:40 +0000</pubDate>
		<dc:creator>Grant Croker</dc:creator>
				<category><![CDATA[pecl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[release]]></category>
		<guid isPermaLink="false">http://blogs.planetingres.org/grant/?p=175</guid>
		<description><![CDATA[Just a quick note to say that PHP 5.3.0 has been released. DLLs for PHP 5.3.0 and Ingres are in the process of being built and should be up on http://esd.ingres.com within the next 24 hours. Related Posts PHP Ingres 2.2.1 released PHP Ingres 2.2.0 released PHP Ingres 2.1.0 released]]></description>
			<content:encoded><![CDATA[<p>Just a quick note to say that PHP 5.3.0 has been <a href="http://www.php.net/archive/2009.php#id2009-06-30-1">released</a>. DLLs for PHP 5.3.0 and Ingres are in the process of being built and should be up on <a href="http://esd.ingres.com">http://esd.ingres.com</a> within the next 24 hours.<br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://blogs.planetingres.org/grant/179-php-ingres-221-released" title="PHP Ingres 2.2.1 released">PHP Ingres 2.2.1 released</a></li>
<li><a href="http://blogs.planetingres.org/grant/168-php-ingres-220-released" title="PHP Ingres 2.2.0 released">PHP Ingres 2.2.0 released</a></li>
<li><a href="http://blogs.planetingres.org/grant/147-php-ingres-210-released" title="PHP Ingres 2.1.0 released">PHP Ingres 2.1.0 released</a></li>
</ul>
<img src="http://blogs.planetingres.org/grant/?ak_action=api_record_view&id=175&type=feed" alt="" /><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blogs.planetingres.org/grant/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.planetingres.org/grant/175-php-530-released/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Ingres 2.1.0 released</title>
		<link>http://blogs.planetingres.org/grant/147-php-ingres-210-released</link>
		<comments>http://blogs.planetingres.org/grant/147-php-ingres-210-released#comments</comments>
		<pubDate>Fri, 27 Feb 2009 12:57:56 +0000</pubDate>
		<dc:creator>Grant Croker</dc:creator>
				<category><![CDATA[ingres]]></category>
		<category><![CDATA[pecl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php driver]]></category>
		<category><![CDATA[release]]></category>
		<guid isPermaLink="false">http://blogs.planetingres.org/grant/?p=147</guid>
		<description><![CDATA[Another month &#8230; (this is getting to be a habit): This update is implements several bits of new functionality as can seen from the CHANGELOG Add ingres.fetch_buffer_size to configure to the number of rows ingres_query() will fetch. Add ingres_charset() to fetch the installation II_CHARSETxx value Add ingres.describe ini setting to allow disabling of DESCRIBE INPUT [...]]]></description>
			<content:encoded><![CDATA[<p>Another month &#8230; (<a href="http://blogs.planetingres.org/grant/2009/01/23/php-driver-202-released/">this is getting to be a habit</a>):</p>
<p>This update is implements several bits of new functionality as can seen from the <a href="http://pecl.php.net/package-info.php?package=ingres&amp;version=2.1.0">CHANGELOG</a></p>
<blockquote><ul>
<li>Add ingres.fetch_buffer_size to configure to the number of rows ingres_query() will fetch.</li>
<li>Add ingres_charset() to fetch the installation II_CHARSETxx value</li>
<li>Add ingres.describe ini setting to allow disabling of DESCRIBE INPUT if desired</li>
<li>Add support for DESCRIBE INPUT</li>
<li>Add ingres_escape_string()</li>
<li>Add ingres_result_seek() to support row positioning</li>
</ul>
</blockquote>
<p>Some Links:</p>
<ul>
<li>Package home &#8211; <a href="http://pecl.php.net/package/ingres">http://pecl.php.net/package/ingres</a></li>
<li>Changelog &#8211; <a href="http://pecl.php.net/package-changelog.php?package=ingres">http://pecl.php.net/package-changelog.php?package=ingres</a></li>
<li>Source Download &#8211; <a href="http://pecl.php.net/get/ingres-2.1.0.tgz">http://pecl.php.net/get/ingres-2.1.0.tgz</a></li>
<li>W32 Download &#8211;  <a href="http://esd.ingres.com/product/drivers/PHP/Windows_32-Bit">http://esd.ingres.com/product/drivers/PHP/Windows_32-Bit</a></li>
</ul>
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://blogs.planetingres.org/grant/179-php-ingres-221-released" title="PHP Ingres 2.2.1 released">PHP Ingres 2.2.1 released</a></li>
<li><a href="http://blogs.planetingres.org/grant/168-php-ingres-220-released" title="PHP Ingres 2.2.0 released">PHP Ingres 2.2.0 released</a></li>
<li><a href="http://blogs.planetingres.org/grant/124-php-driver-202-released" title="PHP driver 2.0.2 released">PHP driver 2.0.2 released</a></li>
</ul>
<img src="http://blogs.planetingres.org/grant/?ak_action=api_record_view&id=147&type=feed" alt="" /><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blogs.planetingres.org/grant/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.planetingres.org/grant/147-php-ingres-210-released/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
