Is there any way to have the NAS restarting itself automatically when the connection is lost ? I have deleted the session of the NAS running at the same database. Unfortunately I do get the annoying “Restart your Client” message on the screen of the machine where the NAS is running. Can it restart itself ? And if the answer is no. Any suggestions ?
Yes, and another (famous) message which stops the NAS: “Another user has modified the definition of the BlaBla table.”
If you kill the session there won’t be any possibility to restart the NAS itselfs. We build a tool which checks several messages in the Eventlog and can stop / start the NAS. Does NAS write a special message in the Eventlog when disconnecting its session (i think its SQL Server or?)? The message “Another user has” lets the NAS act in the same way like every other Error Message. It stops if you haven’t any kind of Exception Handling. The Difference is that you can’t do anything against this Message and must restart your NAS service to get the new objects.
That is exactly my problem. We have created a way to programmatically export/import objects into Navision using C/AL code. I also can kill remote sessions. What I would need now is a way to “restart” all connections to the server. The only way I see for now is to write my own program which controls the Navision Client and the NAS server (somehow). Means to have a executable which can start and kill the local Navision session it is controlling. Will be a hard job. I will bring up a suggestion to Microsoft I guess [;)]
I have the same problems. The main problem is that, as mentioned, when NAS gets stuck on a table that gets locked, it was pegging my NAS process at 50% and not doing anything. I had to manually kill the process through the task manager and restart NAS. I posted this at the MS Navision newsgroup, and it was suggested that a recent hotfix may solve this (we are on 4.0 SP1), but I’m willing to wait for SP2. One thing that has helped is that I set the service recovery options to run a program. Simply setting the service to restart did not work since the instance would still be running. I also downloaded a free utility called pskill from sysinternals.com which allows you to kill running processes. Then, the program I run is this batch command:
@echo off c: cd\windows\killnasvol1 pskill -t nassql.exe net start "NAVEDI-SQL" Note the assumption that you are using SQL, modify as necessary for CLASSIC.
Hi all, I have a program called ServiceKeeper installed at one of my clients. This program monitor the event log, and if there is a error/warning it restarts the service and sends out an email. This works great, and I don’t think the price was high either. When I researched the matter, I found several similar programs that did the same thing. Just search on Servicekeeper in Google and you will find it if you want more information. /Daniel
Just an additional information for all of you: I’m not talking about ONE NAS. I’m talking about thousands of them on different servers. So I need something which does not need to be installed or requires ANY manual action [;)]
Thomas: I do not know if this will quite answer your question, but we have done something similar w/ our clients. The NAS Service (as you probably already know) can be extremely picky w/ connections. We have had them crash because of object changes, misc. network influences, and other abnormalities. Because of this we developed something that has thus far been successful and basically eliminated connection issues. When a NAS server connects to the database, one of the first functions that it does is copy the entire object table to a temporary object table. Then, after each timer call, there is a check to see if any objects have changed (timestamp information). If there has been a change, Navision executes a VBS script that stops and then restarts the service on the NAS Server. It is executed as either a Text Constant (trusted) or a string value that we then manually Trust the first time the NAS server is executed. On top of this, you could modify it so that every so often the service stops and restarts just to possibly flush any connection issues. This could be setup as a job on the SQL Server (Windows Job/Task) and it could use a similar VBS script. We have found this a very effective tool w/ our NAS installations.