Table 同步错误。无法删除索引,因为它不存在或您没有权限

Table synchronize error. Cannot drop the index because it does not exist or you do not have permission

我为此 table 添加了一个字段:STG_INVOICE_SUP_VW

但是后来我无法同步 table 所以我删除了它。现在,如果我尝试同步任何 table,它会在下面抛出此错误:

Cannot execute a data definition language command on (). The SQL database has issued an error.

SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot drop the index 'STG_INVOICE_SUP_VW._dta_index_STG_INVOICE_SUP_VW_25_692157136__K7_1_2_3_4_5_6_8_9_10_11_12_13_14_15_16_17_1', because it does not exist or you do not have permission.

SQL statement: DROP INDEX STG_INVOICE_SUP_VW._dta_index_STG_INVOICE_SUP_VW_25_692157136__K7_1_2_3_4_5_6_8_9_10_11_12_13_14_15_16_17_1

Problems during SQL data dictionary synchronization. The operation failed.

Synchronize failed on 1 table(s)

尝试直接在 SQL 服务器中创建索引 STG_INVOICE_SUP_VW._dta_index_STG_INVOICE_SUP_VW_25_692157136__K7_1_2_3_4_5_6_8_9_10_11_12_13_14_15_16_17_1,然后在 AX 中重新运行 数据库同步。

编辑:

整个问题与从 SQL 端创建的附加索引有关。 如果您从 SQL 端在 AX tables 上创建索引,那么要么您将无法同步 table,要么您创建的索引将在同步时被删除(如一些用户)。
您应该从应用程序对象树创建索引。

我从 SSMS 中删除了索引,然后同步工作正常。

还解决了一个问题。增量 CIL 在下面引发错误:

Cannot create a record in SysXppAssembly (SysXppAssembly). The record already exists.

对于增量 CIL 问题,我已经完成了此处指出的步骤,但没有解决:

  1. Stop the AOS Navigate to the XppIL folder in your AOS server “C:\Program Files\Microsoft Dynamics AX\Server\YourAXInstanceName\bin\XppIL”
  2. Backup the files from the XppIL folder.
  3. Delete the files from the XppIL folder. Note: files only not sub folders.
  4. Restart the AOS.
  5. The XppIL folder files will be created after the AOS restart

来自这个link:Community.Dynamics

修复 table 同步问题后,增量 CIL 运行 没有问题。