Informix-Star configuration
Posted in 1995
Topics: Installation, Setup & Upgrades, SQL Development & Query Writing, Connectivity: ESQL/C, 4GL & Embedded SQL, Networking & sqlhosts Configuration, Platform-Specific Issues
Hello out there,
We have an Informix OnLine server running SOLARIS and want to
access a database from within an application that runs on a different
machine.
According to the documentation "Informix-Net and Informix-Star Installation
Guide" I have to do the following things:
0. find out the right product for me: both machines are SUN-Sparc Stations
under SOLARIS; the db-server is ONLINE. So I have to install Informix-Star
1. prepare the network.
I added the following line to the /etc/services file:
sqlexec 1111/tcp # Informix-Net
The machines are already listed in /etc/hosts
The file /etc/hosts.equiv contains the following line:
+@sun
(I hope this is sufficient)
Then I created the file /home/informix/etc/sqlhosts with
the following entry:
ONLINE olsoctcp serv-202 sqlexec
(the name of the machine that runs the online-db-server is serv-202;
the name of the database-server is ONLINE)
2. start the sqlexecd daemon on the machine with the db-server (on serv-202)
Our system administrator has made the following script that
starts the sqlexecd after each reboot:
#!/bin/sh
#(@)/etc/rc3.d/S96informix
# Informix-Star
killproc ()
{ pid=`/bin/ps -e | grep $1 | awk '{ print $1 }'`
[ "$pid" != "" ] && kill $pid
}
INFORMIXDIR=/home/informix export INFORMIXDIR
SQLEXEC=/home/informix/lib/sqlturbo
export SQLEXEC
case "$1" in
'start')
echo "Starting Informix-Star"
killproc sqlexec >>/dev/null
/home/informix/lib/sqlexecd
;;
'stop')
killproc sqlexec
;;
esac
I checked with the "ps -ef|grep sqlexec" command that
the daemon was running.
3. Nothing else to do in server-side.
For the client application I have to tell where the database resides.
From within an esql/c program i do that with the statement:
$database omega@ONLINE;
(the name of the database is omega; the db-servername is ONLINE)
Now for the problem:
When starting the desired application from serv-202 (where online is resident)
I get the correct result.
When starting the same application from serv-402 (the remote machine)
I get the followong message:
kieni@serv-402[~/spielwiese] ./getdokument
sqlca.code, after the cursor open, is -404
kieni@serv-402[~/spielwiese]
finderr 404 the following answer:
-404 The cursor or statement is not available.
This statement names a cursor which has been released with the
FREE statement. Review the program logic and make sure that the
cursor specified is declared and opened, but not freed, prior to
reaching this statement.
Could someone of you tell me, what I have done wrong or if I forgot
something.
I can imagine, that I need to run another daemon on client side to
provide remote db-access, but this is NOT mentioned in the handbook.
There it says that you need Informix-Net only for the Informix-SE DB-Server
and the sqlexecd process only needs to run on server-side.
Shouldn't there be all programs available, that one needs for successful
remote access?
How shall I know weather I need the "relay-module" and how can I get it
if it isn't included in our distribution?
The FAQ gives very little information on Informix-Star and -Net but there
it says, that Informix-Net is for the client:
1.4.3 Connectivity Packages.
These are the items which let you connect your PC to your Mini to your Mainframe,
and have them all share data happily. Note that these now come bundled with Version
6.0 (and above) of the engine.
I-Star
The networking software you need on your server machine. Provides
distributed database capabilities including multisite joins and multisite
updates with transparent two-phase commit recovery.
I-Net
The software you need on your client machine in order to talk to a
database server on a server machine.
This information is irritating me a little, since it says something different
than the "Informix-Net and Informix-Star Installation Guide".
Any help is welcome - perferably by e-mail, since we sometimes have problems
with the news-server.
Thanks in advance...
...Thomas Kieninger