title: How to run stored procedure in Azure Data Factory DataFlow SQL Server source
body: <p>When using an Azure SQL Server source, I use the Query option and specify a stored procedure to run.  When I paste in the same code in Management Studio, it works, but when executed from ADF source using <code>Query</code> option, it errors with the following condition.  How can I call a stored procedure using Query option?</p>
  <pre><code>{&quot;message&quot;:&quot;at Source 'Source': com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'EXECUTE'.. Details:at Source 'Source': com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'EXECUTE'.&quot;,&quot;failureType&quot;:&quot;UserError&quot;,&quot;target&quot;:&quot;SyncData&quot;,&quot;errorCode&quot;:&quot;DFExecutorUserError&quot;}
  </code></pre>
  <p>Here is the query I'm passing that works when called from SSMS:</p>
  <pre><code>EXECUTE [dbo].[sp_ReplicaGetChanges] @ReplicaVersion = 0, @FirstTimeFlag = 1, @SourceSchema = 'dbo', @SourceTable = 'Brand', @UpdateColumns = NULL
  </code></pre>
  <p><a href="https://i.stack.imgur.com/I1b0S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I1b0S.png" alt="enter image description here" /></a></p>