Red Gate forums :: View topic - can i ignore certain db objects?
Return to www.red-gate.com RSS Feed Available

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

can i ignore certain db objects?

Search in SQL Source Control 2 forum
Post new topic   Reply to topic
Jump to:  
Go to page 1, 2  Next
Author Message
merk



Joined: 15 Jun 2006
Posts: 17

PostPosted: Tue Mar 15, 2011 12:36 am    Post subject: can i ignore certain db objects? Reply with quote

Unfortunately i have a few stored procs which differ from the dev database compared to the production database. So, i'd prefer it if sqlcompare would ignore these, since i absolutely do not want to copy the dev version into the production db.

So i'd like to know if i can tell sql compare to ignore changes - preferably ignore them just when on a specific db. i.e. if sp_mySproc changes, notify me when i an looking at the dev database, but don't tell me when i am looking at the production db.

Thanks
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1120
Location: Twitter: @dtabase

PostPosted: Tue Mar 15, 2011 7:11 am    Post subject: Reply with quote

You have posted to the SQL Source Control forum. Could you confirm if your question is about SQL Compare or SQL Source Control?

In SQL Compare you can use the Filter panel to exclude objects. You can save the filter settings with a saved project.

This isn't yet possible in SQL Source Control.

David Atkinson
Product Manager
Red Gate Software
Back to top
View user's profile Send private message Send e-mail
merk



Joined: 15 Jun 2006
Posts: 17

PostPosted: Tue Mar 15, 2011 7:50 am    Post subject: Reply with quote

I am indeed talking about sql source control. Is this something that's going to be added in?
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1120
Location: Twitter: @dtabase

PostPosted: Tue Mar 15, 2011 4:01 pm    Post subject: Reply with quote

Yes, this is on the roadmap for hopefully later this year. It would help us when designing the feature to understand why you have objects that differ that you wouldn't want to commit to source control.

David
Back to top
View user's profile Send private message Send e-mail
wtjones



Joined: 08 Jan 2008
Posts: 14

PostPosted: Tue Mar 15, 2011 6:56 pm    Post subject: Reply with quote

The main reason I want this is because we develop our own objects on a vendor-created database and are not as concerned with source controlling their code.

It would not be a huge deal to have then in SC except that we have a large number of objects in the db and I suspect this as the reason for slow performance.
Back to top
View user's profile Send private message
merk



Joined: 15 Jun 2006
Posts: 17

PostPosted: Tue Mar 15, 2011 7:49 pm    Post subject: Reply with quote

For me, in this instance, i have linked servers and the server names/db names differ between dev and production. So my stored procs will always be slightly different between dev and production. I couldn't find a way to use some sort of aliasing system so that i could keep the stored procs in sync. So right now i always have some stored procs showing up as needing to be committed, or updated, since they have different linked server names in them.

i also occasionally comment out sections of code in my dev or prod stored procs since some of it's for debugging purposes.
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1120
Location: Twitter: @dtabase

PostPosted: Tue Mar 15, 2011 8:05 pm    Post subject: Reply with quote

@merk - that's useful information. You're using filtering to ignore known stored procedure differences as a workaround for linked server name references. This is an issue we anticipated, but so far we've not had anyone bring it up just yet. I'd be very interested in hearing from any other users who are experiencing this. Clearly, if this is a pervasive issue, we should be looking at addressing the root cause and devising a mechanism where these different server name references aren't regarded as actual differences.

David
Back to top
View user's profile Send private message Send e-mail
merk



Joined: 15 Jun 2006
Posts: 17

PostPosted: Tue Mar 15, 2011 8:31 pm    Post subject: Re: Reply with quote

David Atkinson wrote:
@merk - that's useful information. You're using filtering to ignore known stored procedure differences as a workaround for linked server name references. This is an issue we anticipated, but so far we've not had anyone bring it up just yet. I'd be very interested in hearing from any other users who are experiencing this. Clearly, if this is a pervasive issue, we should be looking at addressing the root cause and devising a mechanism where these different server name references aren't regarded as actual differences.

well ideally, it would be nice if i could specific a string that would get auto-replaced when moving from one server to another.

ie on dev it's linkdevserv. DevDb.dbo.devtable
and when i'm pushing changes to the production db, it should automatically convert linkdevsrv to linkprdserv and devdb to proddb, and should ignore differences in that text when doing a compare.

I didn't think that would be something that would be included in sql source control, which is why i asked about ignoring files, which is obviously an imperfect workaround.
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1120
Location: Twitter: @dtabase

PostPosted: Tue Mar 15, 2011 9:25 pm    Post subject: Reply with quote

Some sort of server name mapping or parameter substitution could maybe used to solve this issue. I expect we'll get an increasing number of questions about this over the coming months. At least you'll have some sort of workaround once we've added object filtering!

David
Back to top
View user's profile Send private message Send e-mail
jim.whaley



Joined: 26 Apr 2011
Posts: 1

PostPosted: Tue Apr 26, 2011 3:18 pm    Post subject: Reply with quote

We are running into an issue with synonyms.

We have a reporting database that looks at a replicated (MSSQL replication) copy of our production database.

We use synonyms in our reporting database to point to the replicated production database.

I don't really want or need the synonyms in source control. When we deploy a new report database, we simply run a proc that automatically creates all of the synonyms.

Sure would love the ability to exclude things from source control! Smile

Jim
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1120
Location: Twitter: @dtabase

PostPosted: Tue Apr 26, 2011 3:29 pm    Post subject: Reply with quote

We're working on adding the same filtering screen you currently get in SQL Compare. This will filter the Commit list to exclude objects you specify. The idea is that the filter is saved as a per-project setting, which means that all users connected to the same repository will inherit the filter.

Comments on this approach are most welcome! As soon as we've got something ready, we'll release this as an Early Access build.

David Atkinson
Product Manager
Red Gate Software
Back to top
View user's profile Send private message Send e-mail
ahmannj



Joined: 06 Jan 2006
Posts: 13
Location: Minneapolis, MN. USA

PostPosted: Wed Apr 27, 2011 9:37 pm    Post subject: Reply with quote

As long as you're looking for feedback... I'd love to exclude Users, Permissions and Role Memberships - since they always differ between our development environment and our higher test and production environments. I'd prefer to exclude them from our source control system, rather than from the sync process during promotion to the higher environments.
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1120
Location: Twitter: @dtabase

PostPosted: Thu Apr 28, 2011 3:19 pm    Post subject: Reply with quote

Thanks for the feedback. Let me know if you would like to be added to our SQL Source Control early access notification list? This way you’ll be notified when we have a Beta build to try out, and you’ll have the opportunity to let us know if it meets your needs.

Kind regards,

David Atkinson
Product Manager
Red Gate Software
Back to top
View user's profile Send private message Send e-mail
ahmannj



Joined: 06 Jan 2006
Posts: 13
Location: Minneapolis, MN. USA

PostPosted: Thu Apr 28, 2011 6:13 pm    Post subject: Reply with quote

I'm on the list already - thanks!
Back to top
View user's profile Send private message
bradtoast



Joined: 19 May 2011
Posts: 2

PostPosted: Thu May 19, 2011 1:15 am    Post subject: Reply with quote

Could you please add me to the list? I would also be interested in having the ability to have a config file where I could set variables to be used in creating synonyms that reference other databases where the names might change from environment to environment.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Go to page 1, 2  Next
Page 1 of 2

 
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