Feature: Drop/Create for stored procedure synchronization

Forum for users of SQL Compare schema synchronization utility

Feature: Drop/Create for stored procedure synchronization

Postby csuire » Fri Feb 01, 2008 6:30 pm

Add new Project Behavior:
"Do not use ALTER to modify stored procedures or views"

When this option is selected, SQL Compare will drop and then create any stored procedures and views that are to be synchronized rather than using the ALTER method. This will create the "if exists() drop..." sql code even if the stored procedure is being added for the first time.

Example Output:
This is similar to scripting stored procedures from Enterprise manager.

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ExampleStoredProcedure]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[ExampleStoredProcedure]

CREATE PROCEDURE [dbo].[ExampleStoredProcedure] ...

Please note that this feature request is similar to this previous post:
http://www.red-gate.com/messageboard/vi ... t=2747#top

Posts: 16
Joined: Fri Feb 01, 2008 5:28 pm

Postby Michelle Taylor » Mon Feb 04, 2008 11:20 am

I've added this forum thread to the feature request covering this behaviour.
Michelle Taylor
Posts: 537
Joined: Mon Oct 30, 2006 11:45 am
Location: Red Gate Software

I second

Postby jhogan » Wed Sep 23, 2009 5:52 pm

I second...
We need this feature because we can make only a limited number of assumptions about the target databases. We can't assume that procs will exists. ALTER's have caused scripts to fail for us in the past because the proc didn't exist.

Is there anyway I can check the status of this feature request?
Posts: 7
Joined: Wed Sep 23, 2009 5:30 pm

Postby David Atkinson » Wed Sep 23, 2009 7:49 pm

We're looking closely at feature and actively looking for user requirements in this area. If there are any more examples of what you'd want the generated script to look like if we added a "Make scripts rerunnable" option, please let us know what they are. Is it only ever Stored Procedures that may already exist on the target server, or are there other objects or object properties that you need to check for existence?

David Atkinson
Product Manager
Red Gate Software
David Atkinson
Posts: 1143
Joined: Mon Dec 05, 2005 3:54 pm
Location: Twitter: @dtabase

Postby David Atkinson » Fri Oct 28, 2011 11:02 am

We have options for rerunnable scripts in the latest Beta.

would you be able to let us know if this meets your requirements?

http://www.red-gate.com/MessageBoard/vi ... hp?t=14113

Kind regards,

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

Return to SQL Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 2 guests