executing an oracle stored procedure from Sql Server 2008

Im trying to execute an oracle stored procedure from SQL Server 2008 R8 trough DB LINK ,
the header of the stored procedure is like this :

PROCEDURE TEST(X OUT NOCOPY VARCHAR2,Y OUT NOCOPY NUMBER,Z IN NUMBER )

This procedure will should update a table “MYTABLE” and return a result

My T-SQL is :

           DECLARE @X nvarchar(255)              
           DECLARE @Y INTEGER   
           DECLARE @Z INTEGER


           SET @X= ''
           SET @Y = 0
           SET @Z = 2

           EXEC('begin USER.PKG.TEST(?,?,?); end;',@X OUTPUT, @Y OUTPUT,@Z ) AT DB_ORACLE;

The stored procedure is executed because i can see that the table “MYTABLE” is updated , but the problem is that im getting an error :

Msg 7215, Niveau 17, État 1, Ligne 10

Impossible d’exécuter l’instruction sur le serveur distant ‘DB_ORACLE’.

=> Canot execute the instruction at the distant server ‘DB_ORACLE’

NB : The parameters for Rpc, Rpc Out, and Use Remote Collation are enabled

Thanks for HELP


Source: oracle

Leave a Reply