简体   繁体   English

是否可以将SQL Server Standard 2014备份还原到Azure SQL?

[英]Is it possible to restore a SQL Server Standard 2014 backup to Azure SQL?

We currently have a SQL Server Standard 2014 database on one of our servers that is backed up daily to Azure Blob Storage. 当前,我们在其中一台服务器上拥有一个SQL Server Standard 2014数据库,该数据库每天备份到Azure Blob存储。 Those backups are working well and have restored beautifully to the original server in manual tests. 这些备份运行良好,并且在手动测试中已完美还原到原始服务器。

However, to ensure that our backups continue to be valid, I want to put in place some sort of automated restore testing. 但是,为了确保我们的备份继续有效,我想进行某种自动还原测试。 Due to performance/disk constraints, I'd rather not do this automated testing on our primary database server. 由于性能/磁盘的限制,我不想在我们的主数据库服务器上进行此自动化测试。 But we can't spend the money to buy more SQL Server Standard licenses to set up another server. 但是我们不能花钱购买更多的SQL Server Standard许可来设置另一台服务器。 And we can't use SQL Server Express, because our database is too large (about 20 GB). 而且我们不能使用SQL Server Express,因为我们的数据库太大(大约20 GB)。

Given that our backups are stored in Azure, I thought the best way to test backup restoration would be to restore the backup directly into an Azure SQL database. 鉴于我们的备份存储在Azure中,我认为测试备份还原的最佳方法是直接将备份还原到Azure SQL数据库中。 I could do this roughly once per week, run some quick checks on the restored data, and then automatically delete the database, and pay for less than 1 hour of service/week. 我每周大概可以执行一次,对恢复的数据进行一些快速检查,然后自动删除数据库,每周支付不到1个小时的服务费用。 This would result in minimal expense. 这将导致最小的花费。 However, I'm not sure it's possible. 但是,我不确定是否有可能。 Google searches for instructions on how to restore a SQL Server backup directly to Azure SQL haven't turned up anything so far. 谷歌搜索有关如何将SQL Server备份直接还原到Azure SQL的说明,到目前为止还没有发现任何问题。 Is it possible for me to restore my SQL Server backups directly to Azure Managed SQL like this? 是否可以像这样将SQL Server备份直接还原到Azure托管SQL?

If it isn't possible, my next thought is that I could just create an SQL Server VM in Azure and activate/deactivate it as needed for my automated restore tests. 如果不可能,我的下一个想法是,我可以在Azure中创建一个SQL Server VM,然后根据需要进行激活/停用,以进行自动还原测试。 That'd be a bit more complicated though, so I'm saving that approach for plan B. 不过,这会有些复杂,因此我将这种方法保存在计划B中。

Not Directly. 不直接。 You can only directly import a bacpac file into SQL Azure. 您只能直接将bacpac文件导入SQL Azure。

What you can do is use SQL Server on an Azure VM to test your backup files. 您可以做的是在Azure VM上使用SQL Server测试您的备份文件。

Pretty sure you can write a script to automatically pull down the latest .bak file and restore it to the SQL Server Instance on the VM. 可以肯定,您可以编写一个脚本来自动下拉最新的.bak文件并将其还原到VM上的SQL Server实例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM