How to pre-create column in SQL Server to speed up Nav FOB import

We've been using Nav 2009R2 for about five years now, and the process of adding new columns to certain large tables (sales invoice line, etc.) has become agonizingly slow.

We've experimented with adding the column at the SQL Server level in an attempt to have the column "prebuilt" when the FOB import for the table happens, and a process that currently takes a couple of hours (creating huge locking trees if we attempt to do it any time other than wee hours) seems as if it could happen in a few minutes if we could just get the details correct -- as in running a script to add the column, set the default values, and clean up any constraints that differ from what Nav generates takes a few minutes.

But no matter how perfect the table looks, Nav still decides that it needs to add the column instead of using the existing column, which of course fails because the column name must be unique.

Does anyone know enough about the Nav internals to know what it is that Nav uses to determine which one of its columns corresponds to which one of the SQL Server columns? Is there some metadata somewhere that we could discard and rebuild after importing from text instead of FOB?

The fact that this post http://vjeko.com/how-i-reduced-data-upgrade-time-by-78-hours/ involves renaming columns at the SQL Server level seems to imply that what we are doing should be possible, but the details are obviously different.

Best Answer

Answers

  • njhansennjhansen Member Posts: 37
    Thanks, we tried it in test last week, and over the weekend in live, and it seemed to work.
  • NavNabNavNab Member Posts: 181
    I'm glad it helps.
    I forgot to mention that if your new column is included in a key then you should handle this also in SQL (but in this case I do not recommend to do it SQL way ;) )
Sign In or Register to comment.