I've been tasked with writing a script to do some file processing, and I need to be able to do a simple query against a SQL server to verify the counts on the server match up to how many the database thinks there should be.
Since I've never done much (any) DB access with perl, before I get started I wanted to query the great minds here as to what is the best option for querying a MSSQL DB from perl? I've done a couple of searches but nothing too definitive has come up.
One limitation - I'm running perl 5.8.0 on that box and upgrading isn't an option right now.
I know this is one of those borderline SO/SF questions - if the concensus is that is a SO question i'll cast the 5th migration vote myself ;)
Yes, you can query MSSQL DB from perl. There are two options, either through a DBD::ODBC, or DBD::Sybase.
You didn't say what the box is (update: it was in the tags). If the box is MS then ODBC will be easier. If not probably Sybase. Thanks to FreeTDS both are possible.
I'll go one step further and say ODBC is an DBI abstraction layer, Sybase connectivity must work for ODBC to work, so it is always a step more.
Look up DBI and DBD. There's a whole ORA book on exactly this topic.