Accessing MS SQL Server from Perl through OLE DB

Version 2.009 released 2015-05-24

Win32::SqlServer - Downloads and Documentation

Win32::SqlServer is a module that permits you to access Microsoft SQL Server from Perl through OLE DB. Win32::SqlServer is designed to be the prime alternative when you need to access SQL Server from Perl on Windows, and you have no interest to access any other RDBMS. That is, it does not run on Unix, and there is no support for DBI. To see Win32::SqlServer in action, take at look the quick examples in the Win32::SqlServer manual.

To download this module here is the file: (1,5 MB). The zip file includes binaries for x86 and AMD64 for Perl 5.12, 5.14, 5.16, 5.18 and 5.20. The binaries run with Active Perl and those for 5.18 and 5.20 have also been tested with Strawberry Perl.

Quick install instruction for the binary versions.

For more detailed instructions, including the full set of prerequisites, see the README (also included in the zip file).

The manual is included in the zip file, but you can also read it here:

Manual for Win32::SqlServer.

The manual is long, over 90 pages when printed, but there are plenty of examples in it.

You can also view the revision history.

Assorted side information

Modules for DB-Library: I have two older modules that uses the DB-Library API. They are obsolete and abandoned.

Accessing SQL Server from Unix. No, you can't run any of my modules on Unix. They rely on libraries only available on Windows. See here what options you have for talking to MS SQL Server from a Unix machine.

Alternatives on Windows. There are plentiful of alternatives to connect to SQL Server on Windows. I've tried to summarize those I know about. Please note that the page is out of date.

DBI/DBD driver. No I don't have a DBD::SqlServer, neither do I plan to write one.


The story about Win32::SqlServer is highly dependent on three men: Larry Wall (of course). Michael Peppler who wrote the original Sybperl, and Christian Mallwitz of Intershop Gmbh who took the effort to port Sybperl 2.03 to Windows NT. From that work I was able to develop MSSQL::DBlib, and without that an entrace point into the XS world, I would not have been able to write Win32::SqlServer.


Any comments on these modules are welcome, please mail me at
Last updated 15-05-24 22:57