I am extremely new to Informix and am having some trouble trying to get sqldemo installed.
Set up so far:
- openSuse 12.1 (32 bit)
- Informix Growth Edition 11.70 UC6
- Informix SQL Developer 7.50 UC6
- Informix RDS 7.50 UC6
- Informix ID 7.50 UC6
After struggling a few days and a lot of reading of http://publib.boulder.ibm.com/infocenter/idshelp/v117/index.jsp, I managed to get Informix installed and On-line.
I also opted to install the demo database instance that comes with the installation.
I now and attempting to get started with Informix 4GL by Example.
I am trying to get the sqldemo database up. I don't know if it will replace the previous instance installed with Informix, but that is a different problem.
Right now as per the document, running the following should set up the DB:
sqldemo stores2t -log
I however get an error: "Invalid Locales set !!".
I have tried looking up this error and also in the documentation.
I have tried setting the CLIENT_LOCALE and DB_LOCALE in my .profile file.
For example:
export CLIENT_LOCALE=en_US.CP1252
andexport DB_LOCALE=en_US.819
This has not helped.
A push in the right direction, or perhaps some other documentation I could read that would explain things better would really be appreciated.
If any other information is required from me, please do not hesitate to ask.
Update 1
Thanks so much for the response.
A couple of things firstly that I have tried since your post.
- Changed the the CLIENT_LOCALE and DB_LOCALE as you specified - Same error - So i removed it as you said it should not be set.
- Fixed a problem in my PATH and made sure it has /usr/informix/bin - Same Error
- INFORMIXDIR is /usr/informix
- INFORMIXSERVER is ol_informix1170 (This is from the database that was installed with the informix install, don't know if this must be changed? and if so to what?)
Ran the script you mentioned, result : INFORMIXDIR=/usr/informix INFORMIXSERVER=ol_informix1170 INFORMIXSQLHOSTS=/usr/informix/etc/sqlhosts LANG=en_US.UTF-8 ONCONFIG=onconfig
I noticed I had set the language to UK, which made the Locales en_gb instead if en_us, so tried changing that in my .profile, which did not help, so also tried changing the language to US and the locales to en_us, but this made no difference.
As for what you said about the sqldemo script and the already installed db, It is fine if that db is removed as this is just a test VB box for me to learn on.
Could the $INFORMIXSERVER set as ol_informix1170 be the problem?
Thank you once again for the help.
Neill
Update 2
Thanks again for the response.
A few things to note.
The dbenv results I posted is all that shows which i assume/presume (uh-oh) means that the other environment variables are not set. Which of the environment variables you posted are absolutely necessary for it to work?
As above, Where would I find the terminfo file, or does this need to be created?
As above, the SQLEXEC variable... where would I find sqlrm? I can somewhat remember from the documents I have read I think it should be $INFORMIXDIR/lib? but I only have an esql directory. Is this correct.
Barring that something in the first 3 above is not causing more problems, when trying your suggestion of DEMOPATH=en_us/0333 sqldemo stores2t -log I receive the following error: Sorry, cannot read the mkstores3 program required to build the demonstration database. Check the /etc subdirectory of INFORMIXDIR (/usr/informix).
Checking /usr/informix/etc shows indeed that there is no mkstores3 file.
- Attempting your further note of isqldemo, I get the following error: /usr/informix/bin/isqldemo: line 58: /usr/informix/demo/sql/en_us/e01c/isqldemo: No such file or directory.
I guess this makes perfect sense as there is no e01c directory, just the 0333 directory.
Right now anything you can tell me would indeed be a consolation because my newb-ness to generally Linux and definately Informix is a big factor. Interesting that this bug has been around for so long. I guess way more experienced folk than I figured out how solve it on their own, or just never bothered with the sqldemo.
I guess that will teach me to read this:
INFORMIX-4GL by Example Version 4.1 July 1991
Going to check now if any updated text exists, but would still appreciated more help in solving this problem. Do you think reverting to a previous snapshot before Informix was installed and not opting for the ol_informix1170 database to be included could be a possible solution? I wouldn't really see that it would be, but what do I know.
Many many thanks for your continued time and effort.
Regards,
Neill
Update 3
So I see indeed the document I was reading is ancient. I have found an updated one (2002) which uses a different script (dbaccessdemo7).
I tried running that, have run into an error, but tomorrow is another day.
For now I am going to mark this as solved because of the bug detected and resolved. I am not going to put more time and effort into sqldemo.
Thank you so much, and if I struggle with dbaccessdemo 7, I will post a new question.
Regards,
Neill
The
sqldemo
script won't create a new server; it may clobber your existing database (a single server may house multiple databases; indeed, there are 4sys*
databases created when a server is initialized) but it won't harm your server otherwise.Probable cause of the error
The normal problem with invalid locales is that you've not set
$INFORMIXDIR
. You need$INFORMIXDIR
set unless/usr/informix
is (a symlink to) the correct location. You also need$INFORMIXSERVER
set, and you usually need$INFORMIXDIR/bin
on$PATH
. Strictly,$INFORMIXSERVER
is the only mandatory variable; in practice, you worry about the other two too.The
$INFORMIXDIR
setting is used to locate the locale information (which is found in$INFORMIXDIR/gls
) and the message files (which are found in$INFORMIXDIR/msg
).Note that CP1252 is a Windows code page. Normally on Unix, you'd either not set CLIENT_LOCALE or DB_LOCALE, or you could set them to:
or you can choose another more appropriate (to you) locale. The
8859-15
locale includes the Euro symbol, for example, or theutf-8
locale dictates UTF-8 in the database. But, for initial debugging, stick with the 8859-1 locale, aka 819 or 0333 (all based on the IBM CCSID). If it doesn't work with 8859-1, then we have one set of problems; if it works with 8859-1 but not some other codeset or locale, then we have a different set of problems.Follow-up info if the solution above fails
If that isn't the trouble, then I'll ask for some more details — notably, your Informix environment as reported by the
dbenv
script below:It's an old script; that's why the shebang is missing.
Second set of diagnosis
I was hoping for the complete output of the
dbenv
script; it is surprising how often something shows up. However, given what you've said, it is likely to be OK.The INFORMIXSERVER setting sounds fine.
I'm struck by the
LANG=en_US.UTF-8
setting; Informix does pay attention to$LANG
and the$LC_*
variables (that's whydbenv
prints those out). That may be a factor in the problem. However, I would have expectedCLIENT_LOCALE
andSERVER_LOCALE
to deal with that if it was the problem. Also, on my Mac, I haveLANG=en_US.UTF-8
and yet I can connect to (8859-1) databases OK.This is beginning to look like an install problem...or
sqldemo
problem...I transitioned from a Mac to a RHEL 5 (archaic) x86/64 machine, and tried running
sqldemo
over there:Oh yeah? No; my locales are fine, thank you!
Well, so be it...I can reproduce your problem! That's step 1. Step 2 is to look at the expletive deleted script.
Note that test for
${DEMOPATH}
; note thatDEMOPATH
is not set in the script. So, we've got to get it set. What to? Well,ls $INFORMIXDIR/demo/sql
shows that there are various locale-specific sub-directories (en_us
,ja_jp
,ko_kr
,th_th
,zh_cn
,zh_tw
) and under theen_us
directory there's0333
(only).Please run:
This more or less worked for me — I believe it would work for you. I have a slightly unusual setup in that I have just I4GL (p-code and c-code) and ISQL in the $INFORMIXDIR; the server is run out of a different directory. This means I don't have server utility programs like
dbload
(specifically) in$INFORMIXDIR/bin
. When thesqldemo
script tried to load the data withdbload
, therefore, it failed for me. It would work for you because you have all the Informix software in a single directory. To add insult to injury, it runs thedbload
program by explicit path, so I can't futz my PATH to make it available.This should get you going. I have a bug to report...it is CQ idsdb00244894.
I'm sorry that you ran into so much trouble. You shouldn't have done so.