Perl connectivity on Solaris
Posted in 1999
Topics: Installation, Setup & Upgrades, Platform-Specific Issues
Hi, I am trying to setup perl connectivity on a Solaris machine to access to the Informix database on a AIX server. I have already installed the DBI and DBD::Informix when there is a informix server setup in the solaris machine. Now the Informix server on solaris machine is removed. Can someone tell me what is needed on the solaris machine to provide such connectivity and hopefully provide some sample script. Any help is greatly appreciated. Thank you. Regards, Yang Yang
Yang Yang wrote: > I am trying to setup perl connectivity on a Solaris machine to > access to the Informix database on a AIX server. I have already > installed the DBI and DBD::Informix when there is a informix server > setup in the solaris machine. Now the Informix server on solaris > machine is removed. Can someone tell me what is needed on the > solaris machine to provide such connectivity and hopefully provide > some sample script. Versions? Basically, you need to be able to access the AIX server from the Solaris box, so you need an appropriate entry in the Solaris sqlhosts file pointing at the AIX server. You can test that with DB-Access. Once you can connect with DB-Access, you can connect with DBI and DBD::Informix using the same setup -- a new value for INFORMIXSERVER, mainly. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
Hi Jonathan, I have DBI 1.06 and DBD::Informix 0.60 installed. Judging from your reply, seems I need Online installed on my solaris box, is that true? Since in our case, the solaris box will not be used as the database server, but a database gateway, I am looking for the minimum requirement for the solaris box. Thank you. Regards, Yang Yang Jonathan Leffler wrote: > Versions? > > Basically, you need to be able to access the AIX server from the > Solaris box, so you need an appropriate entry in the Solaris sqlhosts > file pointing at the AIX server. You can test that with DB-Access. > Once you can connect with DB-Access, you can connect with DBI and > DBD::Informix using the same setup -- a new value for INFORMIXSERVER, > mainly. > > -- > Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) > Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN > #include <disclaimer.h>
Yang Yang wrote: > I have DBI 1.06 and DBD::Informix 0.60 installed. Judging from your > reply, seems I need Online installed on my solaris box, is that true? No, though it will be simplest to do your testing if you have some server on the Solaris box so that you have DB-Access to play with. You need CSDK on the Solaris box. This will allow you to write an ESQL/C program that connects to the database on the AIX server, and you'll be able to run it. If all else fails, use the esqlbasic.ec program from DBD::Informix. Get the connectivity working with the test program. Then start trying to get DBD::Informix to work. > Since in our case, the solaris box will not be used as the database > server, but a database gateway, I am looking for the minimum > requirement for the solaris box. Thank you. If you've got the relevant development environment elsewhere, I-Connect is all you need on the Solaris box. If you don't have a development system on some other Solaris box, then you need CSDK on it. > Jonathan Leffler wrote: > > Versions? You didn't specify the Informix software versions. It probably isn't important, but you'd get different answers if you mentioned 4.00 from the answers you get if you mention 7.30 or 9.14 or 2.20, for example. > > Basically, you need to be able to access the AIX server from the > > Solaris box, so you need an appropriate entry in the Solaris > > sqlhosts > > file pointing at the AIX server. You can test that with DB-Access. > > Once you can connect with DB-Access, you can connect with DBI and > > DBD::Informix using the same setup -- a new value for > > INFORMIXSERVER, mainly. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
Hi, I have installed the CSDK successfully, but encounter problem running the demo scripts. If I use esql to compile the esqlbasic.ec, it goes through successfully, but during execution gives an error: ld.so.1: a.out: fatal: libifsql.so: can't open file: errno=2 But the libifsql.so is found in /usr/informix/lib/esql and the INFORMIXDIR is set to /usr/informix and /usr/informix/bin included in PATH. If I use gcc to compile, it says: Undefined first referenced symbol in file sqlca /var/tmp/cca006u41.o sqli_trans_rollback /var/tmp/cca006u41.o sqli_stmt /var/tmp/cca006u41.o sqli_db_open /var/tmp/cca006u41.o rgetmsg /var/tmp/cca006u41.o ld: fatal: Symbol referencing errors. No output written to esqlbasic Makefile is: gcc -L/usr/informix/lib/ -L/usr/informix/lib/esql/ -L/usr/informix/lib/cli -L/usr/informix/lib/dmi/ -I/usr/informix/incl/esql/ -I/usr/informix/incl/dmi -I/usr/informix/incl/cli -o esqlbasic esqlbasic.c Could you tell me where went wrong? Many thanks. Regards, Yang Yang Jonathan Leffler wrote: > You need CSDK on the Solaris box. This will allow you to write an > ESQL/C program that connects to the database on the AIX server, and > you'll be able to run it. If all else fails, use the esqlbasic.ec > program from DBD::Informix. Get the connectivity working with the > test program. Then start trying to get DBD::Informix to work. > > > -- > Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) > Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN > #include <disclaimer.h>
Yang Yang wrote:
> I have installed the CSDK successfully, but encounter problem
> running the demo scripts. If I use esql to compile the esqlbasic.ec,
> it goes through successfully, but during execution gives an error:
> ld.so.1: a.out: fatal: libifsql.so: can't open file: errno=2
> But the libifsql.so is found in /usr/informix/lib/esql and the
> INFORMIXDIR is set to /usr/informix and /usr/informix/bin included
> in PATH.
But you haven't set LD_LIBRARY_PATH correctly, have you?
Read the README file again.
$INFORMIXDIR/lib and $INFORMIXDIR/lib/esql.
> If I use gcc to compile, it says:
>
> Undefined first referenced
> symbol in file
> sqlca /var/tmp/cca006u41.o
> sqli_trans_rollback /var/tmp/cca006u41.o
> sqli_stmt /var/tmp/cca006u41.o
> sqli_db_open /var/tmp/cca006u41.o
> rgetmsg /var/tmp/cca006u41.o
> ld: fatal: Symbol referencing errors. No output written to esqlbasic
>
> Makefile is:
> gcc -L/usr/informix/lib/ -L/usr/informix/lib/esql/
> -L/usr/informix/lib/cli -L/usr/informix/lib/dmi/ -I/usr/informix/incl/esql/
> -I/usr/informix/incl/dmi -I/usr/informix/incl/cli -o esqlbasic esqlbasic.c
>
> Could you tell me where went wrong?
First problem; you're linking an ESQL/C program with gcc, not the
esql script. Last problem; you're linking an ESQL/C program with
gcc and not the esql script. Other problems; you're not using the
esql script to do the linking.
Rule of thumb: if you're linking ESQL/C, use the esql script.
If you know enough to avoid this rule, you don't ask me questions.
I don't know enough to avoid following this rule (or, perhaps a tad
more accurately, I know enough to know that not following this rule
means far too much work for me).
Now, I'm pretty darn sure that the README file says something about:
If you have problems creating ESQL/C programs, compile esqlbasic.ec
(note the suffix!) with a command:
esql -o esqlbasic esqlbasic.ec
If you need to use gcc, then you can tell it to do so:
INFORMIXC=gcc esql -o esqlbasic esqlbasic.ec
Unless you know a lot more about ESQL/C than you appear to, that's
all you should try. Messing around with the cli or dmi directories
is not a good idea -- they provide the ODBC and C++ facilities,
not ESQL/C facilities.
> Many thanks.
>
> Regards,
> Yang Yang
>
> Jonathan Leffler wrote:
>
> > You need CSDK on the Solaris box. This will allow you to write an
> > ESQL/C program that connects to the database on the AIX server, and
> > you'll be able to run it. If all else fails, use the esqlbasic.ec
> > program from DBD::Informix. Get the connectivity working with the
> > test program. Then start trying to get DBD::Informix to work.
> >
> >
> > --
> > Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
> > Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
> > #include <disclaimer.h>
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
#include <disclaimer.h>