Download presentation
Presentation is loading. Please wait.
Published byMeryl Paul Modified over 9 years ago
2
Dr Greg Low Senior Consultant – Readify Pty Ltd DAT302
3
Senior Consultant Readify Host of SQL Down Under Podcast Microsoft MSDN Regional Director Microsoft MVP for SQL Server Co-organizer of CodeCampOz Organizer of SQL Down Under CodeCamp Author with Rational Press
4
Introduction to Visual Studio Team Edition for Database Professionals (aka DataDude) The Project System Unit Tests Building and Deploying What’s Coming Next?
5
Disconnected Project Model Visual Studio based Team Collaboration via TFS Work Item Tracking Process Integration
6
Comparison Tools Schema Data Source/Version Control Refactoring Limited as yet Rename Object Power Tools add more
7
VSTS Test Project Infrastructure Data Generation Auto-generation Histogram-based Understands foreign key relationships Extensible Data Generators Test Assertions
8
MSBuild Integration Create New DB Update an Existing Schema
9
Introduction to Visual Studio Team Edition for Database Professionals (aka DataDude) The Project System Unit Tests Building and Deploying What’s Coming Next?
11
DatabaseProjectDatabaseProject Import database schema Reverse engineer existing.SQL script files Create New Project SQLScript DatabaseProjectTemplate SQL Server Database Collection of.SQL file containing T- SQL DDL fragments
12
Parsing = SqlCodeDom based on Abstract Syntax Trees Interpretation of Schema Model Symbol list Object References (hard and soft dependencies).SQL Source Parse SqlCode Dom Interpret Schema Model
13
Database Project Database Project Edit Compare Test Build Data Generation Deploy Refactor Compare
14
Database Project Database Project Import database schema Reverse engineer existing.SQL script files Create New Project SQLScript DatabaseProjectTemplate SQL Server Database Deploy SQL Script SQL Server Database Build project Deploy project
15
Database project = “truth” with regards to schema versioning Can be placed under source control.SQL script file is the canonical format used Changes are tracked at object level Indexes, constraints, triggers tracked independently of base table Provides high granularity for change tracking
17
Introduction to Visual Studio Team Edition for Database Professionals (aka DataDude) The Project System Unit Tests Building and Deploying What’s Coming Next?
18
Where does test data come from? Production data? Scrubbed production data? Typed in manually? Auto-generated?
19
Have been hard to do with databases SQL 2k5 Database Snapshots helpful Leverage VSTS Unit Test Infrastructure Extensible test assertions
21
Introduction to Visual Studio Team Edition for Database Professionals (aka DataDude) The Project System Unit Tests Building and Deploying What’s Coming Next?
22
DBA DBDev Production Database Staging Database SCM Daily Build Test Get Latest Test Database Daily Build Output Can also be used in a “Continuous” build environment Trust Boundary
23
DBA Sync from Label DBDev Production Database Staging Database SCM SQL Deploy Script Build Deploy Refine deploy script Verify Trust Boundary DatabaseProjectDatabaseProject
24
Managed, project oriented evolution of database schema Application and database schema are managed together Work in “isolation”, deploying only when changes verified Leverage VSTS work item tracking and process guidance increases team collaboration and unity
25
Database Project Database Project Target Database SQLScript Deploy Build Difference based build script Project State “What you want” Current State “How it is right now” Execute Incremental Update Script
26
All steps are implemented as MSBuild tasks SqlBuildTask SqlDeployTask DataGeneratorTask More tasks coming in Power Tools All project properties can be overwritten at the command line
27
Using the project settings: msbuild NorthwindOnline.dbproj /t:build Overwriting project settings msbuild NorthwindOnline.dbproj /t:build /p:TargetConnectionString="Data Source=(local)\sql80;Integrated Security=True;Pooling=False;" /p:TargetDatabase="NorthwindOnlineTestDB"
28
Using the project settings: msbuild NorthwindOnline.dbproj /t:deploy Overwriting project settings: msbuild NorthwindOnline.dbproj /t:deploy /p:TargetConnectionString="Data Source=(local)\sql80;Integrated Security=True;Pooling=False;" /p:TargetDatabase="NorthWind"
29
How can I deploy to multiple targets? The Database Project only understand a single target server/database at the time for each server+database combination in list { SqlBuildTask SqlDeployTask }
31
Build Server infrastructure Fully integrates with Team Foundation Server Extensible Based on MSBuild Fully extensible XML-based scripting Rich Command-line support Remote and Desktop build support Have to install Team Build separately Not installed as part of Team Foundation Server
32
TF Client Team Build Client Team Build Store Build Server Source Control Build Configuration files - MSBuild Scripts MSBuild Scripts and targets Build sources and scripts Build Events Build events Build request and Reports Team Build Service Team Build logger Build and Test data Build start/stop Work item Tracking Open and Update bugs Build Drop site TFS Data Tier TF Warehouse Static Analysis & Testing TFS
33
Introduction to Visual Studio Team Edition for Database Professionals (aka DataDude) The Project System Unit Tests Building and Deploying What’s Coming Next?
34
Now downloadable
35
New Refactorings Move schema Disambiguate (fully aliases references) Wild-card expansion (*) Generated schema deployment scripts based on refactoring logs (separates sp_name and TRANSFER SCHEMA) Strongly-typed dataset refactoring (if in same solution file)
36
New MSBuild Tasks Schema compare Data Compare Data Generator Regular expression string and data bound generators Regex editor has generator for check constraints Stream-based data-bound generator (pulls one row at a time)
37
Dependency Tree Viewer T-SQL Static Code Analysis (ala FxCop) API Access to Schema View Leveraged by CA Erwin R7.2 SQL Script Pre-Processor Expands variables and include files
38
Excellent addition to VSTS Allows database schemas and versioning to be managed along with application code Extensible
39
MSDN Forum: Visual Studio Team System - Database Professionals http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=725&Site ID=1 White papers What Microsoft Visual Studio 2005 Team Edition for Database Professionals Can Do for You A Security Overview of Microsoft Visual Studio 2005 Team Edition for Database Professionals Database Unit Testing with Team Edition for Database Professionals Samples http://www.codeplex.com/vsdbpro Trial Edition http://www.microsoft.com/downloads/details.aspx?familyid=7de00386- 893d-4142-a778-992b69d482ad&displaylang=en Gert’s Blog http://blog.msdn.com/gertd
40
Biggest SQL Server community event in Australia 14 SQL Server sessions over two days Special guest presentation from Kevin Kline President of PASS, Director of Technology – Quest Software When? Weekend of the 13 th and 14 th of October Where? Charles Sturt University, Wagga Wagga What does it cost? This event is FREE http://www.sqldownunder.com
41
Best place to learn about SQL Server for FREE User Groups in most capital cities Great networking opportunity http://www.sqlserver.org.au
44
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.