Looking for best solution - FastCGI, ODBC, FreeTDS, MSSQL
- From: Eric Anderson <eric@xxxxxxxx>
- Date: Tue, 06 Sep 2005 14:37:30 -0400
I'm looking for advice on how to best allow perl to interact with MS-SQL. The setup I have is the following:
1) I have an application that we have developed mostly for MySQL but we want to bring it to a wider ranges of database servers. MS-SQL is once place we are trying to bring this application.
2) Our application works well on Windows and Unix-like systems (Linux) but one area we are having problems in a Windows and Linux setup. We have the application installed on a Linux box and MS-SQL on Windows. To allow the application to connect to the MS-SQL database we are trying to use the FreeTDS (http://freetds.org/) library. Since our application currently is coded to the use DBI interface we seem to have one of two choices for DBI Drivers:
* DBD::ODBC
* DBD::Sybase
3) We first worked with the ODBC drivers since that is setup out-of-the box on Windows and in available via unixODBC on Unix. This has worked fairly well except two problems:
* On Linux is is dog slow compared to MySQL or MS-SQL with the app installed on Windows).
* We are having problems storing more than 32K worth of data in the "image" field type.
* When running our application under FastCGI we get random segmentation faults that we don't get when using MySQL or when running against MS-SQL with the app on Windows.
4) To get rid of these problems I decided to try DBD::Sybase. According to the FreeTDS site this actually the preferred driver. Since testing this I found out a major feature lacking in the FreeTDS library. It currently doesn't support placeholder-style statements (?). Most of the application uses placeholder style statements and changing it to straight SQL would be a bit of a pain. On the plus side I think I did get a speed boost (based on the few bits of functionality I could access) and from limited testing I didn't seem to get the segmetation faults.
Long story made short (too late) I was wondering what other perl developers were doing for this type of setup. With MS-SQL having a large market share, I have to believe that many people are in the same boat. What are they doing and how are they working around these problems. Is there something obvious that I am missing?
Eric .
- Prev by Date: Re: Where to begin with Perl 6
- Next by Date: Re: hex represenation from string in perl
- Previous by thread: Prototype mismatch under ModPerl::PerlRun
- Next by thread: Perl debug hanging
- Index(es):
Relevant Pages
|