SQL Azure, rename index

igor_yastrebovigor_yastrebov Posts: 2
edited May 17, 2012 6:22AM in SQL Compare Previous Versions
Hello,

situation:
* we changed index name on PK.
* run SQLCompare to get proper scheme upgrade SQL script
* run this script on SQLAzure, got an error: ... Table without clustered index is not supported...

problem:
* SQLCompare tries to drop all constraints including PK constraint
* then rename the index and create constrains back
this works fine except PK constraint!

proposal:
why don't you follow the script SQLCompare creating for PK column type change? In that case, SQLCompare does NOT drop any PK constraints on target Table but:
* drops only FK constraints
* creates an duplicate table (with right names, types etc)
* moves date from original to a new table
* drop original table
* re-name the new table into original name

P.S. "ignore constraints/indexes names" setting is not an option.

- Igor

Comments

  • Thanks for your post.

    This issue has actually been fixed in the next SQL Compare update. We are doing exactly what you suggested in your proposal.

    As you know, SQL Azure complains if you try to put data in a table without a clustered index. We solved this problem if the index was a PK, but forgot to use the same behaviour for other unique indexes.

    The fix SC-5128 should be available tomorrow through 'check for updates'
    Chris
  • 10.2 is is available now through 'check for updates' Does this fix the problem?
    Chris
Sign In or Register to comment.