Filters on from source control "Schema Compare/Deploy" tab

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

Filters on from source control "Schema Compare/Deploy" tab

Postby sux.stellino » Wed Jan 04, 2012 11:08 am

Hi all,

I'm deploying stored procedures from database A to database B via "Schema Compare/Deploy" tab of Sql Source Control. I'm comparing the latest changeset of database A to the database B schema. I'm doing it using the button "Compare/Deploy with SQL Compare..".
Ok until here..

When SQL Compare appears I noticed that in the filter section there is a default "Source Control Filter 1" item selected.
I created my filter in the past and I'd like to know if there is a chance to use it by default when I compare a specific database.
If I compare A to B, I'd like to get my designed filter for A and B.
If I compare C to D, I'd like to get my designed filter for C and D.

Is there a way to do this?
And what about change at least for a different default (always the filter for A and B)?
thanks in advance!
Alessandro Alpi
Head of Database Administration@Goldbet Sportwetten GmbH
Microsoft MVP - Most Valuable Professional
SQL Server - Systems Administrator
http://mvp.microsoft.com/profiles/Alessandro.Alpi

[MCP] [MCITP - Database Developer] [MCTS] [MCT]
sux.stellino
 
Posts: 4
Joined: Fri Jan 14, 2011 2:47 pm
Location: it

Using saved filter settings

Postby micheleidesmith » Thu Jan 05, 2012 5:18 pm

I’m afraid this is not currently possible from within SSMS. But we are planning a new version of the Integration Pack which enable you to load a pre-saved filter for a specific pair of databases (e.g. A to B, or C to D). This will work as follows:
1. Create a custom filter within SQL Compare.
2. Save the filter as part of a comparison project settings in SQL Compare.
3. Load the saved project settings from the main Schema Compare/Deploy tab in SSMS. This will load the details for the database (or repository) you want to use as a source and target for the comparison, the custom filter you have saved and any other SQL Compare project options you have saved.

Would this solve the problem for you?

We are hoping to issue a new release of the Integration Pack mid-way through this year (Q2).

Can I ask if you use the SQL Compare project settings at the moment? If so, what do you use them for? What kind of settings do you save within your projects? E.g. project options, filters, mappings.

If you are not familiar with SQL Compare projects, please see this page for more information: http://www.red-gate.com/SupportCenter/C ... h_projects
Michele Ide-Smith
User Experience Specialist
Red Gate Software
michele.ide-smith@red-gate.com
micheleidesmith
 
Posts: 1
Joined: Wed Jan 04, 2012 5:56 pm

Re: Using saved filter settings

Postby sux.stellino » Thu Jan 12, 2012 11:04 am

micheleidesmith wrote:Would this solve the problem for you?

Yes it will, and, if possible, let the system to choose the most used setting, that will be like a "default" setting. What do you think about that?

micheleidesmith wrote:Can I ask if you use the SQL Compare project settings at the moment? If so, what do you use them for? What kind of settings do you save within your projects? E.g. project options, filters, mappings.

I use project settings to preset my filter on different branches to organize better the releases. When I started to use changesets instead of direct database I found the problem I described in the last post. This is the reason why I was asking. Using the contextual compare (right mouse compare/deploy) doesn't allow me to use a preconfigured project setting.
I have a complex scenario with 5 dev branches, the main line and one rtm line so merging/branching/migrating and releasing are my daily missions to accomplish.

Your proposed solution will be ok imho.
Thanks a lot
Alessandro Alpi
Head of Database Administration@Goldbet Sportwetten GmbH
Microsoft MVP - Most Valuable Professional
SQL Server - Systems Administrator
http://mvp.microsoft.com/profiles/Alessandro.Alpi

[MCP] [MCITP - Database Developer] [MCTS] [MCT]
sux.stellino
 
Posts: 4
Joined: Fri Jan 14, 2011 2:47 pm
Location: it

similar issue

Postby bigminer » Mon Nov 05, 2012 10:19 pm

From SSMS > selected database > Other SQL source control tasks > Edit filter rules. I have edited my filter and committed that to source control. No problem. Now if i unlink my database from source control and link it again it doesn't load the filter.scpf that I modified the first time. It recognizes that it is different and presents me with the option to commit the default filter, but I don't want to do that.

If I look in the base location i see that the filter.scpf doesn't exist there. However, if i do svn update on that folder i get the filter.scpf. Unfortunately, it doesn't load this file even if i restart SSMS. It still has the default filter.
bigminer
 
Posts: 2
Joined: Mon Nov 05, 2012 9:59 pm


Return to SQL Source Control 3

Who is online

Users browsing this forum: No registered users and 1 guest