S
Slickuser
Hi,
I'm trying to connect to MS SQL 2005 server from UNIX. But I get the
warning below.
I can connect through C#.NET fine using the same server, user &
password.
Any idea why?
Here's the perl code:
#!/usr/local/bin/perl
use strict;
use warnings;
use DBI;
my $server = "xxx";
my $user = "xxx";
my $password = "xxx";
my $dbname = "xxx";
my @available_drivers = DBI->available_drivers;
print ("The available DBD drivers are: @available_drivers.\n");
my $dbh = DBI->connect("dbi:Sybase:$server", "$user", "$password")
or die "Cannot log into $server\n";
login> perl testSQL.pl
The available DBD drivers are: DBM ExampleP File ODBC Pg Proxy SQLite
Sponge Sybase mysql.
src/tds/login.c: tds_connect: x.x.x.x:4000: Connection refused
DBI connect('xxx','xxx',...) failed: OpenClient message: LAYER = (0)
ORIGIN = (0) SEVERITY = (78) NUMBER = (41)
Server xxx, database
Message String: Server is unavailable or does not exist. at testSQL.pl
line 17
Cannot log into xxx
I'm trying to connect to MS SQL 2005 server from UNIX. But I get the
warning below.
I can connect through C#.NET fine using the same server, user &
password.
Any idea why?
Here's the perl code:
#!/usr/local/bin/perl
use strict;
use warnings;
use DBI;
my $server = "xxx";
my $user = "xxx";
my $password = "xxx";
my $dbname = "xxx";
my @available_drivers = DBI->available_drivers;
print ("The available DBD drivers are: @available_drivers.\n");
my $dbh = DBI->connect("dbi:Sybase:$server", "$user", "$password")
or die "Cannot log into $server\n";
login> perl testSQL.pl
The available DBD drivers are: DBM ExampleP File ODBC Pg Proxy SQLite
Sponge Sybase mysql.
src/tds/login.c: tds_connect: x.x.x.x:4000: Connection refused
DBI connect('xxx','xxx',...) failed: OpenClient message: LAYER = (0)
ORIGIN = (0) SEVERITY = (78) NUMBER = (41)
Server xxx, database
Message String: Server is unavailable or does not exist. at testSQL.pl
line 17
Cannot log into xxx