A day in a life of a DBA- High Level Over View of Data-Tier Applications
This was actually a month in a life of a DBA. It took me a few weeks to figure out why a DAC PAC was hanging during deployment and after that was resolved I actually had an error during deployment. First let me start on explaining what a DAC PAC or formally known as a Data-Tier Application is in my terms.
Basically it is a Microsoft tool that allows you to package the current database and deploy to other application database environments. If the database already exists in other environments the package will update that database and bring the database to the current version.
Disclaimer- Data-Tier only extracts database objects. For deploying data changes you might want to take a look at a BAC PAC.
What are the benefits of using a DAC PAC?
- Reduces user error when performing database changes
- Reduces time for database deployments
- Don’t have to deal different script versions
- Actually don’t deal with any scripts; if there are last minute changes done on development database you can go extract the data-tier from that database.
How do I create a DAC PAC?
I am mostly familiar with using through SQL Server Management Studio. You can right click the database you wish to package and in Tasks select Extract Data-Tier Application. A DAC PAC can also be scripted but that is unknown territory to me.
How do I deploy a DAC PAC?
You can apply using SQL Management studio. Same approach as the packaging but this time you want select the database you are applying the package to and in tasks select ‘ Upgrade Data-Tier Application’ That will bring up a wizard that will help you through process. Applying the DAC PAC through scripts is also unknown to me but I promise to step into that territory soon.
What versions can I use a DAC PAC with?
My understanding is that it was introduced in SQL Server 2008 R2 but you shouldn’t even be using that versions as it has already reached end of support from Microsoft.
I could keep on going but I don’t think this is a good idea. In my next post I will share issues I encountered while trying to deploy a DAC PAC.
Feedback is always appreciated!