Tuesday, January 14, 2014

SOLVED :"Illegal data conversion from original field : unable to convert data types to anything but character field type." Ax 2012 / Synchronization

"Illegal data conversion from original field : unable to convert data types to anything but character field type." 
We often encounter this error while trying to full / partial synchronize database from AX 2012/ Ax 2009 to SQL. I have been trying to figure the exact cause of this error for a long time. But the workaround as suggested by a few in the blogging world which also helped in my case is :

System kernel table : SQLSYNCINFO

This table accumulates the sync issues , and are not reconsidered, which means that old errors which were not solved, or errors of tables dropped still remain in this info table.

truncating this table data from sql and resynchronizing the entire db again from AX helped me get over the problem.

Steps i followed :
1.  Stop AOS
2. So go Sql Management Studio
3. Navigate to SQLSYNCInfo table, and delete the unwanted table records.
Alternatively, also truncating the entire table helps

SQL Management studio, run the following query on the DB

truncate table SQLSYNCINFO.

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi,
    Thanks fro the great post. I've read about SQLSYNCINFO table here: https://msdn.microsoft.com/en-us/library/sqlsyncinfo.aspx.
    It says "Once the synchronization process is complete the information in the table is deleted."
    I've double checked in my db. Yes, it's always empty aftr sync.
    Then why to truncate?

    ReplyDelete
    Replies
    1. Even though its a late post i will answer for anyone coming across this, you truncate it if for example Sync failed, the error could be for example could not rename field X to field Y and you fixed the issue by for example deleting all the fields in SQL that cause the issue. The next time you sync it will still try to rename the field even though they dont exist anymore. Clearing that table and compiling it will then sync it correctly.

      Delete