Cumulative Update 03 for Microsoft Dynamics NAV 2017 has been released – Dynamics NAV Team Blog


Cumulative Update 03 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2017.

The cumulative update is intended mainly for solutions that are experiencing the problems described in the Knowledge Base article linked to below. However, you are advised to always keep your solution updated with the latest cumulative update. If you are in doubt about whether this cumulative update addresses your specific problem, or if you want to confirm whether any special compatibility, installation, or download issues are associated with this cumulative update, support professionals in Customer Support Services are ready to help you. For more information, see http://support.microsoft.com/contactus/

Source: Cumulative Update 03 for Microsoft Dynamics NAV 2017 has been released – Dynamics NAV Team Blog

Where to find Cumulative Update 03

You can download the cumulative update from KB 4011763  – Cumulative Update 3 for Microsoft Dynamics NAV 2017 (Build 15140).

You can press one of the countries in list above for a direct download or you can download the cumulative update from the Microsoft Download Center.

To learn more about other Cumulative Updates already released for Microsoft Dynamics NAV 2017 please see KB  3210255.

Warning

Before you install a cumulative update in a production environment, take the following precautions:

  1. Test the cumulative update in a non-production environment.
  2. Make a backup of the system or computer where the cumulative update is to be installed.

Additional Information

For information about how to install the cumulative update, see How to Install a Microsoft Dynamics NAV 2017 Cumulative Update

Advertisements

“ALL ABOUT” Kill (In)active Sessions when “no more licenses”


Sometimes it happens that there are “no more licenses available” for Dynamics NAV, from NAV 2013 R2 and next releases, it’s necessary to run the Windows Client or to use Powershell statements to kill some sessions and unlock others.
If you are unable to access to NAV (“no more licenses”), you should need to use SQL Console and kill sessions from there (reading from Active Sessions Table of from sysprocesses View on master db..)
“Some user don’t want to use SQL Server to achieve this !” …
WARNING : “No more licenses !!”   … Immediately Buy Others !!!
license1.png
There are many ways to kill sessions, i list below some methods.
With NAV Server Login
– C/AL
– Powershell
Without NAV Server Login
– SQL Server Stored Procedures\T-Sql
– VB .NET Application
Below some methods to kill the sessions even in the case of “no more licenses available“: SQL Script and VB.NET
C/AL Statement to Kill Sessions
The Standard Statement for C/AL Code is:  STOPSESSION(“Session ID”);
Example:
IF CONFIRM (‘Kill Session ?’) THEN STOPSESSION(“Session ID”) … GOAL !
…. BUT YOU NEED TO CONNECT TO NAV SERVER !  .. sometimes is NOT possible!
———————————————————-
My VB.NET Solution
“I wrote a simple solution on VB.NET to Kill Active Sessions using a SQL Connections,
you cand find it on GITHUB and TECHNET.”
ON GITHUB
ON TECHNET
Post link
Download link
About My VB.NET Simple Solution, some pictures
kill1
kill-2
kill-3
App Config File
<?xml version=”1.0″ encoding=”utf-8″ ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name=”NAV_2017_KIll_SQL_Inactive_Sessions.My.MySettings.Demo_Database_NAV__10_0_ConnectionString”
connectionString=”Data Source=STEFANETTILEN\SQL2012ENT;Initial Catalog=&quot;Demo Database NAV (10-0)&quot;;Integrated Security=True”
providerName=”System.Data.SqlClient” />
</connectionStrings>
<startup>
<supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.5″ />
</startup>
</configuration>
———————————————————-
SQL KILL STATEMENTS
KILL (Transact-SQL)
– Syntax for SQL Server, Syntax for Azure SQL Data Warehouse and Parallel Data Warehouse

KILL ‘session_id’ [;]    
Source https://msdn.microsoft.com/it-it/library/ms173730.aspx

KEEP IN MIND !!!   DON’T KILL PROCESSES IN THIS STATES:
-AWAITING COMMAND
-CHECKPOINT SLEEP
-LAZY WRITER
-LOCK MONITOR
-SIGNAL HANDLER
My Customized release
1) SP_SQL_KillNavServerSession
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
— =============================================
— Description: KILL ALL NAV ACTIVE USER SESSSIONS WITH MULTIPLE INSTANCES
— =============================================
CREATE PROCEDURE [dbo].[SP_SQL_KillNavServerSession]
AS
BEGIN
DECLARE @RowIndex AS INT;
DECLARE @MaxIndex AS INT;
 SET @RowIndex = 1;
SELECT @MaxIndex =
(SELECT top 1 MIN([Session ID])
FROM [ITA].[dbo].[Active Session]
WHERE [User ID] = ‘************’
group by [Session ID])
 — Remove Active Session
DELETE FROM [DB].[dbo].[Active Session] where [Session ID]>@MaxIndex AND [User ID] = ‘*********’
END
2) SP_SQL_KillNONavSession
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
— =============================================
— Description: KILL SLEEPING NO NAV SESSIONS
— =============================================
CREATE PROCEDURE [dbo].[SP_SQL_KillNoNavSession]
AS
BEGIN
DECLARE @Session TABLE
(
id INT IDENTITY(1,1) PRIMARY KEY,
[sid] int,
ltime DATETIME,
hname varchar(MAX),
uid varchar(100),
lret datetime,
etime int
);
DECLARE @NotAffectedUserList TABLE
(
id INT IDENTITY(1,1) PRIMARY KEY,
[uid] varchar(MAX)
);
DECLARE @session_time as int;
DECLARE @vSID as int;
DECLARE @command as varchar(MAX);
DECLARE @RowIndex AS INT;
DECLARE @MaxIndex AS INT;
set @session_time=15; — Assign Session time in Minutes
— Assign List of Users who “will not be affected” by this Session Kill
INSERT into @NotAffectedUserList SELECT ‘sa’
INSERT into @NotAffectedUserList SELECT ‘NT AUTHORITY\SERVIZIO DI RETE’
INSERT into @NotAffectedUserList SELECT ‘**************’
INSERT into @NotAffectedUserList SELECT ‘scheduler’
INSERT into @Session
SELECT
session_id as [Session ID],
login_time as [Login Time],
host_name as [Host Name],
LOGIN_NAME as [Login ID],
last_request_end_time as [Last Request End Time],
DATEDIFF(minute,  last_request_end_time,getdate()) as[Elapsed Time (minutes)]
FROM
sys.dm_exec_sessions
WHERE
open_transaction_count = 0
AND host_name <> ‘NAVSRV’ COLLATE Latin1_General_CI_AS
AND host_name is not NULL
AND DATEDIFF(minute,  last_request_end_time,getdate())>=@session_time
–AND client_version=4
AND login_name COLLATE Latin1_General_CI_AS not in
(
SELECT DISTINCT uid
FROM @NotAffectedUserList
)
SET @RowIndex = 1;
SELECT @MaxIndex = MAX(id) FROM @Session;
WHILE( @RowIndex <= @MaxIndex)
BEGIN
SELECT @vSID = sid
FROM @Session
WHERE id = @RowIndex;
 — String together the KILL statement
SELECT @command = ‘KILL ‘ + CAST(@vSID AS varchar(5))
 BEGIN TRY
  — Execute the final string to KILL the spids
EXEC (@command)
END TRY
BEGIN CATCH
declare @emsg varchar(500);
SELECT
@emsg=ERROR_MESSAGE();
  print @emsg;
END CATCH
 SET @RowIndex = @RowIndex + 1;
END;
END
// KILL SQL INACTIVE SESSIONS FOR NAV APPLICATIONS
// ONLY FOR SLEEPING SESSIONS – OLD NAV CLIENTS
a very Simple SQL Stored Procedure to ‘kill’ sql inactive sessions
idle (sleeping) for 10 minutes related to “Nav Client” applications
*** it’s necessary to identify correct “application name” ***
*** ex: program_name LIKE N’%NAV client% *** or %NAV Web%
DECLARE @v_spid INT
DECLARE c_Users CURSOR
FAST_FORWARD FOR
SELECT SPID
FROM master..sysprocesses (NOLOCK)
WHERE spid>50
AND loginame <> ‘DIR%’
AND program_name LIKE N’%NAV client%’
AND status=’sleeping’
AND DATEDIFF(mi,last_batch,GETDATE())>=10
AND spid <> @@spid
OPEN c_Users
FETCH NEXT FROM c_Users INTO @v_spid
WHILE (@@FETCH_STATUS=0)
BEGIN
PRINT ‘Killing ‘+ CONVERT(VARCHAR,@v_spid)+’…’
EXEC(‘KILL ‘+ @v_spid)
FETCH NEXT FROM c_Users INTO @v_spid
END
CLOSE c_Users
DEALLOCATE c_Users
———————————————————-
OTHERS NICE SOLUTIONS (NAV LOGIN IS REQUIRED)
Olof Simren Solution
Kill Sessions in Dynamics NAV (from NAV Page)
Source https://www.olofsimren.com/kill-sessions-in-dynamics-nav/
Gunnar Solutions
ADO NET Solution
Kill Idle Connections
Source http://www.dynamics.is/?p=471
Poweshell Solution
Stopping Idle Microsoft Dynamics NAV Services
Nice Sessions Killing !

Merry Christmas and happy New Year !


merry 2016.png

#dyndev365  #msdynnav  #Merry Christmas #TomorrowNAV

“Dear readers, followers and friends,

wish you and your family a Merry Christmas and Happy New Year 2017!”

Roberto Stefanetti

 

…and always “long life to Dynamics NAV !”

Announcing the Preview of Development Tools for Dynamics NAV – Nice Christmas!


“Tools are available in preview from today”!  AWESOME !!

  • The in-client designer
  • Visual Studio Code

Start from here:  http://aka.ms/navdeveloperpreview

In-Client Designer

InClient - Adding-a-field.gif

Visual Studio Code

vscode.png

New Development Environment “What’s New” here:

Developing Extensions Using the New Development Environment

https://msdn.microsoft.com/en-us/dynamics-nav/newdev-dev-overview

In-Client Designer

https://msdn.microsoft.com/en-us/dynamics-nav/newdev-inclient-designer

Differences in the Dynamics NAV Development Environments

https://msdn.microsoft.com/en-us/dynamics-nav/newdev-differences

Keyboard Shortcuts for the New Development Environment

https://msdn.microsoft.com/en-us/dynamics-nav/newdev-keyboard-shortcuts

Developer Reference

https://msdn.microsoft.com/en-us/dynamics-nav/newdev-reference-overview

 

Full Documentation here:

Tools overview

Getting Started guide

Object overview and AL language Changes

 

GitHub Bug Branch https://github.com/microsoft/al/issues

Source: Announcing the Preview of Development Tools for Dynamics NAV – Dynamics NAV Team Blog

Be Social !    #dyndev365 #msdynnav #code

“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/

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)

“ALL About” C/AL Coding Guidelines


CAL

hi guys, this is another short post of my “ALL About” posts series (the first of this year); in this case i want to write about “C/AL Coding Rules and Guidelines”.

below a short list of documents\pages about this topic,

First “ALL IN ONE” Document but “ALWAYSuseful is:  “C/AL Coding Guidelines used at Microsoft Development Center Copenhagen”  …”The Bible” for each C/AL Developer!

Source: C/AL Coding Guidelines used at Microsoft Development Center

you can download PDF document here: cal-coding-guidelines-at-microsoft-development-center-copenhagen

“ALL IN ONE” Document Vs Wiki & Community Feedback Philosophy

CAL-Coding-Guidelines-at-Microsoft-Development-Center-Copenhagen.pdf” is “all in one document”. In contrast, on this wiki, the coding guidelines are published individually. The reason is: give you the chance to comment and share your oppinion on each one.

Question: Since we’re having the guidelines, how come there is still C/AL code in NAV which doesn’t respect them?

Answer: all new C/AL code is bound to follow the guidelines (else it cannot be checked-in). However, the code that existed before the rules – it does not. We had done cleanup in a certain degree. Now we’re gradually improving the old code base as we visit various objects in order to add new functionality, however chances are that code we didn’t touch in a long time had remained in its old form.

“Microsoft Dynamics Community is looking forward to your comments!  Where you can, do provide concrete examples of the alternatives, Good and Bad”

Wiki Page on Design Patterns

https://community.dynamics.com/nav/w/designpatterns/156.cal-coding-guidelines

other nice resources:

nice doc on Mibuso about “How to work with record-variables”:

http://mibuso.com/howtos/how-to-work-with-record-variables-version-2

Nice general sections on MSDN

General C/AL Programming Format

https://msdn.microsoft.com/en-us/library/ee414237(v=nav.10).aspx

Programming Best Practices

https://msdn.microsoft.com/en-us/library/ee414204(v=nav.90).aspx

C/AL Comments

https://msdn.microsoft.com/en-us/library/dd301180(v=nav.90).aspx

C/AL Coding Guidelines Video

Dynamics Profile: New Dynamics NAV MVP Roberto Stefanetti Eager to Share More Broadly – MSDynamicsWorld.com


Award-winning blogger Stefanetti says MVP status will help him to share even more intelligence about Dynamics NAV.

Source: Dynamics Profile: New Dynamics NAV MVP Roberto Stefanetti Eager to Share More Broadly – MSDynamicsWorld.com

NAV 2017 Roadmap


NAV 2017 Roadmap

Some nice “public pictures” from event “WPC 2016”

https://resources.wpc.microsoft.com/session-resources.html#

 

 

 

 

 

..you can download official Microsoft videos and ppt slides from here:

https://resources.wpc.microsoft.com/session-resources.html#

nice post by Saurav Dhyani about event topics here:

http://saurav-nav.blogspot.it/2016/08/microsoft-dynamics-nav-2017-demo-wpc.html

you are welcome !

Microsoft Forum 2016, 19 Aprile 2016, FieraMilanoCity


Microsoft Forum

Microsoft Forum 2016, 19 Aprile 2016, FieraMilanoCity

“AccelerateYourBusiness”: a “Microsoft Forumla tecnologia incontra il business.  Scopri le soluzioni di Microsoft e dei suoi Partner. Diventa protagonista, oggi.

Microsoft Forum 2016  http://www.microsoftforum.it

Iscrizioni: https://www.microsoftevents.com/profile/form/index.cfm?PKformID=0x103893e0fa