Share via

MSDASQL ODBC queries to Linked Servers hang with no response after a couple weeks.

Ted 0 Reputation points
2026-02-05T18:29:07.92+00:00

Hi all,

Our current setup is a linked server to NetSuite ODBC using MSDASQL 17 as the provider.
Everything works and runs fine and fast for about 2 weeks. Then the error will occur.
There will be no error message or anything, but the query just "hangs". The cpu time increases very small does while the wait time increase exponentially. There's no error but no data/rows are being copied over. Also when this happens, I will try "Test Connection" with the linked server which also just hangs with no error message. The wait_type is OLEDB and wait resource states our linked Server?

Our solution for now has to been to either resume/restart the SQL Server Service or the Server itself, both of which works but it's bad practice and wasn't an issue 3-6 months ago.
Is there any reason for this and is there any solution for this?
Thanks!

I'm also aware of a known issue since SQL Server 2000 with rolled-back operations through linked servers, where the linked server is not SQL Server, but like I said it wasn't an issue 3-6 months ago.

SQL Server Database Engine
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 132.9K Reputation points
    2026-02-05T22:35:51.1866667+00:00

    This would be an issue in MSDASQL or the NetSuite ODBC driver. Or whatever NetSuite is talking with on the other end. I'm more inclined to put the blame on the latter two.

    The wait type OLEDB means that SQL Server has called the OLE DB provider, and SQL Server has thereby given up all control. Which amongst other things means that you cannot kill it.

    The only thing you possibly could do to alleviate the situation from the SQL Server side of things is to uncheck "Allow in-process" the OLE DB provider, and then find a way to kill what is running the OLE DB/ODBC thing from Windows when it reaches Nirvana.

    Else, you would need to talk to the vendor of NetSuite.


  2. Q&A Assist
    2026-02-05T18:29:18.34+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    It sounds like you are experiencing a performance issue with your linked server setup using MSDASQL 17 for ODBC connections to NetSuite. This type of hanging behavior can occur due to various reasons, including network issues, resource constraints, or problems with the ODBC driver itself.

    Here are a few suggestions that might help you troubleshoot and resolve the issue:

    1. Check Resource Availability: Ensure that your SQL Server has sufficient resources (CPU, memory, etc.) available. If resources are constrained, it may lead to hanging queries.
    2. Network Stability: Investigate the network connection between your SQL Server and the NetSuite ODBC source. Network instability can cause queries to hang.
    3. ODBC Driver Updates: Make sure you are using the latest version of the ODBC driver. Sometimes, bugs in the driver can lead to performance issues, and updates may contain fixes.
    4. Connection Timeout Settings: Review and adjust the connection timeout settings for your linked server. If the timeout is set too high, it may cause queries to hang longer than expected.
    5. Monitor Wait Types: Since you mentioned that the wait type is OLEDB, you might want to monitor the specific wait statistics to identify if there are any patterns or specific issues related to OLEDB.
    6. Review SQL Server Logs: Check the SQL Server error logs for any warnings or errors that may provide additional context about the hanging queries.
    7. Consider Alternatives: If the issue persists, you might want to explore alternative methods for connecting to NetSuite, such as using a different driver or approach that might be more stable.

    If the problem continues after trying these steps, you may need to consider reaching out to Microsoft support or the ODBC driver vendor for further assistance.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.