如何将存储过程部署到 SQL Azure 中的联合数据库

发布于 2024-12-29 22:30:42 字数 475 浏览 2 评论 0 原文

我目前正在努力设置自动迁移以转到 Azure 中的联合数据库。我终于成功部署了表,但未来需要关注的一件事是部署存储过程。

看起来,当我们添加一个存储过程时,它只存在于我们所在的联合的任何部分。因此,如果我将数据分成两个数据库并将存储过程部署到其中一个数据库,那么它只会在那里。 是否有任何方法可以将存储过程部署到已内置于 Azure 中的联合中的每个数据库?

我确实找到了 一篇关于从多个数据库查询的 msdn 博客文章,我认为我可以修改它来部署过程,但我宁愿不在当前的迁移设置中实现它,因为我认为它会变得混乱。

I am currently working on getting automatic migrations set up to go to a federated database in Azure. I have finally gotten deployment of tables working, but one thing that is concerning for the future is deploying stored procedures.

It appears that when we add a stored procedure, it exists only on whatever part of the federation we were in. So, if I have the data separated out into two databases and deploy the stored procedures to one of the dbs, then it will only be there. Is there any way to deploy a stored procedure out to every database in a federation that is built into Azure already?

I did find a msdn blog post about querying from multiple databases and I think that I could modify this to deploy the procedures, but I would rather not implement that in the current migration setup, as I think it would get messy.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

原来分手还会想你 2025-01-05 22:30:42

我认为这是扇出脚本来创建存储过程的唯一方法。与 Cihan 在他的博客文章中所说的类似。但我认为你最好在拆分之前在第一个成员上创建表、过程和函数等。如果是这样,SQL Azure 将帮助您使用过程创建成员。

I think this is the only way to fan-out your script to create a stored procedure. Similar as what Cihan said in his blog post. But I think you'd better create the tables, procedures and functions, etc. on the first member, before you split. If so the SQL Azure will help you create the members with the procedures.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文