Hi,
I'm looking for some advice on how to modify large tables in a Native DB.
I have tables with millions of records and adding new fields or new keys is not trivial.
When stopping the database server and accessing the several db files directly (db1.fdb+db2.fdb+ etc.), internal errors reg. timeouts can mostly be avoided. Another option is to export all data in the table, delete the data in the table, add fields, and then import the data. Any other ways?
Do you have any suggestions for creating new keys? Again accessing the db files as above without the server minimizes the internal errors. Could I use the same trick (import/export) to speed up the process?
All suggestions are welcome, but switching to SQL is not an option.
Thanks,
0
Comments
Which NAV version do you use? How is the server configured? Which error do you actually get?
FD Consulting
The only think you can do is to buy the fastest hardware available. You can't do too much in optimization with the standard C/Side database.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
The error is 1355 in module 19, Err_DB_DBMNotReentrant.
The version is a 5.0SP1 runtime with a 54GB 2.00A database.
The tables contain about 10 mio. records. DB fill is about 70%.
TempFilePath has 70GB free space.
600 MB DBMS cache on the server. 3GHz dual core CPU, 3GB ram. 1 Gbit network.
Db server and the client I use to are on the same box.
The users (ab. 100 concurrent via terminal servers) do not experience any problems nor delays.
In the post http://www.mibuso.com/forum/viewtopic.php?f=23&t=8067 Timo Lässer has some good suggestions, but the only option I see is to try and increase the server cache (or replace the infrastructure and hope for the best).
Any suggestions?
Thanks,
http://www.gbusiness-solutions.com
You've already answered your own question. Again, C/Side database is limited on what can be done.
50GB database is not big. Why not just update the objects overnight?
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
There are three drives with one fdb on each. I once heard MS recommended no more that 2GB per fdb but now they have 3 x 18GB. Any thoughts on that?
There is some kind of raid controller in the box, but I'm not sure how it's set up.
Thanks,
http://www.gbusiness-solutions.com
What I would really like to see in your situation is whether a FusionIO Board helps (no David, no, don't shoot )
FD Consulting
This is really the essential part. A good configured Raid system can support your system but if its configured wrong you will get into trouble.
FusionIO: This is the best performance hardware I had ever in my hands but verrryyyy expensive. Less expensive hardware will give you enough firepower for a NavDB.
FD Consulting
Considering you still have 2.0 objects, you better consider a project from scratch and not just an upgrade+migration.
You should check which RAID the machine is using. If it is using RAID5 (why do I have a gut feeling you have?), you should implement a RAID1 for each db-file. (the more db-files and thus RAID1 disks you have, the better performance you will have.
Also increase the cache to as much as you can (I got 950MB once and even saw once a 1GB [the limit], both working without problems; in case the service doesn't start, try to restart the server to clean the memory:Seems NAV needs 1 big chunk of memory and doesn't like fragmented memory).
Also check if you have the commit-cache enabled.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I've asked the guys who set up the box for raid information, I will get back to you as soon as he gets back to me.
I'll try increasing the cache (commit cache is enabled).
I would love to build them a new system or even just migrate to SQL, but as they are awaiting the roll-out of the HQ's ERP it's a really hard sell.
Cheers,
http://www.gbusiness-solutions.com
Finally got the info I needed on the RAID setup:
Six 136Gb disks setup in 3 x RAID 1 with one fdb on each.
Disk 0:
C: (System) Cap. 30Gb Free Space 8Gb
(DB1) Cap. 107Gb Free Space 72Gb
Disk 1:
E: (DB2) Cap. 136Gb Free Space 80Gb
Disk 2:
F: (DB3) Cap. 136Gb Free Space 68Gb
This should be OK, no? Then there's just the cache to increase.
Thanks,
http://www.gbusiness-solutions.com
BTW: I just remembered that I've had the error a few times when doing a lot of data changes like a modifyall. The trick I used to solve the problem was:removing keys in the offending tables. On a native DB, this is not so easy. You must check all the code to see where a key is used and maybe you need to change the code.
If it is something you need to do very few times (during off-hours!), you can save the object, remove all the keys you don't need. Do your thing, re-import the original object.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Doesn't sound good at all. From comments above I gather that 50 gig is used. So 17gig per disk, that's too much you want that number down to about half that, so 6 RAID arrays would be better. More importantly though you MUST have the same size db parts for each part, otherwise Navision will not stripe correctly and the effect is the same as having less spindles.
My bigger fear is that actually the db parts are the same size, and you are putting other stuff on the raids.
Also note that drive is sharing the same physical disk as drive C:. Another configuration issue.
I missed that!
So far this is not looking like a well configured server.
So: not good. I supposed it was 3 spindles with ONLY the NAV-DB on it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I'll investigate if more disks can be added and the 3 equal size fdbs replaced with 6 or 8 equal size fdbs while keeping the system files and other files away from any fdb-disks.
Cheers,
http://www.gbusiness-solutions.com
I am also curious as to why you have such different sized db files on each of the drives.
Disk 0:
C: (System) Cap. 30Gb Free Space 8Gb
(DB1) Cap. 107Gb Free Space 72Gb => DB 18GB, Other Stuff 17GB
Disk 1:
E: (DB2) Cap. 136Gb Free Space 80Gb => DB 18GB, Other Stuff 38GB
Disk 2:
F: (DB3) Cap. 136Gb Free Space 68Gb => DB 18GB, Other Stuff 50GB
FD Consulting
http://www.gbusiness-solutions.com
Why would it matter if there are other files on these drives? Suppose they are old backups or other rarely accessed files?
RIS Plus, LLC
Not trying to pick a fight. I just wanted to know why it would cause a performance issue.