How to know all the list of tables which are filled in?

gdkve9gdkve9 Member Posts: 161
Hi dear forum mates..

Hope everyone doing good inspite of the world being in recession period as we are all into dynamics group.

Have one query from me. Zst wanted to know the best way to find all the list of tables which get inserted(filled in) when a complete purchase process or complete sales process is done right from creation of the order till invoice posting. All the tables if any struture related also needed to be known.

I used to do this using Code coverage but I think this is not 100% correct as this covers only the tables where the system reads the code but not the tables in which data gets inserted.

Hope I could get some better solution for this :-k .

Thanks and regards in advance :)
Dilip
Falling down is not a defeat..defeat is when you refuse to get up.

Comments

  • MBergerMBerger Member Posts: 413
    Use the client monitor for something like this, it will record which DB transactions occur. so start the client monitor, do whatever you want to monitor, and then stop it again. Do realise that it will impair performance.

    Tip : Use the advanced Client monitor from the Navision Tools CD, it makes everything much easier to read.
  • gerdhuebnergerdhuebner Member Posts: 155
    It may be that Client monitor is a little bit awesome, because there could be temporary records inserted, there could be records inserted and deleted in the same transaction, ...
    If you only want to know into which tables records have been inserted you could write a little piece of code, which saves the number of records in each table before the transaction (you can extract that information from the system table 2000000028 "Table Information" and save it to some new table). Then you have to run your transaction. At last you need another piece of code which checks, in which table the number of records has changed...
  • BeliasBelias Member Posts: 2,998
    It may be that Client monitor is a little bit awesome, because there could be temporary records inserted, there could be records inserted and deleted in the same transaction, ...
    If you only want to know into which tables records have been inserted you could write a little piece of code, which saves the number of records in each table before the transaction (you can extract that information from the system table 2000000028 "Table Information" and save it to some new table). Then you have to run your transaction. At last you need another piece of code which checks, in which table the number of records has changed...
    what about using code coverage, filter with "no. of hits" >0, and then filter the code with *INSERT*...and that's it...(there are some tables that maybe you don't need...check them (e.g.: maybe you don't need buffers and journal lines))
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • i4tosti4tost Member Posts: 208
    There is a tool called Right Manager. This tool can create you permissions for all objects that will be used in any of your actions. By using this tool you will be able to find out which tables will be used and records will be inserted.
  • gdkve9gdkve9 Member Posts: 161
    i4tost wrote:
    There is a tool called Right Manager.

    Can you provide me some link where I can download the Right Manager Tool. I have tried finding it but I didnot find it :(

    Would be very thankful to you.
    Dilip
    Falling down is not a defeat..defeat is when you refuse to get up.
  • gerdhuebnergerdhuebner Member Posts: 155
    Belias wrote:
    what about using code coverage, filter with "no. of hits" >0, and then filter the code with *INSERT*...and that's it...
    In an arbitrary transaction there may be code like this:
    SalesHeader.INSERT;                     // create a temporary Sales Quote to get the sales price 
    ...
    SalesLineTemp.VALIDATE(Quantity); // retrieves the sales price
    SalesHeader.DELETE;                     // delete Sales Quote again
    
    As a result the transaction has not inserted any records at all, but client monitor (or Code Coverage) says something different at first glance... -
    what I wanted to say is: The method you may chose depends on the question, and I understood the question as: "How many records have been added?" and not as "How many times has the INSERT function been called?".
    But there is yet another difficulty, which makes both methods more or less invalid in a (very) special case, when the transaction inserts and deletes record(s) of the same table and it is not clear whether one or more of the deleted records have been inserted before in the current transaction or not, but in that case the question has to be put more precisely...

    Last but not least there is another aspect, which perhaps makes Client monitor the right tool. Consider the posting of a sales order, e.g. - There is at least one COMMIT in the posting routine (after the Posting No." has been determined) - With the method of comparing the number of records per table before and after the posting routine, it cannot be determined in which transaction the record(s) have been inserted or added. So if the question is to be answered for a single transaction, in general only client monitor (not Code Coverage) can give you the answer (without additional code).
  • BeliasBelias Member Posts: 2,998
    you're right, my method is intended to be used by someone that more or less knows the code he's analyzing, or at least, he have to investigate in the code if the inserted variable is temporary or not(for example). "Insert" instructions are not a lot in a transaction, and it does not take a long time to anlyze some factors e.g. if the variable is temporary or if the line is deleted ("delete"/"deleteall" instructions are usually less than "insert"s) for every insert instruction.
    i didn't want to say that my method is accurate. :mrgreen:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
Sign In or Register to comment.