When you synchronize Microsoft Dynamics AX with a table in Microsoft SQL Server, you receive the following error message:
Cannot execute a data definition language command on table_name. The SQL database has issued an error.
Additionally, an error message that resembles the following is logged in the Event Viewer Application log on the Application Object Server (AOS) server:Object Server 01: The database reported (session 1 (Admin)): [Microsoft][ODBC SQL Server Driver][SQL Server]CREATE UNIQUE INDEX terminated because a duplicate key was found for object name 'dbo.table_name' and index name 'I_xxxIDX'. The duplicate key value is (value1, value2). The SQL statement was: "CREATE UNIQUE INDEX I_xxxIDX ON table_name (column1,column2) "
Note- The table_name placeholder is a placeholder for the table name.
- The I_xxxIDX placeholder is a placeholder for the unique index name.
- The value1 placeholder and the value2 placeholder are placeholders for the duplicate key values.
- The column1 placeholder and the column2 placeholder are the placeholders that represent the column names.