简体   繁体   English

Azure Bacpac文件还原错误

[英]Azure Bacpac file Restore Error

I do the daily bacpac file backup from Azure database using RedGate Azure Backup tool . 我使用RedGate Azure备份工具从Azure数据库进行每日bacpac文件备份。 Until 31st of May, All my Bacpac files can restore to Local SQL2008R2 database using DAC Client Tool . 直到5月31日,我所有的Bacpac文件都可以使用DAC Client Tool还原到Local SQL2008R2数据库。

Starting from 1st of June, I got error like: 从6月1日开始,我收到如下错误:

Failure Creating schema objects in database
'XXXXX' System.Data.SqlClient.SqlException (0x80131904): Cannot
find the object "dbo.XXXX" because it does not exist or you do not have per
missions.

When I check it table still exist in DB.Also No idea for this. 当我检查它的表仍然存在于DB.Also对此不知道。 Is there anyone face that kind of missing table, invalid Column.. etc 有没有人面对那种丢失的表,无效的列..等等

RedGate Azure Backup is deprecated now. RedGate Azure备份现已弃用 The DAC Client Tool ( DacCli.exe ) has been integrated into SSMS 2012 and SSDT . DAC客户端工具( DacCli.exe )已集成到SSMS 2012和SSDT中 You could try updating your DAC Client Tool to the latest version ( 1.6 from 1.2 ) 您可以尝试将DAC客户端工具更新为最新版本从1.2 1.6

SSMS 2012 Data Tools now allow you to Import Data-tier Applications . 现在,SSMS 2012数据工具允许您导入数据层应用程序 Take a look at the Data-Tier Application Framework Feature in SQL 2012 downloads. 查看SQL 2012下载中的“ 数据层应用程序框架功能” View this MSDN article for reference . 查看此MSDN文章以供参考

I use the free utility SQL Backup and FTP to backup Azure SQL Databases to a local .bacpac file. 我使用免费的实用程序SQL备份和FTP将Azure SQL数据库备份到本地.bacpac文件。 The free version allows you to backup up to 2 different databases and then the paid versions are very reasonable (ie Professional version is $70 or so). 免费版本允许您备份多达2个不同的数据库,然后付费版本是非常合理的(即,专业版为70美元左右)。

http://sqlbackupandftp.com/ http://sqlbackupandftp.com/

It actually runs on a schedule for me, automatically emails me the results of the backup and stores it on my Google Drive (even with the free version - I just have it store the timestamped backups in the file folder of my Google drive). 它实际上是按计划运行的,它会自动将备份结果通过电子邮件发送给我,并将其存储在我的Google云端硬盘中(即使使用免费版本,我也只是将带有时间戳的备份存储在我的Google云端硬盘的文件夹中)。

The procedure I use to restore it to a local database is: 我将其还原到本地数据库的过程是:

  1. Back up SQL Azure to .bacpac file 将SQL Azure备份到.bacpac文件
  2. Login to local database server as sa 以sa登录到本地数据库服务器
  3. Right-click Databases 右键单击数据库
  4. Click Import Data-Tier Application 单击导入数据层应用程序
  5. Select .bacpac file either from Azure or local disk 从Azure或本地磁盘中选择.bacpac文件
  6. Enter the name and the locations to store the data and log files 输入名称和存储数据和日志文件的位置
  7. If necessary, set the original database to single user mode and delete it 如有必要,将原始数据库设置为单用户模式并删除它
  8. If necessary, rename restored database to original database name 如有必要,将还原的数据库重命名为原始数据库名称

Note: Must use SQL Server 2012 (or later) management tools 注意:必须使用SQL Server 2012(或更高版本)管理工具

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

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