1

I added a field to this table: STG_INVOICE_SUP_VW

But then I wasn't able to synchronize the table so I deleted it. Now if I'm trying to synchronize any table it's throwing this error below:

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)

enter image description here

Mohammad Yusuf
  • 16,554
  • 10
  • 50
  • 78

2 Answers2

2

Edit:

Entire issue was related to an additional index created from SQL side. If you create an Index on AX tables from SQL side then either you won't be able to synchronize the table or your created index will be dropped on synchronization(as suggested by by some users).
You should create indexes from Application Object Tree.

I Deleted the index from SSMS and then synchronize worked perfectly.

It also solved one more issue. Incremental CIL was throwing an error below:

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

For incremental CIL issue I had already done the steps pointed here but it didn't fix it:

  1. Stop the AOS Navigate to the XppIL folder in your AOS server “C:\Program Files\Microsoft Dynamics AX\60\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

From this link: Community.Dynamics

After fixing the table sync issue, Incremental CIL ran without issue.

Mohammad Yusuf
  • 16,554
  • 10
  • 50
  • 78
0

Try creating 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 directly in SQL Server and then re-run DB sync in AX.

10p
  • 5,488
  • 22
  • 30
  • Some of the option you can try is restarting AOS, Re-indexing from SQL Administration Form or dropping table from backed and then do db synchronize – Pradeep Muttikulangara Vasu Aug 10 '18 at 21:11
  • I didn't create that index. It isn't required as well. Deleting it solved the issue. Check my answer. – Mohammad Yusuf Aug 11 '18 at 08:05
  • 1
    OK, good. It was one or the other. Either there was no index that AX was trying to drop so you'd have to create it in SQL Server yourself first, or there was an index that AX was failing to drop so you had to do it from SQL Server yourself. The bottom line is that such DB sync issues normally have to be looked at from SQL Server side. – 10p Aug 11 '18 at 09:16