What is the easiest way to access SQL 2005 from perl?
SQL is a language, not something that can be accessed. Do you mean MS SQL Server? Probably DBD::ODBC. (Can someone confirm?)
SQL::DB is not a communication driver. While it can be used to manipulate MS SQL Server databases, you still to find an appropriate DBD first.
| [reply] |
Yes, I mean a way to connect to MS SQL Server.
| [reply] |
I think DBD::Sybase will also allow connection. I use this with FreeTDS to connect to Netcool and I think connection to MSSQL is also present. You'll need to check the FreeTDS docs to set up the connection description including TDS Version which describes the sort of database. I use 5.0 to connect to Netcool and I think 8.0 is some form of MSSQL database. | [reply] |
If you're on Windows, then yes, as ikegami says, it's DBD::ODBC.
Just for completeness, let me refer you to MSSQL::DBlib and MSSQL::Sqllib by Erland Sommarskog. These work directly with SQL Server, and don't require either ODBC or FreeTDS. On the other hand, they don't work with DBI; to use them, you'll have to learn a new interface (fully documented in the distributions).
| [reply] |