Hi All
The issue is as follows we are a hosting/navision company and as such we have multiple customer servers.
We use a SPLA license and the customers then rent their licenses pr. user basis.
The SPLA license always have 999 users available, so we cannot control how many they actually have logged on at any given time, in the normal way. (aside form doing it manually in sessions)
I seem to recall that I found a article about limiting number of users pr. database on the SQL. I can however not find anything about it.
Another possible method would be maybe putting something in Codeunit 1 to limit it.
Good ideas?
Sincerly
Jacob
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I need to count the current quantity of users using the database but which table is it stored in.
In C/AL I would use a setrange and count up but SQL is not quite my home turf. : )
If someone have a code snippet or something that do it or similar it would be very helpful
/jacob
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I am using the code from the other topic
IF EXISTS (SELECT name FROM sysobjects
WHERE name = 'sp_$ndo$loginproc' AND type = 'P')
DROP PROCEDURE [sp_$ndo$loginproc]
GO
CREATE PROCEDURE [sp_$ndo$loginproc]
@appname VARCHAR(64) = NULL,
@appversion VARCHAR(16) = NULL
AS
BEGIN
IF (Insert special code that checks for how many users are connected to the DB < 12) THEN
RAISERROR ('Too few user sessions available', 11, 1)
END
GO
GRANT EXECUTE ON [sp_$ndo$loginproc] TO public
GO
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
/jacob