SQL Server Database Source Control using Visual Studio: Git

Last Update: August 28, 2024
Table of Contents
Contributors
Picture of Khairul Alam
Khairul Alam
Tech Stack
0 +
Want to accelerate your software development company?

It has become a prerequisite for companies to develop custom software products to stay competitive.

In this brief article, we will see how to setup SQL Server Database Source Control using Visual Studio step by step — 1. Create a new repository to GitHub
1. create new repo
2. Clone the repository to local directory 3. Create a new Sql Server Database project inside the repository
3. select sql server database project 1
4. Right click on the project -> Import -> Select Database or Data-tier Application(*.dacpac)
4. import database data tier
For Data-tier Application(*.dacpac) option, Select/Browse the file then click on ’Start’.
4.1. import data tier
For Database option, Select Connection of the Source Sql Server Database then click on ’Start’. [But this option is not available in Visual Studio Community Edition]
4.2. import database
4.3. finish 1
5. Now update a Stored procedure (Add comment) from source Sql Server Database as well as create a new table for testing purpose.
5. update source database
6. To compare the Source Database and our target project, Right click on the project name the select  ‘Schema Compare’
6. compare schema
7. Select Source Database and Target Project then click on ‘Compare Button’
7. compare
8. Check the changes
8.1. check changes
8.2. check changes
9. To update the Target Project/Source Control click on ‘Update’
9.1. update target
9.2. update target
10. Commit & Push the changes.
10. final updated source controll
10.1. final updated source controll
Thanks…
Potential Developer
Tech Stack
0 +
Accelerate Your Software Development Potential with Us
With our innovative solutions and dedicated expertise, success is a guaranteed outcome. Let's accelerate together towards your goals and beyond.
Blogs You May Love

Don’t let understaffing hold you back. Maximize your team’s performance and reach your business goals with the best IT Staff Augmentation