title: execute Oracle stored procedure from SQL Server 2012
body: <p>I have changed variable names to protect customer.  </p>
  
  <p>I am trying to execute a stored procedure from a remote Oracle 12c database, from my SQL Server 2012 database. If it helps, the Oracle database pl/SQL procedure is has input data types of: INPUT1=CHAR(200), INPUT2=(NUMBER), OUTPUT=SYS_REFCURSOR</p>
  
  <p>I am constantly getting the following error:</p>
  
  <blockquote>
    <p>"OLE DB provider "OraOLEDB.Oracle" for linked server "testsrv1" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.""</p>
  </blockquote>
  
  <p>My query is found below: </p>
  
  <pre><code>DECLARE @outputParameter int
  DECLARE @inputParameter varchar(400)
  DECLARE @inputParameter1 varchar(400)
  
  set @inputParameter1 = 'SampleStringValue'
  set @inputparameter = SampleNumberValue
  
  EXEC ('BEGIN storedProcedure(?,?); END;', @inputParameter, @inputParameter1, @outputParameter OUTPUT) at testsrv1
  </code></pre>