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
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: 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.
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 :-)
From sp_helptext sp_ddopen
it looks like a version translation layer between an API like ODBC/OLEDB for a variety of system stored procs.
If your case I'd guess the application is version-independently calling sp_sproc_columns
to sniff the prototype of some_stored_procedure_name
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With