Multiple informix installations.
Posted in 2005
A new AIX admin inherited a server with five informix-looking directories (/informix, /oldinformix, /OKinformix, /sdkinformix, /INFORMIXTMP) and couldn't run onstat/oninit, getting "GLS initialization failed, error -23101". Replies explained the cause was unset environment: INFORMIXDIR, ONCONFIG (from $INFORMIXDIR/etc/onconfig.*, giving DBSERVERNAME), INFORMIXSERVER, PATH and optionally INFORMIXSQLHOSTS, plus tips on identifying which install is live by checking ROOTPATH/ROOTOFFSET and dumping the first reserved page with dd/od to read the server version. The poster then posted his sqlhosts (servers porto, euro, arquivo) and config file contents; no confirmed resolution is recorded in the thread.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Platform-Specific Issues, Internationalization & Character Sets
Hi group,
I'm starting administering an AIX (Unix) server with informix installed on
it. I need to access the informix database because I have to make a new
program that should use the same database, so that all the data inserted
before could be used.
The problem is that I found multiple installations of informix and I can't
run the standard commands (onstat, oninit, etc) in anyone.
I've got 5 informix directories at the the root (/):
- OKinformix
- INFORMIXTMP
- informix
- oldinformix
- sdkinformix
How do I know what installation is??
I go to the bin directory of all of them but when I try to run "./onstat" I
receive this error:
GLS initialization failed, error -23101
I know that the database is running but I can't find where!!
What could be the problem? Can anyone help me?
Best regards,
Nuno Paquete
nuno,
It may sound real rude but i think you need to go on an Informix DBA
training course.
Before you can run onstat etc in any of the directories you will need
to understand the use of and setting of various environemnt variables,
INFORMIXDIR
INFORMIXSERVER
ONCONFIG
PATH
INFORMIXSQLHOSTS
to name but a few
I believe you have a number of these that are not set and hence your
error messge.
Normally a dba would set up some scripts for each instance which would
set these appropriately. You may want to see if the previous
administrator has helped you out by doing this.
How do you take backups of your system ? Whatever runs your ontape or
onbar must set these variables so you may be able to identify what they
should be from that process.
Nuno Paquete wrote:
> Hi group,
>
> I'm starting administering an AIX (Unix) server with informix
installed on
> it. I need to access the informix database because I have to make a
new
> program that should use the same database, so that all the data
inserted
> before could be used.
> The problem is that I found multiple installations of informix and I
can't
> run the standard commands (onstat, oninit, etc) in anyone.
> I've got 5 informix directories at the the root (/):
> - OKinformix
> - INFORMIXTMP
> - informix
> - oldinformix
> - sdkinformix
>
> How do I know what installation is??
> I go to the bin directory of all of them but when I try to run
"./onstat" I
> receive this error:
> GLS initialization failed, error -23101
> I know that the database is running but I can't find where!!
> What could be the problem? Can anyone help me?
>
> Best regards,
> Nuno Paquete
Hi,
Thanks a lot for the answer.
> It may sound real rude but i think you need to go on an Informix DBA
> training course.
Perhaps you're wright, but I've been reading the manuals (from IBM website)
and the sequence for starting and using the server is:
- oninit (returns: "Message 12759 not found.")
- onstat (returns: "GLS initialization failed, error -23101")
Please help me if this is not wright. All I want to do is to start using the
database.
I repeat, the database is running, I'm sure of that because the software
that uses it (on windows machines) works perfectly, but I want to make some
queries to the database, see the relationships between tables, and so on.
> INFORMIXDIR
> INFORMIXSERVER
> ONCONFIG
> PATH
> INFORMIXSQLHOSTS
I've seen this variables and here is the result:
[/informix]echo $INFORMIXDIR
/informix
[/informix]echo $INFORMIXSERVER
[/informix]echo $ONCONFIG
[/informix]echo $INFORMIXSQLHOSTS
[/informix]echo $PATH
/informix/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/informix/bin:/usr/bin/X11:/sbin:.
As you can see, not all the variables are configured.
Please help me!! Show me what I should do!
I've been following the instructions of the manuals but I'm not getting
success!!
Thanks in advance.
Nuno Paquete wrote:
> Hi,
> Thanks a lot for the answer.
>
>>It may sound real rude but i think you need to go on an Informix DBA
>>training course.
>
> Perhaps you're wright, but I've been reading the manuals (from IBM website)
> and the sequence for starting and using the server is:
> - oninit (returns: "Message 12759 not found.")
> - onstat (returns: "GLS initialization failed, error -23101")
>
> Please help me if this is not wright. All I want to do is to start using the
> database.
> I repeat, the database is running, I'm sure of that because the software
> that uses it (on windows machines) works perfectly, but I want to make some
> queries to the database, see the relationships between tables, and so on.
>
>
>>INFORMIXDIR
>>INFORMIXSERVER
>>ONCONFIG
>>PATH
>>INFORMIXSQLHOSTS
>
>
> I've seen this variables and here is the result:
>
> [/informix]echo $INFORMIXDIR
> /informix
> [/informix]echo $INFORMIXSERVER
>
> [/informix]echo $ONCONFIG
>
> [/informix]echo $INFORMIXSQLHOSTS
>
> [/informix]echo $PATH
> /informix/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/informix/bin:/usr/bin/X11:/sbin:.
>
> As you can see, not all the variables are configured.
> Please help me!! Show me what I should do!
> I've been following the instructions of the manuals but I'm not getting
> success!!
>
> Thanks in advance.
>
>
Right,
so you have the informix product installed in the following directory
(or more specifically you have $INFORMIXDIR set to) :
/informix
$INFORMIXSQLHOSTS isn't compulsory, the default location for the
sqlhosts file is
$INFORMIXDIR/etc/sqlhosts
have a look in here for clues as to what your $INFORMIXSERVER values
could be :D You will have one or more lines per Informix Server (each
server can have several connection protocols).
Then you need to have a $ONCONFIG which is the configuration file for
the $INFORMIXSERVER, this is also located in the $INFORMIXDIR/etc
directory, but could be any name at all (however it is general practice
to name it onconfig.<servername>.
What userid are you doing this as? You may have a "default" environment
if you su - informix.
If you want some more clues post the $INFORMIXDIR/etc/sqlhosts file and
also ls -latr /INFORMIXTMP.
starting to get into the relms of consultancy here Nuno and it would
normally be chargeable. i am sure there are a number of guys who could
quote you for some work, get a PO from you and dial onto your system
and see what the settings are.
The manuals are great, but would normally expect a basic level of
knowledge. Probably help you set a systemm up from scratch but its more
complicated to take over a system that is already running.
As you have said $INFORMIXDIR is set to /informix so we will have to
assume that this is the correct one, (not okinformix or old informix or
anything else.
In $INFORMIXDIR/etc you will have a file which is the onconfig file for
your system.
Obviously I don't know what the previous adminstrator called this fole
on your system, but normally it is called onconfig or onconfig.xxx
where that You need to find out what that configuartopn file is called
and set ONCONFIG= to that name.
eg onconfig.prim, onconfig.sec, onconfig.test, onconfig.prod1
In that file you will find something called DBSERVERNAME. Thats what
you should set INFORMIXSERVER to.
It is possible to run multiple instances of Informix on the same server
so there may be multiple onconfig files each with their own
DBSERVERNAME that you would need to try before you find the instance
that contains the particular database you need.
Nuno Paquete wrote:
> Hi,
> Thanks a lot for the answer.
> > It may sound real rude but i think you need to go on an Informix
DBA
> > training course.
> Perhaps you're wright, but I've been reading the manuals (from IBM
website)
> and the sequence for starting and using the server is:
> - oninit (returns: "Message 12759 not found.")
> - onstat (returns: "GLS initialization failed, error -23101")
>
> Please help me if this is not wright. All I want to do is to start
using the
> database.
> I repeat, the database is running, I'm sure of that because the
software
> that uses it (on windows machines) works perfectly, but I want to
make some
> queries to the database, see the relationships between tables, and so
on.
>
> > INFORMIXDIR
> > INFORMIXSERVER
> > ONCONFIG
> > PATH
> > INFORMIXSQLHOSTS
>
> I've seen this variables and here is the result:
>
> [/informix]echo $INFORMIXDIR
> /informix
> [/informix]echo $INFORMIXSERVER
>
> [/informix]echo $ONCONFIG
>
> [/informix]echo $INFORMIXSQLHOSTS
>
> [/informix]echo $PATH
>
/informix/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/informix/bin:/usr/bin/X11:/sbin:.
>
> As you can see, not all the variables are configured.
> Please help me!! Show me what I should do!
> I've been following the instructions of the manuals but I'm not
getting
> success!!
>
> Thanks in advance.
Nuno Paquete wrote:
> Hi group,
Look in any onconfig files you find, usually named onconfig.<servername> and
stored in the installation's etc subdirectory. In each is a config
paramater ROOTPATH. This is the first disk space allocated to the server.
Step one, see if ANY of those files/devices still exist. If more than one,
then you may have multiple versions online (or at least available to start
up). If more than one point to the same file/device, you have to look into
the file to tell which version last used the disk (though most likely it was
the newest version). First check the value for ROOTOFFSET for any offset
into the device/file where the disk usage begins. Then:
dd if=<ROOTPATH> bs=4k count=1 skip=<ROOTOFFSET> | od -c
(Note no of= argument to dd, and bs would be set to 2k on any other platform
than AIX or WinXX.)
This will display the first reserved page of the server. You will see the
name of the server in the output, usually something like INFORMIX DYNAMIC
SERVER or IBM INFORMIX DYNAMIC SERVER. Then near the middle of the page a
string like 7.31 or 9.40 telling you what version of the server it was. If
you also dump the next page (change to count=2) you will see the ONCONFIG
parameters the engine had read from the onconfig file the last time it was
started up. You can compare these string pairs (parameter value) to those
in the various onconfig files and that may also help to narrow the version
down. Once you have done that you'll know which install directory holds the
version you want so set:
export INFORMIXDIR=<install dir path>
export INFORMIXSERVER=<SERVERNAME parameter value from onconfig file>
export ONCONFIG=<name of the matching onconfig file>
Then you can try to start the engine:
oninit -v
and post any output to the terminal and the end of the online log file
(MSGPATH onconfig parameter points to this file) if the startup fails and
we'll see if we can help more.
Art S. Kagel
> I'm starting administering an AIX (Unix) server with informix installed on
> it. I need to access the informix database because I have to make a new
> program that should use the same database, so that all the data inserted
> before could be used.
> The problem is that I found multiple installations of informix and I can't
> run the standard commands (onstat, oninit, etc) in anyone.
> I've got 5 informix directories at the the root (/):
> - OKinformix
> - INFORMIXTMP
> - informix
> - oldinformix
> - sdkinformix
>
> How do I know what installation is??
> I go to the bin directory of all of them but when I try to run "./onstat" I
> receive this error:
> GLS initialization failed, error -23101
> I know that the database is running but I can't find where!!
> What could be the problem? Can anyone help me?
>
> Best regards,
> Nuno Paquete
TBP wrote:
>
> Right,
>
> so you have the informix product installed in the following directory
> (or more specifically you have $INFORMIXDIR set to) :
>
> /informix
>
> $INFORMIXSQLHOSTS isn't compulsory, the default location for the
> sqlhosts file is
>
> $INFORMIXDIR/etc/sqlhosts
>
> have a look in here for clues as to what your $INFORMIXSERVER values
> could be :D You will have one or more lines per Informix Server (each
> server can have several connection protocols).
>
> Then you need to have a $ONCONFIG which is the configuration file for
> the $INFORMIXSERVER, this is also located in the $INFORMIXDIR/etc
> directory, but could be any name at all (however it is general practice
> to name it onconfig.<servername>.
>
> What userid are you doing this as? You may have a "default" environment
> if you su - informix.
>
> If you want some more clues post the $INFORMIXDIR/etc/sqlhosts file and
> also ls -latr /INFORMIXTMP.
Hi,
Thank you very much for the answer. I hope someone could help me.
I'm logging in with user "informix".
Note: the server is running without problems, I just don't understand how it
can be running without this variables defined!!
Do I have to define it every time I log in??
The onconfig file is named oncfg_porto.0 and it's content is:
--------------------------------------------------------------------------
DBSpace 1 1 1 1 1104274320 14 0 1107939628 0 0 0 0 rootdbs
informix
DBSpace 2 1 2 1 1104274512 4 0 1107939628 2 1040448 0 0 logsp
informix
DBSpace 3 1 3 1 1104274615 4 0 1107939628 2 1048640 0 0 phlogp
informix
DBSpace 4 1 4 1 1104275130 4 0 1107939628 2 1056832 0 0 tag
informix
DBSpace 5 1 5 1 1104275161 4 0 1107939628 2 1065024 0 0 gestad
informix
DBSpace 6 1 6 1 1104275234 4 0 1107939628 2 1073216 0 0 transitos
informix
DBSpace 7 1 7 1 1104275275 4 0 1107939628 2 1081408 0 0 arquivos
informix
DBSpace 8 1 8 1 1104275328 4 0 1107939628 2 1089600 0 0 teste
informix
DBSpace 9 8193 9 1 1104275477 4 0 1104276040 2 1101888 0 0 temp_po
informix
Chunk 1 0 1 255999 248603 1 0 64 14 /dev/ridsporto
Chunk 2 0 1 127999 87446 2 0 64 11 /dev/rlogsp
Chunk 3 0 1 63999 196 3 0 64 12 /dev/rphlogp
Chunk 4 0 1 191999 86080 4 0 64 9 /dev/rtag
Chunk 5 0 1 191999 162150 5 0 64 12 /dev/rgestad
Chunk 6 0 1 303999 20277 6 0 64 16 /dev/rtransitosp
Chunk 7 0 1 247999 40040 7 0 64 14 /dev/rarquivos
Chunk 8 0 1 495999 495946 8 0 64 11 /dev/rteste
Chunk 9 0 1 255999 255946 9 0 64 13 /dev/rtemp_po
Log 4 21 92444818 1107684456 408 2097205 1500 1500
Log 5 21 92586937 1107686078 409 2098705 1500 1500
Log 6 21 92832624 1107769813 410 2100205 1500 1500
Log 7 21 92858078 1107769962 411 2101705 1500 1500
Log 8 21 92917550 1107770469 412 2103205 1500 1500
Log 9 21 93110466 1107772480 413 2104705 1500 1500
Log 10 21 93641796 1107789468 414 2106205 1500 1500
Log 11 21 93758400 1107790271 415 2107705 1500 1500
Log 12 21 93910251 1107793694 416 2109205 1500 1500
Log 13 21 94334777 1107797051 417 2110705 1500 1500
Log 14 21 94513036 1107806150 418 2112205 1500 1500
--------------------------------------------------------------------------
The content of "$INFORMIXDIR/etc/sqlhosts" is:
--------------------------------------------------------------------------
porto onipcshm lusonova porto
euro onipcshm lusonova euro
arquivo onipcshm lusonova arquivo
--------------------------------------------------------------------------
The command "ls -atr /INFORMIXTMP" returns:
--------------------------------------------------------------------------
-rw-rw-r-- 1 root informix 10 Jun 12 2001 .infxdirs
drwxr-xr-x 32 gestad staff 1024 Feb 09 07:02 ..
-r--r--r-- 1 root informix 40 Feb 09 07:09 .inf.porto
-r--r--r-- 1 root informix 40 Feb 09 07:09 .inf.arquivo
drwxrwxrwt 2 root informix 512 Feb 09 07:09 .
--------------------------------------------------------------------------