Red Gate forums :: View topic - Does v9 support both "ALTER" & "If exists .. DROP + CREATE"?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare Previous Versions
SQL Compare Previous Versions forum

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

Search in SQL Compare Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Go to page Previous  1, 2, 3
Author Message
vehro



Joined: 19 Oct 2011
Posts: 6

PostPosted: Wed Oct 19, 2011 6:07 pm    Post subject: Better yet? Reply with quote

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...
Back to top
View user's profile Send private message
Barry K



Joined: 27 Oct 2011
Posts: 1
Location: USA

PostPosted: Thu Oct 27, 2011 4:47 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
David Atkinson



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

PostPosted: Thu Oct 27, 2011 4:53 pm    Post subject: Reply with quote

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

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

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

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



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

PostPosted: Thu Oct 27, 2011 4:53 pm    Post subject: Reply with quote

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

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

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

David Atkinson
Product Manager
Red Gate Software
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Go to page Previous  1, 2, 3
Page 3 of 3

 
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