ONCONIFG in a directory other than $INFORMIXDIR/etc
Posted in 2023
Jacob Salomon asked whether ONCONFIG could point to a directory outside $INFORMIXDIR/etc; oninit looked under INFORMIXDIR even with a full path. Art Kagel said only sqlhosts has such a variable (INFORMIXSQLHOSTS). Franck Thomas, Andreas Legner and Paul Watson said the file must be in etc but can be a symbolic link; onmode -wf keeps the link. Jacob concluded he had misremembered sqlhosts.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Server Administration
Hi Folks.
I feel so stupid asking this and there is an easy solution to my little conundrum anyway. But I've been away for too long and some things have just faded from my memory. So here it is:
Of course when I specify in my ENV:
export ONCONFIG=onconfig.schmoethen when I try to connect to (or initialize) my server it looks in $INFORMIXDIR/etc for that file. I have a memory from 2008 that the bank where I was working had set
ONCONFIG=<Some other directory
>/ONCONFIG.schmoe
I was trying to configure my environment similarly:
export ONCONFIG=/ifmx/onconfig.schmoebut oninit -t tells me:
unable to open
/ifmx/ids.14.10.FC10/etc/
/ifmx/onconfig.schmoe
That is: Looking under $INFORMIXDIR although I had specified a complete path.
Obviously the solution is to just put that into $INFORMIXDIR/etc, set ONCONFIG= just the unembellished name of the file and toe the line like a nice little DBA.
My memory aside: Is there a way to do it in a path independent of INFORMIXDIR?
Why in blazes does he even
want
to do this? Glad you ased that question! ;-)
The aforementioned bank had many different releases of Informix on one box. As I recall it, all the ONCONFIG files were consolidated in one directory so I could upgrade one instance and not have to chase down its ONCONFIG file to copy into the INFORMIXDIR/etc of the upgraded server.
------------------------------
Jacob Salomon
---
Nobody goes there anymore, it's too crowded. --Attr: Yogi Berra
------------------------------
Jacob: You can only do that with the sqlhosts file using the INFORMIXSQLHOSTS environment variable. There is no equivalent for the onconfig file. Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
You can create $INFORMIXDIR/etc/$ONCONFIG as a link to the file in your common config directory, and that might well have been what they did back in the day.
Nowadays this probably would only work until your next 'onmode -wf' command, and even without it the server might decide to update onconfig which typically occurs through renaming the existing $INFORMIXDIR/etc/$ONCONFIG, in this location, and continuing with a modified copy - which isn't going to be a link any more.
Andreas
------------------------------
Andreas Legner
------------------------------
Hi Jacob, Your ONCONFIG file must be located in the $INFORMIXDIR/etc directory, you have no other choice. The ONCONFIG value cannot contain the directory path. If you want to bundle your onconfig files from different releases of informix in the same directory, you should consider consider using a symbolic link. For example : Indeed, Informix can start without problems if your ONONCONFIG file in $INFORMIXDIR/etc is a symbolic link! -- Franck Thomas ConsultiX franck.thomas@consult-ix.fr http://www.consult-ix.fr Le 20/06/2023 à 00:39, Jacob Salomon via IBM TechXchange Community a écrit :
Hi,
From my side, I have never had a problem with "onmode -wf" and the use of a link.
The "onmode -wf" command works by directly updating the file corresponding to the symbolic link and keeping the link in the $INFORMIXDIR directory.
-- Franck Thomas ConsultiX
franck.thomas@consult-ix.fr
http://www.consult-ix.fr
Le 20/06/2023 à 10:12, Andreas Legner via IBM TechXchange Community a écrit :
You're right - I was wrong. The link is preserved, the actual file gets updated and no 'before image' copy gets created. Thanks for correction! ------------------------------ Andreas Legner ------------------------------
It must be in $INFORMIXDIR/etc/ but can be a link to a 'general area'. The same rules apply to a number of config files Cheers Paul
Thanks for you all who ganged up on me (kidding here) to tell me how wrong I am. No, $ONCONFIG MUST refer to a file under $INFORMIXDIR/etc/ However, Art reminded me of what was going on at that bank: The $INFORMIXSQLHOSTS can be anywhere, not dependent on $INFORMIXDIR. That must be what I had mis-remembered. Again, thank to y'all but mostly thanks to Art. -- Jacob S ------------------------------ Jacob Salomon --- Nobody goes there anymore, it's too crowded. --Attr: Yogi Berra ------------------------------
ONCONFIG, REMOTE_CFG file, EAR files and the SSL directory are the only ones that must live under $INFORMIXDIR AFAIR. But all can be links Cheers Paul