Navision Temp DIrectory

Hi, This is Prashant here again…In fact I have 2 doubts to clear here. I am facing a typical problem in our company. We are in retail business running Navision 4.0 SP3 with SQL Server 2005. The problem is that our stores have Navision 4.0 SP3 with its own native database. I hope you got my architecture the stores run Native Navision and at the End of the day it connects to the main database (running Navision 4.0 SP3 with SQL Server 2005) which is lying in our Headquarters.

  1. Now the problem which is in the store…Recently we found that the Native database in the store gets deleted by itself and we are very puzzled how is it happening. One or two stores is understandable but this is happening in 5-6 stores. The native database datafile gets deleted by itself…no logs no events logged in no clues…We recently upgraded our antivirus to the latest version (Symantec Endpoint) in our organization…Is it something to do with the antivirus software. Should we exclude certain files I mean the datafile of the Native database. We called in the Symantec guys too but in vain …its happening again and again. What could be the reason? Are there any best practice to be followed where the Native database is concerned? Are we missing anything ? Your experts comments & views on this would be really appreciated.

  2. Not a problem but a doubt…We all know that SQL Server uses the tempdb for sorting & calculations that needs to be carried out on a day to day basis…But when Navision comes in it totally ignores it and uses its own temp directory. Here I noticed that it creates very small files named like junk file names and then deletes it. At given point of time there are not more that 6 files sizing not more than 132 KB. Just for my curiosity I deleted the contents of the directory and found that Navision wont start without these files. What could be this? What information does Navision store here? I would like to know what is the significance of this Temp directory? What all does happen here?

Can the gurus enlighten me on this subject in brief? I hope it is not much… Awaiting for your comments and views Best



I’m no guru, but I would defiantely exclude your Native DB files from the virus scan, especially any real time checks as well as scheduled scans. If its getting deleted by something else, modify the permissions so the logged in users do not have delete permission at the NTFS layer.

The temp directory you speak of is in no way related to tempdb. Tempdb is a SQL back-end database, with no special relation to Navision. Your tempdb database will still be used, just only by SQL server and not the Nav client directly. As to what the temp directory holds, I have no idea. I would presume cache of some description?

Still not convinced Legosz …asto why the database gets deleted…as for the files to be excluded I have done that…thanx for that…any more valuable inputs regarding the Native database would be great as to how to protect them…as we expereinced this in 5-6 stores in random in a location.

It still beats me what significance is the Navision Temp Directory hold…When I observe it especially while running the Cost Batch I see very heavy duty work going in here…creation & deletion of junk like files around 6-7 in number of small sizes (in KB’s). How important is this file to Navision ? Even If I disconnect from the Server the files still exists in the directory. If I delete these then Navision wont start prompting that it needs the file.

I know its going very deep …What I am trying to co-relate is does this file & Symantec delete the database file…I have seen this in front of my eyes…the .fdb file just gets dissappeared …no logs …no events logged …I am pretty amazed & confused.



With the Native DB deletion, modify the NTFS permissions and set delete for everyone to deny (you’ll need to go into advanced). If the file still goes missing with this in place… well something really nasty is happening. If this stops it from happening, gradually relax the permissions until you find out what account is doing the deletion. From there you can work forward to what processes or users are associated to that account.

We once had some template files (for another system) go missing on an almost monthly basis. Turns out one tech doing maintenance had a script that deleted all .tmp files. His script was somehow flawed that it deleted all .tmpl files too - these were the template files. Sometimes causes like this can come from left field.

With the tempdb - we need to make the distinction between a SQL transaction and Navision’s temp work area. If you have ever run SQL profiler against Navision you will notice that generally speaking the transactions issued to the database engine by the client are very simple. This means the Nav client is doing a significant portion of the processing work on the client side. I suspect this client side work is what is causing the generation of your temp files.

As to the specifics of the temp files individually and the Nav clients dependency on them, I can’t speak to those. That question may be better placed in another section.

Good luck with the troubleshooting!


Hi Prashant,

I have been working with Navision for many years, and I must say that issues like this are very common. I have had customer report many strange things that Navision does at night all by it self when no one is logged into the system. As well as the database being deleted, I have seen Sales orders that get magically deleted at night, Customer names that change randomly all by them selves. Documents that self destruct. Even GL entries that delete themselves when no one was in 200 kilometers of the Navision server.

On a more serious note, we eventually resolve these and find out who or what was doing it. But allways the hardest part of the analysis and evenual solution is to get the client to beleive that Navision does not do stuff like this all by it self. Once you have the ability to acknowledge this FACT you can then set about solving the actual issue.

Step one is to open your eyes.

Thanx Legosz & David for your valuable inputs…I will get back to you once I resolve this…



Regarding the Temp files on the client machine - there are many uses of them from c/side, among them:

  1. Each language’s .stx and .etx file are placed in a cache as temp files.

  2. Each time a Temporary table reaches a certain size, its binary tree becomes a temp file.

  3. Temp files created by AL code are created there.

  4. The help system index uses a temp file for the topic index.

I would advise against deleting them. Is there a reason that you are interested in them?

  • Thanx Dean, that was very useful….Are U interested in it ? Yes, coz when I have completed all my transactions & done with my work & I disconnect NAV still I find these files…and when I delete them NAV wont start…I wanted an indepth overview of the same if available somewhere.
  • Also I tried what Legozs suggested to me above but still I am not able to close in as to why the .fdb file gets deleted on its own…some say its the virus and there is a shortcut called fin on the desktop which the end users double click to open the application…they say that the virus takes the path mentioned in the shortcut on the desktop and goes to the target destination and deletes the file…sounds ridicoulous but cud be true…My guess its the symantec endpoint (version 11 ) which we are using…



As David mentioned, you need to stop thinking of it as being ‘deleted on its own’. Navision would not be deleting its own database. There is something else causing your DB file to be deleted. You need to fall back to generic troubleshooting skills for this one.

Have you confirmed the permissions are correctly assigned? i.e. did you try and delete the file manually yourself to confirm you were denied?

Try creating a batch file that launches Navision, and point the shortcut to that. You’ll soon rule the virus idea out (or confirm it if the batch file goes missing).

Otherwise, I would suggest the below options:

  • Temporarily uninstall your anti virus if you really think this is a possible culprit. Normally that type of software keeps logs of its activity in its own log files
  • Write a small batch file to monitor for the file, and schedule it to run each minute using task scheduler. Something like if exist c:\mydbfile.fdb time /t >> logfile.txt That will tell you at what tile the file was deleted as you will end up with a text file called logfile.txt with a list of times - the last time in the file will be when it was last found on disk.
  • Run an offline checkdisk and possibly an offline virus scan (better chance of finding root kits if they are present).
  • Find some advanced file monitoring software.

Good luck