azure - 如何通过azure Portal在cosmos db中保存并执行存储过程?

标签 azure stored-procedures azureportal azure-cosmosdb

我尝试从脚本资源管理器->存储过程 View 执行此操作,但是当我在那里使用按钮保存并执行时,它仅在以下错误消息中给出结果:

Failed to save the script

Database Account: myaccountname, Script: HelloWorld, Message: {"code":500,"body":"{\"message\":\"An error has occurred.\"}"}

并且结果下的文本框没有改变。

下面是它在 azure 门户中的外观的屏幕截图: Azure portal does not Save and Execute Stored Procedure

最佳答案

@MichaelRätzel:我刚刚编写了一个非常简单的 CosmosDB 脚本并在 Azure Portal 上运行它。

function TestSample() {
    getContext().getResponse().setBody("Hello World");
}

这是我的结果:

Azure Portal screenshot of succesful save

关于无法保存存储过程,我也遇到了与您相同的问题。我为解决这个问题所做的是:

  1. 先保存存储过程
  2. 左键单击左栏中的当前 SP
  3. 保存并执行 SP

我认为这是Azure Portal的技术问题。尝试一下并告诉我结果。

关于azure - 如何通过azure Portal在cosmos db中保存并执行存储过程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45741570/

相关文章:

Azure 搜索 - 正则表达式搜索

mysql - 使用存储过程性能会提高

mysql - 如何避免存储过程中的递归调用?

Azure 机器人和网络聊天 : There was an error sending this message to your bot

azure - 无法从 Kubernetes 获取 apiVersions : Unable to retrieve the complete list of server APIs

azure - 如何使用服务托管标识通过 Terraform 在 Azure 中配置资源

mysql - 重复表 mysql 显示表(Azure 实例)

java - 使用 JTDS 调用存储过程时如何设置空表类型参数

Azure:应用服务:部署虚拟目录

Azure应用服务配置不明确