Option to "Commit all dependencies (recommended)"

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace, andy.campbell.smith

Option to "Commit all dependencies (recommended)"

Postby anna.p » Tue Feb 05, 2013 1:13 am

Hello,

When you try to commit something that has dependencies you get the window that pops up with the list of dependent objects giving you the option to commit them as well. I'm wondering 2 things:

1. What is the purpose of going ahead and committing the listed dependencies?

2. How exactly does SSC decide what dependencies to list?

Thanks much!
anna.p
 
Posts: 23
Joined: Tue Jul 03, 2012 10:59 pm

Postby David Atkinson » Thu Feb 07, 2013 11:39 am

In some cases, not committing the dependencies could mean that the database held (as files) in source control comprise an invalid database. This could mean in some cases that another user failing in the 'get latest' operation.

The workaround would be to manually fix up the "invalidness" in source control before trying to "get latest" again, but that's something that would best be avoided.

SQL Source Control builds up a dependency tree of your database to determine the objects that reference the object in question.

David Atkinson
Red Gate
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase

Postby anna.p » Thu Feb 07, 2013 8:26 pm

We're using a shared database model. Does it have any use in that environment?

Also, does the list of "recommended objects" include ones that are waiting to be committed and ones that haven't changed since the last commit? This seems to be the case, I just want to make sure.
anna.p
 
Posts: 23
Joined: Tue Jul 03, 2012 10:59 pm

Postby David Atkinson » Thu Feb 07, 2013 11:42 pm

Yes, in as much that if you deploy from source control with, say, SQL Compare, you'd want to do so from a valid repository. However, this is unlikely to be problematic as the fix would be to commit the offending objects.

It should only offer those objects that have changed. Are there objects in the list that don't exist in the commit list? That would be a bug which you should report to support@red-gate.com

David
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase

Postby anna.p » Fri Feb 08, 2013 1:34 am

I'm pretty sure I've seen it happen. I remember being curious about it, checking, then becoming confused. If I see it again I'll report it.

Thanks very much!
anna.p
 
Posts: 23
Joined: Tue Jul 03, 2012 10:59 pm


Return to SQL Source Control 3

Who is online

Users browsing this forum: No registered users and 2 guests