freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Eric Deutsch <edeutsch AT systemsbiology.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: RE: Installing FreeTDS, DBI, etc.
- Date: Mon, 9 Jul 2001 21:47:21 -0700 (PDT)
On Mon, 9 Jul 2001, dblist wrote:
> Eric,
>
> Thank you so much for the info. :-) You mentioned some extensive notes
> and sample perl scripts... If you have them handy and if it's not too much
> trouble, I'd love to take a look if you want to send them to me off list.
I'll send them tomorrow when I have a minute. In the mean time, just try
this:
#!/usr/bin/perl
use DBI;
my $dbh = DBI->connect ("DBI:Sybase:server=SQLSVR;database=pubs",
"guest","guestpasswd" )
or die ("Cannot connect to database: $DBI::errstr");
my $querystring="SELECT \@\@SERVERNAME,\@\@VERSION";
my $sth = $dbh->prepare($querystring) or die ("Cannot prepare query");
$sth->execute() or die ("Cannot execute query: $DBI::errstr");
my (@result) = $sth->fetchrow_array();
print join(" | ",@result),"\n";
$DBI::err == 0 or die ("Error during retrieval: $DBI::errstr");
Make sure that you have created a SQL Server account by the name of guest
or use some other (non-Windows) account name.
>
> I did run into a slight problem when doing a 'make test' on the Sybase
> module after successfully installing the other components. Here's the
> output I get:
>
> $ make test
> PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
> -I/usr/lib/perl5/5.00503/i386-linux -I/usr/lib/perl5/5.00503 -e 'use
> Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
> t/autocommit........dubious
> Test returned status 0 (wstat 139, 0x8b)
> Undefined subroutine &Test::Harness::WCOREDUMP called at
> /usr/lib/perl5/5.00503/Test/Harness.pm line 288.
> make: *** [test_dynamic] Error 255
>
> Have you run into this before? Any suggestions?
I don't think my Sybase test ever ran correctly. Yours sounds pretty bad,
but if I were you, I'd boldly press ahead and install it and run the
script above.
> Again, thank you for the help, I'll definitely be checking out some of the
> software you recommended (once I get everything working, of course). :-)
There's lots more good info in the User's Guide, available at
www.freetds.org. Most of the info I gave is is there already.
> - John J. Reilly
> - dblist AT fingerlust.wtfs.net
>
>
> On Mon, 9 Jul 2001, Eric Deutsch wrote:
>
> >
> > Hi John, I run a similar setup, except with Red Hat 7.0 with great
> > results.
> > I have some more extensive notes if you need more, but the best solution
> > I've found is:
> > - Install DBI-1.15.tar.gz from CPAN
> > - Install Data-ShowTable-3.3.tar.gz from CPAN (optional)
> > - Install freetds-0.52.tgz from freetds.org
> > (I just do `./configure --with-tdsver=7.0` and `make`, `make install`)
> > - Install DBD-Sybase-0.91.tar.gz from CPAN
> >
> > (The version numbers are just the ones I used; later ones are fine)
> >
> > Get perl modules from http://www.perl.com/CPAN/modules/by-module or your
> > other favorite method. Install perl modules with:
> > perl Makefile.PL
> > make
> > make test
> > make install
> > Before installing DBD-Sybase, do:
> > setenv SYBASE /usr/local/freetds
> >
> > I can send you a sample little Perl program that you can use to test
> > things.
> >
> > Other software I've found very useful with Linux + MS SQL Server 2000:
> >
> > Even if you don't program in Java, I *HIGHLY* recommend the following:
> > - Sun Java JDK 1.3.1 Red Hat RPM from
> > http://java.sun.com/j2se/1.3/download-linux.html
> > - Java Transact-SQL Analyzer from
> > http://sourceforge.net/projects/sqlanalyzer
> > Run with something like:
> > setenv PATH ${PATH}:/usr/java/jdk1.3.1/bin
> > java -jar tsa.jar
> >
> > For a good command line interface, get SQSH and compile after installing
> > FreeTDS.
> >
> > If you want a GUI Perl/Tk tool for issuing queries and viewing results, a
> > nice tool I've found is asSQL, also available on SourceForge. I run a
> > somewhat hacked version along with a slightly hacked version of
> > Data-ShowTable-3.3 but I think it should mostly work as is available at
> > SourceForge. You do need to install Perl/Tk first, which may not be
> > painless.
> >
> > One project that's always intrigued me was KSQL. I've never been able to
> > compile KSQL much less test against SQL Server. Has anyone put there ever
> > used KSQL successfully against SQL Server?
> >
> > Hope some of this helps,
> > Eric
> >
> >
> >
> > > -----Original Message-----
> > > From: bounce-freetds-127899 AT franklin.oit.unc.edu
> > > [mailto:bounce-freetds-127899 AT franklin.oit.unc.edu]On Behalf Of John J.
> > > Reilly
> > > Sent: Monday, July 09, 2001 3:56 PM
> > > To: TDS Development Group
> > > Subject: [freetds] Installing FreeTDS, DBI, etc.
>
> > >
> > >
> > > Hello all,
> > >
> > > I'm new to the list, so please be gentle. :-)
> > >
> > > I'm trying to connect to a Microsoft SQL Server 2000 database from a
> > > Linux
> > > box using perl scripts. I think I'd like to use FreeTDS and one of the
> > > DBI modules to accomplish this. I've been going around in circles for a
> > > few days now trying to figure out exactly what software I need, and how
> > > to
> > > install & configure it. And to be honest, I'm getting more and more
> > > befuddled with each README and FAQ that I read. Needless to say, I'm
> > > fairly new at database connectivity topics, but I am somewhat competent
> > > with Linux, so if given good directions I'd be in decent shape.
> > >
> > > If anyone here would be willing to provide me with newbie-oriented
> > > information on how to accomplish this from start to finish (or point me
> > > to
> > > where this information could be found), I'd be eternally grateful. :-)
> > >
> > > Once again, a rundown:
> > >
> > > Connecting to:
> > > Microsoft SQL Server 2000
> > > From:
> > > Linux (redhat 6.2)
> > > Using:
> > > FreeTDS, and perl DBI
> > >
> > > Thanks in advance for any help, and I apologize for my ignorance. :-)
> > >
> > > - John J. Reilly
> > > - dblist AT fingerlust.wtfs.net
> > >
> > > ---
> > > You are currently subscribed to freetds as:
> > > [edeutsch AT systemsbiology.org]
> > > To unsubscribe, forward this message to
> > > $subst('Email.Unsub')
> > >
> >
> >
> > ---
> > You are currently subscribed to freetds as: [dblist AT fingerlust.wtfs.net]
> > To unsubscribe, forward this message to $subst('Email.Unsub')
> >
>
>
> ---
> You are currently subscribed to freetds as: [edeutsch AT systemsbiology.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
--
----------------------------------------------------------------------
Eric Deutsch email: edeutsch AT systemsbiology.org
Institute for Systems Biology Voice: (206) 732-1397
4225 Roosevelt Way NE, Suite 200 FAX: (206) 732-1260
Seattle, WA 98105-6099 TJ's Location
http://www.systemsbiology.org/
-
Installing FreeTDS, DBI, etc.,
John J. Reilly, 07/09/2001
- <Possible follow-up(s)>
- RE: Installing FreeTDS, DBI, etc., Eric Deutsch, 07/09/2001
- RE: Installing FreeTDS, DBI, etc., dblist, 07/09/2001
- RE: Installing FreeTDS, DBI, etc., Eric Deutsch, 07/10/2001
Archive powered by MHonArc 2.6.24.