title: Execute SQL Server stored procedure through SSIS
body: <p>I have this stored procedure:</p>
  
  <pre><code>CREATE PROCEDURE [dbo].[sp_Carrier_Scan_Compliance]
       (@RETAILERID  INT OUTPUT,
        @SYSTEM_ID  VARCHAR(10) OUTPUT)
  AS
  BEGIN
      SET @RETAILERID = 2
      SET @SYSTEM_ID = 'DMASOS'
      ...
  END
  </code></pre>
  
  <p>I have created a SSIS package using a <strong>Execute SQL Task</strong> in the control flow.</p>
  
  <p>These are my <strong>Execute SQL Task</strong> editor settings:</p>
  
  <p><a href="https://i.stack.imgur.com/y80qk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y80qk.png" alt="enter image description here"></a></p>
  
  <p>This are my <strong>Variable</strong> settings:</p>
  
  <p><a href="https://i.stack.imgur.com/snCtc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/snCtc.png" alt="enter image description here"></a></p>
  
  <p>These are my <strong>Parameter Mapping</strong> settings:</p>
  
  <p><a href="https://i.stack.imgur.com/8C1fC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8C1fC.png" alt="enter image description here"></a></p>
  
  <p>When I run the SSIS package, I get an error:</p>
  
  <blockquote>
    <p>Error: 0xC002F210 at Execute SQL Stored Procedure (to copy data from 'BI-Datatrunk' source table) Task, Execute SQL Task: Executing the query "exec  = [sp_Carrier_Scan_Compliance] ? OUTPUT, ? O..." failed with the following error: "Incorrect syntax near '='.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. </p>
    
    <p>Task failed: Execute SQL Stored Procedure (to copy data from 'BI-Datatrunk' source table) Task<br>
    Warning: 0x80019002 at Carrier_Scan_Compliance_SP: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.</p>
  </blockquote>
  
  <p>I am not sure what I am missing. </p>
  
  <p>Please help me.</p>
  
  <p>Thanks</p>