简体   繁体   中英

Export Data-Tier Application with Data (bacpac) from a database that contains encrypted objects

I have a SQL Server 2012 Database project that I have been working on for deployment of our database. The dacpac deployments are working great but I have run into a roadblock when it comes to deploying data along with the schema.

My plan was to have a local copy of the database that contains all of the default data so that I could deploy the dacpac to that database then export a bacpac that contains the latest schema as well as the default data set for deployment to remote sites.

However, we have a handful of objects in the database that are encrypted and the bacpac export fails on those objects. Is there a way to export a bacpac from a database that contains encrypted objects or how might you recommend addressing this issue?

Edit: I am also running into issues with objects that reference system databases such as Master and MSDB if you have any suggestions for that.

I think that export encrypted object as data-tier application is not possible for now.

As for system databases references you need to go to the Solution->Project->Reference->Add Database Reference (see screenshot below)

在此处输入图片说明

and add reference to the system database msdb (or master).

在此处输入图片说明

Thanks for this question. I have the same issue, though three days ago, I was exporting encrypted objects without an issue locally and now I'm running into this error.

My work-around has been to create a copy of the database, drop the encrypted objects of the database copy, then export that (I need the data). However, I do not know of a work-around to extract all the objects, including the encrypted objects.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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