开发者

How to avoid preemptive_oledbops SQL Server 2008 with Linked Servers

开发者 https://www.devze.com 2023-02-03 12:08 出处:网络
We have two SQL Servers and have them set up as linked servers. There is one particular stored procedure that when run has to join tables from the linked server to it\'s 开发者_运维问答own. Often time

We have two SQL Servers and have them set up as linked servers. There is one particular stored procedure that when run has to join tables from the linked server to it's 开发者_运维问答own. Often times it seems to take forever and after looking a bit, it seems that in activity monitor it gets a "PREEMPTIVE_OLEDBOPS". But this is only when the SP is called from ASP.NET. When I run the query in SQL Server Management Studio the query runs in 6 seconds - everytime.

I am not a dba - so my knowledge here is pretty superficial. Googling for this error code, suggests it's a wait code, but I couldn't get any information about how to avoid them or what exactly is causing it.

Thanks for any help, ~P


Try adapting your sp to use OPENQUERY command.

0

精彩评论

暂无评论...
验证码 换一张
取 消