Monday, November 19, 2007
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?
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:
(Continued)
Thursday, October 11, 2007
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.
Thursday, September 13, 2007
Its been a long time coming but I have finally released to cvs.php.net a major revision of the PECL Ingres code. So major that I have had to break backwards compatibility to implement the ability to have multiple active result-sets. Since I promised Andy Grimm I would write a piece on the new driver for the company blog site http://blogs.ingres.com/tech I will not be providing much info here, at least not just yet. However, to whet your appetite, here are the changes made since the last release:
- Added support for multiple concurrent result-sets
- Added automatic coercion between UTF-8 and UTF-16
- Added support for Bi-directional scrolling cursors
- Added ingres_free_results() - free the memory associated with a given result set
- Added ingres_autocommit_state() - return the current auto-commit state
- Added ingres_next_error() - fetch additional errors if any
If you are feeling brave you can grab the code from cvs.php.net:
cvs co -d somedir pecl/ingres
If you want to run it along side an existing pecl ingres install I would recommend you use the following (ahem, undocumented) configure flag:
./configure --enable-ingres2
Documentation will follow, first with an overhaul of the README(.html) as well as the information on http://php.net/ingres.
Technorati Tags: ingres, pecl, php, update
Thursday, September 6, 2007
Picked up from reading Andy Astor’s (EnterpriseDB’s CEO) blog. It would appear that Michael Stonebraker, one of the founders of INteractive Graphics REtrieval System project at UCB has started a column, on a topic close to his heart, column based storage systems. It will be interesting to hear what he has to say regarding the database industry nearly 30 years on from its inception.
Technorati Tags: ingres, stonebraker, column
Wednesday, September 5, 2007
Next month I will be attending the Eclipse Summit in Ludgwigsburg, Germany. The plan at the moment is to take over a PS3 to run Ingres on with another machine acting as a client for the Eclipse DTP Ingres plugin and the Ingres Frequent Flyer demo.
Technorati Tags: ingres, database, eclipse, summit, germany, demo, ps3
Updated Added some technorati tags
I am sure I have written about this before, certainly there is something in comp.databases.ingres on getting Ingres and SELinux to play nice.
The following will enable Ingres (2006 and beyond) to be installed on a Linux system with SELinux enabled.
setenforce 0
#Install Ingres here....
chcon -t texrel_shlib_t $II_SYSTEM/ingres/lib/libcompat.1.so
chcon -t texrel_shlib_t $II_SYSTEM/ingres/lib/libbecompat.1.so
setenforce 1
If you find that this does not work for you, let me know. I was able to get Ingres and SELinux to work on Fedora Core 6, using the above.
Technorati Tags: ingres, selinux, install
Thursday, August 23, 2007
As I mentioned previously, I am willing to host blogs by people who have some involvement with Ingres. If you work for the company or you are a client / user and you are interested let me know. You can write as much or as little as you want, if you want to inform the world regarding your latest ebay purchase, using up your 2nd hand car buying luck in the process, feel free. Post a comment below with your email address or email me via grant [at] planetingres [dot] org, after some verification (10 question trace point test), I will get you set-up. If you already have your own blog and want to be added to the planetingres.org email me (grant [at] planetingres [dot] org) the URL and it will be added.
Thursday, August 23, 2007
Hopefully I have not forgotten to switch the gas off at the other place. On Monday, 27th August, ingres.co.uk will be transferred to Ingres Europe Ltd. All the content that was held on that site has already been moved here. In actual fact it has been split in two. All of my posts can be found here, where as Ray’s articles can be found via notnull. If you go there now you can see he has been busy announcing his work with the IceBreaker BI appliance. I have some more decorating to do and will have a house party once the paint has dried.
technorati tags: ingres