title: sp_ddopen - What is this doing?
body: <p>Captured this in SQL Profiler, being sent from a 3rd party app. What is it doing?</p>
  
  <pre><code>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
  </code></pre>
  
  <p>edit: my best guess: Its an ODBC driver asking for the parameters that a stored procedure needs.<br>
  <a href="http://www.webtropy.com/articles/SQL.asp?SQL=sp_ddopen" rel="nofollow noreferrer">Here's the source code for sp_ddopen</a>, apparently.</p>
  
  <p>edit2: the setting of the @p parameters before the exec is an <a href="https://stackoverflow.com/questions/2198715/stored-procedure-output-parameters-in-sql-server-profiler">artifact of the Sql Profiler</a> 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.</p>