Database Projects in Visual Studio Improving Reliability & Productivity.

Slides:



Advertisements
Similar presentations
Develop your database with Visual Studio
Advertisements

AXC01 DIXF: The Microsoft Dynamics AX Data Import and Export Framework
Stored procedures and views You can see definitions for stored procedures and views in the demo databases but you can’t change them. For views, expand.
Part 05 – Code First Migrations and Azure Deployment Entity Framework and MVC Series Tom Perkins NTPCUG.
Access Web Apps – OK, Now What? EXTENDING ACCESS WEB APPS George Young Dawson Butte Software ACCESS DAY – OCTOBER DENVER,
Agenda Model migration vs MDS upgrade Model migration overview Model migration – how does it work? Model package Demo.
René Balzano Technology Solution Professional Data Platform Microsoft Switzerland Database Development with SQL Server Data Tools (SSDT)
Virtual techdays INDIA │ august 2010 Building ASP.NET applications using SQL Server Compact Chaitanya Solapurkar │ Partner Technical Consultant,
© 2011 PLANET TECHNOLOGIES, INC. Augmenting User Profiles with Line of Business Data Patrick Curran, MCT APRIL 28, 2012.
How a little code can help with support.. Chris Barba – Developer at Cimarex Energy Blog:
Created by the Community for the Community BizTalk & Build.
UNIT TESTING FOR SQL Prepared for SUGSA CodeLabs Alain King Paul Johnson.
Intro to Entity Framework By Shahed Chowdhuri Don’t drown in database design during WakeUpAndCode.com.
Tom Castiglia Hershey Technologies
Database Unit Test MSSQL 2008 & VS 2010 Aung Kyaw Myo.
1 Extending User Profiles with Line of Business Data Patrick Curran, MCT.
ADAPTING YOUR ETL SOLUTION TO USE SSIS 2012 Presentation by Devin Knight
Isolated Database Environments Kevin Howell February 2014.
DATABASE DEVELOPMENT WITH VSTS DATABASE EDITION By Chris Dahlberg ©2009 Aspect Software, Inc. All rights reserved. 1.
Real World SQL Server Data Tools Benjamin
Version Control and SVN ECE 297. Why Do We Need Version Control?
Virtual techdays INDIA │ august 2010 Data-tier Applications in Visual Studio 2010 Abhishek Kala │ Partner Technical Consultant, Microsoft Global.
Visual Studio 2012: A Complete IDE (Debugging & Source Control) Kevin Howell.
SSMS SQL Server Management System. SQL Server Microsoft SQL Server is a Relational Database Management System (RDBMS) Relational Database Management System.
Continuous Deployments using SSDT
Developing SQL/Server database in Visual Studio Introducing SQL /Server Data Tools Peter Lu.Net Practices Director Principle Architect Nexient March 19.
Fix: Windows 10 Error Code 0x in Mail App u/6/b/ /alexwaston14/reimage-system-repair/ /pages/Reimage-Repair-Tool/
Database Development with SQL Server Data Tools (SSDT) Björn Eriksen, Architect Evangelist DPE Microsoft
Building Your ETL Framework with Biml Meagan Longoria March 19, 2016.
1 Adding a Model. We have created an MVC web app project Added a controller class. Added a view class. Next we will add some classes for managing movies.
Others Talk, We Listen. Managing Database Projects in Visual Studio 2013.
DBMS Programs MS SQL Server & MySQL
DevOps with ASP.NET Core and Entity Framework Core
How to Start SQL Server and SSDT BI in Local
SSIS Templates, Configurations & Variables
Visual Studio Database Tools (aka SQL Server Data Tools)
Agile Analytics: Automated Builds and Deployments
SQL Server deployments
Introduction to unit and integration testing with tSQLt
Continuous Deployments using SSDT
Database Projects and Source Control (TFS)
Entity Framework Core for Enterprise Applications
Data Virtualization Community Edition
SQL Server Data Tools Gert Drapers
Database Code Management with VS 2017 and RedGate
Populating a Data Warehouse
Populating a Data Warehouse
Populating a Data Warehouse
Prove to your boss your database is sound - Unit Testing with tSQLt
CRM 2016 Solutions and Package Deployer
Populating a Data Warehouse
Visual Studio Database Tools (aka SQL Server Data Tools)
Populating a Data Warehouse
Continuous Deployments using SSDT
Continuous Deployments using SSDT
Continuous Deployments using SSDT
Database Projects and Source Control (TFS)
SSDT and Database Project Basics
What about the Data Dude?
SSIS Data Integration Data Warehouse Acceleration
SSDT, Docker, and (Azure) DevOps
SSIS Data Integration Data Warehouse Acceleration
SSDT, Docker, and (Azure) DevOps
Database Projects and Source Control (TFS)
SSIS Data Integration Data Warehouse Acceleration
PNW SQL Users Group August 10th, 2011
SSDT, Docker, and (Azure) DevOps
Samir Behara, Senior Developer, EBSCO
Presentation transcript:

Database Projects in Visual Studio Improving Reliability & Productivity

Overview  What problems are we trying to solve?  Why not Entity Framework?  Benefits of using Database Projects  Prerequisites / Requirements  Database Project Flow  Demo  Where to take it next  Acknowledgements / further reading

What problems are we trying to solve?  Good development code not being promoted into test and production databases  Bad development code being promoted into test and production databases  Too much effort  Bad schema  Stored procedures that won’t work  Logins/schemas that no longer exist but are required  Schema changes that have broken your database  Configuration data not being promoted  Tables / Schemas / Stored Procedures etc. not in source control

Why not Entity Framework?  Legacy systems – database already exists so code-first is not viable  Entity Framework might be difficult / impossible to implement at your site  EF performance issues

Benefits of Using Database Projects  Place your databases under source control  Easily migrate from development to testing to production – even automatically!  Compare schema and data before publishing  Eliminate stupid errors before they happen

Prerequisites / Requirements  Visual Studio  SQL Server Data Tools (SSDT)   Download required for 2012  Integrated with VS after 2012  Existing SQL database (hopefully obvious)

Database Project Flow  Copied straight from Jason Kassay’s presentation:

Demo

Step 1

Step 2  Right-click solution, Import -> Database

Step 3

Step 4  My experience is that I have to add a reference to the Master database  Right-click solution -> Add -> Database Reference

Let’s actually use this  Tools -> SQL Server -> New Schema Comparison  Select the database as the source  Select the project as the target  Click on compare  If there are differences you can right-click to Include/Exclude as needed  If you want, Click the Update button to update your project  Schema comparisons can be saved and added to the project  In this way you can keep your project updated to the latest version of development  Don’t forget to rebuild whenever you update!

Let’s do something slightly more useful  How about using schema compare to migrate database changes?  You can set the source to either your development database or the project  You set the target to your staging/QA/team database  You can easily apply all of these changes just by clicking on the Update button  Click on the script icon to generate a script  Database changes are migrated

One final useful step  Tools -> SQL Server -> New Data Comparison  Choose your target and source databases  Select what type of comparison to run  Differences  Source only  Target only  Identical  I have used this when working with lookup tables and configuration tables

Where to take it next?  Automation  Deployment scripts  Publish  DACPAC  SqlPackage.exe us/library/hh550080(v=vs.103).aspxhttps://msdn.microsoft.com/en- us/library/hh550080(v=vs.103).aspx

Acknowledgements/Further Reading  Jason Kassay / / /Blog:  Jason was the first person I’d seen use database projects. His presentation at SQL Saturday hinted at some of the problems that I could solve  SQL Server Data Tools (SSDT) us/library/hh272686(v=vs.103).aspxhttps://msdn.microsoft.com/en- us/library/hh272686(v=vs.103).aspx