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.
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!!! | [reply] [Watch: Dir/Any] [d/l] |
|
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
| [reply] [Watch: Dir/Any] |
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. | [reply] [Watch: Dir/Any] |
|
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.
| [reply] [Watch: Dir/Any] |
|