“ALL About” How To Boost Dynamics NAV Server


Hi Guys,
another post of “ALL About” Series, in this case, some people have asked me about NAV configuration and how to configure NAV Server for better performance (Boosting
NAV..);  also in Microsoft Forum there are several posts about this topic, i searched and collected a variety of useful information for a correct NAV Server configuration.
Documents and Posts
“Great White Paper” about typical questions around the number of users or tenants, hardware requirements, scaling, and upgrading
-> “…How to have a great configuration and “How-to Boost NAV”!!
“This white paper provides detailed insight into the concepts and principles that support performance testing in Microsoft Dynamics NAV”.
By outlining some sample goals from the start, it explains how you can use load testing to optimize your application and hardware to meet the customer and user requirements – addressing typical questions around the number of users or tenants, hardware requirements, scaling, and upgrading”
Below some useful information about NAV Server Configuration.
NAV Server Configuration Best Practices (from Whitepaper)
1) Number of Microsoft Dynamics NAV Service Tiers
When a client connects to Microsoft Dynamics NAV Server, the load balancer will select a server and keep the connection open throughout the lifetime of the client.
This means that setting up more servers behind a load balancer will increase the capacity of the cluster of Microsoft Dynamics NAV Service tiers.
2) Server Memory
Each Microsoft Dynamics NAV Service tier needs 500Mb of memory to run.
On top of that, the Microsoft Dynamics NAV Service tier needs memory for each active session, even if they are idle.
The more pages the user have opened, the more memory gets allocated, but a good starting point for doing sizing calculations is around 10Mb per active session.
Idle sessions are not terminated if they are running the Windows client.
Server CPU (cores and speed) Faster CPU will get things done faster, and more cores can run more things in parallel.
Idle sessions on the Microsoft Dynamics NAV Service tier don’t use any CPU power, except for generic housekeeping, which shouldn’t be counted.
3) Server CPU (cores and speed)
Faster CPU will get things done faster, and more cores can run more things in parallel.
Idle sessions on the Microsoft Dynamics NAV Service tier don’t use any CPU power, except for generic housekeeping, which shouldn’t be counted.
Active sessions will use CPU power depending on what they do, but it is hard to generalize how much.
For example, CPU power is used whenever the user is performing a task that requires the Microsoft Dynamics NAV Service tier to run some business logic or perform some UI logic or setup server pages.
If the Microsoft Dynamics NAV Service tier does a lot of IO (SQL calls or client callbacks), then the CPU will be waiting for response and thus be loaded less.
4) Data Cache Size
This is a Microsoft Dynamics NAV Server setting, which located in CustomSettings.config file. Sets the data cache size. This is an abstract value with contextual meaning on the type of the item being cached.
<add key=”DataCacheSize” value=”9″ />
The number you specify in DataCacheSize setting determines how much memory is used for caching data.
The actual amount of memory (in MB) allocated is 2n, where n is the value of the DataCacheSize setting:
Value Memor y 9 (default) 512Mb 10 1Gb 11 2Gb 12 4Gb 13 8Gb 14 16Gb 15 32Gb …
When running a single tenant system the default value of 9 is probably good.
When running a multi-tenant system, the data cache is shared between all tenants.
Set to 0 to disable cache.
boost2
5) Metadata Provider Cache Size
This is a Microsoft Dynamics NAV Server setting, which located in CustomSettings.config file.
Sets the Metadata Provider cache size (in number in objects cached).
Set to 0 to disable cache.
<add key=”MetadataProviderCacheSize” value=”150″ />
You can monitor the number of objects in the metadata cache by monitoring the following performance counter on the Microsoft Dynamics NAV Service tier.
There is really NO REASON not to set this to a high value (like 10000) if you are not pressed on memory on the Microsoft Dynamics NAV Server.
6) Max Concurrent Calls
This is a Microsoft Dynamics NAV Server setting, which is located in CustomSettings.config file.
Maximum number of concurrent client calls that can be active on the Microsoft Dynamics NAV Server.
To disable this setting set the value to “MaxValue”.
<add key=”MaxConcurrentCalls” value=”40″ />
The number specified here determines how many concurrent calls the Service Tier is able to handle. The more cores in your server, the higher this value can be.
NAVPERF (On Github)
GitHub organization for performance testing Microsoft Dynamics NAV
GitHub You will find a couple of projects on GitHub, which contains some sample code on how to do performance tests.
The GitHub organization is used to store the sample repositories and is available here:
boost1
boost3
nav-2017-sanmple

Microsoft Dynamics NAV 2017 Load Test sample as references from the Load Test WhitePaper

Enables you to create scenario tests for Microsoft Dynamics NAV.

The solution consists of:

Microsoft.Dynamics.Nav.LoadTest : A sample test for NAV Order Processor Scenarios Microsoft.Dynamics.Nav.TestUtilities : Test utilities to help build test scenarios Microsoft.Dynamics.Nav.UserSession : Client Library for the NAV Client Services Web Service

On the Microsoft Dynamics NAV 2017 DVD, you will find a folder called Test Assemblies. This folder contains one DLL, which is needed for running Load Tests: Microsoft.Dynamics.Framework.UI.Client.dll  The DLL is also included in this project.

Others nice links
Optimizing SQL Server Performance with Microsoft Dynamics NAV
https://msdn.microsoft.com/en-us/dynamics-nav/optimizing-sql-server-performance-with-microsoft-dynamics-nav
Videos
How Do I: Run NAV Performance Tests Using Visual Studio in Microsoft Dynamics NAV
https://www.youtube.com/watch?v=IG-y8DsXqaQ
Some my old posts here:
Monitoring Microsoft Dynamics NAV 2015 Server Using “Performance Counters”
https://robertostefanettinavblog.wordpress.com/2015/07/06/monitoring-microsoft-dynamics-nav-2015-server-using-performance-counters/
Advertisements

Dynamics NAV as SaaS …and 365 as IaaS


Dynamics NAV as SaaS (Software as a Service)
hi Guys,
some people have asked me information about this topic, below a little group of links about this topic (…old but actual).
saas
ABOUT SAAS (Software as a service)
Introducing Microsoft Dynamics NAV Managed Service for Partners
Microsoft Definition:
“The Microsoft Dynamics NAV managed service enables Dynamics partners to easily offer SaaS solutions to their customers, deployed on Azure infrastructure and managed by Microsoft Cloud Engineers.  It reduces the operational, technical and administrative complexity of deploying and maintaining multi-tenant NAV solutions in the cloud while at the same time enables partners to leverage the latest and greatest Microsoft technology.”
“Following the launch of Microsoft Dynamics NAV 2016, we are pleased to announce general availability of the Microsoft Dynamics NAV managed service for partners, a significant new option for Microsoft partners  interested in providing multitenant Software-as-a-Service (SaaS) solutions built on Microsoft Dynamics NAV and deployed in the cloud on Microsoft Azure.”
The Microsoft Dynamics NAV managed service is a highly scalable and reliable platform-as-a-service offering that consists of:
Streamlined administration: A new management portal and web services API enable Microsoft partners to efficiently deploy, manage, upgrade and monitor Microsoft Dynamics NAV multitenant solutions on Microsoft Azure.
Simplified operations: Cloud-optimized licensing and billing helps partners deploy customers more quickly, manage users seamlessly, and receive a single bill from Microsoft for the service.
Microsoft Azure:  Auto-scaled, load-balanced and highly-available, the service utilizes Microsoft Azure, which includes many built-in benefits such as enterprise-class security, geo-replication, backup support, and point-in-time restore.
24×7 support from Microsoft: Microsoft Cloud Engineers monitor and maintain partner solutions, customers, and users, offering Microsoft partners a financially-backed SLA of 99.9% availability.
The Microsoft Dynamics NAV managed service has been in preview since April 2015, with partner solutions and customers live on the service today.
Partners interested in the Microsoft Dynamics NAV managed service can find more information at:
CORE MODEL
FAQ
…some other useful links:
Microsoft Dynamics NAV 2016 now available, as is Microsoft Dynamics NAV 2016 managed service for partners
https://blogs.microsoft.com/firehose/2015/10/07/microsoft-dynamics-nav-2016-now-available-as-is-microsoft-dynamics-nav-2016-managed-service-for-partners/
ABOUT IAAS  (Infrastucture as a service)
and now … “THE IaaS ERA”… (from NAV TechDays 2016- Mibuso)
nice video here:
THE “NAVTechDays 2016 Playlist” (ALL VIDEOS)

Business Solutions MVP Award 2016 (NAV)


Business Solutions MVP Award 2016 (NAV)

… stamattina mi è arrivata questa mail da Microsoft !!!   onorato del premio !

MVP

Salve Roberto Stefanetti,

Complimenti!  Siamo lieti di presentarti l’edizione 2016 del titolo MVP Microsoft.

Si tratta di un premio destinato ai leader delle community tecniche con doti eccezionali che condividono attivamente con altri la straordinaria qualità della propria competenza sul campo. Apprezziamo davvero il tuo incredibile contributo, relativamente a Business Solutions, all’interno delle community tecniche durante lo scorso anno. Il Microsoft MVP Award ci offre un’opportunità unica per celebrare ed onorare i suoi contributi così significativi e per dirle “Grazie per la sua leadership tecnica“.

Congratulazioni Roberto! , sei una delle poche centinaia di persone nel Mondo che sono state insignite del Microsoft MVP Award.

…after a lot of post on my new blog, TechNet articles and reviews, NAV books reviews,  Dynamics NAV forum moderation activies, some bugs, suggestions for product change and improvement .. after many nominations, many times in first five european contenders … finally i got !

…today is a GREAT day !!!   …only one simple “word” to ALL my readers & followers : THANKS !!!  Thanks to Microsoft.

MY MVP PROFILE PAGE

https://mvp.microsoft.com/it-it/PublicProfile/5001957?FullName=Roberto%20%20Stefanetti

MVP 2016 AWARD KIT

TECHNET PROFILE MVP, MCC

https://social.msdn.microsoft.com/Profile/v1/roberto%20stefanetti/

RS TECHNET

HR (Human Resources) module in Dynamics NAV


HR (Human Resources) module in Dynamics NAV

NAV HR Module

Some people have asked me about the HR NAV module, below some definitions and links.

HR Module’s Topics Details
The Human Resources feature lets you keep detailed records of your employees.
You can register and maintain employee information, such as employment contracts, confidential information, qualifications, and employee contacts.
You can also use Human Resources to register employee absences, which allows you to analyze registered absences as necessary.
To start using Human Resources, you must set up employees and other basic information. You can also associate various codes to an employee, which allows you to filter information and view specific employees.

Best Goals of Module
– Candidate profiling (skills matrix)
– Employees confidential information
– Managing employees absences
– Tracking of expensive equipments (assignements of benefits..etc.)
– Possibile integration with NAV resources (ex: timesheets)
– Possibile integration with external payroll system (NAV addons or Others..)

MSDN, NAV 2016 Human Resources Help Page
https://msdn.microsoft.com/en-us/library/hh167801(v=nav.90).aspx

nice PDF here
http://libertygrove.com/wp-content/uploads/2012/02/microsoft-dynamics-nav-human-resources.pdf

nice yuoutube videos here


NAV Project Management Module with resources integration

Jobs & Projects
https://msdn.microsoft.com/en-us/library/hh172378(v=nav.90).aspx

Best Topics
The Jobs area supports common project management tasks, such as configuring a job and scheduling a resource, as well as providing the information needed to manage budgets and monitor progress.
With the Jobs feature, you can manage long-term projects that involve the use of man hours, machine hours, inventory items, and other types of usage that you want to keep track of.
You can track machine and employee hours on the project by using time sheets. Using the Jobs functionality will provide a good overview, not only of individual jobs,
but also of the allocation of employees, machinery and other resources being used in all projects. You can also use this functionality for many types of services and consultancy tasks.

Task with resources
Create, schedule and manage resources
Integrate time sheets with job orders

Resource Planning Topics
https://msdn.microsoft.com/en-us/library/hh175161(v=nav.90).aspx

Create and price resources, both persons and machines
Set up time sheets and the approval process.

SCM (Source Control Management) with NAV


SCM (Source Control Management) with NAV

do you need to use NAV with SCM (Source control Management) integration ?

…you can use two applications to reach this goal.

– Visual Studio Online (and team foundation server) (free for 5 users)

https://www.visualstudio.com/en-us/products/visual-studio-team-services-pricing-vs.aspx

– GIT (free and open source)

https://www.git-scm.com/about/free-and-open-source

You can find a script on codeplex for using GIT and NAV (integration with TFS and GIT) …. and Others nice free scripts at links below (always on codeplex repository)

1) NAV Powershell scripts and TFS Build Template

https://navscripts.codeplex.com/

2) TFS Build Template for GIT repository

https://navscripts.codeplex.com/wikipage?title=TFS%20Build%20Template&referringTitle=Home

Some parts of the scripts are based on work (Waldo) see http://www.waldo.be/tag/powershell/

Some parts are based on PowerShell scripts from module “Microsoft.Dynamics.Nav.Ide” made by Microsoft people.

My GIT@  https://github.com/rstefanetti   https://github.com/rstefanetti/NAV_SQL

Progress Indicator vs window


..nice old “but actual” post about NAV progress indicator !

progre

Example
Progress indicator based on Item DataItem
Create a report with Item as the dataitem.  
Put the code below in the prescribed triggers. 
Define the variables, Run the report  
The TotalCount will adjust per the filters you enter on the report so the 
progression bar is always on time.

Variables
Name         DataType
Window       Dialog  
TotalCount   Integer  
Counter      Integer  
  
Item - OnPreDataItem()
  Window.OPEN('Processing: @1@@@@@@@@@@@@@@@');
  TotalCount := COUNT;
Item - OnAfterGetRecord()
  Counter := Counter + 1;
  Window.UPDATE(1,ROUND(Counter / TotalCount * 10000, 1));
   
Item - OnPostDataItem()
  Window.CLOSE;

How-to use Dialog Box with Progress Indicator
Try using a dialog box, but instead of using (ex. '#1######') you use 
(ex. @1@@@@@@@@@@@@@). The "@" sign signifies that you want to use 
progress bar indicator.

Source http://groups.yahoo.com/group/Navision-Knowledge-Village/

Sharing the knowledge on Navision > Visit www.frappr.com/navision for navison friends 
http://groups.yahoo.com/group/Navision-Knowledge-Village/

based on this question :
"When running a long processing report, I usually open a window & 
update it with the entry no I am processing. Instead of using this, is 
there a function that can create a progress indicator type bar instead 
with a % done (for example, like the one you see when importing a file)?"

Sending SMS from NAV


Sending SMS from NAV
two useful links about sending SMS from NAV.
SMS
Sending SMS from Dynamics NAV with 5 lines of code (Windows Mobile Automation)

What you need: Outlook 2010, Exchange 2010, NAV (any version supporting automations…), Mobile phone with Windows Mobile 6.1 (with some update) or 6.5 http://dynamicsuser.net/blogs/kine/archive/2011/01/18/sending-sms-from-dynamics-nav-with-5-lines-of-code.aspx

Using Web Service to send SMS from NAV  (Web Services)
method to send SMS notification through the Webservice using service provider interface protocols.

Some SQL date calculation scripts for NAV Linked Tables


Some SQL date calculation scripts for NAV Linked Tables

sql date

Dato che alcuni utilizzano le viste SQL come tabelle collegate in NAV, riporto alcuni script SQL relativi all’utilizzo delle date; inserendo un campo virtuale in una vista SQL e richiamando una “function” esistente o personalizzata nel campo (es: la uf_DaysDifference sotto indicata) è possibile creare delle viste SQL molto utili da utilizzare in NAV.

esempio di alcune viste da me utilizzate in cruscotti di avanzamento
– Avanzamento Ordini Vendita\Acquisto\Commesse\Timesheets
– Avanzamento Fasi di Produzione
– Avanzamento Shop Floor etc..

SQL Date Scripts

Calcolare l’ultimo giorno di un mese

DECLARE @oggi DATETIME
SET @oggi = GETDATE()

SELECT CONVERT(varchar, DATEADD ( dd , -1 , CONVERT (VARCHAR(6), DATEADD( mm , 1 , @oggi ) , 112 ) + ’01’ ) ,103)

Se @oggi = 09/01/2016
La select ritorna = 31/01/2016

Details:
— Aggiungo 1 mese alla data odierna:
SELECT DATEADD( mm , 1 , getdate())

— Visualizzo la data senza il giorno:
SELECT CONVERT (VARCHAR(6), DATEADD( mm , 1 , getdate()) , 112 )

— Imposto il primo giorno del mese:
SELECT CONVERT (VARCHAR(6), DATEADD( mm , 1 , getdate()) , 112 ) + ’01’

— Tolgo 1 giorno dalla data ottenuta:
SELECT DATEADD ( dd , -1 , CONVERT (VARCHAR(6), DATEADD( mm , 1 , getdate()) , 112 ) + ’01’ )

— Formatto il risultato in italiano (gg/mm/aaaa):
SELECT CONVERT(varchar, DATEADD ( dd , -1 , CONVERT (VARCHAR(6), DATEADD( mm , 1 , getdate()) , 112 ) + ’01’ ) ,103)

Calcolare il numero giorni di un mese

declare @data datetime
set @data = getdate()

select day(dateadd(month,1,@data)-(day(@data)-1)-1) as NumGiorniMese

— Trovo la data da elaborare aumentata di un mese:
select dateadd(month,1,@data)
— Imposto la nuova data con giorno = 1:
select dateadd(month,1,@data)-(day(@data)-1)
— Tolgo un giorno alla data:
select dateadd(month,1,@data)-(day(@data)-1)-1
— Leggo il numero di giorni:
select day(dateadd(month,1,@data)-(day(@data)-1)-1)

Calcolare differenza giorni

/* Differenza in giorni */
CREATE FUNCTION uf_DaysDifference (@dataIniziale DATETIME, @dataFinale DATETIME)
RETURNS INT
AS
BEGIN
RETURN
(
SELECT CASE WHEN
DATEADD(DAY, DATEDIFF(DAY, @dataIniziale, @dataFinale), @dataIniziale) > @dataFinale
THEN DATEDIFF(DAY, @dataIniziale, @dataFinale) – 1
ELSE DATEDIFF(DAY, @dataIniziale, @dataFinale) END
)
END
GO

/* Ad esempio: */
select dbo.uf_DaysDifference(‘20160109′,’20160114’) as NumGiorni
select dbo.uf_DaysDifference(‘20060109’,getdate()) as NumGiorni
select dbo.uf_DaysDifference(‘20060109’,CURRENT_TIMESTAMP) as NumGiorni

IsZero
Funzione che converte 0 in altro numero, utile in viste o stored procedures.

CREATE FUNCTION IsZero (
@Number FLOAT,
@IsZeroNumber FLOAT
)

RETURNS FLOAT
AS
BEGIN
IF (@Number = 0)
BEGIN
SET @Number = @IsZeroNumber
END

RETURN (@Number)
END

es: isZero(<campo>; 1) –> converte o in 1

Microsoft Dynamics NAV Online Resources


Hi Guys,

happy new year and welcome to my first post of 2016 !

Why i’m talking about Microsoft Dynamics NAV Online Resources ?

… some people asked me some information about links and resources available for NAV on network (links, blogs, forums, socials and so on..), also in the community forum of NAV you can find some user requests on this subject.

… below a short list of usefull resources for NAV (i hope !)

MICROSOFT DYNAMICS COMMUNITY – NAV
NAV Community Root Page
https://community.dynamics.com/NAV

NAV Community Sections
Forum
https://community.dynamics.com/nav/f

Blogs
https://community.dynamics.com/nav/b

Videos
https://community.dynamics.com/nav/b/navvideos

Wiki
https://community.dynamics.com/nav/w/

Expert
https://community.dynamics.com/nav/p/experts

OTHERS RESOURCES
NAV Developer Center
https://msdn.microsoft.com/dynamics/nav

NAV on MSDN (NAV Help Online, How-to use NAV, Scenarios etc.)
https://msdn.microsoft.com/en-us/library/hh173988(v=nav.90).aspx

NAV Team Blog
https://blogs.msdn.microsoft.com/nav/

MDLP (Microsoft Dynamics Learning Portal )
https://mbspartner.microsoft.com/NAV/WhatsNew/2

NAV Product Suggestions
By Connect Page
https://connect.microsoft.com/dynamicssuggestions/

Virtual Academy – Dynamics NAV
https://mva.microsoft.com/

Featured Dynamics NAV MVPs
https://msdn.microsoft.com/en-us/dynamics/nav/dn781204.aspx

YOUTUBE
Dynamics Youtube Channel
https://www.youtube.com/user/msdyncomm

PARTNERS
MBS PartnersourceCustomersource
https://mbs.microsoft.com/partnersource/
https://mbs.microsoft.com/customersource/

Download NAV Direct link
https://mbs.microsoft.com/partnersource/northamerica/deployment/downloads/product-releases/msdnav2016download

NAV Localization Portal
https://mbs.microsoft.com/customersource/northamerica/nav/support/support-news/GFMLocalizationPortalMC_nav

NAV Support RequestsIncidents
https://mbs.microsoft.com/customersource/northamerica/nav/support

TWITTER

Microsoft Dynamics

https://twitter.com/MSFTDynamics

Microsoft Dynamics NAV Support

https://twitter.com/MSDynNAVSupport

FACEBOOK

https://www.facebook.com/msftdynamics

OTHERS USERGROUPS\FORUMS

Mibuso

http://www.mibuso.com/

Dynamics User Group

http://dynamicsuser.net/

NAVUG

https://www.navug.com/

…you are welcome !