基于生产的Azure SQL数据库沙箱 [英] Azure SQL Database sandbox based on production

查看:152
本文介绍了基于生产的Azure SQL数据库沙箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大型的Azure Sql数据库.我需要为一个团队提供一个沙箱,该团队是数据库的副本,但允许他们创建sql对象.沙盒中的数据需要与生产保持同步.我使用了弹性查询,但是性能并不理想.我看过数据同步,但是该公司需要AD身份验证.由于沙盒不理想​​,因此要定期恢复生产,因为团队不想失去工作.有什么建议?我确定我必须忽略某些东西.

I have a large Azure Sql Database. I need to provide a sandbox to a team that is a copy of the database, but allows them to create sql objects. The data in the sandbox needs to be up to date with production. I used elastic queries, but the performance is not ideal. I've looked at data sync, but the company requires AD authentication. Restoring production periodically as the sandbox is not ideal as the team does not want to lose their work. Any suggestions? I'm sure I must be overlooking something.

推荐答案

我将首先复制生产数据库,然后创建一个来自中心"同步组.

I would first make a copy the production database, then create a "From the Hub" sync group.

1.复制数据库

通过转到数据库刀片并单击标题中的复制",可以轻松创建Azure SQL数据库的副本.从那里它将询问您新的数据库名称和目标服务器.您可以将它放在同一台服务器上,也可以创建一个新服务器,由您自己决定.

You can easily create a copy of an Azure SQL database by going to the database blade and clicking "Copy" in the header. From there it will ask you the new database name and target server. You can put it on the same server or create a new server, that is up to you.

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-copy

完成此操作后,您现在可以控制一个沙盒"数据库,该数据库将是生产的精确副本.

Once you've done that, you now have a "sandbox" database you control which would be an exact copy of production.

2.同步组

此后,可以通过创建Azure SQL同步组"将特定表从生产同步到沙箱.

After that, you can sync specific tables from production to the sandbox by creating a Azure SQL "Sync Group".

  • 您要从生产数据库中启动此数据库,因为它是源(或集线器)数据库,因此请转到生产数据库的数据库刀片,然后选择同步到其他数据库".
  • 单击新同步组".从那里它将询问您一个同步组名称,该名称可能类似于"SyncSandbox".
  • 选择您的成员数据库,这将是您的沙箱数据库,因此选择使用现有数据库"并选择您的沙箱数据库.
  • 选择同步方向. 这很重要,因为您只想将生产环境同步到沙箱,所以请选择来自中心".
  • 最后,您可以配置同步组.在表"页面上,从同步组成员列表中选择一个数据库,然后选择刷新架构".完成后,选择保存.您还可以进入属性并选择同步频率(如果您希望自动的话).
  • You want to initiate this from your production database since that is the source (or hub) database, so go to the database blade of your production database and choose "Sync to other databases".
  • Click on "New Sync Group". From there it will ask you for a sync group name which could be something like "SyncSandbox".
  • Select your member database(s), this would be your sandbox database, so choose "Use Existing Database" and select your sandbox database.
  • Choose your sync direction. This is important, since you only want to sync from production to the sandbox, select "From the Hub".
  • Finally you can configure the sync group. On the Tables page, select a database from the list of sync group members and select Refresh schema. Once you're done, select Save. You can also go into the properties and select the sync frequency if you want it automatic.

https ://docs.microsoft.com/zh-CN/azure/sql-database/sql-database-get-started-sql-data-sync

这篇关于基于生产的Azure SQL数据库沙箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆