SQL Server – How to Rename Index with SSMA

sql serverssma

I am using Microsoft SQL Server Migration Assistant v6 (aka SSMA) to update a database from Access to SQL Server. I am getting informational messages that say "A2SS0029: Index name 'Name' was changed during conversion.".

As these are just index names, that shouldn't cause a problem for me. But I do wonder why the name has to be changed. Particularrly since I was able to create an index with the given name manually after the migration.

Why are the index names being renamed? And am I wrong about that not causing any problems (given that I don't have any queries that use index hints, if that is even possible with Access).

Best Answer

While there are reasons that a tool might make intelligent decisions about index names (like to prevent duplicate names in cases where there are actual collisions, and further when it actually matters, like when they are in the same table), it would appear that SSMA just creates new, unique names for all indexes. Perhaps only in the case where it finds at least one index name that is reused, not sure. I would test this, but I don't have Access installed anywhere.

Why does it do that? Who knows? Extreme conservatism? Paranoia? I think it's just being extremely safe.

There are cases where duplicate names would be a problem, but these are isolated to first class entities that end up in sys.objects, like primary key constraints. Index names are only enforced to be unique at the table level (since the name is only exposed in sys.indexes), not at the database level.