Don't know the answer offhand but definitely would suggest upgrading
DBD:Sybase. You are many versions behind. Also DBI is a bit dated as
well...
--- Benny Pei <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Perl version: 5.00404
> DBI version: 1.06
> DBD::Sybase version: 0.13
>
> We have two servers. One is 12.0 and the other is in
> 11.9.2. We moved the 12.0 server behind a firewall and
> uses Mapped IP (MIP) address while the 11.9.2 will
> remain in a public IP. We could isql in and out of any
> of these machines without any problem. (ie. the sybase
> listener port is open). I wrote this simple perl
> script to "ping" the server from another machine in
> the public IP address space and check whether they are
> alive. This machine also able to isql into both 12.0
> and 11.9.2 box.
>
> --- cut here ---
> #!/usr/local/bin/perl
> use DBI;
> use DBD::Sybase();
>
> ######
> # Now lets check 12.0
>
> $svrname = host1200;
> $username = sa;
> $passwd = passwd;
>
> $data_source = "dbi:Sybase:server=$svrname";
> $dbh = DBI->connect($data_source, $username, $passwd,
> {
> PrintError => 1});
>
> if (! defined $dbh) {
> print "No DBhandle and add $svrname to the
> list\n";
> }
> else {
> eval ($dbh->ping);
> print "Got DBHandle and DBI::pinging
> $svrname\n";
> $dbh->disconnect;
> }
>
> #####
> # Now check 11.9.2
>
> $svrname = host1192;
> $username = sa;
> $passwd = passwd;
>
> $data_source = "dbi:Sybase:server=$svrname";
> $dbh = DBI->connect($data_source, $username, $passwd,
> {
> PrintError => 1});
>
> if (! defined $dbh) {
> print "No DBhandle and add $svrname to the
> list\n";
> }
> else {
> eval ($dbh->ping);
> print "Got DBHandle and DBI::pinging
> $svrname\n";
> $dbh->disconnect;
> }
>
> --- cut here ---
>
>
> RESULT:
> ======================================
>
> Got DBHandle and DBI::pinging host1192
> OpenClient message: LAYER = (5) ORIGIN = (3) SEVERITY
> = (5) NUMBER = (4)
> Message String: ct_connect(): network packet layer:
> internal net library error:
> Net-Lib protocol driver call to connect two endpoints
> failed
> Operating System Error: Failed to parse address info
> at ./testping.pl line 35
> No DBhandle and add host1200 to the list
>
>
>
> However if I swap the order of ping, ie. I ping
> host120 and then host1192. Both get the DBHandle and
> connect succesfully.
>
> Got DBHandle and DBI::pinging host1200
> Got DBHandle and DBI::pinging host1192
>
> Could someone tell me what is going on? I have no clue
> now. The same script works fine if host120 were in the
> public IP. Things only goes weird after we moved it to
> MIP. We cannot change it to public IP because
> management wants to put it behind a firewall to
> protect sensitive data.
>
>
> thanks,
>
> benny
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com