web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Synchronization fails on InventDim table

(0) ShareShare
ReportReport
Posted on by 1,115

Dear All,

I created some fields in the InventDim Table.After i created the field the synchronization on invent dim table failed.i tried to sync the table but everytime it failed to sync, so i deleted the table and the table is on sys layer now even then i am not able to sync the table and i get the following error

SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]ALTER TABLE DROP COLUMN failed because column 'TRI_ONHANDLENGTH' does not exist in table 'INVENTDIM'.

Here "TRI_ONHANDLENGTH" was the name of my field.

I viewed the table in sql and in sql also there is no such field now but still i am not able to sync the table.

Kindly help.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Sohaib Cheema Profile Picture
    48,893 User Group Leader on at
    RE: Synchronization fails on InventDim table

    Check it Here

    This way can be helpful for you.

  • Chandan Sharma Profile Picture
    1,115 on at
    RE: Synchronization fails on InventDim table

    where??

  • Verified answer
    Sohaib Cheema Profile Picture
    48,893 User Group Leader on at
    RE: Synchronization fails on InventDim table

    Click on Here (Blue colored) or go on following link

    smcdax.blogspot.com/.../dynamics-ax-database-synchronization.html

  • Douglas Noel Profile Picture
    3,905 on at
    RE: Synchronization fails on InventDim table

    Hi Chandan,

    Ax doesn't try to synch the table (generating the appropriate sql statement to add modify fields) comparing the cuurent layout in the database with the layout in the aot. (modelstore)

    Instead a "helper" table is used within the normal ax database - sqldictionary.

    It seems in your case, that ax thinks it has a field TRI_ONHANDLENGTH (which isn't really part of that table) because there is an entry within sqldictionary (did you mix up model databases and normal databases from different environments?)

    The content of that table (for the inventdim table) doesn't seem to match the current structure as seen from aot/model sight.

    So you have to repair the sqldictionary to match the current structure

    Lets take a look using SSMS

    select F.* from SQLDICTIONARY F

    where F.FIELDID != 0

    AND   F.TABLEID =

    (select TABLEID from SQLDICTIONARY

    where FIELDID=0

    and   NAME='INVENTDIM'

    )

    The output shows what ax currently thinks it has. Maybe there is an entry for the decribed field here.

    === do not do the following in production ========================

    Here is one way to rebuild the table (but only do this if you can't overcome the problem repairing the sqldictionry entires in a testsystem)

    - make a copy (or rename) the table in ssms. delete all indices on that renamed table.

    You will not habe a InventDim at this moment

    - now delete all inventdim related entries from sqldictionry table

    delete from SQLDICTIONARY

    where SQLDICTIONARY.TABLEID =

    (select A.TABLEID from SQLDICTIONARY A

    where A.FIELDID=0

    and   A.NAME='INVENTDIM'

    )

    - now sync inventdim. Ax generates a fully create table with all fields command.

    - now you have a fresh but empty inventdim within database.

    now copy the data from the copied (or renamed table) back to the empty inventdim using the export import table data tool from sql server or issue a single insert command by yourself

    insert into inventdim (field1, field , ......)

    select field, field, ......

    from copiedoldinventdim

    regards

    Douglas

  • Suggested answer
    Anton Venter Profile Picture
    20,301 Super User 2025 Season 2 on at
    RE: Synchronization fails on InventDim table

    Hi, add the missing field back again using SQL Enterprise Manager and try again.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Community Member Profile Picture

Community Member 2

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans