AN OVERVIEW & INTRODUCTION TO USING DACPACS
Data-Tier Applications{Application and Multi-Server Management}
Neil HamblyYork Oct
2010
Neil Hambly MS SQL Server Databases (12+ Yrs)
Permanent RolesMDSL (London) July 2010 – Present
DB Architect Editions: SQL 2008 (R2), SQL 2005Key Features: Mirroring, Service Broker, SSRS,SSAS
iProfile (London) Oct 2004 – June 2010DB Architect | DBA | DB Developer (Database Lead )Editions: SQL 2008 (R2), SQL 2005, SQL 2000Key Features: Clustering, Service Broker, Replication, SSRS
Accenture (Dublin) June 1999– Oct 2004DBA | DB Developer (Global BI - Team Leader) Editions: SQL 2000, SQL 7, SQL6.5Key Features: Replication, DTS, OLAP
Contractor RolesBBC 14 Months (DB Support )ABN AMRO 16 Months (DB Developer )Editions: SQL7, SQL6.5
UK SQL User Group (London) Organiser /
Presenter
Twitter: @Neil_HamblyEmail: [email protected]
Neils Blog @http://sqlblogcasts.com/blogs/NeilHambly
Agenda Overview
Tools to develop Data Tier ApplicationsData Application ComponentsWhere do we put the DACWhat’s in the Data Tier ApplicationComparing DACs with Database projectsLimitations of object supported in V1DAC and UCP’sDemo’s (SSMS & Visual Studio 2010)Q&A
Tools to Develop Data Tier Applications
You will need the following items
SQL Server 2008 R2
DAC Projects in Pro+ SKUs
Data-Tier Application Components
Single file filename.dacpac
Combines logical & Physical objects along with deployment policies
Simpler deployment options Install / Uninstall
/Upgrade Repair (in future release) filename.dacpa
c
Policies
Logical
Physical
Where do we put the DAC
Data-tier applications are deployed to a database instance (or multiple instances)
SQL Server 2008 R2
But otherwise are the same as other user Databases
What’s in the Data-Tier Application
.dacpacs are a zip file, containing multiple XML files
Database object definitionsServer-selection policiesApplication properties (versions, App name…)Instance-level objects (logins, users...)pre & post-deployment scripts
Current version has limitations of objects supported
DAC vs Database Projects?
Database projects and Data-tier Application projects can operate side by side
Database Projects Data-Tier Application Projects
Target applications Mission or business critical Departmental sized (< 20GB)
SQL Server object types
All SQL Server objects Only certain SQL Server objects currently supported in Version 1
Database support SQL Server 2005, 2008 & 2008 R2 and third-party databases
SQL Server 2008 R2 (Supported on SQL Server 2008 SP2)
Upgrade(schema + data)
Deploy generates SQL scripts;data stays in place
Upgrade is automated;data is migrated (Dependent)
Before .dacpacs development was done in various different methodsSometimes this is a database project, below is a quick comparison of the differences where a database project or DAC are the most suitable method
DAC V1 Limitations (Objects Not Supported)
Objects marked for deprecation(Including defaults, rules and numbered stored procedures)
CLR objects and data types (Spatial, Geography, Geometry, Hierarchy ID data types, SQL assemblies, CLR stored procedures and functions)
User-defined aggregates and user-defined (CLR) types
Partition schemes and partition functions
XML schema collections, XML indexes and spatial indexes
Service broker objects Filestream columns
Symmetric keys, asymmetric keys, certificates
DDL triggers Application roles Full-text catalog objects Extended stored procedures Encrypted objects
(Encrypted stored procedures, views, functions, and triggers)
Objects containing cross-database dependencies and linked server references
Extended properties Synonyms
DACPAC & UCP’S
DBA
SQL Server Management Studio
Install the .dacpac & monitor it’s usage via a UCP
Utility Explorer content has useful Videos to help you with UCP’s
DEMO TIMESeveral demo’s now will follow in SSMS & Visual Studio 2010 to illustrate the concepts
• Demo 1 SSMS Extracting a Database as .dacpac
• Demo 2 Visual Studio 2010 - DACPAC project
• Demo 3 SSMS Installing / Upgrading DAC databases
Latest News - (SQL Server 2008 SP2) Released 29th Sept 2010
SQL Server 2008 R2 Application and Multi-Server Management Compatibility with SQL Server 2008.
SQL Server 2008 Instance Management.With SP2 applied, an instance of the SQL Server 2008 Database Engine can be enrolled with a SQL Server 2008 R2 Utility Control Point as a managed instance of SQL Server.
Data-tier Application (DAC) Support.Instances of the SQL Server 2008 Database Engine support all DAC operations delivered in SQL Server 2008 R2 after SP2 has been applied.
You can deploy, upgrade, register, extract, and delete DACs. SP2 does not upgrade the SQL Server 2008 client tools to support DACs.
You must use the SQL Server 2008 R2 client tools, such as SQL Server Management Studio, to perform DAC operations.
Action steps give useful insight to how a DAC upgrade is performed
Creating a new version of the Database and renaming previous versions
Resources
Data-tier Application Tutorialshttp://msdn.microsoft.com/en-us/library/
ee210554(SQL.105).aspx
Data-tier Applications in SQL Server 2008 R2 whitepaperhttp://msdn.microsoft.com/en-us/library/ff381683.aspx
The End well… (until next time)
Please ask your questions clearly and loudly.
If you don’t get your questions answered now
PLEASE ask me after the session, or emails to
Thank You
Please complete feedbackSaturday Session Feedback @
www.sqlbits.com/saturdayfeedback