This error is coming while synchronizing the DataDictionary.
SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]There is already an object named 'I_100013RECID' in the database.
SQL statement: ALTER TABLE "DBO".ACOCOSTCENTERATTRIBUTEVALUE_BR ADD CONSTRAINT I_100013RECID PRIMARY KEY NONCLUSTERED (RECID)
I copied entire business and code database and created new AX Env. I am not sure if this error is there on source Env as well, but I want to resolve this on the new Env.
What I tried already:
Deleted the table from SQL Server Management Studio and then Synchronize from AOT but the error persists.
Tried to drop the index name from SSMS:
DROP INDEX I_100013RECID ON [ACOCOSTCENTERATTRIBUTEVALUE_BR]
But getting this error:
Cannot drop the index 'ACOCOSTCENTERATTRIBUTEVALUE_BR.I_100013RECID', because it does not exist or you do not have permission.
But on querying the indexes, it's showing the correct table:
select object_name(object_id) from sys.indexes WHERE name = 'I_100013RECID'
Output:
dbo.ACOCOSTCENTERATTRIBUTEVALUE_BR
- On checking sys.indexes there is an index by this name:
- But the index is not visible in the table:
EDIT 1: Additional Info
No conflict in table ID:
Table from SSMS:
Deleting table from SSMS:
Out of 3 indexes why are the 2 indexes not getting deleted when I delete the table from SSMS? Why only 1 gets deleted? Check below for the 3 indexes after synchronization. How to get rid of these? SSMS won't let me delete it telling ' Catalog cannot be modified'. Can I try to delete it by changing the settings on master data? I'm not sure what all tables related to this table are populated in the catalog.