SQL Azure, rename index

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

SQL Azure, rename index

Postby igor_yastrebov » Thu May 10, 2012 4:23 pm


* 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...

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

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
Posts: 1
Joined: Thu May 10, 2012 4:02 pm
Location: Minsk

Postby Chris Auckland » Mon May 14, 2012 6:48 pm

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 Auckland
Posts: 757
Joined: Tue Oct 24, 2006 2:12 pm
Location: Red Gate Software Ltd.

Postby Chris Auckland » Thu May 17, 2012 11:22 am

10.2 is is available now through 'check for updates' Does this fix the problem?
Chris Auckland
Posts: 757
Joined: Tue Oct 24, 2006 2:12 pm
Location: Red Gate Software Ltd.

Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests