gpt4 book ai didi

sql - 如何将数据库部署到 windows azure sql 数据库?

转载 作者:行者123 更新时间:2023-12-02 08:06:24 25 4
gpt4 key购买 nike

我有一个位于本地 SQL Server 上的数据库。我转到 Management Studio,然后选择要在 Azure 上部署的数据库并按照指南进行操作。最终,我收到了一堆错误,例如

One or more unsupported elements were found in the schema used as part of a data package. Error SQL71561: Error validating element [dbo].[patientInfo]: View: [dbo].[patientInfo] has an unresolved reference to object [198.18.21.71].[db_cs_dw].[dbo].[invoice]. External references are not supported when creating a package from this platform.

Error SQL71562: Error validating element [dbo].[getAllClaimsByPatientId]: Procedure: [dbo].[getAllClaimsByPatientId] has an unresolved reference to object [198.18.21.71].[db_cs_dw].[dbo].[all_clients_view]. External references are not supported when creating a package from this platform.

我是否需要在我的 Azure sql 服务器上使用 [198.18.21.71] 设置链接服务器。我可以这样做吗?

最佳答案

正如其他人正确指出的那样,您无法在 Azure 中设置链接服务器。您看到的验证失败是因为检测到由 4 部分组成的 [服务器].[数据库].[架构].[表] 引用,而 Azure 不支持这些引用。

假设您的 [db_cs_dw] 数据库也将托管在 Azure 中,您可以执行 Elastic Query执行跨数据库查询。执行此操作需要进行一些设置,包括创建安全上下文、数据源和 External Tables表示 [invoice] 表或您希望在其他数据库中访问的任何其他数据。您对 [198.18.21.71].[db_cs_dw].[dbo].[invoice] 的旧引用现在将引用外部表。您还可以通过引入 Synonyms 来进一步封装它- 因此同义词引用外部表,[dbo].[patentInfo] View 将引用该同义词。

否则,您将需要在同一数据库中托管数据,并采用某种 ETL/复制流程来移动/同步数据。

关于sql - 如何将数据库部署到 windows azure sql 数据库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42008995/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com