Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedures are out of Sync

Status
Not open for further replies.

manmaria

Technical User
Aug 8, 2003
286
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,
 
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!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top