Download presentation
Presentation is loading. Please wait.
1
Database Projects and Source Control (TFS)
JUST DO IT Database Projects and Source Control (TFS)
2
Leslie Weed Data/BI Architect – RevGen Partners DataVault Certified 20+ years IT
3
Have you heard this? My code disappeared My SSMS crashed and I lost all my work My fix didn’t get pushed out or deployed I don’t know what the code was that worked yesterday (and now it is broken) I wish I knew who originally worked on this I don’t know if that commented out code should or should not be in there Someone overwrote my fixes
4
Solution Technology AND Process
5
Database Projects (DAC Projects)
Manage changes Apply version control Standardization between environments Script differences quickly and easily
6
Version Control (TFS) Versioning Multi-developer environment AND solo developer environment Review History Track changes No disappearing code Risk mitigation for the business (not about what the developer perceives as overhead)
7
Database Projects New project Existing project Layout Settings
8
Now TFS Adding to Source Control Or getting an existing project Settings Changes/Checkin History
9
Tips & Tricks Naming conventions Versions Renaming objects (you could lose data!) Get latest at the solution level – always DML – set build property to “NONE” Always add objects in solution explorer – NOT in source control explorer Refactor
10
Solution Explorer NOT Source Control Explorer
11
Make sure this is checked!!
Tools>Options>SourceControl>Visual Studio Team Foundation Server
12
What your team needs Setting up the process with your team Get the latest before checking in (daily at a minimum) Confirm Database is error free prior to checkin Designate a deployment lead Everyone has their own schema compare file Pay attention – don’t get click happy
13
Your next steps Database Project - References, SQLCommand Mode Source Control – Branching and Merging REFACTORING -
14
Creating a db project: In Visual Studio, Create a new database project, file>new>project then templates>sql server>sql server database project Update the name, location, solution name as desired. You may or may not want to add to source control at this time, if you do select the box Importing an existing db to your newly created project: In Visual Studio go to Solution Explorer window. Right click on the database (project level, not solution level) and your first option in the menu is import
15
Thank You Sponsors Platinum Gold Silver Bronze Swag Venue
16
Contact Leslie Weed Twitter
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.