Visual Studio 2012
Building a Database Project with TFS
I have built DBA data warehouse with TFS Database Project. I documented steps that I need to follow to build a database using TFS database Project. I created this post to share my knowledge with others.
Check
and verify that VS 2012 has SQL Server template installed.
If not, please install SSDTSetup.exe
1. Open VS2012 Studio and Click on New Project
2. Choose SQL server and give database name that you want to create. Check Add to source control
3. A new project is created in Solution explorer and it is added in source control
4. Set Target server by clicking on Properties of solution.
5. Currently, Target platform is SQL server 2014. So, change it to SQL server 2012
6. Save
7. Now, right click on solution and create a folder
8. Name a folder Scripts
9. Next, add a table under Scripts folder
10. Name a table and Click on Add
11. Build a table using a script or GUI
12. Save . A new table is added to Scripts folder under the solution.
13. Next, Click on Check in at Solution Level
14. Save the project
15. Write in comment and click on Check In
16. Click Yes
17. Project is check in successfully
18. In Solution Explorer, A locked is appeared beside a solution name after a solution is checked In.
19. Click on Build and then Build a Solution
22. Type Server Name in Server name
23. As a result, Target database connection is filled.
24. Click on Save Profile As
26. Save the project
29. Click Build and then click on publish solution. Edit Target database connection to the server where database will be created. Then click on Publish
31. A database with a table is created. Check in Management Studio.
No comments:
Post a Comment