THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Davide Mauri

A place for my thoughts and experiences the Microsoft Data Platform

Connecting to DB2 from SQL Server 2005 x64 and after using IBM Client Access

If you have to connect your SQL Server to a DB2 database server, you can quickly stumble upon this “nice” error:

Cannot fetch a row from OLE DB provider "IBMDA400" for linked server.

After spending some time trying to figure out what was wrong, I found this very complete and useful article:

The article is quite long and deals with all the problems you may find when trying to make SQL Server and DB2 work together, using SSIS or Linked Server.

If you’re using Linked Server and you have the aforementioned error, all you have to do is to set the “magic” properties:

USE [master]
EXEC master.dbo.sp_MSset_oledb_prop N'IBMDA400', N'AllowInProcess', 1
EXEC master.dbo.sp_MSset_oledb_prop N'IBMDA400', N'DynamicParameters', 1

and – voilà – everthing will start to work.

Published Wednesday, July 20, 2011 5:13 PM by Davide Mauri
Filed under: , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS



Michael Francis said:

Hi Davide

We (Red Gate Software) have a free tool – a data cleanser for SSIS – that we are looking for opinions on.

Information on the free tool, including the download, can be found at

May I ask if you would be interested taking a look and letting us know your opinions?

Many thanks

Michael Francis

July 22, 2011 6:38 AM

Scott said:

Thanks Davide. Ran that code and it fixed my Sql2008 to IBM linked server issue.

May 13, 2013 10:51 AM

Devshish Shinde said:

Thanks so much Davide for providing accurate details.

I was facing same issue and able to fetch the query result from DB2 linked server after running your queries.

February 24, 2014 3:27 AM

abx said:


May 31, 2018 11:06 PM

dongdong8 said:



June 29, 2018 2:50 AM

linying123 said:



July 16, 2018 8:32 PM

dongdong8 said:



July 23, 2018 11:28 PM

shenyuhang said:


July 23, 2018 11:34 PM

qqq said:

August 16, 2018 12:06 AM

chenjinyan said:


August 22, 2018 11:05 PM

shenyuhang said:


August 23, 2018 10:16 PM

kakakaoo said:

October 8, 2018 2:29 AM

Leave a Comment


About Davide Mauri

Director of Software Development & Cloud Infrastructure @ Sensoria, an innovative smart garments and wearable company. After more than 15 year playing with the Microsoft Data Platform, with a specific focus on High Performance databases, Business Intelligence, Data Science and Data Architectures, he's now applying all his skills to IoT, defining architectures to crunch numbers, create nice user experiences and provide meaningful insights, all leveraging Microsoft Azure cloud. MVP on Data Platform since 2006 he has a very strong background development and love both the ER model and OO principles. He is also a fan of Agile Methodology and Automation, which he tries to apply everywhere he can, to make sure that "people think, machines do".

This Blog


Privacy Statement