March 2009

Perl script for listing open user sessions in Ingres

I wrote a pretty simple Perl script which outputs a list of open user sessions in an Ingres installation (remote or local). This information can also be retrieved using Ingres utilities iinamu and iimonitor, but not in a very straigth-forward fashion. The script is also a decent example how to access an Ingres database using Perl scripting language and Database Interface (DBI).

The script uses DBD-Ingres driver to access the imadb database, which is part of  the Ingres Management Architecture (IMA). The script retrieves the necessary data from the imadb and then prints it. A short, concise list of open sessions is printed first with a more verbose listing (“iimonitor show user sessions formatted” alike) following.

The version 1.0 of the script is available at The requirements for running the script are listed in the beginning of the script.