From owner-freebsd-questions@FreeBSD.ORG Wed Aug 6 04:39:51 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB20237B401 for ; Wed, 6 Aug 2003 04:39:51 -0700 (PDT) Received: from serv1.pstu.ac.ru (serv1.pstu.ac.ru [195.19.160.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C50D43F3F for ; Wed, 6 Aug 2003 04:39:50 -0700 (PDT) (envelope-from andrey@hm.perm.ru) Received: from hm.pstu.ac.ru (hm.pstu.ac.ru [195.19.162.101]) h76Bdlop017014 for ; Wed, 6 Aug 2003 17:39:48 +0600 (YEKST) (envelope-from andrey@hm.perm.ru) Received: Received: from andrew.hm.pstu.ac.ru (HydraIRC@andrew.hm.pstu.ac.ru [195.19.166.221]) (auth type=CRAM-MD5 auth authen=andrew) by hm.pstu.ac.ru (8.12.9/8.12.9) with ESMTP id h76BcVpb026586 for ; Wed, 6 Aug 2003 17:38:31 +0600 (YEKST) (envelope-from andrey@hm.perm.ru) Date: Wed, 6 Aug 2003 17:38:31 +0600 From: Andrew Khlebutin X-Mailer: The Bat! (v1.62r) Personal X-Priority: 3 (Normal) Message-ID: <1889849679.20030806173831@hm.perm.ru> To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: perl & MSSQL X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Andrew Khlebutin List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2003 11:39:52 -0000 Hi, I need to get an access to MSSQL 2000 SP3 from my perl script. I have freetds-0.61_1, p5-DBD-Sybase-1.00, p5-DBI-1.37 installed from the ports. I try to connect this way: #!/usr/bin/perl use DBI; use DBD::Sybase; ... $dbh_mssql = DBI->connect("dbi:Sybase:server=10.0.0.103:database=$dbname",$msuser,$mspasswd); it gives this error message: src/tds/login.c: tds_connect: 10.0.0.103:0: Can't assign requested address DBI connect('server=10.0.0.103:database=lan','stat',...) failed: at ./stat.pl line 56 I can't understand at all why it tries to connect to 10.0.0.103 to zero port(0)?I couldn't find out how to tell the function to connect to my particular port number. Do you have any comments? =========================cat freetds.debug=========================== Starting log file with debug level 99. 2003-08-06 12:52:35.050644 iconv will convert client-side data to the "" character set 2003-08-06 12:52:35.050806 iconv_open: cannot convert to "" 2003-08-06 12:52:35.050853 Connecting addr 10.0.0.103 port 0 with TDS version 7.0 2003-08-06 12:52:35.051566 inside ct_con_props() action = CS_GET property = 13 2003-08-06 12:52:35.051631 fetching userdata 137271312 2003-08-06 12:52:35.051824 leaving ct_connect() returning 0 2003-08-06 12:52:35.051860 inside ct_con_drop() =========================cat freetds.debug=========================== In the /usr/local/etc/freetds.conf I tried to pinpoint to port number 1433 and server=MSSQL2000 but it doesn't work anyway [MSSQL2000] host = 10.0.0.103 port = 1433 tds version = 7.0 In the /usr/local/etc/freetds/interfaces I also tried to set port number with no result too: ... MSSQL2000 query tcp 7.0 10.0.0.103 1433 P.S: FreeBSD 4.8 Stable -- Andrew Khlebutin