如何更改 sql azure 服务器位置

发布于 2024-12-14 09:49:59 字数 434 浏览 0 评论 0 原文

我想将现有的 SQL Azure 位置转移到其他位置,但我认为 Azure 管理门户上目前没有功能可以执行此操作。

我刚刚用谷歌搜索,发现一个链接 http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/thread/e6c961cc-5eea-4f07-82c9-a8805d367b05 说我需要使用数据同步Azure 门户中的选项,但我没有在我的 Azure 门户中启用该功能。

另外,如果我确实使用该选项,需要付费吗?最后,是否还有其他选项可以移动 SQL Azure 位置?

I would like to transfer my existing SQL Azure location to other one, but I think there is no functionality right now to do so on the management portal of Azure.

I just googled it and found one link http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/thread/e6c961cc-5eea-4f07-82c9-a8805d367b05 that says I need to use the data sync option in Azure's portal but I don't have that feature enabled in my Azure portal.

Also if I do use that option, is there any charge for it? Finally, are there any other option that is possible for moving the SQL Azure location?

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

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

发布评论

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

评论(5

温折酒 2024-12-21 09:49:59

将现有 SQL Server 数据库移动到 Azure 上的新区域(假设没有与数据库关联的 Blob 容器)。如需进一步参考,请参阅:
https://azure.microsoft.com/ en-us/blog/migration-azure-services-to-new-regions/

  1. 如有必要,将数据库升级到高级定价层之一
  2. 将异地复制添加到现有数据库。您可以选择在哪个区域备份现有数据库。在您选择的目标区域中创建新的数据库服务器。我建议使用与现有 sql 数据库相同的管理员用户名和密码来配置新的数据库服务器。创建辅助数据库时,我建议将辅助类型设置为“可读”,因为它将允许您检查所有数据和模式是否已正确复制。
  3. 允许两个数据库有时间同步。根据 Microsoft AzureCAT 的经验法则是: 3 *(5 分钟 + 数据库大小 / 150 MB/分钟)
  4. 配置辅助数据库的防火墙设置,以允许必要的 IP 地址访问数据库
  5. 暂时关闭正在访问的任何用户或应用程序现有数据库。
  6. 从 Azure 门户中选择现有数据库并将其异地复制角色从主要更改为辅助。
  7. 运行依赖于 masterdb 的任何 ddl 脚本,例如重新创建用户和用户配置文件的 ddl 脚本
  8. 更改任何应用程序的连接字符串以指向新数据库。
  9. 用户和应用程序现在可以连接到新数据库
  10. 您可以自行决定删除旧数据库作为备份并添加任何新区域作为备份。

在费用方面,如果旧数据库还不是高级数据库,则升级旧数据库将收取费用。创建异地复制数据库也将收取费用。但是,这些费用可能仅限于一天到几天的费用(取决于地理复制需要多长时间)。一旦新数据库启动并运行,请尽快删除旧数据库以限制额外费用。最后,如果您将旧数据库的服务级别升级到高级级别以方便异地复制,您将需要将新数据库降级到旧数据库的原始服务级别以限制费用。

To Move an Existing SQL Server Database to a New Region on Azure Assuming There Are No Blob Containers Associated With the Database. For further reference see:
https://azure.microsoft.com/en-us/blog/migrating-azure-services-to-new-regions/

  1. Upgrade the database, if necessary, to one of the Premium pricing tiers
  2. Add geo-replication to the existing database. You can choose what region to have the backup of the existing database. Create a new Database server in the target region of your choice. I suggest provisioning that new database server with the same admin username and password as the existing sql database. When creating the secondary database, I suggest making the Secondary type “Readable” as it will allow you the ability to check that all data and schemas were replicated correctly.
  3. Allow the two databases time to sync. Rule of thumb according from Microsoft AzureCAT is: 3 * (5 minutes + database size / 150 MB/minute)
  4. Configure the Firewall settings of the secondary database to allow the necessary IP addresses to access the database
  5. Temporarily shut down whatever users or applications are accessing the existing database.
  6. From the Azure portal select the existing database and change its geo-replication role from primary to secondary.
  7. Run any ddl scripts that rely on the masterdb such as ddl scripts to recreate users and user profiles
  8. Change the connection strings of any applications to point to the new database.
  9. Users and applications can now connect to the new Database
  10. At your discretion you can remove the old database as a backup and add any new regions as backup.

In terms of charges there will be charges for upgrading the old database if it isn't already a premium database. There will also be charges for creating the geo-replicated database. However, those charges can be limited to a day to a few days worth of fees (depending on how long geo-replication takes). Once the new database is up and running, delete the old database as soon as possible to limit additional fees. Finally, if you upgraded the service level of the old database to a premium tier to facilitate the geo-replication, you will want to downgrade the new database to the original service level of the old database to also limit fees.

挽清梦 2024-12-21 09:49:59

我认为您可以使用新的导入/导出 bacpac 功能。我已经用它在帐户之间移动数据库,但不明白为什么它不能在区域之间工作。

请参阅此处

I think you can use new Import/Export bacpac feature. I have used it to move databases between accounts and can't see why it wouldn't also work between regions.

See how here

多情癖 2024-12-21 09:49:59

如果您能够暂时停止对数据库的写入,则可以使用 Azure 门户上的复制功能。

  1. 在您选择的区域中创建一个新的 SQL Server。
  2. 将您的服务 IP 地址添加到新的 SQL Server 防火墙。
  3. 停止写入原始数据库。
  4. 在 Azure 门户中打开源数据库,然后单击边栏选项卡顶部的“复制”。
  5. 选择位于目标区域的新 SQL 服务器。
  6. 等待复制完成。
  7. 更新您的服务以指向目标数据库。
  8. 启用数据库写入。
  9. 验证一切正常。
  10. 删除原始数据库(如果它是服务器上唯一的数据库,则删除服务器)。

If you are able to stop writes to the DB for a time then you can use the Copy feature on the Azure Portal.

  1. Create a new SQL Server in the region of your choosing.
  2. Add your service(s) IP addresses to the new SQL Server firewall.
  3. Stop writes to the origin database.
  4. Open the origin database in the Azure Portal and click Copy at the top of the blade.
  5. Choose your new SQL server located in the destination region.
  6. Wait for the copy to complete.
  7. Update your service(s) to point to the destination DB.
  8. Enable DB writes.
  9. Verify everything is working.
  10. Delete origin database (and server if it was the only DB on the server).
初相遇 2024-12-21 09:49:59

我不会使用 DataSynch,因为它会在数据库中创建许多对象来执行同步(这是一种侵入式解决方案)。您确实可以尝试导入/导出功能;那应该可以正常工作。您还可以下载 Enzo 备份工具的试用版,该工具提供 30 天免费试用期:http: //www.bluesyntax.net/backup.aspx。 [免责声明:我是这个工具的作者]

关于定价问题,您可能需要为从数据库中提取的数据付费。目前,将数据移入“SQL Azure”是免费的。如果您要将数据传输到不同的数据中心,您将需要支付提取数据的费用。美国和欧洲每 GB 15 美分,亚洲 20 美分。以下是定价详细信息:http://www.microsoft.com/windowsazure/pricing/

请记住,需要 4GB 存储空间的数据库并不意味着您拥有 4GB 数据。有时索引会占用大量空间。要估计您需要传输的数据的大小,您可以删除索引(并等待数据库大小缩小;数据库大小应大致等于您的数据传输需求),或者您可以计算通过运行命令来创建表。以下是一篇文章的链接,该文章展示了如何执行类似的操作(查看第二个命令,其中包含 SELECT 语句;只需对所有表运行它): http://www.sqldocumentor.com/table-size-in-sql-server-find-rows-and-disk-space-usage

I wouldn't use DataSynch because it creates many objects in your database to perform synchronization (it's an invasive solution). You can indeed try the Import/Export feature; that should work fine. You can also download a trial version of the Enzo backup tool, which comes with a 30-day free trial: http://www.bluesyntax.net/backup.aspx. [disclaimer: I am the author of this tool]

Regarding the pricing question, you may be charged for data being extracted out of the database. Moving data "in" SQL Azure is free of charge for now. If you are transferring the data to a different data center, you will be charged for extracting the data. It's 15 cents per GB in the US and Europe, and 20 cents in Asia. Here are the pricing details: http://www.microsoft.com/windowsazure/pricing/

Keep in mind that a database that requires 4GB of storage doesn't mean you have 4GB of data. Sometimes indexes can take a lot of space. To estimate the size of the data you will need to transfer you can either drop your indexes (and wait a little for the database size to shrink; the database size should be roughly equal to your data transfer needs) or you can calculate the size of your tables by running a command. Here is a link to an article that shows how to do something similar (look at the second command with is a SELECT statement; just run it for all the tables): http://www.sqldocumentor.com/table-size-in-sql-server-find-rows-and-disk-space-usage

荒芜了季节 2024-12-21 09:49:59

Azure 发布了一个名为 Azure Resource Mover 的新工具。

资源移动器现在可以处理以下资源:

  • Azure VM 和关联的磁盘
  • NIC
  • 可用性集
  • Azure 虚拟网络
  • 公共 IP 地址
  • 网络安全组 (NSG)
  • 内部和公共负载均衡器
  • Azure SQL 数据库和弹性池

https://learn.microsoft.com/en-us/azure/resource-mover/move-region-within-resource-group

尚不支持 Azure SQL Server,但 Azure 有完整的指南无论如何:

https://learn.microsoft.com/en-us/azure/resource-mover/tutorial-move-region-sql#move-the-sql-server

Azure has released a new tool called Azure Resource Mover.

Resource mover can for now handle these resources:

  • Azure VMs and associated disks
  • NICs
  • Availability sets
  • Azure virtual networks
  • Public IP addresses
  • Network security groups (NSGs)
  • Internal and public load balancers
  • Azure SQL databases and elastic pools

https://learn.microsoft.com/en-us/azure/resource-mover/move-region-within-resource-group

Azure SQL Server is not supported yet but Azure has a complete guide for this anyway:

https://learn.microsoft.com/en-us/azure/resource-mover/tutorial-move-region-sql#move-the-sql-server

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