Testing if remote informix database is available
Posted in 2000
Topics: General Discussion
I am (should be) connected from a SunSolaris to a remote informix database (on a remote server). When I call the database from inside a program it waits (forever) for response. 1.) Is there a way of detecting if this is an error of the server machine or the database engine itself ? 2.) Is it possible to telnet to the remote server system and to access or test if the database is ready and available ? Thank you Herbert Sent via Deja.com http://www.deja.com/ Before you buy.
herbkauf@gmx.ch wrote:
> I am (should be) connected from a SunSolaris to a remote
> informix database (on a remote server).
> When I call the database from inside a program
> it waits (forever) for response.
>
> 1.) Is there a way of detecting if this is an error of the
> server machine or the database engine itself ?
It should not actually wait forever, but when the
connection won't work, it sure feels like it waits
forever. Assuming it does actually terminate, you
should get an error indicating that it was unable
to contact the remote server. However, it is slow.
I don't know of a sensible way of changing the default
timeout -- I'm not sure it is even an Informix timeout
rather than an o/s controlled timeout.
> 2.) Is it possible to telnet to the remote server system and
> to access or test if the database is ready and available ?
Well, yes, but when do you do it? When it has already
taken an aeon to connect? Do you try it unconditionally
before trying the connect? Even if you do it, there are
problems with specifying the password and the like. Or,
if you use rlogin instead of telnet, you have problems
setting the environment and running a suitable test (such
as onstat -p).
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v1.00.PC1 -- see http://www.perl.com/CPAN
#include <disclaimer.h>