SQL Compare renames two of my sprocs?

davidfossildavidfossil Posts: 3
edited March 15, 2007 2:49PM in SQL Compare Previous Versions
As a new user of SQL Compare I am having some troubles trying to copy the schema of a live database to an empty database on another server. The comparison works fine, but the synchronization seems to mess up the names of some of my stored procedures. The post synchronization comparison (figure below) shows how two of my procedures have been created in the target database with different names than the original procedures in the source database.

What is going on? Have I done something wrong in my configuration, or is SQL Compare generally opposing all book clubs? :lol:



  • Hello David,

    This can happen if you rename an object, for instance in SQL Server Management Studio, Enterprise Manager or by executing sp_rename. When a object is renamed in this way, SQL Server updates its' system tables, but not the text of the object stored in the syscomments table. This is why SQL Compare echoes the object name correctly, but creates it under the old name.

    I am afraid the only workaround for you is to script the object, drop it, and re-create it.

    We also do a tool called SQL Refactor which plugs into SQL Server Management Studio and allows you to rename objects correctly, it updates references in any objects that may have a dependancy on the target object.

    Hope this helps,


    Jonathan Watts

    -Project Manager
    -Red Gate Software Ltd
  • Thanks a lot - that was exactly the answer I needed. I will drop and recreate the two offending procedures, and try not to use the rename functionality of SSMS in the future.

    I have just had the chance to use your other product, SQL Data Compare, and I must say that these two products really rock. :D

    Do you know what is the difference between the "standard" versions of SQL (Data) Compare included in the SQL Comparison Bundle compared to the "Pro" versions in the SQL Bundle Pro?
  • Hi there,

    Glad you like the products, the pro versions allow you to use the command lines for the product that you have a pro license for.

    Hope this helps.

    Jonathan Watts

    -Project Manager
    -Red Gate Software Ltd
Sign In or Register to comment.