Tag: work

Sun Java JDK 1.6 update 16 on CentOS 5.3

Today I needed to install Sun Java SDK 1.6 on CentOS 5.3. Unfortunately, Sun Java does not appear to be packaged in CentOS. Instead, there are instructions at http://wiki.centos.org/HowTos/JavaOnCentOS on how to install Sun Java using a “helper” SRPM (source RPM) package from the JPackage Project. The latest generic JPackage SRPM is for 1.6 update 11 and it does not work for update 16 without minor modifications.

I created a new version for 1.6 update 16 by extracting the old version using rpm2cpio, modifying the spec file and recreating the SRPM using rpmbuild. I tested the package on 32-bit CentOS 5.3 and it worked without problems.

The SRPM for Sun Java 1.6 update 16 is available here. It works with the instructions mentioned in the url in the beginning of this posting.

Tips for comparing Ingres patch bug fixes lists

I like to keep Ingres installations up to date by upgrading them occasionally by using the latest patches from ESD. Since I am a responsible DBA, I always read through the list of fixed bugs (“Bugs addressed with this patch” section in the readme file). Some bug fixes even need special attention (marked with “ATTENTION”), so it would be careless not to read the readme file, which is included with the patch.

Ingres patches are cumulative, meaning that each patch also contain the fixes included in the previous patches. Since the list of fixed bugs is ordered by bug numbers and not chronologically, it’s pretty hard to figure what have been fixed since previous installed patch. For example there’s 145 new bug fixes between patches 13322 and 13435.

Here’s a simple tip, how to compare two readme files on Linux using command line tools. First, save the readme files on disk with names p13322.html and p13435.html. Then run

grep "Bug " p13322.html | perl -p -e 's/<.*?>//g' > p13322.txt
grep "Bug " p13435.html | perl -p -e 's/<.*?>//g' > p13435.txt

Now you have a simple listing of bugs fixed in the patches. You can then use diff to compare, what have been fixed between 13322 and 13435:

diff -u p13322.txt p13435.txt | grep "^+" | less

The best thing would be, if Ingres Co. provided their customers a simple web application, which could be used to check these. Until that… use this tip or propose a better one!

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 http://pauli.borodulin.fi/misc/ingres/ima_sessions-v1.0.pl. The requirements for running the script are listed in the beginning of the script.

SJSAS 9.1 u1, AJP/mod_jk and log4j troubles

I have been preparing for an update of Sun ONE Application Server 7 at work for some time now. A week ago I finally found a decent way to run Sun Java System Application Server 9.1 u1 on Solaris 9 under unprivileged account so that SJSAS could be reached on ports 80 and 443. The solution was to put Apache HTTP server in front of SJSAS using mod_jk and AJP (just like Tomcat often is installed). In the solution Apache will listen for the ports and deliver the requests to SJSAS using AJP. Gladly, Sun has provided instructions for this.

Read more »