Skip to Content.
Sympa Menu

freetds - Re: [freetds] DBD::Sybase + freetds from Linux to Microsoft SQL Server 2000 contest

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: "JupiterHost.Net" <mlists AT jupiterhost.net>
  • Cc: FreeTDS AT lists.ibiblio.org, dbi-users AT perl.org
  • Subject: Re: [freetds] DBD::Sybase + freetds from Linux to Microsoft SQL Server 2000 contest
  • Date: Sun, 05 Feb 2006 09:18:28 +0100

On Sat, 2006-02-04 at 22:13 -0600, JupiterHost.Net wrote:
> Hello list,
>
> I'm about to go nuts trying to connect to Microsoft SQL Server 2000 from
> a linux machine.
>
> I'll pay $20 to the first person who can get me over this last hump,
> seriously I'll paypal it to you, maybe more if the solution is had
> quickly. No joke, I will pay :)
>
> Here's what I have:
>
> As root I:
>
> 1) download and untarred freetds (v0.63)and went into the dir:
> ./configure --prefix=/opt/freetds
> make
> make install
>
> 2) Dowloaded an unatarred DBD-Sybase (v1.07) and went into the dir:
> export SYBASE=/opt/freetds
> perl Makefile.PL
> make
> make install
>
> This connects:
> # /opt/freetds/bin/tsql -H 1.2.3.4 -p 1433 -U howdy -Pdoody
> locale is "en_US.UTF-8"
> locale charset is "UTF-8"
> 1> select convert( varchar(30), getdate(), 120 ) as No
> 2> go
> No
> 2006-02-04 21:40:56
> 1>
>
> Now what do I need to do to
> my $dbh = DBI->connect(?????) or die DBI->errstr();
>
> and how can I do a simple test query (verision or date, whatever) and
> print the results?

Add an entry in the /etc/freetds.conf file (or wherever the freetds.conf
file is located) that maps to your server - let's call this MYSERVER.

Now the connect() call:

$dbh = DBI->connect('dbi:Sybase:server=MYSERVER', ....);

Of course you should already have seen this and added the entry to
freetds.conf when you were building DBD::Sybase as it is required for
the "make test" phase.

Michael
--
Michael Peppler - mpeppler AT peppler.org - http://www.peppler.org/
Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com/
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html






Archive powered by MHonArc 2.6.24.

Top of Page