DAT312DAT312Managing and Deploying your Managing and Deploying your SQL Server schemas with SQL Server schemas with Visual Studio Team Edition for Visual Studio Team Edition for Database ProfessionalsDatabase Professionals
DAT312DAT312Managing and Deploying your Managing and Deploying your SQL Server schemas with SQL Server schemas with Visual Studio Team Edition for Visual Studio Team Edition for Database ProfessionalsDatabase Professionals
Richard WaymireRichard WaymirePM ArchitectPM ArchitectMicrosoft Microsoft CorporationCorporation
Mairead A. Mairead A. O’DonovanO’DonovanProgram ManagerProgram ManagerMicrosoft Microsoft CorporationCorporation
AgendaAgenda
Overview of Team System for Database Overview of Team System for Database Professionals (TSDATA)Professionals (TSDATA)
Database ProjectsDatabase Projects
Source Control IntegrationSource Control Integration
Schema CompareSchema Compare
Build and DeployBuild and Deploy
Overview of Team System for Overview of Team System for Database ProfessionalsDatabase Professionals
Visual Studio Team SystemVisual Studio Team SystemVisual Studio Team SuiteVisual Studio Team Suite
MS
F P
rocess a
nd
Gu
idan
ce
MS
F P
rocess a
nd
Gu
idan
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 DatabaseDatabase Deployment Deployment
Database Database Change Change
ManagementManagementDatabase Database TestingTesting
Performance Performance TestingTesting
Manual TestingManual Testing
Test Case Test Case ManagementManagement
Visual Studio Professional Visual Studio Professional EditionEdition
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 Code CoverageCoverage
New!
Product OverviewProduct Overview
Database Project SystemDatabase Project SystemSchema and Script Versioning (SCC Integration)Schema and Script Versioning (SCC Integration)
Schema Build & DeploySchema Build & Deploy
Schema CompareSchema Compare
Data CompareData Compare
Database Unit TestingDatabase Unit Testing
(Test) Data Generator(Test) Data Generator
Schema RefactoringSchema Refactoring
T-SQL Editor with Query ExecutionT-SQL Editor with Query Execution
Work Item and Process Integration with Work Item and Process Integration with TFSTFS
Database Development Life Database Development Life CycleCycleThe cycle of life for database developersThe cycle of life for database developers
DatabaseDatabaseProjectProject
(*) Not implemented in the current CTP(*) Not implemented in the current CTP
Import database schemaImport database schema
Reverse engineer existing .SQL script files (*)Reverse engineer existing .SQL script files (*)
Create New ProjectCreate New Project
SQLSQLScriptScript
DatabasDatabasee
ProjectProjectTemplatTemplat
ee
SQLSQLServerServer
DatabasDatabasee
Database Development Life Database Development Life CycleCycleThe cycle of life for database developersThe cycle of life for database developers
DatabaseDatabaseProjectProject
EditEdit
CompareCompare
TestTest
BuildBuild
Data Data GenerationGeneration
DeployDeploy
RefactorRefactor
CompareCompare
Database Development Life Database Development Life CycleCycleThe cycle of life for database developersThe cycle of life for database developers
DatabaseDatabaseProjectProject
(*) Not implemented in the current CTP(*) Not implemented in the current CTP
Import database schemaImport database schema
Reverse engineer existing .SQL script files (*)Reverse engineer existing .SQL script files (*)
Create New ProjectCreate New Project
SQLSQLScriptScript
DatabasDatabasee
ProjectProjectTemplatTemplat
ee
SQLSQLServerServer
DatabasDatabasee
DeployDeploySQLSQL
ScriptScript
SQLSQLServerServer
DatabasDatabasee
Build projectBuild project
Deploy projectDeploy project
Project ModelProject ModelThe center of gravityThe center of gravity
The database project represents the The database project represents the “truth” with regards to schema versioning“truth” with regards to schema versioning
Optionally database project can be placed Optionally database project can be placed under source controlunder source control
.SQL script files is the canonical format .SQL script files is the canonical format usedused
Changes are tracked at the “object level”Changes are tracked at the “object level”For example indexes, constraints, triggers are For example indexes, constraints, triggers are tracked independent of the base table tracked independent of the base table definition, in order have the highest granularity definition, in order have the highest granularity of change tracking of change tracking
Other SessionsOther Sessions
Introducing Visual Studio Team Edition for Introducing Visual Studio Team Edition for Database ProfessionalsDatabase Professionals
DEV217 - 6/13/2006 10:15AM - 11:30AM, room: 104 ABCDEV217 - 6/13/2006 10:15AM - 11:30AM, room: 104 ABC
Managing and Deploying your SQL Server Managing and Deploying your SQL Server Schemas with Visual Studio Team Edition for Schemas with Visual Studio Team Edition for Database ProfessionalsDatabase Professionals
DAT312 - 6/13/2006 1:00PM - 2:15PM, room: 156 ABCDAT312 - 6/13/2006 1:00PM - 2:15PM, room: 156 ABC
Testing & Refactoring your Database with Visual Testing & Refactoring your Database with Visual Studio Team Edition for Database ProfessionalsStudio Team Edition for Database Professionals
DAT320 - 6/14/2006 8:30AM - 9:45AM, room: 160 ABCDAT320 - 6/14/2006 8:30AM - 9:45AM, room: 160 ABC
Under the Hood of Visual Studio Team Edition for Under the Hood of Visual Studio Team Edition for Database ProfessionalsDatabase Professionals
DAT433 - 6/15/2006 1:00PM - 2:15PM, room: 160 ABCDAT433 - 6/15/2006 1:00PM - 2:15PM, room: 160 ABC
DATABASE PROJECTSDATABASE PROJECTS
Database Projects DefinedDatabase Projects Defined
““Schema” projectsSchema” projectsSQL Server 2000SQL Server 2000
SQL Server 2005SQL Server 2005
““Script Only” projectsScript Only” projectsSQL Server 2000SQL Server 2000
SQL Server 2005SQL Server 2005
Different types to support different Different types to support different syntax/language optionssyntax/language options
A project is simply a series of files collected A project is simply a series of files collected together into a single logical collectiontogether into a single logical collection
The files represent the truth of your The files represent the truth of your schemaschema
Schema ProjectsSchema Projects
Support three areas:Support three areas:Data Generation PlansData Generation Plans
Schema ObjectsSchema Objects
ScriptsScripts
Data Generation will be covered fully in Data Generation will be covered fully in talk DAT320talk DAT320
Schema ObjectsSchema Objects
The “Meat and potatoes” of the project The “Meat and potatoes” of the project systemsystemAll SQL Server objects are reflected hereAll SQL Server objects are reflected here
All objects within user databases, that isAll objects within user databases, that isAnd that are user-created objects (no system And that are user-created objects (no system objects)objects)
Schema folders reflect the product versionSchema folders reflect the product versionSo “Service Broker” objects only show up in the So “Service Broker” objects only show up in the SQL Server 2005 project typeSQL Server 2005 project type
Table and View are containers for child Table and View are containers for child objectsobjects
Indexes, Triggers, Constraints, Statistics, Full-Indexes, Triggers, Constraints, Statistics, Full-texttext
Goal is to be as compatible as possible Goal is to be as compatible as possible with SQL Server Management Studio with SQL Server Management Studio Object Explorer viewObject Explorer view
We use the same icons, folder view when We use the same icons, folder view when possiblepossible
TemplatesTemplates
For each type of object you can have in the For each type of object you can have in the project system, we have a version-specific project system, we have a version-specific template to create that objecttemplate to create that object
Wherever possible, the template will Wherever possible, the template will generate valid SQLgenerate valid SQL
But probably not the SQL you wantBut probably not the SQL you want
They give you a starting point to write your They give you a starting point to write your
SQL statementsSQL statements
Error StatesError StatesAny given project item (file) can have three error Any given project item (file) can have three error states:states:
CleanCleanYou just see the expected icon for the objectYou just see the expected icon for the object
DirtyDirtyYou get a red exclamation point superimposed on the icon You get a red exclamation point superimposed on the icon for for the objectthe object
This means the script/DDL wasn’t understood by us, orThis means the script/DDL wasn’t understood by us, or
The syntax is wrongThe syntax is wrong
Not fully interpreted/implemented yetNot fully interpreted/implemented yetYou get a yellow warning triangle superimposed on the icon You get a yellow warning triangle superimposed on the icon for the objectfor the object
This means we’re not done yet understanding some SQL This means we’re not done yet understanding some SQL code in the object code in the object
So you shouldn’t see this when we releaseSo you shouldn’t see this when we release
You can’t refactor over the object in this fileYou can’t refactor over the object in this file
But, it will build/deploy correctlyBut, it will build/deploy correctly
Errors and warnings show up in the Error ListErrors and warnings show up in the Error List
ScriptsScripts
The Scripts folder contains two children The Scripts folder contains two children folder folder by default:by default:
PreDeploymentPreDeployment
PostDeploymentPostDeployment
Each contains a single script (for now) that Each contains a single script (for now) that will be either pre-pended or post-pended will be either pre-pended or post-pended during project buildduring project build
More on that later…More on that later…
You can also insert any folder or .SQL You can also insert any folder or .SQL script file into this areascript file into this area
Import Database SchemaImport Database Schema
Also sometimes referred to as reverse Also sometimes referred to as reverse engineerengineer
Imports an existing database schema into Imports an existing database schema into a database projecta database project
For CTP3 it only supports importing into an For CTP3 it only supports importing into an empty SQL Server 2000 projectempty SQL Server 2000 project
We use the schema compare engine under We use the schema compare engine under the covers to generate the scriptthe covers to generate the script
Then submit the script one piece at a time Then submit the script one piece at a time as if you’d typed them in yourselfas if you’d typed them in yourself
We then turn each object into a separate We then turn each object into a separate file in your projectfile in your project
Project PropertiesProject Properties
Project properties set a variety of information Project properties set a variety of information about a given database projectabout a given database project
Project VersionProject VersionEventually you’ll be able to “upgrade” a project from SQL Eventually you’ll be able to “upgrade” a project from SQL Server 2000 to SQL Server 2005Server 2000 to SQL Server 2005
Default SchemaDefault SchemaWhen a new object is created, what schema does it go into When a new object is created, what schema does it go into by defaultby default
Is FullText Indexing enabledIs FullText Indexing enabledOff for CTP3Off for CTP3
Default CollationDefault CollationWhat collation should be assumed as default for all schema What collation should be assumed as default for all schema objectsobjects
Import Existing Schema will reset this to whatever the Import Existing Schema will reset this to whatever the collation was on the source databasecollation was on the source database
Build Properties will be discussed later…Build Properties will be discussed later…
SOURCE CONTROL INTEGRATIONSOURCE CONTROL INTEGRATION
Source Control IntegrationSource Control Integration
Full Integration with Visual Studio SCC Full Integration with Visual Studio SCC InterfacesInterfaces
Support out of the box for Team Foundation Support out of the box for Team Foundation Server, Visual SourceSafeServer, Visual SourceSafe
However, any SCCI compliant source system However, any SCCI compliant source system should workshould work
Standard Graphical InterfaceStandard Graphical InterfaceIf you work with VB/C# projects and source If you work with VB/C# projects and source control, we’ll behave the samecontrol, we’ll behave the same
Same icons on project itemsSame icons on project items
Same top level/context menu itemsSame top level/context menu items
The Project System, Import Database Schema, and Source Control Integration
The Project System, Import Database Schema, and Source Control IntegrationMairead A. O’DonovanMairead A. O’DonovanProgram ManagerProgram Manager
Database Development Life Database Development Life CycleCycleThe cycle of life for database developersThe cycle of life for database developers
DatabaseDatabaseProjectProject
EditEdit
CompareCompare
TestTest
BuildBuild
Data Data GenerationGeneration
DeployDeploy
RefactorRefactor
CompareCompare
Schema CompareSchema Compare
Schema CompareSchema Compare
What is Schema Compare?What is Schema Compare?
Allows quick comparisons of:Allows quick comparisons of: project -> databaseproject -> database
database -> databasedatabase -> database
GUI interface and/or SQL scripts to compare GUI interface and/or SQL scripts to compare diffsdiffs
Full SQL Server 2000 and SQL Server 2005 Full SQL Server 2000 and SQL Server 2005 supportsupport
Object level script differences between Object level script differences between databasesdatabases
Handles Data MotionHandles Data Motion
Schema Compare (cont)Schema Compare (cont)
Options for restricting/changing scriptOptions for restricting/changing scriptRestrict which object types are comparedRestrict which object types are compared
Compare while ignoring schema, filegroups, Compare while ignoring schema, filegroups, etc.etc.
Enables comparison of test to productionEnables comparison of test to production
Turn off dependency checkingTurn off dependency checking
Generate backwards compatible scriptsGenerate backwards compatible scriptsi.e. script a 2005 database with a 2000 scripti.e. script a 2005 database with a 2000 script
Compare security settingsCompare security settingsUsers, roles, and permissionsUsers, roles, and permissions
Building and Deploying Database Projects
Building and Deploying Database Projects
Build/DeployBuild/Deploy
Standard MSBuild taskStandard MSBuild task
ConfigurationsConfigurationsNew vs. Existing buildsNew vs. Existing builds
Project properties for buildProject properties for build
Schema compare used for buildSchema compare used for build
Pre/Post Deployment scriptsPre/Post Deployment scripts
Build results in .SQL script fileBuild results in .SQL script file
Deploy Deploy Deploy via SQL query toolDeploy via SQL query tool
Deploy via MSBuild taskDeploy via MSBuild task
FUTURE: SQLCMD command supportFUTURE: SQLCMD command support
Schema Compare, Build and Deploy Database Project
Schema Compare, Build and Deploy Database ProjectMairead A. O’DonovanMairead A. O’DonovanProgram ManagerProgram Manager
Database Development Life Database Development Life CycleCycleThe cycle of life for database developersThe cycle of life for database developers
DatabaseDatabaseProjectProject
EditEdit
CompareCompare
TestTest
BuildBuild
Data Data GenerationGeneration
DeployDeploy
RefactorRefactor
CompareCompare
Wrap UpWrap Up
Database Projects will change the way Database Projects will change the way developers and DBAs work and think about developers and DBAs work and think about change management in SQL Serverchange management in SQL Server
Go get the CTP and try it out on your Go get the CTP and try it out on your databasesdatabases
Report feedback (good & bad)Report feedback (good & bad)
Further Questions:Further Questions:Richard: Richard: [email protected]@microsoft.com
Mairead: Mairead: [email protected]@microsoft.com
Other SessionsOther Sessions
Testing & Refactoring your Database with Testing & Refactoring your Database with Visual Studio Team Edition for Database Visual Studio Team Edition for Database ProfessionalsProfessionals
DAT320 - 6/14/2006 8:30AM - 9:45AM, room: DAT320 - 6/14/2006 8:30AM - 9:45AM, room: 160 ABC160 ABC
Under the Hood of Under the Hood of Visual Studio Team Edition for Database Visual Studio Team Edition for Database ProfessionalsProfessionals
DAT433 - 6/15/2006 1:00PM - 2:15PM, room: DAT433 - 6/15/2006 1:00PM - 2:15PM, room: 160 ABC160 ABC
ResourcesResourcesTechnical Chats and Webcastshttp://www.microsoft.com/communities/chats/default.mspx http://www.microsoft.com/usa/webcasts/default.asp
Microsoft Learning and Certificationhttp://www.microsoft.com/learning/default.mspx
MSDN & TechNet http://microsoft.com/msdnhttp://microsoft.com/technet
Virtual Labshttp://www.microsoft.com/technet/traincert/virtuallab/rms.mspx
Newsgroupshttp://communities2.microsoft.com/communities/newsgroups/en-us/default.aspx
Technical Community Siteshttp://www.microsoft.com/communities/default.mspx
User Groupshttp://www.microsoft.com/communities/usergroups/default.mspx
Visual Studio Team System Visual Studio Team System Breakout SessionsBreakout Sessions
DEV304 - Delving into Visual Studio 2005 Team Edition for Software Architects DEV304 - Delving into Visual Studio 2005 Team Edition for Software Architects 6/12/2006 10:45AM-12:00PM 160ABC6/12/2006 10:45AM-12:00PM 160ABC
DEV307 - Delving into Visual Studio 2005 Team Edition for Software DevelopersDEV307 - Delving into Visual Studio 2005 Team Edition for Software Developers6/12/2006 1:30PM-2:45PM Grand Ballroom A6/12/2006 1:30PM-2:45PM Grand Ballroom A
DEV311 - Delving into Visual Studio 2005 Team Edition for Software TestersDEV311 - Delving into Visual Studio 2005 Team Edition for Software Testers6/12/2006 5:00PM-6:15PM 104 ABC6/12/2006 5:00PM-6:15PM 104 ABC
DEV217 - Introducing Visual Studio 2005 Team Edition for Database ProfessionalsDEV217 - Introducing Visual Studio 2005 Team Edition for Database Professionals6/13/2006 10:15AM-11:30AM 104 ABC6/13/2006 10:15AM-11:30AM 104 ABC
DAT312 - Managing and Deploying Your SQL Server Schemas with Visual Studio Team Edition for DAT312 - Managing and Deploying Your SQL Server Schemas with Visual Studio Team Edition for Database ProfessionalsDatabase Professionals
6/13/2006 1:00PM-2:15PM 156 ABC6/13/2006 1:00PM-2:15PM 156 ABC
DAT320 - Testing and Refactoring Your Database with Visual Studio Team Edition for Database DAT320 - Testing and Refactoring Your Database with Visual Studio Team Edition for Database ProfessionalsProfessionals
6/14/2006 8:30AM-9:45AM 160 ABC6/14/2006 8:30AM-9:45AM 160 ABC
DEV327 - Visual Studio 2005 Team Foundation Server (Part 1): Applying Version Control, Work Item DEV327 - Visual Studio 2005 Team Foundation Server (Part 1): Applying Version Control, Work Item Tracking and Team Build to Your Software Development Project Tracking and Team Build to Your Software Development Project
6/14/2006 10:15AM-11:30AM 160 ABC6/14/2006 10:15AM-11:30AM 160 ABC
DEV429 - Visual Studio 2005 Team Foundation Server (Part 2): Developing Custom Process DEV429 - Visual Studio 2005 Team Foundation Server (Part 2): Developing Custom Process Templates, Work Item Types and Policies Templates, Work Item Types and Policies
6/14/2006 2:00PM-3:15PM 160 ABC6/14/2006 2:00PM-3:15PM 160 ABC
DEV233 - Visual Studio 2005 Team Foundation Server: Using Metrics to Manage and Troubleshoot DEV233 - Visual Studio 2005 Team Foundation Server: Using Metrics to Manage and Troubleshoot Your Projects Your Projects
6/14/2006 5:30PM-6:45PM 153 ABC6/14/2006 5:30PM-6:45PM 153 ABC
DEV237 - Visual Studio 2005 Team Foundation Server: Step-by-Step Migration and Adoption Planning DEV237 - Visual Studio 2005 Team Foundation Server: Step-by-Step Migration and Adoption Planning 6/15/2006 9:45AM-11:00AM 104 ABC6/15/2006 9:45AM-11:00AM 104 ABC
DEV439- Visual Studio 2005 Team System and Microsoft Solution Framework: Implementing an Agile DEV439- Visual Studio 2005 Team System and Microsoft Solution Framework: Implementing an Agile or CMMI Process or CMMI Process
6/15/2006 1:00PM-2:15PM 156 ABC6/15/2006 1:00PM-2:15PM 156 ABC
DAT433DAT433 Under the Hood of Visual Studio Team Edition for Database Professionals 6/15/2006 Under the Hood of Visual Studio Team Edition for Database Professionals 6/15/2006 1:00PM-2:15PM 160 ABC1:00PM-2:15PM 160 ABC
Visual Studio Team System HOL / Visual Studio Team System HOL / TCLTCL
Hands on LabsHands on LabsDEV005 Streamlining your Development Process with Visual Studio DEV005 Streamlining your Development Process with Visual Studio 2005 Team System2005 Team System
DEV008 Take a Tour of Visual Studio 2005 Team System for DEV008 Take a Tour of Visual Studio 2005 Team System for Database ProfessionalsDatabase Professionals
ChalktalksChalktalksBuilding Quality In: Visual Studio Team System and Continuous Building Quality In: Visual Studio Team System and Continuous Integrated TestingIntegrated Testing
DEV TLC Theatre 6/14/2006 8:30AM-9:45AMDEV TLC Theatre 6/14/2006 8:30AM-9:45AM
Teamlook and TeamSpec in ContextTeamlook and TeamSpec in Context Modeling that Supports Visual Modeling that Supports Visual Studio 2005Studio 2005
DEV TLC Theatre 6/14/2006 5:30PM-6:45PMDEV TLC Theatre 6/14/2006 5:30PM-6:45PM
Modeling that Supports Visual Studio 2005Modeling that Supports Visual Studio 2005DEV TLC Theatre 6/14/2006 5:30PM-6:45PMDEV TLC Theatre 6/14/2006 5:30PM-6:45PM
Visual Studio Team Edition for Database Professionals: OverviewVisual Studio Team Edition for Database Professionals: Overview DEV TLC Theatre 6/15/2006 9:45AM-11:00AMDEV TLC Theatre 6/15/2006 9:45AM-11:00AM
Code Generation and Model Execution from DSL ToolsCode Generation and Model Execution from DSL ToolsDEV TLC Theatre 6/15/2006 2:45PM-4:00PMDEV TLC Theatre 6/15/2006 2:45PM-4:00PM
Fill out a session Fill out a session evaluation on evaluation on CommNet for CommNet for
a chance toa chance toWin an XBOX Win an XBOX
360!360!
© 2006 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.