How to do version control for SQL Server database

0 votes
I'd want to keep track of the versions of my databases.

I'll always want to have some information in there. For performance measurements, I'll frequently want a significant quantity of created test data.

How would I go about implementing version control in my database?
Feb 15 in Database by Vaani
• 7,020 points
18 views

1 answer to this question.

0 votes
Not only can you compare objects at the object level and produce change scripts using Red Gate's SQL Compare, but you can also export your database objects into a folder hierarchy structured by object type, with one [objectname].sql creation script per object in these folders. The hierarchy of object types looks like this:

\Functions
\Security
\Security\Roles
\Security\Schemas
\Security\Users
\Stored Procedures
\Tables

You can use this to update your SVN repo and retain a running history of each item individually if you dump your scripts to the same root directory whenever you make changes.
answered Feb 15 by Neha
• 8,560 points

Related Questions In Database

0 votes
1 answer

How to schedule a job for SQL query to run daily?

down voteaccepted Expand the SQL Server Agent node ...READ MORE

answered Oct 25, 2018 in Database by Frankie
• 9,830 points
7,838 views
0 votes
2 answers
0 votes
0 answers

Which SQL server should we use for SQL queries to be executed?

I mean to say which SQL server ...READ MORE

Aug 18, 2019 in Database by Sonali
209 views
0 votes
2 answers

How to select the nth row in a SQL database table?

SELECT * FROM ( SELECT ID, NAME, ROW_NUMBER() ...READ MORE

answered Apr 23, 2020 in Database by anand
• 140 points
16,212 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,676 views
+2 votes
1 answer
0 votes
1 answer

How to drop all tables from a database with one SQL query?

Use the INFORMATION_SCHEMA.TABLES view to get the ...READ MORE

answered Feb 4 in Database by Neha
• 8,560 points
119 views
0 votes
1 answer

How to rename a column in a database table using SQL?

For SQL Server, use sp_rename USE AdventureWorks; GO EXEC sp_rename 'Customers.CustomerTerritory.TerritoryID', ...READ MORE

answered Feb 9 in Database by Neha
• 8,560 points
67 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP