Management Reporter on R3 no CU install error fix

I was setting up Management Reporter in the following scenario: AX 2012 R3 (no CU), SQL 2014, Management Reporter (ran from the R3 disk, then applied the CU11 update, before starting the configuration); and ran into the following error: "An error occurred while configuring SQL change tracking. Check your deployment log for details.".

Looking in the logs I noticed the error: "An error occurred while configuring SQL change tracking. The error message is as follows: System.Data.SqlClient.SqlException (0x80131904): Cannot enable change tracking on table 'RetailTerminalTable'. Change tracking requires a primary key on the table. Create a primary key on the table before enabling change tracking.". So the PK set on the table was not getting to SQL. I think it has to do with the fact that I do not have a valid Retail license, so the db sync process does not actually syncs the table with the PK definition (which in this case is not the SurrogateKey, but rather a natural key).
The fix was just to change the PK in AX to RecId (I did it like this and not in SQL directly because the index would have been dropped when ran a sync again).

No comments:

Post a Comment