Managing the Database Lifecycle using Team Edition for Database Professionals Randy Pagels Developer...
-
Upload
rebecca-johnson -
Category
Documents
-
view
220 -
download
0
Transcript of Managing the Database Lifecycle using Team Edition for Database Professionals Randy Pagels Developer...
Managing theManaging theDatabase LifecycleDatabase Lifecycle
usingusingTeam Edition forTeam Edition for
Database ProfessionalsDatabase Professionals
Randy PagelsRandy PagelsDeveloper Technology SpecialistDeveloper Technology SpecialistMicrosoft CorporationMicrosoft Corporation
AgendaAgenda• What is Visual Studio Team System?What is Visual Studio Team System?• Key themes of “Data Dude”Key themes of “Data Dude”• Living in the “Sandbox”Living in the “Sandbox”
• Database Project TypesDatabase Project Types• Data GenerationData Generation• Unit TestingUnit Testing• RefactoringRefactoring• Build & DeployBuild & Deploy• Schema & Data CompareSchema & Data Compare
• Process GuidanceProcess Guidance• Setup RequirementsSetup Requirements• Q&A Q&A
What we heard from customersWhat we heard from customers“why did we build it…”“why did we build it…”
• Managing Database Change is hard…Managing Database Change is hard…• changes to the schema throughout the development changes to the schema throughout the development
process and after deploymentprocess and after deployment• Managing Database State is hard…Managing Database State is hard…
• What’s the state for the Dev, Test, or Prod What’s the state for the Dev, Test, or Prod environmentsenvironments
• It’s hard to track changes to the databaseIt’s hard to track changes to the database• Managing Database Testing is hard…Managing Database Testing is hard…
• It’s hard to consistently establish the state of the It’s hard to consistently establish the state of the databasedatabase
• I can’t use my live production dataI can’t use my live production data• Disconnect between development and database teamsDisconnect between development and database teams
• Developers may make poor database design Developers may make poor database design decisionsdecisions
• Needs to be more integratedNeeds to be more integrated
BusinessAnalyst
PMO
Operations
CIO
ApplicationSupport
Architect
ProjectManager
Tester
Designer
Visual Studio Team SystemVisual Studio Team System
Developer
Visual Studio Team SystemVisual Studio Team System
BusinessAnalyst
PMO
Operations
CIO
ApplicationSupport
Architect
ProjectManager
Tester
Designer
Developer
DB Pro
Team Edition for Database Professionals
• Expand to database teams• Manage Database Change• Extend Team productivity and
collaboration• Integrated quality
Conceptual OverviewConceptual Overview
Difficult to Manage Change Difficult to Manage Change to the schemato the schema
Production Database is one Production Database is one version of the truth for Data version of the truth for Data and Schemaand Schema
DBA doesn’t have access to DBA doesn’t have access to changes until he/she has changes until he/she has deploy or reject choicedeploy or reject choice
Changes often made to Changes often made to production database and not production database and not rolled back into testrolled back into test
Production
Database
Production
Database
Management Studio
TuningTuningMonitoringMonitoring
“One Version of the Truth” for Data and Schema
SchemaSchemaSchema ChangesSchema Changes
Conceptual OverviewConceptual OverviewProductio
n Database
Production
Database
Management Studio
TuningTuningMonitoringMonitoring
“One Version of the Truth” for Data
“One Version of the Truth” for Schema •Offline •Under Source Control
SchemaSchema
Schema ChangesSchema Changes
Changes can be rolled out in a scheduled, managed way
Scripts allow administrators to mange change updates
Schema Change now managed in VSTS Schema Change now managed in VSTS and TFSand TFS
Production Database is now “One Production Database is now “One version of the truth” only for Dataversion of the truth” only for Data
DBA doesn’t have access to changes DBA doesn’t have access to changes until he/she has deploy or reject choiceuntil he/she has deploy or reject choice
““One Version of the truth for Schema” One Version of the truth for Schema” is Under Source Controlis Under Source Control
Visual Studio Team SystemVisual Studio Team SystemVisual Studio Team SuiteVisual Studio Team Suite
MS
F Pro
cess
an
d G
uid
an
ceM
SF
Pro
cess
an
d G
uid
an
ce
Visual Studio Team Foundation ServerVisual Studio Team Foundation Server
VisualStudio
IndustryPartners
SoftwareSoftwareArchitectsArchitects
SoftwareSoftwareDevelopersDevelopers
SoftwareSoftwareTestersTesters
DatabaseDatabaseProfessionalsProfessionalsVisual
StudioTeam
ExplorerApplication Application ModelingModeling
Infrastructure Infrastructure and Deployment and Deployment
ModelingModeling
Code AnalysisCode Analysis
Performance Performance TuningTuning
Security AnalysisSecurity Analysis
Data Data GenerationGeneration
Database Database ProjectsProjects
Unit TestingUnit Testing
Performance Performance TestingTesting
Manual TestingManual Testing
Test Case Test Case ManagementManagement
Visual Studio Professional EditionVisual Studio Professional Edition
Change ManagementChange Management
Work Item TrackingWork Item Tracking
ReportingReporting
Project SiteProject Site
Integration ServicesIntegration Services
Project ManagementProject Management
Load Test AgentLoad Test Agent
Visio and UML Visio and UML ModelingModeling
Class Class ModelingModeling
Unit TestingUnit Testing
Code CoverageCode Coverage
Data/Schema Data/Schema CompareCompare
Build/DeployBuild/Deploy
Rename/Rename/RefactorRefactor
New!New!
Key ThemesKey Themes
Manage Database Schema ChangeManage Database Schema Change Enable Version Control for Database schemaEnable Version Control for Database schema
Mitigate Risk of those changesMitigate Risk of those changes Leverage the “Sandbox”Leverage the “Sandbox”
Establish the Database Development Lifecycle Establish the Database Development Lifecycle ( DDLC )( DDLC ) Support iterative developmentSupport iterative development
Incorporate the DDLC into the Software Incorporate the DDLC into the Software Development Lifecycle ( SDLC )Development Lifecycle ( SDLC ) Holistic ApplicationHolistic Application
Test Databa
se
Test Databa
se
Production
Database
Production
DatabaseCreate table AUCTION( id int not null,title varchar(25) not null,startDate DateTime not null,length in not null)
Import database schema to populate project Import database schema to populate project from existing databasefrom existing database
Changes to schema traditionally have Changes to schema traditionally have immediate affectimmediate affect
With off-line project nothing changes until you With off-line project nothing changes until you deploy the changedeploy the change
Off-line DevelopmentOff-line Development
Creating a ProjectCreating a Project
Represents the off-line databaseRepresents the off-line databaseYou are NOT connected to a live database!You are NOT connected to a live database!
Simply a series of files collected together into a Simply a series of files collected together into a single logical collectionsingle logical collectionThe files represent the truth of your schemaThe files represent the truth of your schemaConnects to SCCI providers for versioning such as Connects to SCCI providers for versioning such as Team Foundation ServerTeam Foundation ServerThe database project is a first class project along The database project is a first class project along with the other VS project types ( C# / VB.NET / C++, with the other VS project types ( C# / VB.NET / C++, etc. )etc. )
The Project System & Import Database SchemaThe Project System & Import Database SchemaThe Project System & Import Database SchemaThe Project System & Import Database SchemaCreating the “Sandbox”Creating the “Sandbox”
Test DataTest Data
To create a solid foundation for testing we To create a solid foundation for testing we support data generationsupport data generationDeterministic – always generate the same Deterministic – always generate the same layoutlayoutMatched to your schema and very Matched to your schema and very customizablecustomizableExtensible mechanism, build your own Extensible mechanism, build your own generators & distributionsgenerators & distributionsBottom Line: Realistic values with Bottom Line: Realistic values with representative distributionsrepresentative distributions
Establish a Representative Staging AreaEstablish a Representative Staging AreaEstablish a Representative Staging AreaEstablish a Representative Staging AreaFill the “Sandbox”Fill the “Sandbox”
Database Unit TestingDatabase Unit Testing
Unit Testing helps ensure that changes do not break Unit Testing helps ensure that changes do not break existing codeexisting code
Unit test designer is SQL focusedUnit test designer is SQL focused Work in the language of your choice: TSQL, VB.NET, C#Work in the language of your choice: TSQL, VB.NET, C#
Builds on existing Team Test Unit Test functionalityBuilds on existing Team Test Unit Test functionality Integrate your database tests along side your Integrate your database tests along side your
application unit testsapplication unit tests We can test the following:We can test the following:
Generate test stubs for these typesGenerate test stubs for these types Stored Procedures, Functions, TriggersStored Procedures, Functions, Triggers
Arbitrary SQLArbitrary SQL
Database Unit TestingDatabase Unit TestingDatabase Unit TestingDatabase Unit TestingPlaying in the Playing in the “Sandbox”“Sandbox”
RefactoringRefactoring
Bring power of refactoring to SQLBring power of refactoring to SQL Cascading ChangeCascading Change
Update all dependent objects in database project Update all dependent objects in database project Schema objects, Data generation, Unit Tests, SQL ScriptsSchema objects, Data generation, Unit Tests, SQL Scripts Preview all changesPreview all changes Make an atomic changeMake an atomic change Global UndoGlobal Undo
RenameRename Meet corporate standardsMeet corporate standards Better express semantic intent – clarityBetter express semantic intent – clarity
Database RefactoringDatabase RefactoringDatabase RefactoringDatabase RefactoringLeveraging the Leveraging the “Sandbox”“Sandbox”
MSBuild TasksMSBuild Tasks Build, deploy and data generation all Build, deploy and data generation all
implemented as MSBuild tasksimplemented as MSBuild tasks MSBuild enables: MSBuild enables:
Command line usage Command line usage Programmatic accessProgrammatic access Chaining and composition of tasksChaining and composition of tasks Team Build integrationTeam Build integration
TeamBuild on a Build ServerTeamBuild on a Build Server It is a requirement to have VSDBPro installed on the It is a requirement to have VSDBPro installed on the
Team Build ServerTeam Build Server
Safely Deploying & Managing UpdatesSafely Deploying & Managing UpdatesSafely Deploying & Managing UpdatesSafely Deploying & Managing Updates““Sandbox” the Next Sandbox” the Next StageStage
Incorporate the Database Professional into the software lifecycle and provide them with a foundation for change management and process integration.
Incorporate the Database Professional into the software lifecycle and provide them with a foundation for change management and process integration.
Change ManagementChange Management Project Based DevelopmentProject Based Development
Project ModelProject Model that represents schema as objects providing a “personal sandbox” for offline development that that represents schema as objects providing a “personal sandbox” for offline development that lives within a Visual Studio Solutionlives within a Visual Studio Solution
Team CollaborationTeam Collaboration with Work Item and Process Integration with Team Foundation Serverwith Work Item and Process Integration with Team Foundation Server Automated Change SupportAutomated Change Support
Rename RefactoringRename Refactoring with the ability to preview pending changes prior to execution with the ability to preview pending changes prior to execution Comparison ToolsComparison Tools (Schema & Data Compare) allow comparisons (Schema & Data Compare) allow comparisons & synchronization of schema and data with & synchronization of schema and data with
design/test/production databases design/test/production databases Source/Version ControlSource/Version Control of all database objects with the ability to reverse engineer a database to bring it under of all database objects with the ability to reverse engineer a database to bring it under
Source ControlSource Control
Database Unit TestingDatabase Unit Testing Leverages theLeverages the Test Project Infrastructure Test Project Infrastructure GenerateGenerate “Real and Meaningful” “Real and Meaningful” Data ValuesData Values through the ability to import information such as Row Counts through the ability to import information such as Row Counts
and histograms from a real databaseand histograms from a real database Data Generator provides Data Generator provides Repetitive Dataset GenerationRepetitive Dataset Generation for tests based on saved settings for tests based on saved settings
Build / DeploymentBuild / Deployment MSBuild Integration MSBuild Integration for Database Deployments/Builds based on Projects for Database Deployments/Builds based on Projects Either Either CreateCreate a new Database at the target location or a new Database at the target location or UpdateUpdate an Existing Schema an Existing Schema
Wrap UpWrap Up
Managed, project oriented evolution of database Managed, project oriented evolution of database schema – no more rollbacksschema – no more rollbacksApplication and database schema can now be Application and database schema can now be managed togethermanaged togetherWork in “isolation”, deploying only when changes Work in “isolation”, deploying only when changes verifiedverifiedLeverage VSTS work item tracking and process Leverage VSTS work item tracking and process guidanceguidanceFurther Questions:Further Questions:
Randy Pagels: [email protected] Pagels: [email protected]
Related ContentRelated Content
BlogsBlogs http://blog.msdn.com/gertd http://blog.msdn.com/gertd http://blog.msdn.com/cameronshttp://blog.msdn.com/camerons
White papersWhite papers What Microsoft Visual Studio 2005 Team Edition for Database What Microsoft Visual Studio 2005 Team Edition for Database
Professionals Can Do for YouProfessionals Can Do for You A Security Overview of Microsoft Visual Studio 2005 Team Edition for A Security Overview of Microsoft Visual Studio 2005 Team Edition for
Database ProfessionalsDatabase Professionals SamplesSamples
http://www.codeplex.com/vsdbprohttp://www.codeplex.com/vsdbpro MSDN ForumMSDN Forum
© 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.
MSF Process GuidanceMSF Process GuidanceMSF Process GuidanceMSF Process Guidance
MSF IntegrationMSF Integration• Extends existing MSF process guidance for database Extends existing MSF process guidance for database
development for both:development for both:• MSF Agile MSF Agile • MSF CMMIMSF CMMI
• Adds 2 roles:Adds 2 roles:• Database AdministratorDatabase Administrator• Database DeveloperDatabase Developer
• Adds 3 new work streams:Adds 3 new work streams:• Create a Database ProjectCreate a Database Project• Implement a Database Development TaskImplement a Database Development Task• Deploy a Database ProjectDeploy a Database Project
• Delivered as MSF content update through the webDelivered as MSF content update through the web
Setup RequirementsSetup Requirements
• Visual Studio 2005 Team Edition for Database Visual Studio 2005 Team Edition for Database Professionals Professionals • Add-on to Visual Studio 2005 Team SuiteAdd-on to Visual Studio 2005 Team Suite• Own SKU on top of Visual Studio 2005 ProfessionalOwn SKU on top of Visual Studio 2005 Professional
• Need to have C# or VB.NET installed for Unit Need to have C# or VB.NET installed for Unit TestingTesting
• Need a local SQL Server 2005 instance for Need a local SQL Server 2005 instance for background compile time validationbackground compile time validation