Corrupt Dimension Value ID

tarkmylertarkmyler Member Posts: 57
edited 2015-02-23 in NAV Three Tier
I have a client on NAV 2013r2 Update 8 that has duplicate Dimension Value IDs in their Dimension Value table. Since the field has the Autoincrement property set to "Yes", this is supposed to be impossible. Now Dimension Set data is compromised and there is no good way to recover. Any ideas?

](*,)
Mark Tyler
Pacific City, OR

Comments

  • LgooLgoo Member Posts: 45
    This is not so impossible, because the field "Dimension Set ID" is not the only primary key field.
    Check this bevore working on Dimensions:
    http://msdn.microsoft.com/en-us/library ... 70%29.aspx
  • tarkmylertarkmyler Member Posts: 57
    I have spent my time and paid my dues with Dimension Set functionality.

    My concern is that once data corruption happens; in this case the Dimension Value ID being duplicated in the Dimension Value table - there is no recovery methodology. Incorrect dimension set ids are assigned and there is no methodology for rebuilding dimension sets from the posted data.
    Mark Tyler
    Pacific City, OR
  • tarkmylertarkmyler Member Posts: 57
    Just a final note on this issue that is important for those that will be manipulating dimension values.

    **** The Dimension Value ID is an auto-generated integer ONLY if the record is inserted with a null / zero value.

    We are creating default dimension values for items and failed to do an INIT on the record before the INSERT. We were unfamiliar with this type of integer field and its behavior in SQL. We assumed (incorrectly) that a new primary key would cause the field to auto-increment correctly.

    Lesson learned - always INIT the new dimension value record before inserting.
    Mark Tyler
    Pacific City, OR
Sign In or Register to comment.