opends60.lib and extended stored procedure in 64-bit SQL Server

If you want to create some extension for Microsoft SQL Server, you will need to create a DLL that contains extended stored procedures functions (read more about it). A very good and useful example: imagine that you want to call a external application from a trigger or a stored procedure in your SQL Sever (00, 05 or 08). Cool, isn’t it? You can find this example in this nice article of The Code Project: Run external programs from SQL Server stored procedures.

But this example is focused in 32-bit platforms. If you want to run this extension, or any one that you have developed, you will need to recompile it for x64 platforms. In this last case, the library opends60 will be required. You can find it in your SQL Server (e.g. for a SQL Server 2008):

opends60.dll => ~\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn

opends60.lib => ~\Program Files\Microsoft SQL Server\90\SDK\Lib\x64

(read more about it)

So, to recompile it, you can do that from Visual Studio (e.g. 05 or 08):

1) Add a reference to the static library:

2) Place the opends60.lib file in the root of you Visual Studio C++ project:

3) In the Visual Studio settings, select x64 platform, and rebuild the project.

4) Automatically, in the root of your C++ VS project, a new x64 folder will appear with this new recompiled DLL.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s