SlideShare a Scribd company logo
Managing Database Project with Visual Studio, SSDT 
and TFS
About myself: 
• Seasoned data architect/DBA with 15 years of SQL Server experience 
• Independent consultant, currently Technical Delivery Manager at 
Government of Alberta 
• Microsoft Certified System Engineer: MCSE 
• Oracle Certified Professional: Oracle DBA 
• IBM Certified Solution Expert: DB2 UDB 
http://netdbsolutions.com 
https://twitter.com/HarryZheng 
http://ca.linkedin.com/in/harryzheng 
https://www.facebook.com/Harry.H.Zheng 
2
Session agenda 
1. Evolution of SSDT 
2. Create a database project with Visual Studio / SSDT 
3. Build and deploy database project 
4. Check in the project to Team Foundation Server (TFS) 
5. Manage database changes with SSDT and TFS 
6. Seed reference data and other test data for deployment 
7. Database Unit test and deployment packaging 
3
1.1 What is SSDT 
• Free download from MSDN 
• http://msdn.microsoft.com/en-US/data/tools.aspx 
4
1.2 Evolving of SSDT 
• Visual Studio 2005 DB Pro - Data Dude 
• Visual Studio Team System 2008 Database Edition 
• Visual Studio 2010 Database Project 
----------------------------------------------------------------- 
• SSDT 
• Visual Studio 2010 SSDT 
• Visual Studio 2012 SSDT 
Latest news: http://blogs.msdn.com/b/ssdt/ 
5
1.3 Visual Studio 2010 v.s. SSDT 2010 
Confusion on Visual Studio 2010 when selecting 
project template 
•Database Project templates – DB Pro style 
• Server Project 
• SQL 2005 
• SQL 2008 
•SSDT Database Project Template 
6
VS 2010 Database Project Templates 
7
SSDT Database Project Template 
8
1.4 Why SSDT 
• Manage database objects from Visual Studio – unified interface 
• Manage database version with source control tools, e.g. TFS 
• Refactoring 
• Schema Comparison 
• Database Unit Test 
9
1.5 SSDT Features 
• Solution Explorer 
• SQL Server Object Explorer – including Project Schema View 
• T-SQL Query Window 
• Online Connected Development 
• Offline Project Development – (localdb)Projects 
• Database Snapshot 
• Target switch to different SQL Server versions 
• Schema compare between: 
• Database 
• Database project 
• Project snapshot 
10
1.6 SSDT Limitations 
Not feature complete v.s. VS Database Professional (DBPro) 
•No data compare (this feature is available now) 
•No data generation (this feature is available now) 
Third party tool: 
•Red Gate Data Compare 
•Red Gate Data Generation 
11
Session agenda 
1. Evolution of SSDT 
2. Create a database project with Visual Studio / SSDT 
3. Build and deploy database project 
4. Check in the project to Team Foundation Server (TFS) 
5. Manage database changes with SSDT and TFS 
6. Seed reference data and other test data for deployment 
7. Database Unit test and deployment packaging 
12
2.1 Create a brand new database 
project 
• Add Member table from Solution Explorer 
• Update PK comumn to MemberID 
• Set Identity on MemberID 
• Add index IX_Member_BirthDate 
• Add Meeting table and MeetingAttendee table 
• Demo 
13
2.2 Import existing database into 
project 
1. Design Data Model in PowerDesigner 
2. Generate SQL Script from PowerDesigner 
3. Run SQL Script to local SQL Instance 
4. Import existing database to create the database project 
• Demo 
14
2.3 Create a project snapshot 
• Snapshot – point in time project objects 
Demo 
1 
5
Session agenda 
1. Evolution of SSDT 
2. Create a database project with Visual Studio / SSDT 
3. Build and deploy database project 
4. Check in the project to Team Foundation Server (TFS) 
5. Manage database changes with SSDT and TFS 
6. Seed reference data and other test data for deployment 
7. Database Unit test and deployment packaging 
16
3.1 Code Analysis 
• Add SP: uspShowMeetingAttendee with “select * from” 
• Build project 
• Project -> Property -> Code Analysis 
• Build project 
• Update Sp to select FirstName, LastName 
• Build project 
Demo 
17
3.2 Publish project 
• Publish to Integration 
• Publish to Windows Azure SQL Database 
Demo 
1 
8
Session agenda 
1. Evolution of SSDT 
2. Create a database project with Visual Studio / SSDT 
3. Build and deploy database project 
4. Check in the project to Team Foundation Server (TFS) 
5. Manage database changes with SSDT and TFS 
6. Seed reference data and other test data for deployment 
7. Database Unit test and deployment packaging 
19
4. Check in the project to Team 
Foundation Server (TFS) 
• Protect database schema objects 
• Track schema changes 
Demo 
• Check in database project 
20
Session agenda 
1. Evolution of SSDT 
2. Create a database project with Visual Studio / SSDT 
3. Build and deploy database project 
4. Check in the project to Team Foundation Server (TFS) 
5. Manage database changes with SSDT and TFS 
6. Seed reference data and other test data for deployment 
7. Database Unit test and deployment packaging 
21
5.1 Manage Table Change 
• Change Member.LastName to varchar 
• Checkin change 
• Inspect TFS history 
22
5.2 Refactor 
•Update table Member 
•Refactor Member.LastName to SurName 
•Inspect uspShowMeetingAttendee 
Demo 
23
5.3 Schema Compare 
Schema Compare 
•Compare Project to live Database 
•Update target database 
•Compare again 
•Schema compare options 
2 
4
Session agenda 
1. Evolution of SSDT 
2. Create a database project with Visual Studio / SSDT 
3. Build and deploy database project 
4. Check in the project to Team Foundation Server (TFS) 
5. Manage database changes with SSDT and TFS 
6. Seed reference data and other test data for deployment 
7. Database Unit test and deployment packaging 
25
6.1 Seed data with SQL Script 
• Add sql script to PostDeploymentScript 
• SSDT allows script data out 
Demo 
26
6.2 Seed data with BCP 
• BCP file in on PostDeploymentScript 
2 
7
6.3 Seed Data with Restore 
• Create a separate Seed Database to track seed data 
• Backup seed database to network share 
• Restore Seed database to target before deployment 
• Publish database to update target schema 
• Seed data remains 
2 
8
Session agenda 
1. Evolution of SSDT 
2. Create a database project with Visual Studio / SSDT 
3. Build and deploy database project 
4. Check in the project to Team Foundation Server (TFS) 
5. Manage database changes with SSDT and TFS 
6. Seed reference data and other test data for deployment 
7. Database Unit test and deployment packaging 
29
7.1 Database Change Work Flow 
1. Code Change 
2. Database build – code analysis 
3. Database deployment to locadb 
4. Data change deployment to localdb 
5. Database unit test against localdb 
6. Publish database to Testing env 
7. Publish database to Production 
3 
0
7.2 Database Unit Test 
1. Create a test project 
2. Add database test 
3. Build test project 
4. Switch to Test Explorer 
5. Run all tests 
6. Exam test results 
Demo 
3 
1
7.2 Database Deployment 
1. Schema Compare to generate schema change script 
2. Data Compare to generate data change script 
3. Script 1 + 2 = Deployment package 
3 
2
Ad

More Related Content

What's hot (20)

Sql 2016 - What's New
Sql 2016 - What's NewSql 2016 - What's New
Sql 2016 - What's New
dpcobb
 
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginnersSQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
Tobias Koprowski
 
Maximizing sql 2012 performance for share point 2013 final
Maximizing sql 2012 performance for share point 2013 finalMaximizing sql 2012 performance for share point 2013 final
Maximizing sql 2012 performance for share point 2013 final
Vinh Nguyen
 
Exploring sql server 2016 bi
Exploring sql server 2016 biExploring sql server 2016 bi
Exploring sql server 2016 bi
Antonios Chatzipavlis
 
Introducing Microsoft SQL Server 2012
Introducing Microsoft SQL Server 2012Introducing Microsoft SQL Server 2012
Introducing Microsoft SQL Server 2012
Intergen
 
SQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and EnhancementsSQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and Enhancements
John Martin
 
SQL Server 2016: Just a Few of Our DBA's Favorite Things
SQL Server 2016: Just a Few of Our DBA's Favorite ThingsSQL Server 2016: Just a Few of Our DBA's Favorite Things
SQL Server 2016: Just a Few of Our DBA's Favorite Things
Hostway|HOSTING
 
Liquibase – a time machine for your data
Liquibase – a time machine for your dataLiquibase – a time machine for your data
Liquibase – a time machine for your data
Neev Technologies
 
Advanced SQL Server Performance Tuning | IDERA
Advanced SQL Server Performance Tuning | IDERAAdvanced SQL Server Performance Tuning | IDERA
Advanced SQL Server Performance Tuning | IDERA
IDERA Software
 
Using extended events for troubleshooting sql server
Using extended events for troubleshooting sql serverUsing extended events for troubleshooting sql server
Using extended events for troubleshooting sql server
Antonios Chatzipavlis
 
Liquibase for java developers
Liquibase for java developersLiquibase for java developers
Liquibase for java developers
Illia Seleznov
 
Spark
SparkSpark
Spark
fatemehjamalii
 
Stretch db sql server 2016 (sn0028)
Stretch db   sql server 2016 (sn0028)Stretch db   sql server 2016 (sn0028)
Stretch db sql server 2016 (sn0028)
Antonios Chatzipavlis
 
SQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DACSQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DAC
sqlserver.co.il
 
Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012
sqlserver.co.il
 
Microsoft SQL Server internals & architecture
Microsoft SQL Server internals & architectureMicrosoft SQL Server internals & architecture
Microsoft SQL Server internals & architecture
Kevin Kline
 
A to z for sql azure databases
A to z for sql azure databasesA to z for sql azure databases
A to z for sql azure databases
Antonios Chatzipavlis
 
First Look to SSIS 2012
First Look to SSIS 2012First Look to SSIS 2012
First Look to SSIS 2012
Pedro Perfeito
 
Optimizing SQL Server 2012 for SharePoint 2013
Optimizing SQL Server 2012 for SharePoint 2013Optimizing SQL Server 2012 for SharePoint 2013
Optimizing SQL Server 2012 for SharePoint 2013
SharePoint Saturday New Jersey
 
SQL Server 2019 Data Virtualization
SQL Server 2019 Data VirtualizationSQL Server 2019 Data Virtualization
SQL Server 2019 Data Virtualization
Matthew W. Bowers
 
Sql 2016 - What's New
Sql 2016 - What's NewSql 2016 - What's New
Sql 2016 - What's New
dpcobb
 
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginnersSQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
Tobias Koprowski
 
Maximizing sql 2012 performance for share point 2013 final
Maximizing sql 2012 performance for share point 2013 finalMaximizing sql 2012 performance for share point 2013 final
Maximizing sql 2012 performance for share point 2013 final
Vinh Nguyen
 
Introducing Microsoft SQL Server 2012
Introducing Microsoft SQL Server 2012Introducing Microsoft SQL Server 2012
Introducing Microsoft SQL Server 2012
Intergen
 
SQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and EnhancementsSQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and Enhancements
John Martin
 
SQL Server 2016: Just a Few of Our DBA's Favorite Things
SQL Server 2016: Just a Few of Our DBA's Favorite ThingsSQL Server 2016: Just a Few of Our DBA's Favorite Things
SQL Server 2016: Just a Few of Our DBA's Favorite Things
Hostway|HOSTING
 
Liquibase – a time machine for your data
Liquibase – a time machine for your dataLiquibase – a time machine for your data
Liquibase – a time machine for your data
Neev Technologies
 
Advanced SQL Server Performance Tuning | IDERA
Advanced SQL Server Performance Tuning | IDERAAdvanced SQL Server Performance Tuning | IDERA
Advanced SQL Server Performance Tuning | IDERA
IDERA Software
 
Using extended events for troubleshooting sql server
Using extended events for troubleshooting sql serverUsing extended events for troubleshooting sql server
Using extended events for troubleshooting sql server
Antonios Chatzipavlis
 
Liquibase for java developers
Liquibase for java developersLiquibase for java developers
Liquibase for java developers
Illia Seleznov
 
SQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DACSQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DAC
sqlserver.co.il
 
Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012
sqlserver.co.il
 
Microsoft SQL Server internals & architecture
Microsoft SQL Server internals & architectureMicrosoft SQL Server internals & architecture
Microsoft SQL Server internals & architecture
Kevin Kline
 
First Look to SSIS 2012
First Look to SSIS 2012First Look to SSIS 2012
First Look to SSIS 2012
Pedro Perfeito
 
SQL Server 2019 Data Virtualization
SQL Server 2019 Data VirtualizationSQL Server 2019 Data Virtualization
SQL Server 2019 Data Virtualization
Matthew W. Bowers
 

Viewers also liked (18)

Mtp ppt soumya_sarkar
Mtp ppt soumya_sarkarMtp ppt soumya_sarkar
Mtp ppt soumya_sarkar
samarai_apoc
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester Training
Anna Russo
 
A SHOULDER SURFING RESISTANT GRAPHICAL AUTHENTICATION SYSTEM
A SHOULDER SURFING RESISTANT GRAPHICAL AUTHENTICATION SYSTEMA SHOULDER SURFING RESISTANT GRAPHICAL AUTHENTICATION SYSTEM
A SHOULDER SURFING RESISTANT GRAPHICAL AUTHENTICATION SYSTEM
Nexgen Technology
 
Graphical Based Authentication (S3PAS)
Graphical Based Authentication (S3PAS)Graphical Based Authentication (S3PAS)
Graphical Based Authentication (S3PAS)
Ketan Patil
 
Soloway.company.2
Soloway.company.2Soloway.company.2
Soloway.company.2
David Wilemski
 
Graphical password
Graphical passwordGraphical password
Graphical password
sowji888
 
Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010
Ed Blankenship
 
Graphical password authentication system with association of sound
Graphical password authentication system with association of soundGraphical password authentication system with association of sound
Graphical password authentication system with association of sound
Vikram Verma
 
Graphical Password Authentication
Graphical Password AuthenticationGraphical Password Authentication
Graphical Password Authentication
Abhijit Akotkar
 
Graphical password authentication
Graphical password authenticationGraphical password authentication
Graphical password authentication
shalini singh
 
Modern database management jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,  Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management jeffrey a. hoffer, mary b. prescott,
BlackIce86
 
Graphical password authentication
Graphical password authenticationGraphical password authentication
Graphical password authentication
Asim Kumar Pathak
 
Project report On MSM (Mobile Shop Management)
Project report On MSM (Mobile Shop Management)Project report On MSM (Mobile Shop Management)
Project report On MSM (Mobile Shop Management)
Dinesh Jogdand
 
Project report on mobile shop management
Project report on mobile shop managementProject report on mobile shop management
Project report on mobile shop management
Dinesh Jogdand
 
Dbms models
Dbms modelsDbms models
Dbms models
devgocool
 
Ppt for graphical password authentication using cued click points
Ppt for graphical password authentication using cued click pointsPpt for graphical password authentication using cued click points
Ppt for graphical password authentication using cued click points
Hari Krishnan
 
Payroll management
Payroll   managementPayroll   management
Payroll management
Prateek Agrawal
 
INSURANCE DATABASE MANAGEMENT SYSTEM
INSURANCE DATABASE MANAGEMENT SYSTEMINSURANCE DATABASE MANAGEMENT SYSTEM
INSURANCE DATABASE MANAGEMENT SYSTEM
sangeethavasan
 
Mtp ppt soumya_sarkar
Mtp ppt soumya_sarkarMtp ppt soumya_sarkar
Mtp ppt soumya_sarkar
samarai_apoc
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester Training
Anna Russo
 
A SHOULDER SURFING RESISTANT GRAPHICAL AUTHENTICATION SYSTEM
A SHOULDER SURFING RESISTANT GRAPHICAL AUTHENTICATION SYSTEMA SHOULDER SURFING RESISTANT GRAPHICAL AUTHENTICATION SYSTEM
A SHOULDER SURFING RESISTANT GRAPHICAL AUTHENTICATION SYSTEM
Nexgen Technology
 
Graphical Based Authentication (S3PAS)
Graphical Based Authentication (S3PAS)Graphical Based Authentication (S3PAS)
Graphical Based Authentication (S3PAS)
Ketan Patil
 
Graphical password
Graphical passwordGraphical password
Graphical password
sowji888
 
Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010
Ed Blankenship
 
Graphical password authentication system with association of sound
Graphical password authentication system with association of soundGraphical password authentication system with association of sound
Graphical password authentication system with association of sound
Vikram Verma
 
Graphical Password Authentication
Graphical Password AuthenticationGraphical Password Authentication
Graphical Password Authentication
Abhijit Akotkar
 
Graphical password authentication
Graphical password authenticationGraphical password authentication
Graphical password authentication
shalini singh
 
Modern database management jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,  Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management jeffrey a. hoffer, mary b. prescott,
BlackIce86
 
Graphical password authentication
Graphical password authenticationGraphical password authentication
Graphical password authentication
Asim Kumar Pathak
 
Project report On MSM (Mobile Shop Management)
Project report On MSM (Mobile Shop Management)Project report On MSM (Mobile Shop Management)
Project report On MSM (Mobile Shop Management)
Dinesh Jogdand
 
Project report on mobile shop management
Project report on mobile shop managementProject report on mobile shop management
Project report on mobile shop management
Dinesh Jogdand
 
Ppt for graphical password authentication using cued click points
Ppt for graphical password authentication using cued click pointsPpt for graphical password authentication using cued click points
Ppt for graphical password authentication using cued click points
Hari Krishnan
 
INSURANCE DATABASE MANAGEMENT SYSTEM
INSURANCE DATABASE MANAGEMENT SYSTEMINSURANCE DATABASE MANAGEMENT SYSTEM
INSURANCE DATABASE MANAGEMENT SYSTEM
sangeethavasan
 
Ad

Similar to Managing database project with Visual Studio SSDT and TFS (20)

Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Dr. John Tunnicliffe
 
Database continuous integration, unit test and functional test
Database continuous integration, unit test and functional testDatabase continuous integration, unit test and functional test
Database continuous integration, unit test and functional test
Harry Zheng
 
(20.05.2009) Cumuy Presenta - Más tecnologías interesantes para conocer - PPT 2
(20.05.2009) Cumuy Presenta - Más tecnologías interesantes para conocer - PPT 2(20.05.2009) Cumuy Presenta - Más tecnologías interesantes para conocer - PPT 2
(20.05.2009) Cumuy Presenta - Más tecnologías interesantes para conocer - PPT 2
Microsoft Argentina y Uruguay [Official Space]
 
Microsoft Azure Data Factory Hands-On Lab Overview Slides
Microsoft Azure Data Factory Hands-On Lab Overview SlidesMicrosoft Azure Data Factory Hands-On Lab Overview Slides
Microsoft Azure Data Factory Hands-On Lab Overview Slides
Mark Kromer
 
Database CI Demo Using Sql Server
Database CI  Demo Using Sql ServerDatabase CI  Demo Using Sql Server
Database CI Demo Using Sql Server
Umesh Kumar
 
Splitgraph: AHL talk
Splitgraph: AHL talkSplitgraph: AHL talk
Splitgraph: AHL talk
Splitgraph
 
SQL in Version Control using SQL Server Database Projects
SQL in Version Control using SQL Server Database ProjectsSQL in Version Control using SQL Server Database Projects
SQL in Version Control using SQL Server Database Projects
floydhilton
 
Database Schema Management & Deployment using SQL Server Data Tools (SSDT)
Database Schema Management & Deployment using SQL Server Data Tools (SSDT)Database Schema Management & Deployment using SQL Server Data Tools (SSDT)
Database Schema Management & Deployment using SQL Server Data Tools (SSDT)
Microsoft TechNet - Belgium and Luxembourg
 
Bringing DevOps to the Database
Bringing DevOps to the DatabaseBringing DevOps to the Database
Bringing DevOps to the Database
Michaela Murray
 
05 entity framework
05 entity framework05 entity framework
05 entity framework
Bat Programmer
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and Liquibase
Dan Stine
 
Plantilla oracle
Plantilla oraclePlantilla oracle
Plantilla oracle
Uriel Barrales Garrido
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
Davide Mauri
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive�SSIS Monitoring Deep Dive�
SSIS Monitoring Deep Dive
SolidQIT
 
Day 1 - Technical Bootcamp azure synapse analytics
Day 1 - Technical Bootcamp azure synapse analyticsDay 1 - Technical Bootcamp azure synapse analytics
Day 1 - Technical Bootcamp azure synapse analytics
Armand272
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for Developers
Sarah Dutkiewicz
 
Migrating Data and Databases to Azure
Migrating Data and Databases to AzureMigrating Data and Databases to Azure
Migrating Data and Databases to Azure
Karen Lopez
 
ow.ppt
ow.pptow.ppt
ow.ppt
ssuser96a63c
 
ow.ppt
ow.pptow.ppt
ow.ppt
NalamalpuBhakthavats
 
kjdiakdnfdifjadsjkjklljlldasgjdjdljgfldjgldjgldjgl.ppt
kjdiakdnfdifjadsjkjklljlldasgjdjdljgfldjgldjgldjgl.pptkjdiakdnfdifjadsjkjklljlldasgjdjdljgfldjgldjgldjgl.ppt
kjdiakdnfdifjadsjkjklljlldasgjdjdljgfldjgldjgldjgl.ppt
Brahamam Veera
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Dr. John Tunnicliffe
 
Database continuous integration, unit test and functional test
Database continuous integration, unit test and functional testDatabase continuous integration, unit test and functional test
Database continuous integration, unit test and functional test
Harry Zheng
 
Microsoft Azure Data Factory Hands-On Lab Overview Slides
Microsoft Azure Data Factory Hands-On Lab Overview SlidesMicrosoft Azure Data Factory Hands-On Lab Overview Slides
Microsoft Azure Data Factory Hands-On Lab Overview Slides
Mark Kromer
 
Database CI Demo Using Sql Server
Database CI  Demo Using Sql ServerDatabase CI  Demo Using Sql Server
Database CI Demo Using Sql Server
Umesh Kumar
 
Splitgraph: AHL talk
Splitgraph: AHL talkSplitgraph: AHL talk
Splitgraph: AHL talk
Splitgraph
 
SQL in Version Control using SQL Server Database Projects
SQL in Version Control using SQL Server Database ProjectsSQL in Version Control using SQL Server Database Projects
SQL in Version Control using SQL Server Database Projects
floydhilton
 
Bringing DevOps to the Database
Bringing DevOps to the DatabaseBringing DevOps to the Database
Bringing DevOps to the Database
Michaela Murray
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and Liquibase
Dan Stine
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
Davide Mauri
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive�SSIS Monitoring Deep Dive�
SSIS Monitoring Deep Dive
SolidQIT
 
Day 1 - Technical Bootcamp azure synapse analytics
Day 1 - Technical Bootcamp azure synapse analyticsDay 1 - Technical Bootcamp azure synapse analytics
Day 1 - Technical Bootcamp azure synapse analytics
Armand272
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for Developers
Sarah Dutkiewicz
 
Migrating Data and Databases to Azure
Migrating Data and Databases to AzureMigrating Data and Databases to Azure
Migrating Data and Databases to Azure
Karen Lopez
 
kjdiakdnfdifjadsjkjklljlldasgjdjdljgfldjgldjgldjgl.ppt
kjdiakdnfdifjadsjkjklljlldasgjdjdljgfldjgldjgldjgl.pptkjdiakdnfdifjadsjkjklljlldasgjdjdljgfldjgldjgldjgl.ppt
kjdiakdnfdifjadsjkjklljlldasgjdjdljgfldjgldjgldjgl.ppt
Brahamam Veera
 
Ad

Recently uploaded (20)

Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 

Managing database project with Visual Studio SSDT and TFS

  • 1. Managing Database Project with Visual Studio, SSDT and TFS
  • 2. About myself: • Seasoned data architect/DBA with 15 years of SQL Server experience • Independent consultant, currently Technical Delivery Manager at Government of Alberta • Microsoft Certified System Engineer: MCSE • Oracle Certified Professional: Oracle DBA • IBM Certified Solution Expert: DB2 UDB http://netdbsolutions.com https://twitter.com/HarryZheng http://ca.linkedin.com/in/harryzheng https://www.facebook.com/Harry.H.Zheng 2
  • 3. Session agenda 1. Evolution of SSDT 2. Create a database project with Visual Studio / SSDT 3. Build and deploy database project 4. Check in the project to Team Foundation Server (TFS) 5. Manage database changes with SSDT and TFS 6. Seed reference data and other test data for deployment 7. Database Unit test and deployment packaging 3
  • 4. 1.1 What is SSDT • Free download from MSDN • http://msdn.microsoft.com/en-US/data/tools.aspx 4
  • 5. 1.2 Evolving of SSDT • Visual Studio 2005 DB Pro - Data Dude • Visual Studio Team System 2008 Database Edition • Visual Studio 2010 Database Project ----------------------------------------------------------------- • SSDT • Visual Studio 2010 SSDT • Visual Studio 2012 SSDT Latest news: http://blogs.msdn.com/b/ssdt/ 5
  • 6. 1.3 Visual Studio 2010 v.s. SSDT 2010 Confusion on Visual Studio 2010 when selecting project template •Database Project templates – DB Pro style • Server Project • SQL 2005 • SQL 2008 •SSDT Database Project Template 6
  • 7. VS 2010 Database Project Templates 7
  • 9. 1.4 Why SSDT • Manage database objects from Visual Studio – unified interface • Manage database version with source control tools, e.g. TFS • Refactoring • Schema Comparison • Database Unit Test 9
  • 10. 1.5 SSDT Features • Solution Explorer • SQL Server Object Explorer – including Project Schema View • T-SQL Query Window • Online Connected Development • Offline Project Development – (localdb)Projects • Database Snapshot • Target switch to different SQL Server versions • Schema compare between: • Database • Database project • Project snapshot 10
  • 11. 1.6 SSDT Limitations Not feature complete v.s. VS Database Professional (DBPro) •No data compare (this feature is available now) •No data generation (this feature is available now) Third party tool: •Red Gate Data Compare •Red Gate Data Generation 11
  • 12. Session agenda 1. Evolution of SSDT 2. Create a database project with Visual Studio / SSDT 3. Build and deploy database project 4. Check in the project to Team Foundation Server (TFS) 5. Manage database changes with SSDT and TFS 6. Seed reference data and other test data for deployment 7. Database Unit test and deployment packaging 12
  • 13. 2.1 Create a brand new database project • Add Member table from Solution Explorer • Update PK comumn to MemberID • Set Identity on MemberID • Add index IX_Member_BirthDate • Add Meeting table and MeetingAttendee table • Demo 13
  • 14. 2.2 Import existing database into project 1. Design Data Model in PowerDesigner 2. Generate SQL Script from PowerDesigner 3. Run SQL Script to local SQL Instance 4. Import existing database to create the database project • Demo 14
  • 15. 2.3 Create a project snapshot • Snapshot – point in time project objects Demo 1 5
  • 16. Session agenda 1. Evolution of SSDT 2. Create a database project with Visual Studio / SSDT 3. Build and deploy database project 4. Check in the project to Team Foundation Server (TFS) 5. Manage database changes with SSDT and TFS 6. Seed reference data and other test data for deployment 7. Database Unit test and deployment packaging 16
  • 17. 3.1 Code Analysis • Add SP: uspShowMeetingAttendee with “select * from” • Build project • Project -> Property -> Code Analysis • Build project • Update Sp to select FirstName, LastName • Build project Demo 17
  • 18. 3.2 Publish project • Publish to Integration • Publish to Windows Azure SQL Database Demo 1 8
  • 19. Session agenda 1. Evolution of SSDT 2. Create a database project with Visual Studio / SSDT 3. Build and deploy database project 4. Check in the project to Team Foundation Server (TFS) 5. Manage database changes with SSDT and TFS 6. Seed reference data and other test data for deployment 7. Database Unit test and deployment packaging 19
  • 20. 4. Check in the project to Team Foundation Server (TFS) • Protect database schema objects • Track schema changes Demo • Check in database project 20
  • 21. Session agenda 1. Evolution of SSDT 2. Create a database project with Visual Studio / SSDT 3. Build and deploy database project 4. Check in the project to Team Foundation Server (TFS) 5. Manage database changes with SSDT and TFS 6. Seed reference data and other test data for deployment 7. Database Unit test and deployment packaging 21
  • 22. 5.1 Manage Table Change • Change Member.LastName to varchar • Checkin change • Inspect TFS history 22
  • 23. 5.2 Refactor •Update table Member •Refactor Member.LastName to SurName •Inspect uspShowMeetingAttendee Demo 23
  • 24. 5.3 Schema Compare Schema Compare •Compare Project to live Database •Update target database •Compare again •Schema compare options 2 4
  • 25. Session agenda 1. Evolution of SSDT 2. Create a database project with Visual Studio / SSDT 3. Build and deploy database project 4. Check in the project to Team Foundation Server (TFS) 5. Manage database changes with SSDT and TFS 6. Seed reference data and other test data for deployment 7. Database Unit test and deployment packaging 25
  • 26. 6.1 Seed data with SQL Script • Add sql script to PostDeploymentScript • SSDT allows script data out Demo 26
  • 27. 6.2 Seed data with BCP • BCP file in on PostDeploymentScript 2 7
  • 28. 6.3 Seed Data with Restore • Create a separate Seed Database to track seed data • Backup seed database to network share • Restore Seed database to target before deployment • Publish database to update target schema • Seed data remains 2 8
  • 29. Session agenda 1. Evolution of SSDT 2. Create a database project with Visual Studio / SSDT 3. Build and deploy database project 4. Check in the project to Team Foundation Server (TFS) 5. Manage database changes with SSDT and TFS 6. Seed reference data and other test data for deployment 7. Database Unit test and deployment packaging 29
  • 30. 7.1 Database Change Work Flow 1. Code Change 2. Database build – code analysis 3. Database deployment to locadb 4. Data change deployment to localdb 5. Database unit test against localdb 6. Publish database to Testing env 7. Publish database to Production 3 0
  • 31. 7.2 Database Unit Test 1. Create a test project 2. Add database test 3. Build test project 4. Switch to Test Explorer 5. Run all tests 6. Exam test results Demo 3 1
  • 32. 7.2 Database Deployment 1. Schema Compare to generate schema change script 2. Data Compare to generate data change script 3. Script 1 + 2 = Deployment package 3 2