I'm trying to get an application running that
requires me to make some SQL queries of an
Informix DB. I have Informix on my development
server, so I've been able to get the DBD::Informix
module built and installed, and can connect to
local databases. But I cannot seem to get a
successful connection to the target DB, which is
on a different server. If I use the connect
string:
my $database = "dbname\\@dbserver:port";
my $dbh = DBI->connect("dbi:Informix:$database",
$user, $password, { RaiseError => 1, AutoCommit =>
0 }) || die $DBI::errstr;
I get the error:
DBI->connect failed: SQL: -25555: Server
web-reg.adaptec.com:1526 is not listed
as a dbserver name in sqlhosts.
Now, I don't have an Informix install on the
production machine, so while modifying the
sqlhosts on the development server would solve
this, it seems to me it's not going to work in
production.
When I try:
my $database =
"database=dbname;host=dbserver;port=port";
my $dbh = DBI->connect("dbi:Informix:$database",
$user, $password, { RaiseError => 1, AutoCommit =>
0 }) || die $DBI::errstr;
the error I get is:
DBI->connect failed: SQL: -354: Incorrect database
or cursor name format.
It can't possibly be so uncommon to have one's
Perl server on a different machine than one's
Informix database!
Two things I'm not entirely sure I'm understanding
correctly:
1. I'm using the server name (the one in our DNS)
as the dbserver name when attempting to connect to
the remote machine. Is there something I need to
include the $INFORMIXSERVER (on the target
machine) information as part of that name?
2. I'm assuming that having an sqlhosts file is
part of the Informix install, which is why I'm
assuming I can't use that as my solution for the
Informix-free production machine.
Any help anyone can provide in helping me isolate
what I'm doing wrong, or what I have to do to make
this situation work, will be extremely
appreciated!
Sincerely,
Stephanie Deter
Sent via Deja.com http://www.deja.com/
Before you buy.