Hi all,
We have a customer where a model was installed previously. Instead of updating the model, the old model was deleted and the new version installed. That caused some DB sync errors on creating indexes. This is happening on AX2012R2 with CU7 and various kernel builds, including the latest.
The error is:
Cannot execute a data definition language command on (). The SQL database has issued an error.
SQL error description: [Microsoft][SQL Server Native Client 10.0][SQL Server]Column name 'PARTITION#34' does not exist in the target table or view.
SQL statement: CREATE INDEX I_106718BATCHIDX ON "DBO".TABLENAME (PARTITION,RELATIONTYPE,PARTITION#34) WHERE INSTANCERELATIONTYPE IN ( 106718 )
Indeed the field Partition#34 was not defined. When looking at the table in the SQL database, it appears that almost all columns are wrongly define. They do have fields like Partition#34,Partition#35 and DataAreaID#21,DataAreaId#22. Also when we look at the table SQLDictionary, we see fields like Description created with SQL name Partition#34.
The field types used for the table columns in SQL are also incorrect.
There are various environments where only one environment does have this issue. As there is some important data and also the latest developments in this environment, we cannot simply refresh it from the Production or another Test instance.
Does anyone encounter this same issue before and found a solution to have the correct columns again in the SQL database and the SQLdictionary table?
*This post is locked for comments