Red Gate forums :: View topic - Partially Source Controlled
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 3
SQL Source Control 3 forum

Partially Source Controlled

Search in SQL Source Control 3 forum
Post new topic   Reply to topic
Jump to:  
Author Message
RMD



Joined: 29 Jan 2009
Posts: 13

PostPosted: Wed Feb 13, 2013 9:38 pm    Post subject: Partially Source Controlled Reply with quote

I have several projects that are add-ons to a 3rd party application. This 3rd party application has a very large database, and many customers want my add-ons to have their schema/data in the same database as the 3rd party application.

This creates a problem for SQL Source Control, as adding a database to source control appears to be an all-or-nothing thing.

Aside from just manually using SQL Compare with a scripts folder, is there a way to utilize SQL Source Control without having to add 100% of the database schema into source control?
Back to top
View user's profile Send private message
Chris George



Joined: 31 May 2009
Posts: 21
Location: Red Gate Software Ltd

PostPosted: Fri Feb 15, 2013 12:06 pm    Post subject: Reply with quote

Hi,

Something that immediately springs to mind (and you'll have to judge whether this would work for you) is to use filters.

You will have to link the database to source control, but before committing your schema objects, filter out the ones you do not want to commit.

This can be done by schema or object name, with/without wildcards. So it depends on how your database is structured as to how easy this is.

The filters are committed to your version control system too, so these can be shared among your database developers using SQL Source Control.

I hope this helps, and let me know if you need help in settings this up.

Regards
Chris
_________________
Chris George
SQL Source Control
Red Gate Software
Back to top
View user's profile Send private message
datachomp



Joined: 15 Feb 2013
Posts: 1

PostPosted: Fri Feb 15, 2013 4:46 pm    Post subject: Reply with quote

We hit this issue pretty early on for some of our DB's where multiple apps use the same DB.

Like Chris mentioned, filters worked great for us. If you already have things organized by schema, it makes it tons easier.
Back to top
View user's profile Send private message
RMD



Joined: 29 Jan 2009
Posts: 13

PostPosted: Fri Feb 15, 2013 11:01 pm    Post subject: Reply with quote

So you're adding the entire database to source control, and then setting up filters so that you're only checking in/out the stuff that matches your schema (or whatever)?

Is there a way to not have to add the entire database? This 3rd party database has tens of thousands of objects.
Back to top
View user's profile Send private message
Chris George



Joined: 31 May 2009
Posts: 21
Location: Red Gate Software Ltd

PostPosted: Sat Feb 16, 2013 12:47 am    Post subject: Reply with quote

Hi RMD,

Whilst it is true that the database is linked to source control, you would only be committing/retrieving the objects that satisfies your filter.

We don't automatically commit your entire database when you link, so as long as you apply the filter before your first commit, then you should see the behaviour you desire.

Regards
Chris
_________________
Chris George
SQL Source Control
Red Gate Software
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group