t-sql代码的调试在调用openquery()时失败 [英] debugging of t-sql code fails on call to openquery()

查看:108
本文介绍了t-sql代码的调试在调用openquery()时失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Heu All
我已经在VS2005的服务器资源管理器中连接到SS2005,并进入了一个过程.
一切都很好,直到在那里调用了openquery().
我试图
链接服务器是在VS2005中连接到的SS2005 I上定义的.
当此过程在此SS2005上本地运行时,也会成功.
SS2005和VS2005位于不同的计算机上,并且怀疑怀疑VS2005环境无法识别链接的服务器,或者这里根本没有意识到远程调试问题.
是否需要其他配置才能允许这种操作?远程调试

我会从任何地方开始寻找任何想法..
TIA
Rea

Heu All
I have connected to SS2005 in server explorer of VS2005
and stepped into one procedure.
All is fine untill i m openquery() is being called there.
I m trying to issue there a query against a linked server with openquery().
The Linked server is defined on  the SS2005 I m connecting to in VS2005.
Also when the procedure is run localy on this SS2005 it succeeds.
SS2005 and VS2005 are on different machines, and i m suspecting linked server is not recognized
by the VS2005 environment after all or there is a remote debugging issue here i m not aware of.
Are additional configurations needed to allow this kind of remote debugging ??

I would appriciate any idea as to where to start looking..
TIA
Rea

推荐答案

很抱歉延迟回复!

您在帖子中说进入一个过程.....一切都很好",根据我的理解,您已经直接从Server Explorer成功地进入了存储过程,这表明该连接到服务器的操作没问题,因为如果进行T-SQL调试,则必须在服务器资源管理器中存在数据连接.

You stated in your post that "stepped into one procedure ..... All is fine", based on my understanding, you have successfully stepped into the stored procedure directly from the Server Explorer, this would suggest that the connection to the Server was OK since Data Connections need to be present in the Server Explorer if we did T-SQL Debugging.

因此,问题是当我们进入openquery()时发生的,对吗?
为进一步分析,您能为我们提供更多信息吗?

1. openquery()客户端代码是否是
2.您能否在此处发布openquery()的代码段?

Thus, the issue happened when we stepped into openquery(), right?
For our further analysis, could you please provide us with more informaiton?

    1. Was the openquery() client code?
    2. Could you please post a code snippet of openquery() here?

在进行应用程序调试时,当我们尝试从客户端代码进入CLR存储过程时,通常,我们需要在要调试的CLR代码中设置一个断点,这是T-的局限性之一SQL和CLR调试.
进行应用程序调试时,还有其他一些限制,请查看

When we tried to step into a CLR stored procedure from the client code when we did Application Debugging, usually, we need to set a breakpoint in the CLR code that we want to debug, this is one of the limitations of T-SQL and CLR debugging.
There are several other limitations when we did Application Debugging, take a look at this article for more information.
If I misunderstand you, please let me know, thanks in advance!

请参考确认远程调试上的以下链接:

Please refer to this link on Confirguring Remote Debugging:
http://msdn.microsoft.com/en-us/library/y7f5zaaa(VS.71).aspx

最好的问候


这篇关于t-sql代码的调试在调用openquery()时失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆