SQL Gurus --
Our architecture consists of multiple customer databases to a common codebase. When we deploy database changes, the scripts must be run agianst each database.
Because of deployment issues, there have come times when our stored procedures became out of sync with one another. I would like to create a script to return these mimatched procedures to ensure that we have sync'd copies of our databases after deployment.
Is it possible to compare two or more databases, by having a script look at all the procedures between two databases, and return the mismatches?
Something to the effect of:
DATABASE_1 | DATABASE_2 | MISMATCHED_PROCEDURE | DATABASE_1_MODIFY_DATE | DATABASE_2_MODIFY_DATE
Customer_1 | Customer_2 | sp_get_names | 1/1/2010 | 1/2/2010
Customer_1 | Customer_2 | sp_add_person | 1/5/2010 | 1/6/2010
As a bonus, would it be possible to have the script automatically sync the databases by applying the newest script to the out-of-date script?
Much Thanks! George