Navision table triggers not SQL Server table trigger.....?

gisongison Member Posts: 128
Dear all,

I'm trying to find out how the Navision store its objects in SQL Server Database. Firstly, I cannot find Navsion table trigger in corresponding Database Table trigger, so I think probably Navision use different way to store its objects....then I found there are a log of table named as companyName+ some mysterious number.......
Is't the Navision objects store in this kind of tables...? Does anyone know the rule of table naming... :?

thanks for any idea.

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    AFAK the objects are stored as a BLOB in the object table.
  • HalMdyHalMdy Member Posts: 429
    Hello !

    1. Navision table structure and code (incl. triggers) is saved in a SQL table called "Object" (as I remember).

    2. Tables with ComanyName-numbers are Navision index tables, saved in SQL.


    Hope that help,
  • kinekine Member Posts: 12,562
    NAV is not using SQL to run any application code. All is done on the client. The numbered tables are SIFT tables which are used for fast sum calculation. The number is ID of the table, second no. is ID of the Key. If you want to know more, I recommand to read some documentation (e.g. Application Designers Guide).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • gisongison Member Posts: 128
    thanks you two,

    on the other hand, if I export table: Object then import to different database which have same company name and same object id.
    This is mean all the objects be synchronized except data. am i right? :?

    appreciate your idea.
    :wink:
  • kinekine Member Posts: 12,562
    gison wrote:
    thanks you two,

    on the other hand, if I export table: Object then import to different database which have same company name and same object id.
    This is mean all the objects be synchronized except data. am i right? :?

    appreciate your idea.
    :wink:

    Not exactly, and I recommand to NOT DO THIS. It will "synchronize" the object definitions, but it will not "redesign" existing table structures and definitions! And because you will have another NAV definitions of the tables and another physical table structure, you could have big problems. Just export the objects as FOB and import them as FOB through the NAV client.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • gisongison Member Posts: 128
    Hello Kine,
    thanks your precious advice and explanation.
    If back to the other question.
    HalMdy said tables with ComanyName-numbers are Navision index tables,
    These index tables.... is't like database index.... we better have but not if we don't have it, system still can work, or does these have anything special point.. :?

    appreciate any idea.
  • kinekine Member Posts: 12,562
    It is "you must have" if you want to have correct, consistent database. These tables are created by NAV and are maintained by SQL triggers on the tables. If they are not existing, the triggers will lead to errors and you will not be able to do anything. But, please, describe why you want to know all that. For me it seems that you want to "recover" something from some DB or you are playing some dangerous game and it is not good. Can you throw more light to this?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • gisongison Member Posts: 128
    Hello Kine,

    I'm just trying to understand the structure between Navision and SQL server :o firstly, i just detected the Navision table triggers are not really the database level's table trigger.... it's interesting......the Navision component seem to just have tables and some stored procedures put in the database.....
    :?
  • gisongison Member Posts: 128
    by the way, this is difference architecture with some other ERP system....they just put the table trigger on database level...
  • kinekine Member Posts: 12,562
    You need to know that NAV is not build for SQL, it has own Native Navision Server which was developed together with the client in DOS times. Support for MS SQL server was added in version 2.01 and it was just the "second option" for the client. SQL is just the database backend for the NAV and all the logic is done in the NAV client. C/AL is interpreted language, it means that NAV client read the definition of the object and interpret the language commands. It is something like first versions of Basic interpreters.

    And because Native DB support something called SIFT technology (Sum Index Fields technology - precalculated sums for groups of records), they needed to support this technology on the MS SQL. And it is solved with the "numbered" tables and table triggers updating them. This will change in NAV version 5.0SP1, where the indexed views will be introduced for that.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • gisongison Member Posts: 128
    thank you Kine,

    sorry, please allow me back to previous question, because I'm confused again.
    I checked the table: Object .... In the discussed before, the Navision save the objects in this table...with Blob type.... but when i checked the row in this table, the columns about Blob... like "Blob Reference", "Blob Size" are all null... so...what's happened the Navision objects? :? where were they saved?

    sorry... for trouble you all again.
  • kinekine Member Posts: 12,562
    BLOB reference is the field keping the object definition. If the fields are empty, may be that you are looking to some screwed DB. Are you able to connect to this DB through NAV client?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • dmccraedmccrae Member, Microsoft Employee Posts: 144
    The BLOB Reference field values are NULL for "Table Data" object types, where the Type field of the Object table is 0. For all other Type values there is a BLOB Reference value containing the object binary format.
    Dean McCrae - Senior Software Developer, NAV Server & Tools

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • gisongison Member Posts: 128
    Hi Kine,
    I was wrong....as dmccrae said, just table data has empty field.

    :?

    thanks all of you.
Sign In or Register to comment.