Skip to content

Perl’s DBD-Ingres updated

16-May-08

It looks like someone else has taken over DBD-Ingres and put out a new release. According to the CHANGES the following updates were made:

- add missing timestamp types
- add workaround for do statements with placeholders
-> works for Ingres2006 R3

You can download the updated driver from http://search.cpan.org/CPAN/authors/id/S/SR/SREAGLE/DBD-Ingres-0.5201.tar.gz.

Navigating the Ingres source with … ctags

12-May-08

I recently discovered ctags, a program that generates a tag/index file for C, Java, PHP, Python, Ruby. For those new to the Ingres source ctags is an invaluable tool for navigating the Ingres source tree. Editors like vi and Emacs can use the generated tag file to allow the coder to go directly to the source for any Ingres function.

Here is how to setup ctags with Vim:

  1. Install ctags for your operating system
  2. Generate the tag file for the Ingres source:ctags -R -f ~/.vim/tags/ingres.ctags /home/grant/src/svn/ingres/main/
    • ~/.vim/tags/ingres.ctags is the target tag file. Windows: Use $HOME in place of ~
    • /home/grant/src/svn/ingres/main/ is the full path to the Ingres source tree. The path used needs to absolute and not relative since Vim will need to navigate from the current working directory to the file containing the function definition.
  3. Copy the following code into your $HOME/.vimrc:
    " Tag files
    set tags+=$HOME/.vim/tags/ingres.ctags
    " Ctrl+Right Arrow to goto source of function under the cursor
    map <silent><C-Left> <C-T>
    " Ctrl+Left Arrow to go back
    map <silent><C-Right> <C-]>
  4. Open any Ingres source file with Vim, say main/src/common/odbc/driver/connect.c
  5. Search for IIapi_initialize, somewhere around line 2276 (at least on my system)
  6. Place the cursor over the function IIapi_initialize and then press Control+Right Arrow/Cursor
  7. Vim should have loaded main/src/common/aif/aip/apiinit.c and placed the cursor on the following line (309):
    IIapi_initialize( IIAPI_INITPARM II_FAR *initParm )
  8. To go back to the previous file press Control+Left Arrow/Cursor

There you have it a simple way of navigating the Ingres source from the relative comfort of Vim.

Ingres and PHP VIP session rescheduled

02-Apr-08

Due to unforeseen circumstances the Getting Started with Ingres and PHP session I was supposed to present next Wednesday, 9th April 2008, has been brought forward one day to April 8th. The session will provide the basics for getting up and running with PHP and Ingres, covering the different platforms supported by both Ingres and PHP.

  • To attend the session at 6am PDT (14:00 UK, 15:00 CEDT, 00:00 AEDT Weds) here
  • To attend the session at 5pm PDT (01:00 UK Weds, 02:00 CEDT Weds, 10:00 AEDT Weds) register here

The following week, 16th April, I will presenting a session on working on the driver code and how to submit changes in to the driver.

  • To attend the session at 6am PDT (14:00 UK, 15:00 CEDT, 00:00 AEDT Weds) here
  • To attend the session at 5pm PDT (01:00 UK Weds, 02:00 CEDT Weds, 10:00 AEDT Weds) register here

Hope to see you there.

Ingres accepted as a Google Summer of Code organization

18-Mar-08

Ingres has been accepted as a mentoring organization for Google’s Summer of Code. The list of ideas put forward by Ingres can be found at http://www.ingres.com/events/summerofcode.php.

Ruby 1.2.2 released

18-Jan-08

Yesterday, I/we released version 1.2.2 of the Ruby driver and RoR adaptor for Ingres. The release is a small update that includes the following changes:

  • Fix quote() in ingres_adapater.rb to use the class of variable rather than the equivalent Ingres column type.
  • Fix segvio in Ingres Ruby driver when fetching char/varchar with data longer than 4074 bytes.

The following files have been added to keep a track of the changes made and the work still to be done:

The latest readme.html and driver package (source code) can be downloaded from http://www.ingres.com/downloads/prod-download-drivers.php

Should you wish to provide feedback of any sort you can e-mail me (grant (at) planetingres (dot) org), post to the Ingres Ruby driver forum or to comp.databases.ingres.

Ruby for Ingres

03-Dec-07

Sometime ago I wrote a quick post on getting the Ruby binding for ODBC working with Ingres. Whilst there is still some work to be done there I thought I might write about the Ingres Ruby binding and Ruby on Rails (RoR) adapter.

A consultant for an Ingres client based in the US was asked to develop an Ingres interface for RoR. This he did and as part of the agreement the code was handed over to Ingres Corp. with the intention that it got released after a “once over”. Well the code did get a going over, code specific to the original client’s system had to be removed and earlier this year it was made available on Ingres’s website.

Why am I interested now when I failed to even mention the release of the code? Well it appears I am now assisting in the development of the binding and the RoR adapter. Last week I was in California running through what is needed to get the driver in a more usable state. Here are the edited highlights of what was discussed:

  • Clean up the build/install scripts
  • Document the code, making use of rdoc tags where possible
  • Implement missing data type support; SQL Date/Time, Money, Decimal, Float4/8, Long nvarchar
  • Fix up the adapter to get 100% coverage on the active_records unit tests
  • Allow multiple connections - only one connection per process allowed at present
  • other “stuff”…

The plan is to release as often a possible between changes rather than wait for all pieces to be complete. Ideally this will allow for feedback sooner rather than later. Should you wish to provide feedback of any sort you can e-mail me (grant@planetingres.org), post to the Ingres forums or to comp.databases.ingres.

Ingres 2006 Release 3 beta

19-Nov-07

The following just landed in my inbox from the IngresVIP mailing list:

The latest version of Ingres 2006 by Ingres has been released! This release is a beta version, preparing for the production version release, which will take place in Q1 2008.

The new Ingres 2006 Release 3 is designed to simplify development of sophisticated applications and delivers several outstanding benefits:

Improved Java development capabilities

  • Support of robust multi-language applications using UTF-8 and Unicode
  • Support for scrollable cursors
  • Support for LOB locators
  • New SQL functions
  • Support for larger decimal numbers

Improved Integration with Visual Studio

  • Connection string support for dbms_user, dbms_password, and charset
  • Improved mapping ANSI Interval Day To Second (DS) data type

Improved Availability and Reduced Administration

  • Improved exception handling and tracing
  • Extended capabilities of the locking and logging shared memory segment
  • Improved logging of recovery tools
  • Ability to restart Rollforward
  • Improved Storage and memory management through improved defaults
  • Automatic determination of table type on CREATE TABLE

Performance improvements

  • Connection Pooling in ODBC CLI
  • Streamlined Network listening
  • Faster string comparisons

The software can be downloaded here:
http://www.ingres.com/downloads/prod-comm-download.php

How do you handle multiple Ingres installations?

19-Nov-07

Since it is possible to have multiple copies of Ingres running on box I was wondering how people switch between them. When I worked in support we used to hand write the scripts used to set-up the Ingres environment. Nowadays, at least with the Linux RPM releases, that script is written for you and placed in a known location ~ingres. Both these things make writing a master script to interrogate your Ingres installations (or instances as some people refer to them as). Below is the script I use:

echo "Release Running Script II_SYSTEM"
echo "-------------------------------------------------------------------------------"
for i in `ls ~ingres/.ing*bash`;
do
II_SYSTEM=`grep "II_SYSTEM=" $i | sed 's/^.*=//'`
II_INSTALLATION=`II_SYSTEM=$II_SYSTEM $II_SYSTEM/ingres/bin/ingprenv| grep II_INSTALLATION | sed 's/^.*=//'`
STATUS=`ps -fe | grep ingres | grep ${II_INSTALLATION} | grep dbms | wc -l`
if [ $STATUS -ge 2 ]; then
RUNNING=`echo "Y"`
else
RUNNING=`echo "N"`
fi
alias load${II_INSTALLATION}=". ${i}"
VERSION=`cat $II_SYSTEM/ingres/version.rel`
echo $VERSION " " $RUNNING " " load${II_INSTALLATION} $II_SYSTEM
done
alias show_ingres=". ~/bin/ingres_installs"

What it does
For each of the ~ingres/.ing*bash file the script extracts the following information:

  • II_SYSTEM from the bash script
  • Using II_SYSTEM, fetches the installation code (II_INSTALLATION)
  • Checks to see there are at least two dbms processes running and prints the status, one is the dmfrcp (recovery server) the other is the real database server
  • Sets up an alias of loadXX where XX is the 2 letter installation code obtained earlier
  • Prints out the information obtained; Ingres version, running state, alias needed to access the installation and the value of II_SYSTEM

That script is invoked from .bashrc when the terminal in interactive mode (for non-interactive terminals, e.g. scp, the ingres_installs script might cause problems):

case "$-" in
*i*)
# List ingres installations and setup load aliases
. ~/bin/ingres_installs
echo
~/bin/newsig
;;
*) ;;
esac

So when I login or fire up a new terminal window I get:

Release Running Script II_SYSTEM
-------------------------------------------------------------------------------
II 9.2.0 (int.lnx/114)NPTL Y loadII /opt/Ingres/IngresII
II 9.1.0 (int.lnx/123)NPTL N loadR2 /opt/Ingres/R2
II 9.2.0 (int.lnx/118)NPTL Y loadR3 /opt/Ingres/IngresR3
~ [] [5.2.4]
09:00:11 >

So back to my original question, how do you manage multiple installations?

Install Ingres via openSUSE’s zypper

09-Nov-07

Ever wanted to install Ingres direct from the package manager of favourite Linux distro? Well now you can, via the command line or the GUI. Bellow are the steps for getting Ingres installed into openSUSE using zypper:
More…

Life as an Eclipse Ecosystem Director

11-Oct-07
As mentioned before, this week I am attending the Eclipse Summit in Ludwigsburg, Germany. We have brought along one of the company PS3s that have Ingres and Eclipse installed. All we need now is a decent display to get the higher (normal) resolutions expected from a Linux box. Sony’s use of a HDCP chip prevented us from making use of the DVI port on the projector. That did not stop Ralph Mueller from the Eclipse Foundation from having some fun.