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.


About Ramon Tebar

Software Engineer specialised on Microsoft Technologies with experience in large projects for different industrial sectors as developer, consultant and architect. I enjoy designing and developing software applications, it is my job and one of my hobbies. I’m interested in design patterns, new technologies and best practices. Making those part of the ALM process is a great challenge. During the last years, I have specialised in Microsoft Dynamics CRM (now Dynamics 365). I customise and extend the platform to provide tailored solutions and integrations based on service-oriented architectures and messages queuing. Motivated by community events and contributor in blogs, technical books, open source projects and forums, I have been awarded Microsoft Most Valuable Professional (MVP) on Dynamics 365 (CRM) since 2012.

Posted on April 15, 2009, in SQL Server, c++, opends60.lib, extended stored procedures. Bookmark the permalink. Leave a comment.

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 )

Google+ photo

You are commenting using your Google+ 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

%d bloggers like this: