I have changed variable names to protect customer.
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
I am constantly getting the following error:
"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.""
My query is found below:
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