Skip to main content

Microsoft Dynamics NAV 2015 - How to Setup NAS & Job Queue

Hi All,

In today’s article we will see how we can setup NAS in Microsoft Dynamics NAV 2013, NAV 2013 R2 and NAV 2015.

Till Microsoft Dynamics NAV 2009, NAS used to come as a separate exe, which first need to be installed and then configured separately for Scheduling Jobs.

If you are looking NAS for NAV 2009 or Previous Refer here. 

If you are looking How To Setup Job Queue For NAV 2009 or Previous Refer here.

If you are looking How to Setup Job Queue and NAS in NAV 2016 Refer Video Here.

With NAV 2013 and Later Microsoft Changed the way how NAS is executed –

 - Now NAS is executed at the service tier.
 - NAS is now part of Microsoft Dynamics NAV Administration for configuration.

The Best Practice I would suggest to configure NAS is to create a Separate Service with –

- No Access to User. (Connection String is not shared)
- Service Account (Account used to run services) – Should have sufficient permission in SQL and Navision.

So let’s open Microsoft Dynamics NAV Administration and configure NAS.
** For the Demo I am using NAV 2015, but step remain same for NAV 2013 and NAV 2013 R2.



As you can see in above image, we have a Separate Tab for NAS configuration. Some parameters are known, but some are new. Let’s understand every Parameter.

Enable Debugging (If you want to debug NAS Session) - When this setting is enabled, the NAS services session waits 60 seconds before executing the first C/AL statement, to allow time for activating and attaching the NAV Debugger to the NAS services session.

Retry Attempts per Day - The NAS Services on a tenant is restarted after a failure up to the configured number of times in a 24 hour period. Once the limit is exceeded, it fails permanently.

Startup Argument – Yes we know it. The available options remain same as old days.
"ADCS, ADCSID=1"    OR “OSYNCH" OR “JOBQUEUE"

Startup Code unit – Specifies the codeunit that contains the method that will be called by the NASStartupMethod setting.

0:  NAS Services do not start.
1:  Run the trigger specified by the NAS Startup Method in codeunit 1.
450: Run codeunit 450 (Job Queue - NAS Start Up), and call the method specified by NASStartupMethod.

Startup Method – Specifies the method that will be called in the NASStartupCodeunit.

"": If no start method is specified (null string), the OnRun trigger is called.
StartNAS: NAS services runs the StartNAS method in the NAS Startup Codeunit.


If you are trying to replicate the Old NAS here are the Values –

Parameter
Value
Enable Debugging
Based on Requirement. (Default – FALSE)
Retry Attempts per Day
Based on Requirement. (Default – 3)
Startup Argument
JOBQUEUE
Startup Code unit
1
Startup Method
StartNAS

** Make sure that the new service which you configured is running with a domain account having sufficient permission on SQL and Navision. Change here as below, do not keep it Network service.

After this the configuration is completed. Let’s start Navision and Navigate to Job Queue.
.../Departments/Administration/Application Setup/Job Queue

First Thing we need to setup is Job Queue Category List. With the Category the Job Queue and Job Queue Entries are grouped. So Just add Code and Description as per your need.


Next is to create Job Queue Entries, which are same as of old days.


You can setup the parameters as you used to. 

 - Select the Report or Codeunit that you want to schedule. 
 - Select Parameter if required.
 - Select Job Queue Category Code Created above.
 - Other parameters are self explanatory. 
 - In The Next Tab (Recurrence) you can setup when you want to run the batch and also the start and end time when it should run on the selected day.
 - And between the Starting and Ending Time, how frequently you want to run (in minutes).

Next is to Create a Job Queues as shown below.


With NAV 2013 onwards, if you want to setup to run automatically then setup the NAS Settings Tab. 

If you are testing then Don’t configure the fields in the NAS Settings and for testing use Start Job Queue and Stop Job Queue from actions.

Once you setup you should see something like, which means Job Queue running.

You can check the status of Running jobs using ” Job Queue Log Entries”.


Hope you find the article useful. 

If you have any issues let me know.

Regards,
Saurav Dhyani

Comments

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

RTC Report It is not possible to instantiate the Visual Studio bridge.

Hi all, As a Navision developers I have Multiple Versions of Navision running in single Machine. As discussed Earlier in the post how to run multiple Version of RTC in single machine. So my machine have following details for RTC Versions - NAV 2009 R2    - is installed. NAV 2009 SP1  - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 SP1 IN\ NAV 2009         - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 IN\ This approach has been working great for execution of Classic and RTC Clients. However, after installing Dynamics NAV 2009 R2, if i tried to view the Layout for an NAV 2009 SP1 Report i was getting the following error: ---------------------------  Microsoft Dynamics NAV Classic  ---------------------------  It is not possible to instantiate  the Visual Studio bridge.  ---------------------------  OK    --------------------------- After searching for the error i figured out the issue was due to - Design change in NA

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.