sp_ddopen - 这是在做什么? [英] sp_ddopen - What is this doing?

查看:27
本文介绍了sp_ddopen - 这是在做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 SQL Profiler 中捕获到的,是从 3rd 方应用发送的.它在做什么?

Captured this in SQL Profiler, being sent from a 3rd party app. What is it doing?

declare @p1 int
set @p1=180150003
declare @p3 int
set @p3=8
declare @p4 int
set @p4=1
declare @p5 int
set @p5=34
exec sp_ddopen @p1 output,N'sp_sproc_columns',@p3 output,@p4 output,@p5 output,N'some_stored_procedure_name',NULL,NULL,NULL
select @p1, @p3, @p4, @p5

我最好的猜测:它是一个 ODBC 驱动程序,要求提供存储过程所需的参数.
这是 sp_ddopen 的源代码,显然.

edit: my best guess: Its an ODBC driver asking for the parameters that a stored procedure needs.
Here's the source code for sp_ddopen, apparently.

edit2:exec 前@p 参数的设置是一个显然是Sql Profiler的产物.在其原始形式中,sp_ddopen 将在所有参数为 null 的情况下被调用,并且它们将返回显示的值.

edit2: the setting of the @p parameters before the exec is an artifact of the Sql Profiler apparently. In its original form, the sp_ddopen would have been called with all parameters being null, and they would have returned the values shown.

推荐答案

根据 MS(请参阅 http://msdn.microsoft.com/en-us/library/ms187961.aspx)这是一个内部存储过程,没有正式记录......它在内部数据库目录(元数据用于 DB 对象),并且例如在您/某些应用程序调用 SQLTablesSQLTablesW 时由 SQL Server ODBC 驱动程序使用(参见例如 http://support.microsoft.com/kb/315761/en-us).

According to MS (see http://msdn.microsoft.com/en-us/library/ms187961.aspx) this is an internal stored procedure which is NOT officially documented... it operates on the internal DB catalog (metadata for DB objects) and is used for example by the SQL Server ODBC driver when you/some app calls SQLTables or SQLTablesW (see for example http://support.microsoft.com/kb/315761/en-us).

因此我认为您的猜测是正确的:-)

Thus I would think that your guess is right :-)

这篇关于sp_ddopen - 这是在做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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