2

When I call oninit -i command in an Ubuntu server terminal, it shows an error like this:

 INFORMIXSERVER does not match DBSERVERNAME or any of the DBSERVERALIASES.FAILED

Can anyone give me a solution for this problem?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278

2 Answers2

1

What is the setting of $INFORMIXSERVER in your environment, and what values are set for DBSERVERNAME and DBSERVERALIASES in the $ONCONFIG file? It seems that you've set $INFORMIXSERVER to a value that isn't present in the $ONCONFIG file that is in use. Maybe you didn't set $ONCONFIG at all, or maybe you set $INFORMIXSERVER incorrectly, or maybe the names in the $ONCONFIG file are incorrect.

If you don't set $ONCONFIG, it defaults to onconfig (and maybe even falls back to onconfig.std). But you should normally set $ONCONFIG to a known value. I usually use onconfig.<servername> where the <servername> is the value of DBSERVERNAME in the file. However, nothing enforces that convention.

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
  • Hi, I have the same issue, following are my onconfig and sqlhosts files.https://gist.github.com/cdwijayarathna/22bb5a26e59b2267e824, https://gist.github.com/cdwijayarathna/e04b24011a9527256f88, I have set following environment variables as well, export INFORMIXDIR=/usr/informix export INFORMIXSQLHOSTS=/usr/informix/etc/sqlhosts export ONCONFIG=onconfig export INFORMIXSERVER=myserver export SERVERNUM=1 export PATH=$INFORMIXDIR/bin:.:$PATH, Am I missing anything here? – Chamila Wijayarathna Jul 09 '15 at 03:48
0

http://www.ibm.com/developerworks/data/library/techarticle/dm-0606bombardier/ is a good tutorial for setting up informix DB, I came up with same issue since my rootdbs file was owned by 'root', not by 'informix', make sure all file that are mentioned in the above tutorial to be owned by user 'informix' are correctly owned.

Chamila Wijayarathna
  • 1,815
  • 5
  • 30
  • 54