Alter Proc??

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
nacmorn
Posts: 8
Joined: Tue 11 Sep 2012 07:09

Alter Proc??

Post by nacmorn » Tue 11 Sep 2012 07:18

Hello,
I have tried to update some procedures, but when I obtain the synchronization script I have seen that it always first drop procedures and then create them, but not make the logical and only step (alter procedure)....how can I configure to obtain the alter proc in script??

Thanks

.jp
Devart Team
Posts: 345
Joined: Wed 09 Sep 2009 06:55
Location: devart

Re: Alter Proc??

Post by .jp » Tue 11 Sep 2012 08:19

Please have a look at: http://dev.mysql.md/doc/refman/5.0/en/a ... edure.html

"This statement can be used to change the characteristics of a stored procedure. More than one change may be specified in an ALTER PROCEDURE statement. However, you cannot change the parameters or body of a stored procedure using this statement; to make such changes, you must drop and re-create the procedure using DROP PROCEDURE and CREATE PROCEDURE."

nacmorn
Posts: 8
Joined: Tue 11 Sep 2012 07:09

Re: Alter Proc??

Post by nacmorn » Tue 11 Sep 2012 09:14

I use SQL Server 2008R2....I usually use alter proc to change the body of a procedure

In case the aplication only drops and creates the procedure, how can I configure the synchronization script to include the permissions of each procedure??

alexa

Re: Alter Proc??

Post by alexa » Tue 11 Sep 2012 12:53

Please ignore the last our post.

We will review the issue regarding altering existing procedures instead of dropping and recreating them when developing next versions of the product.

Currently, we suggest you to leave the option 'Ignore permissions' unchecked on the 'Options' page of the 'New Schema Comparison' wizard.

nacmorn
Posts: 8
Joined: Tue 11 Sep 2012 07:09

Re: Alter Proc??

Post by nacmorn » Tue 11 Sep 2012 13:55

Ok, thanks a lot....I will try unchecking that option

nacmorn
Posts: 8
Joined: Tue 11 Sep 2012 07:09

Re: Alter Proc??

Post by nacmorn » Tue 18 Sep 2012 08:48

It was successfull but I have another similar problem....when I need to create a new procedure with this option the application doesn´t include the permissions of new procedures....how can I configure it??

alexa

Re: Alter Proc??

Post by alexa » Tue 18 Sep 2012 10:55

We will review this case when developing next versions of the product.

nacmorn
Posts: 8
Joined: Tue 11 Sep 2012 07:09

Re: Alter Proc??

Post by nacmorn » Tue 18 Sep 2012 11:49

Ok, thank you....is there any way of writing all the operations made by the script at the results window of ssms??
Right now I only receive "Command(s) completed successfully."

alexa

Re: Alter Proc??

Post by alexa » Tue 18 Sep 2012 13:42

Could you please provide us an example of such operations?

nacmorn
Posts: 8
Joined: Tue 11 Sep 2012 07:09

Re: Alter Proc??

Post by nacmorn » Tue 18 Sep 2012 14:26

When I used Visual Studio for schema comparing, it introduces the operation at the window results using:
PRINT N'Creating [dbo].[procedure_example]'

I don´t Know if it is possible with dbforge or something similar like printing the action plan in that window...

alexa

Re: Alter Proc??

Post by alexa » Wed 19 Sep 2012 11:05

We will review this suggestion when developing next versions of the product.

alexa

Re: Alter Proc??

Post by alexa » Fri 09 Nov 2012 12:21

I have tried to update some procedures, but when I obtain the synchronization script I have seen that it always first drop procedures and then create them, but not make the logical and only step (alter procedure)....how can I configure to obtain the alter proc in script??
This behavior is changed in the new builds of the products:

http://www.devart.com/dbforge/sql/schem ... nload.html
http://www.devart.com/dbforge/sql/studio/download.html

Post Reply