简体   繁体   中英

ODBC Query Works in MS Access But Times-Out in SQL Server

We have a pass-through query in MS Access that we need to convert to SQL Server.

The query in MS Access is using a 32-bit ODBC DSN to connect to a Redshift database. The query is complex (eg has about 20 sub-queries), but runs fine in MS Access within 1 to 2 minutes.

We converted that query to SQL Server and use a Linked Server connection using a 64-bit ODBC DSN with the MSDASQL provider to connect to that same database. The query in SQL Server will try to run for over 30 minutes but then eventually times-out.

Any idea why it would work in MS Access and not SQL Server?

I thought it might related to using 64-bit vs 32-bit, so I tried adding a 32-bit ODBC as a Linked Server, but SQL Server would not allow me to.

Given the feedback I decided to scrap using Linked Sever and used SSIS instead to pull in the data. Thanks everyone for your time and help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM