Cannot fetch a row from OLE DB provider "MSDASQL" for linked server "progress"

Deise Vicentin picture Deise Vicentin · Nov 8, 2013 · Viewed 14.2k times · Source

I'm trying to select some data from a Progress Database using an openquery on SQL Server 2008 R2, but I'm getting this error message.

Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "progress" reported an error. The provider reported an unexpected catastrophic failure.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "MSDASQL" for linked server "progress".

I did some tests and I discovered that the problem is with a specif column which is a varchar column. The column has around 30 columns and for them the select works fine. This is my query:

SELECT * from openquery(progress, 'select DescricaoProduto from MP.pub.IMPproduto')

I tried to do some different selects but none of them worked. For example:

SELECT * from openquery(progress, 'select Cast(DescricaoProduto as char(100)) as DescricaoProduto from MP.pub.IMPproduto')

Any idea about what to do?

Answer

Tom Bascom picture Tom Bascom · Nov 11, 2013

Progress data is all variable length. Progress applications routinely "over-stuff" fields. SQL tools often object to that. The Progress db maintains a SQL-WIDTH attribute which can be updated using the "dbtool" utility provided by Progress. If you are going to pull data from a Progress database you must use this tool periodically.

http://knowledgebase.progress.com/articles/Article/P24496?q=how+to+use+dbtool+to+modify+sql-width&l=en_US&c=Product_Group%3AOpenEdge&fs=Search&pn=1

The easy path is to start PROENV (found in the OpenEdge program group) then run "dbtool dbname" and select option 2.

Or you can use the following SQL:

ALTER TABLE ALTER COLUMN SET PRO_SQL_WIDTH ;

if you know which table & column is causing the problem and you do not need to scan everything.