Dec 4, 2006 #1 manmaria Technical User Joined Aug 8, 2003 Messages 286 Location US We have 2 dbs under same instance for different reasons. But I want to keep the stored procedures are in sync and they should be. How to do this? Thanks,
We have 2 dbs under same instance for different reasons. But I want to keep the stored procedures are in sync and they should be. How to do this? Thanks,
Dec 4, 2006 #2 ptheriault IS-IT--Management Joined Aug 28, 2006 Messages 2,699 Location US There are not SQL native tools that will do this for you. There are a couple of things you can do. 1. purchase a 3rd party tool like SQL Change Manager from idera. It can compare two databases and script out difference. 2. write a script to compare the two procedures. You can use the following to help. Code: select * from INFORMATION_SCHEMA.ROUTINES where ROUTINE_TYPE='PROCEDURE' AND SPECIFIC_NAME = 'YourProc' AND ROUTINE_DEFINITION like '%body of proc%' If they are different you could have an email sent to you. Then you would manually have to alter the incorrect proc. - Paul - Database performance looks fine, it must be the Network! Upvote 0 Downvote
There are not SQL native tools that will do this for you. There are a couple of things you can do. 1. purchase a 3rd party tool like SQL Change Manager from idera. It can compare two databases and script out difference. 2. write a script to compare the two procedures. You can use the following to help. Code: select * from INFORMATION_SCHEMA.ROUTINES where ROUTINE_TYPE='PROCEDURE' AND SPECIFIC_NAME = 'YourProc' AND ROUTINE_DEFINITION like '%body of proc%' If they are different you could have an email sent to you. Then you would manually have to alter the incorrect proc. - Paul - Database performance looks fine, it must be the Network!