Accessing MS SQL Server from Perl through OLE DB

Version 2.012 released 2019-07-22

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: (1110 KB). The zip file includes 32-bit and 64-bit binaries for Perl 5.20, 5.22, 5.24, 5.26., 5.28 and 5.30. These binaries run with Strawberry Perl and should also run with ActivePerl.

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 18-05-09 21:09