【问题标题】:Azure SQL sp_execute_remote not supporting Output ParametersAzure SQL sp_execute_remote 不支持输出参数
【发布时间】:2017-06-21 07:28:03
【问题描述】:

我正在关注从here 跨不同 Azure DB 执行存储过程。问题是我的原始 Sp 有 2 个输出参数。

但是当我尝试从其他数据库调用 Sp 时。

我得到的错误是

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

如果 sp_execute_remote 中不支持输出参数。那么我如何从 Caller DB 调用我的 Sp(Original DB)?

【问题讨论】:

    标签: azure stored-procedures azure-sql-database sp-executesql


    【解决方案1】:

    您可以考虑创建一个表来存储存储过程的输出,并且可以远程引用该表来检索存储过程的输出。这样,您可以删除存储过程的输出参数并解决当前 sp_execute_remote 的限制。

    希望这会有所帮助。

    问候,

    阿尔贝托·莫里洛

    SQLCoffee.com

    【讨论】:

    • 是的,我也完成了你上面提到的同样的事情。我还使用了嵌套动态查询
    猜你喜欢
    • 1970-01-01
    • 2012-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多