Search code examples
azurestored-proceduresazure-sql-databasesp-executesql

Azure SQL sp_execute_remote not supporting Output Parameters


I'm following to execute the Store Procedures Across the different Azure DB from here. The thing is my Original Sp has 2 output parameters.

But when i tried to call the Sp from Other DB.

I get the error as

Procedure SP_EXECUTE_REMOTE, Line 1 [Batch Start Line 0]
Output parameters are not supported with sp_execute_remote.

If the output parameters are not supported in sp_execute_remote.Then how could i call my Sp(Original DB)from Caller DB.?


Solution

  • You may consider creating a table that will store the output of your stored procedure and you can reference that table remotely to retrieve the output of the stored procedure. This way you can remove the output parameters of your store procedure and workaround the current limitation of sp_execute_remote.

    Hope this helps.

    Regards,

    Alberto Morillo

    SQLCoffee.com