synchronize stored procs between 2 servers without drop add
Is there a way to use ssis to synchornize stored procedures between two servers without having do drop and recreate the procs?John Schroeder
February 28th, 2011 2:11pm

Do you mean you want to check if the stored procedure's code is different between databases? The short answer is you can use Alter Procedure statement this way it does not get dropped, but I do not see how SSIS would be involved.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
February 28th, 2011 2:14pm

Thanks for the reply, Arthur. I'm just exploring all posible options. Were looking for a way to compare and synchronize sps between servers without doing replication and without having to drop and re-add. The servers are not linked.John Schroeder
February 28th, 2011 3:47pm

With SSIS you can connect to one server and get the text of a stored procedure using say sp_helptext, calculate a check-sum then connect to another and get its check-sum. If the values are different use one sp body text or another to issue an Alter Procedure to update one or the other.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
February 28th, 2011 3:59pm

Hi, You may use the following SQL and get last modified date of a stored proc. SELECT * FROM sys.objects WHERE type = 'P' AND DATEDIFF(D,modify_date, GETDATE()) < 1 It shows a list of stored proc that has been modifed for the past 1 day. I guess you can modify the SQL to compare date between the servers and run ALTER PROCEDURE if the dates are different. Hope this helps. J.
February 28th, 2011 7:27pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics