Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Differences with methods to access SQL Server 2000.

by the_0ne (Pilgrim)
on Apr 20, 2001 at 19:39 UTC ( [id://74208]=perlquestion: print w/replies, xml ) Need Help??

the_0ne has asked for the wisdom of the Perl Monks concerning the following question:

I need your help again monks.

I know there are lot of posts on this topic, problem is most of the posts refer to DBI::ODBC or Sybase. And not only do most posts refer to those modules, they also list all the bad things and I didn't see much good in using these. I'm looking around the web for ways to access SQL Server from Perl and the first thing that came up was MSSQL::Sqllib. (I think written by Michael Peppler.) I don't see much about this at all on perlmonks. Not sure if that's a good thing or bad thing. Has anybody used it? It seems to be well-maintained because the page I found on it even has updated information for SQL Server 2000.

Other relevant facts:

Platform is a Mandrake Linux box hitting a SQL Server on a Win2000 Advanced Server box. Version of Perl is 5.6.

It's a relatively small job I'm taking on, however, it's going to be hitting the db server pretty hard and I'd like to know not only which way will work the best but which way is likely to be the fastest?

I know, I know, I should be using MySQL or some other db that can be used on a unix-based system, however my boss would like to hit this db I'm updating from Windows boxes and he only knows sql server.

Replies are listed 'Best First'.
Re: Differences with methods to access SQL Server 2000.
by PsychoSpunk (Hermit) on Apr 20, 2001 at 19:54 UTC
    No, you want to use DBI;. Here are the key pieces:

    OR
    • DBD:ODBC (as mentioned)
    • Some ODBC-ODBC bridge software

    If memory serves me, MSSQL::*, Sybperl::*, Oraperl::*, etc. are all precursors to the DBI. It's been done. And while we all complain, it was because it's not an easy task. But I haven't heard anyone say they didn't get it to work.

    ALL HAIL BRAK!!!

      From some experience trying to interface with MS-SQL 2000 with Perl, these are the things that I've discovered..

      MSSQL::* libraries don't work from Unix.. I may have looked at an outdated version of the pages, but this page is what I saw and it wasn't very encouraging about working on Unix, or getting these libraries to work with SQL server 2000.

      DBD::ODBC as mentioned above, worked well for me..I'd really not advise using something like DBD::Proxy, although that is indeed one option, because of the potential heavy traffic... instead use a Unix ODBC bridge such as iODBC in conjunction with DBD::ODBC... it may not be the fastest, perhaps.. but on what I implemented, it survived a load test of 150 concurrent users with no problems..
      HTH

Re: Differences with methods to access SQL Server 2000.
by the_0ne (Pilgrim) on Apr 20, 2001 at 21:48 UTC
    Thanks PsychoSpunk and tinman for the info. Looks like I'm bagging MSSQL::sqllib and looking at DBD::ODBC. I've written some things on Win32 using the DBD::ADO and it worked great with DBI, so I'm certainly more partial to DBI. Switching to a different DBD is fine with me, just wasn't sure and wanted the wisdom of the monks.

    Thanks again.
      I have been using DBD::Sybase (having used Sybperl before), with FreeTDS on Linux, and it's quite slow. It might be worth a try though, as these are easier to get going than ODBC.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://74208]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-29 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found