Database projects in visual studio 2010 Anthony Brown

Slides:



Advertisements
Similar presentations
Black marble the strategic IT asset for your organisation DEVELOPMENT LIFE CYCLE USING VISUAL STUDIO TEAM EDITION FOR DB PROFESSIONALS Richard Fennell.
Advertisements

Development Life Cycle using Visual Studio Team Edition for DB Professionals Richard Fennell Engineering Director SQLBits II Birmingham 1 st March 2008.
Black marble the strategic IT asset for your organisation MAKING THE SQL DEVELOPER ONE OF THE FAMILY WITH VISUAL STUDIO TEAM SYSTEM Richard Fennell Engineering.
András Belokosztolszki Managing change in the database world.
Moving from Access Databases to a Visual Studio/SQL Server Solutions Andrew Couch UK Access User Group asc associates
Eralp Erat Senior Software Developer MCP,MCAD.NET,MCSD.NET.
Advantage Data Dictionary. agenda Creating and Managing Data Dictionaries –Tables, Indexes, Fields, and Triggers –Defining Referential Integrity –Defining.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
(code name: Data Dude) Josh Robinson Aculix.
Agenda Model migration vs MDS upgrade Model migration overview Model migration – how does it work? Model package Demo.
Creating a SharePoint App with Microsoft Access Services
René Balzano Technology Solution Professional Data Platform Microsoft Switzerland Database Development with SQL Server Data Tools (SSDT)
Passage Three Introduction to Microsoft SQL Server 2000.
Virtual techdays INDIA │ august 2010 Building ASP.NET applications using SQL Server Compact Chaitanya Solapurkar │ Partner Technical Consultant,
Migrating to EPiServer CMS 5 Johan Björnfot -
2015 International TechNet Wiki Summit 2015 Saeid Hasani Structured Error Handling Mechanism in SQL Server 2012 & 2014.
Database unit testing with visual studio 2010 Anthony Brown
Data-tier Application, Import, Refactoring, Publish, Schema Comparison, Database Unit Testing Borislav Statev Telerik Software Academy academy.telerik.com.
Overview What is SQL Server? Creating databases Administration Security Backup.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Tom Castiglia Hershey Technologies
Store Procedures Lesson 9. Skills Matrix Stored Procedures Stored procedures in SQL Server are similar to the procedures you write in other programming.
Company LOGO 1 Database Creation and Maintenance Jorge G. Martinez.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Database Change Management One solution to an often complex problem Kevin Hurwitz Headspring Systems
Database Unit Test MSSQL 2008 & VS 2010 Aung Kyaw Myo.
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
A Brief Documentation.  Provides basic information about connection, server, and client.
Module 8: Implementing Stored Procedures. Overview Implementing Stored Procedures Creating Parameterized Stored Procedures Working With Execution Plans.
Lara Microsoft. What does it mean? Why do you need to care? How can you achieve your SoD goals?
Taking Control of Visual Studio through Extensions and Extensibility Anthony Cangialosi Senior Program Manager Lead Microsoft Corporation DEV311.
Isolated Database Environments Kevin Howell February 2014.
DATABASE DEVELOPMENT WITH VSTS DATABASE EDITION By Chris Dahlberg ©2009 Aspect Software, Inc. All rights reserved. 1.
Constraints Lesson 8. Skills Matrix Constraints Domain Integrity: A domain refers to a column in a table. Domain integrity includes data types, rules,
Database Projects in Visual Studio Improving Reliability & Productivity.
Neil Kidd Developer Tools Technical Specialist Microsoft UK.
Virtual techdays INDIA │ august 2010 Data-tier Applications in Visual Studio 2010 Abhishek Kala │ Partner Technical Consultant, Microsoft Global.
DATABASE DEVELOPMENT WITH VISUAL STUDIO 2010 Chris Dahlberg 1.
Visual Studio 2012: A Complete IDE (Debugging & Source Control) Kevin Howell.
Level 1-2 Trigger Data Base development Current status and overview Myron Campbell, Alexei Varganov, Stephen Miller University of Michigan August 17, 2000.
Continuous Integration for Databases Steve Jones SQLServerCentral Red Gate Software.
Continuous Deployments using SSDT
Introduction to MySQL  Working with MySQL and MySQL Workbench.
Developing SQL/Server database in Visual Studio Introducing SQL /Server Data Tools Peter Lu.Net Practices Director Principle Architect Nexient March 19.
START Application Spencer Johnson Jonathan Barella Cohner Marker.
Get testing with tSQLt Practical examples and automation Steve Jones SQLServerCentral Red Gate Software.
Others Talk, We Listen. Managing Database Projects in Visual Studio 2013.
Understanding Core Database Concepts Lesson 1. Objectives.
Building Enterprise Applications Using Visual Studio®
SQL Compare & SQL Refactor
Effective T-SQL Solutions
Visual Studio Database Tools (aka SQL Server Data Tools)
Visual Studio 2010 Database Projects
11 | Error Handling and Transactions
PROCEDURES, CONDITIONAL LOGIC, EXCEPTION HANDLING, TRIGGERS
SQL Server Data Tools for Visual Studio Part I: Core SQL Server Tools
Azure Automation and Logic Apps:
SQL Server Data Tools Gert Drapers
Intro to Unit Testing with tSQLt
Visual Studio Database Tools (aka SQL Server Data Tools)
Using JDeveloper.
DAT381 Team Development with SQL Server 2005
Presented by : Chirag Dani & Dhaval Shah
SSDT and Database Project Basics
Introduction to VSTS Database Professional
Mark Quirk Head of Technology Developer & Platform Group
PNW SQL Users Group August 10th, 2011
Samir Behara, Senior Developer, EBSCO
Presentation transcript:

Database projects in visual studio 2010 Anthony Brown

Agenda What are they? How they work What else you can do Limitations

What are they for Offline development of database objects Manage database objects in source control Validation at design time, not deploy Allow easy creation of databases in a consistent state

Version comparison FeatureVisual Studio 2010 Professional Visual Studio 2010 Premium and Ultimate Schema Compare Data Compare Database Unit TestsExecute Only Transact-SQL Refactoring Execute Only Transact-SQL Static Code AnalysisExecute Only Data GenerationExecute Only Team Foundation Server Build Integration Command line deploy (VSDBCMD)

Before database projects Created a change script which was run against all environments Had to maintain change script for each change and run in specific order Had to know state of target server to work out which scripts to run, or create complex scripts

Before database projects if not exists (select null from sys.tables where name = 'ErrorLog' and schema_id = schema_id('dbo')) begin CREATE TABLE [dbo].[ErrorLog] ( [ErrorLogID] INT IDENTITY (1, 1) NOT NULL, [ErrorTime] DATETIME NOT NULL, [UserName] [sysname] NOT NULL, [ErrorNumber] INT NOT NULL, [ErrorSeverity] INT NULL, [ErrorState] INT NULL, [ErrorProcedure] NVARCHAR (126) NULL, [ErrorLine] INT NULL, [ErrorMessage] NVARCHAR (4000) NOT NULL ); end go if not exists (select null from sys.columns where name = 'newcolumn' and OBJECT_NAME(object_id) = 'ErrorLog') begin alter table ErrorLog add newcolumn int null end

With database projects Change script generated at deploy time based on compiled project and state of target database Do not need to know state of target database before deploy

With database projects THE PROJECT IS THE TRUTH

Structure All database objects are stored in a project All objects are defined fully Server projects for server level objects (logins, endpoints etc) Database projects for database level objects (tables, stored procedures, users etc)

Import schema Can import whole database only into blank project Can import script into existing database project

demos

Build Validates all objects Doesn’t need a database connection Creates compiled dbschema file

Schema compare Gui method of comparing project and target server Not available in professional

Deploy Used to generate sql file that will make the target database the same as the project Optionally runs the sql file against the target database Can be run from – Visual studio – Msbuild/team build – Vsdbcmd – API

Deploy

demo

Permissions Managed in an xml file Validated to ensure object and user/role exists in project Might need to define login for user in server project Not very user friendly  Can import from a script

Demo

What else they can do References (dbschema, xsd, clr) Static code analysis Database unit tests & data generation (execute only in professional) Refactor (execute only in professional) Extensibility

New in 2010 Code snippets Intellisense Integrated debugger Extensibility

Not supported - 1 Sql agent jobs Replication Replicated tables schema modification (can workaround by setting VerifyDeployment=false) For replication on stored procedures

Not supported - 2 Change data capture (change tracking supported in 2010) Reference data Circular cross database references

Not supported - 3 Session/global temporary table With check/with no check on constraints Non sql server linked servers Create resource pool Create workload group Create full text stoplist Reporting services Integration services Analysis services Table – lock escalation Index options – maxdop, drop_existing, sort_in_tempdb

Further reading US/vstsdb/threads US/vstsdb/threads