Does v9 support both "ALTER" & "If exists .. DROP + CREATE"?

Forum for users of SQL Compare schema synchronization utility

Better yet?

Postby vehro » Wed Oct 19, 2011 6:07 pm

Get MS to change how it handles the issue to begin with. Support for "create or replace" (instead of separate create x and alter x) would not only address your issue directly, but would also solve the issue of the dropped permissions that occur for

if exists('procedure x') drop procedure x
go
create procedure x...
vehro
 
Posts: 6
Joined: Wed Oct 19, 2011 4:29 pm

Postby Barry K » Thu Oct 27, 2011 4:47 pm

I have run into this issue on numerous occasions. We have functions that call themselves recursively. If you add a parameter to the function that calls itself, simply doing an alter function will not work because it will give you an error that "the procedure or function has too many arguments specified".

If you drop and create the function, it will create it properly.
Barry K
 
Posts: 1
Joined: Thu Oct 27, 2011 4:39 pm
Location: USA

Postby David Atkinson » Thu Oct 27, 2011 4:53 pm

The latest 9.5 Beta has options to add existence checks and DROP/CREATE.

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

Please give it a go and let us know if this meets your requirements.

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

Postby David Atkinson » Thu Oct 27, 2011 4:53 pm

The latest 9.5 Beta has options to add existence checks and DROP/CREATE.

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

Please give it a go and let us know if this meets your requirements.

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

Previous

Return to SQL Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests