NAV 2013 R2 and later - Session vs License count.

SteveKnott
Member Posts: 50
Hi All,
Does anyone know how I can check the license usage on NAV 2013R2 service. We have multiple service tiers , and we have some issues with certain users getting license issues.
When we check the "Active Session" table, it seems to be less sessions than the license . Job Queue is running - so its possible that some jobs are taking sessions at the exact time etc.
My question is how do I count the [Active Session] table to get "licenses used" ?
Read this... http://mibuso.com/blogs/kine/2015/04/30 ... -counting/ and makes sense...but I want to find out the count of licenses used rather:
I am "guessing" that it may be 1 per user per client type per client host name ? or is it per username ?
Also.. is there a counter that we can query somehow ? Looked in perfmon.... I can see active session... but that mathces the [Active Session] table... and can have more than the license count.
Any tips would be appreciated.
Thanks,
Steve
Does anyone know how I can check the license usage on NAV 2013R2 service. We have multiple service tiers , and we have some issues with certain users getting license issues.
When we check the "Active Session" table, it seems to be less sessions than the license . Job Queue is running - so its possible that some jobs are taking sessions at the exact time etc.
My question is how do I count the [Active Session] table to get "licenses used" ?
Read this... http://mibuso.com/blogs/kine/2015/04/30 ... -counting/ and makes sense...but I want to find out the count of licenses used rather:
I am "guessing" that it may be 1 per user per client type per client host name ? or is it per username ?
Also.. is there a counter that we can query somehow ? Looked in perfmon.... I can see active session... but that mathces the [Active Session] table... and can have more than the license count.
Any tips would be appreciated.
Thanks,
Steve
0
Comments
-
Unfortunately you cannot view the current consumed licenses in NAV anymore (since 2013). I've performed a few tests on this with a colleague of mine and it seems easier then it seems.
Client types that do not consume licenses
A few client types do not consume licenses (anymore). For instance the service account starting a NST does not consume a license for it's own session. Neither for NAS services, even if the NAS is executing jobs from the jobqueue. Background processes do not consume licenses too. You get the idea.
Client types that do consume licenses
A few client types do consume licenses. For instance the Windows RTC, Web RTC, Tablet client, SOAP/ODATA calls, etc. A license will be consumed if an unique user makes a connection with NAV with one of the above client types. If this user on the other hand makes another connection with NAV with the same or an other client type, this won't consume another license. NAV counts unique users.
Example
For example if one user starts an session with a windows RTC client from a desktop machine, a session from his tablet with the app and start a job manually (creates a background process) the user will still consume 1 license.
What i do not understand from your post is that you say that you see less sessions in the active session overview than licenses available in the license and that you've issues with it... that is something I haven't seen before.
Query to view current consumed licenses
With the following query you can view the current consumed licenses. I'm not sure if it's waterproof, I just wrote it and did not test it. Feedback is welcome.
/*
Current consumed licenses NAV 2016
Client Types:
0 = Windows RTC
1 = Sharepoint Client
2 = Webservices (SOAP & ODATA)
3 = Client Service
4 = NAV application service (NAS)
5 = Background
6 = Management Client
7 = Web RTC
8 = Unknown
9 = Tablet RTC
10 = Desktop RTC
*/
SELECT COUNT(DISTINCT [User ID]) AS 'Current consumed licenses'
FROM [dbo].[Active Session]
WHERE [Client Type] IN (0,1,2,7,9,10)1 -
I'm using Multi-tenancy soo it will be more complicated.
I'm using powersheel, but I don't have 100% sure if its correct.
the $countType
cls
$tenants = Get-NAVTenant -ServerInstance dynamicsnav90
$totalSessions=0
$counters = New-Object System.Collections.Hashtable
$countType = New-Object System.Collections.Hashtable
foreach ($tenant in $tenants)
{
$sessions =Get-NAVServerSession -ServerInstance dynamicsnav90 -Tenant $tenant.Id
foreach ($session in $sessions)
{
$counters[$session.UserID]++
$totalSessions+=1
$countType[$session.ClientType]++
Write-Host ("{0}`t{1}`t{2}" -f $tenant.Id,$session.UserID,$session.ClientType)
}
}
Write-Host ("Total Sessions`t {0}" -f $totalSessions )
$counters| Format-Table
$countType | Format-Table0 -
Hi, and what about the Full/Limited user? How to determine that from the session count?Regards
xStepa0 -
With SQL it would look something like this:
SELECT 'Microsoft Dynamics NAV Full User License consumed' = (SELECT COUNT([License Type]) FROM [dbo].[User] WHERE [License Type] = 0 AND [User Security ID] IN (SELECT DISTINCT [User SID] FROM [dbo].[Active Session] WHERE [Client Type] IN (0, 1, 2, 7, 9, 10))), 'Microsoft Dynamics NAV Limited User License consumed' = (SELECT COUNT([License Type]) FROM [dbo].[User] WHERE [License Type] = 1 AND [User Security ID] IN (SELECT DISTINCT [User SID] FROM [dbo].[Active Session] WHERE [Client Type] IN (0, 1, 2, 7, 9, 10)))
Note that if the amount of consumed limited user licenses exceeds the amount of limited users in your NAV license, then you have to subtract the difference from the limited user count and add it to the full user count.
I haven't tested the query thoroughly, so feedback from anyone using this is welcome.1
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions