Presentation is loading. Please wait.

Presentation is loading. Please wait.

The SSDT way or the highway (sqlproj) Craig Ottley-Thistlethwaite Data Platform Lead Data Science.

Similar presentations


Presentation on theme: "The SSDT way or the highway (sqlproj) Craig Ottley-Thistlethwaite Data Platform Lead Data Science."— Presentation transcript:

1 The SSDT way or the highway (sqlproj) Craig Ottley-Thistlethwaite Data Platform Lead Data Science

2 2 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 2 Database Technologies

3 3 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 3 This is what the highway can look like

4 4 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 4 Agenda  SQL Server Data Tools History  DAC Framework  Declarative Schema Deployment  Inside the dacpac  Pre/Post Deploy Scripts  Check/Default Constraints  Add/Remove/Rename Columns  Column Data Type Conversion  DacFx Public Model  Deploy Contributor

5 5 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 5  Project funded April 2005 (Data Dude)  Project Started July 2005  VS 2005 Team System for Database Professionals  VS 2008 Team System for Database Professionals  Re-architected to be declarative model based system  VS 2008 Team System for Database Professionals GDR R2  VS 2010 Team System for Database Professionals  Transitioned to SQL Server 2009  SQL Server Data Tools SQL Server Data Tools History Source:

6 6 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 6 Evolution.dbschema v1.1 VS 2008 GDR.dbschema v1.2 VS 2010 dbproj.dbschema v1.2 VS 2010 dbproj.sqlx v1.0 SSDT CTP3.dacpac v2.5 SSDT CTP4.dacpac v3.0 redist consumed by ALL SQL Products.dacpac v3.0 redist consumed by ALL SQL Products.dacpac v1.0 SQL 2008 R2 RC.dacpac v1.05 SQL 2008 R2 RTM.dacpac v1.1 SQL 2008 R2 SP1.dacpac v2.0 SQL 2012 RC0 Source:

7 7 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 7  Core SQL Server redistributable component which provides modelling, reverse engineering and deployment capabilities!  Managed Public API  Command-Line tools (SqlPackage.exe)  DACUnpack.exe ► Windows file handler for unpacking DACPACs to disk  DACFx Clients ► SqlPackage.exe, SSMS, SSDT, SAMP, I&E, VS Web and DB Publishing DAC Framework (DacFX) DacFx does not support state/operational properties! Source:

8 8 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 8 Declarative Schema Deployment

9 9 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 9 Agenda  SQL Server Data Tools History  DAC Framework  Declarative Schema Deployment  Inside the dacpac  Pre/Post Deploy Scripts  Check/Default Constraints  Add/Remove/Rename Columns  Column Data Type Conversion  DacFx Public Model  Deploy Contributor

10 Inside the dacpac

11 11 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 11 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. Agenda  SQL Server Data Tools History  DAC Framework  Declarative Schema Deployment  Inside the dacpac  Pre/Post Deploy Scripts  Check/Default Constraints  Add/Remove/Rename Columns  Column Data Type Conversion  DacFx Public Model  Deploy Contributor

12 Pre/Post Deployment Scripts

13 13 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 13 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. Agenda  SQL Server Data Tools History  DAC Framework  Declarative Schema Deployment  Inside the dacpac  Pre/Post Deploy Scripts  Check/Default Constraints  Add/Remove/Rename Columns  Column Data Type Conversion  DacFx Public Model  Deploy Contributor

14 Check/Default Constraints

15 15 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 15 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. Agenda  SQL Server Data Tools History  DAC Framework  Declarative Schema Deployment  Inside the dacpac  Pre/Post Deploy Scripts  Check/Default Constraints  Add/Remove/Rename Columns  Column Data Type Conversion  DacFx Public Model  Deploy Contributor

16 Add/Remove/Rename Columns

17 17 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 17 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. Agenda  SQL Server Data Tools History  DAC Framework  Declarative Schema Deployment  Inside the dacpac  Pre/Post Deploy Scripts  Check/Default Constraints  Add/Remove/Rename Columns  Column Data Type Conversion  DacFx Public Model  Deploy Contributor

18 Column Data Type Conversions

19 19 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 19 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. Agenda  SQL Server Data Tools History  DAC Framework  Declarative Schema Deployment  Inside the dacpac  Pre/Post Deploy Scripts  Check/Default Constraints  Add/Remove/Rename Columns  Column Data Type Conversion  DacFx Public Model  Deploy Contributor

20 20 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 20 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. DacFx Model API – What is it?  SSDT model’s a database’s schema, the API lets you access that model programmatically.  You can load, query and manipulate the schema to do what ever you like (within reason)  API model is loosely typed, the TSqlModel class contains loosely typed TSqlObject’s that represent all the elements in your schemaTSqlModelTSqlObject  Each object will have some properties that describe it’s state and the relationships to other objects in the model  Use strongly typed classes to find the properties/relationships of an object using TsqlModel.GetObjectsTsqlModel.GetObjects private static void ReadTheModel(TSqlModel model) { // This will get all tables. Note the use of Table.TypeClass! var tables = model.GetObjects(DacQueryScopes.Default, Table.TypeClass).ToList(); }  API does not fully support everything an SSDT project supports! Feature Supported Refactor LogYes Deployment ContributorsYes Pre/Post Deployment ScriptsNo ReferencesNo CLR ObjectsNo XML Schema CollectionsNo

21 21 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 21 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. Agenda  SQL Server Data Tools History  DAC Framework  Declarative Schema Deployment  Inside the dacpac  Pre/Post Deploy Scripts  Check/Default Constraints  Add/Remove/Rename Columns  Column Data Type Conversion  DacFx Public Model  Deploy Contributor

22 Deployment Contributor

23 23 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 23 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. Agenda  SQL Server Data Tools History  DAC Framework  Declarative Schema Deployment  Inside the dacpac  Pre/Post Deploy Scripts  Check/Default Constraints  Add/Remove/Rename Columns  Column Data Type Conversion  DacFx Public Model  Deploy Contributor

24 24 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. 24 ©2013 Experian Information Solutions, Inc. All rights reserved. Experian Public. Resources   https://github.com/dacpac https://github.com/dacpac 

25 Q&A


Download ppt "The SSDT way or the highway (sqlproj) Craig Ottley-Thistlethwaite Data Platform Lead Data Science."

Similar presentations


Ads by Google