2

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.

2 Answers2

0

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)

enter image description here

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

enter image description here

Andrey Morozov
  • 7,839
  • 5
  • 53
  • 75
  • 1
    Thanks for taking the time to respond. Unfortunately this doesn't resolve my issue. I've got those references in the database project just like what you are showing and that works just fine. I can deploy the dacpac without issue. The problem occurs when I go to the database that I deployed to (the database that contains my default data set) and I try to export a bacpac from there. It doesn't appear to have an option that allows me to provide a decryption key for my encrypted objects or to specify external database references. The export fails with errors on both of these items. – user2308073 Aug 15 '13 at 20:08
-1

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.

WhyAShortage
  • 121
  • 1
  • 2
  • 9