Unix Technical Forum

Re: Multiple informix installations.

This is a discussion on Re: Multiple informix installations. within the Informix forums, part of the Database Server Software category; --> Hi, assuming that only one instance is running, you can check for the "oncfg_..." file that each instance is ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 08:37 AM
Martin Fuerderer
 
Posts: n/a
Default Re: Multiple informix installations.


Hi,

assuming that only one instance is running, you can check for the
"oncfg_..." file that each instance is maintaining (this is not the
$ONCONFIG file, it's a file created and maintained by the server).
The complete file name is something like
"$INFORMIXDIR/etc/oncfg_<servername>.<servernumber>"

So you simply have to get a list of all the suspected installation
directories and run a "ls -ltr" like the following:

ls -ltr <dir_1>/etc/oncfg_* <dir_2>/etc/oncfg_* ...

The newest (most up-to-date) oncfg_... file will be the one of the
running server. So from this you know the server number and the
server name.

You can then in the directory where that oncfg_... file is do a
grep for this server name and/or server number to find out the
correct $ONCONFIG file (hopefully there are no old copies lying
around, i.e. hopefully this will give you just a single $ONCONFIG
file name).
With that you can then set:
$INFORMIXDIR, $INFORMIXSERVER, $ONCONFIG

This leaves you with the problem of $INFORMIXSQLHOSTS.
If the sqlhosts file is "$INFORMIXDIR/etc/sqlhosts" then you don't
need to set $INFORMIXSQLHOSTS env variable.
But actually the sqlhosts file (containing the connection info) can
be of any name in any directory on the system ... :-(
So that might leave you with a bit of guesswork.

BTW: To be just a bit rude ... ;-)
The issue here is not (only) knowing that certain env variables (see
above)
need to be set. The issue is, that there are several installation
directories, each possibly containing several $ONCONFIG files, etc.
And finding the actual one out of these (without other information) to
be able
to correctly set the environment variables for a specific instance
- that can really be less than trivial ...

Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management

owner-informix-list@iiug.org wrote on 08.02.2005 17:28:04:
> 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


sending to informix-list
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 08:37 AM
Nuno Paquete
 
Posts: n/a
Default Re: Multiple informix installations.

Hi Martin,

I made everything you said but it doesn't work.
See the other posts that I send to the other answers.

Thanks a lot.


"Martin Fuerderer" <MARTINFU@de.ibm.com> escreveu na mensagem
news:1107945501.7083145c04dbefc20060795448fe2351@t eranews...
>
> Hi,
>
> assuming that only one instance is running, you can check for the
> "oncfg_..." file that each instance is maintaining (this is not the
> $ONCONFIG file, it's a file created and maintained by the server).
> The complete file name is something like
> "$INFORMIXDIR/etc/oncfg_<servername>.<servernumber>"
>
> So you simply have to get a list of all the suspected installation
> directories and run a "ls -ltr" like the following:
>
> ls -ltr <dir_1>/etc/oncfg_* <dir_2>/etc/oncfg_* ...
>
> The newest (most up-to-date) oncfg_... file will be the one of the
> running server. So from this you know the server number and the
> server name.
>
> You can then in the directory where that oncfg_... file is do a
> grep for this server name and/or server number to find out the
> correct $ONCONFIG file (hopefully there are no old copies lying
> around, i.e. hopefully this will give you just a single $ONCONFIG
> file name).
> With that you can then set:
> $INFORMIXDIR, $INFORMIXSERVER, $ONCONFIG
>
> This leaves you with the problem of $INFORMIXSQLHOSTS.
> If the sqlhosts file is "$INFORMIXDIR/etc/sqlhosts" then you don't
> need to set $INFORMIXSQLHOSTS env variable.
> But actually the sqlhosts file (containing the connection info) can
> be of any name in any directory on the system ... :-(
> So that might leave you with a bit of guesswork.
>
> BTW: To be just a bit rude ... ;-)
> The issue here is not (only) knowing that certain env variables (see
> above)
> need to be set. The issue is, that there are several installation
> directories, each possibly containing several $ONCONFIG files, etc.
> And finding the actual one out of these (without other information) to
> be able
> to correctly set the environment variables for a specific instance
> - that can really be less than trivial ...
>
> Regards,
> Martin
> --
> Martin Fuerderer
> IBM Informix Development Munich, Germany
> Information Management
>
> owner-informix-list@iiug.org wrote on 08.02.2005 17:28:04:
>> 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

>
> sending to informix-list



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:36 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com