17
Database Projects Within Visual Studio Ronnie Hicks Consultant http://about.me/ronniehicks SQL Server Data Tools

Database projects within visual studio

Embed Size (px)

DESCRIPTION

Using Database Projects within Visual Studio (thanks to SQL Server Data Tools) can help bridge a gap between developers who need to test their applications against database changes they need and Database Administrators who like to safeguard their servers. This slide deck was used as part of Days of Dot Net 2014 by Ronnie Hicks for his presentation, and contains useful information for getting started with database projects.

Citation preview

Page 1: Database projects within visual studio

Database Projects

Within Visual Studio

Ronnie Hicks

Consultant

http://about.me/ronniehicks

SQL Server Data Tools

Page 2: Database projects within visual studio

Platinum Sponsors

Silver Sponsors

Gold Sponsors

Page 3: Database projects within visual studio

Conference Mobile App

• dodn14.azurewebsites.net

• Quick access to conference info

• Build your custom agenda

• Anonymously rate the sessions you attended

• Share with the Twitter-verse

Page 4: Database projects within visual studio

Agenda

• Database ALM

• Intro to Database Projects

• SQL Server Data Tools (SSDT)

• DAC Framework (DACFx)

• Data-Tier Application Package

(DACPAC)

Database management nirvana is

within your grasp with these

features!

Page 5: Database projects within visual studio

Database ALM is too hard!

Refactoring pain Development cycle

Database

promotion across

environments

Application/

Database

Synchronization

Page 6: Database projects within visual studio

Database Projects (and SSDT) to the rescue!

Buffered

Declarative editing

Model-based

design and

validation

Local testing and

promotion Source Control

SQL Unit TestsPre/Post deploy

scripts SnapshotsDrift detection and

comparisons

Page 7: Database projects within visual studio

What is a Database Project?

Offline development of SQL Server Databases

Project-based development

Developer isolation

Rich T-SQL support

Automatic script generation

Pre-Deploy

Post-Deploy

Refactor Log

Verification against the “Model”

Coding standards enforcement

Page 8: Database projects within visual studio

Intro to Database Project Demo

Page 9: Database projects within visual studio

SQL Server Data Tools (SSDT)

Data

Comparison

SQL

Language

Services

SQL Server

Object

Explorer

Table

Designer

Buffered

Declarative

Editing

Database

Publishing

SQL

Debugging

Schema

Comparison

SQL/CLR

Isolated

Local

Database

Runtime

SQL Static

Code

Analysis

Database

Unit Testing

Page 10: Database projects within visual studio

DAC Framework (DACFx)

Introduced in SQL Server 2008 R2

Suite of tools, APIs and services

Handles all DACPAC and BACPAC processing

Microsoft.SqlServer.Dac (DAC API)

Page 11: Database projects within visual studio
Page 12: Database projects within visual studio

Data Tier Application Package (DACPAC)

Self-contained unit of SQL Server database deployment

Supported by SQL Server 2005 & above, including SQL Azure

Continuous Deployment

DAC properties within SQL

DAC Versioning

Page 13: Database projects within visual studio

Demos

Create a project from an existing database

Make some changes to this new project

Verify that the changes work

Use SQL Debugger to test these changes in LocalDB

Write some Unit tests

Deploy this database to SQL Azure and update the existing database

Page 14: Database projects within visual studio

That’s why Database Projects rock!

• Source Control for SQL

Server

• Database versions

coincide with application,

not just a resource

• Side-by-side SQL/CLR

DACFx and DACPACsSQL Server Data Tools

(SSDT)

Data-Tier Application

(DAC)Multi-team

collaboration

Page 15: Database projects within visual studio

Questions?

Page 16: Database projects within visual studio

Thanks!

Page 17: Database projects within visual studio

Fun Stuff Downstairs