Options

Session Kill

slowhandfanslowhandfan Member Posts: 56
We have a customer licensed for just 4 users, 2 NAS's and 2 clients running SQL 2009R2. They wanted a session kill on a user for 30 miniutes of inactivity. I added some code (see below) to one of the NAS's that we use at other customers running versions 5.1 and 4.3. Code works great. Had an interesting side effect on 2009R2 SQL. After 30 minutes the Session record is deleted if the client was inactive. If 2 users were idle then both session records are deleted allowing another client to connect. The 2 idle sessions appear to the user to be active. When they touch their screen the session record is restablished with no apparent interruption. If both knocked off users touch their screen they are connected. We now have 5 active users (2 NAS and 3 Cleints) while the license clearly only allows 4. If one of the clients logs off they cannot get back in, they get the standard number of sessions exceeded. It seems like a huge license loop hole. If the session records are deleted through the NAS it allows other users to log on but then allows the active clients (whose sessons records were deleted) to re-establish another session record exceeding the license limit.


session.SETRANGE("My Session",FALSE);
session.SETFILTER(session."Application Name",'%1','Microsoft Dynamics NAV Classic client');
session.SETFILTER(session."Database Name",'%1','ECPNavision');
session.SETFILTER("Idle Time",'>30 min');
IF session.FIND('-') THEN BEGIN
session.DELETE;
MESSAGE('UserID %1 logged off for IDLE time', session."User ID"); // goes to event viewer
COMMIT;
END;

Comments

  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,504
    Search the forum with kill session..i am sure you will get lot of solutions..
  • Options
    slowhandfanslowhandfan Member Posts: 56
    I don't really need a solution. The issue is more of a statement of fact that a loophole exists in the license. I am slightly intersted if this is just related to 2009R2 and SQL. In theory 2 users could log in, after 1 minute delete the seesion records, have more 2 more users log in. Now 4 users are using the system when the license only allows 2.
  • Options
    bbrownbbrown Member Posts: 3,268
    Licensing is a legal restriction not a technical one. While some systems attempt to puit some sort of technical controls on licensing, the responsibility remains with the licensee. It is the licensee's responsibility to insure that unlicensed users are not on the system. Telling the judge "the system let us do it" is not a defense.
    There are no bugs - only undocumented features.
  • Options
    codercoder Member Posts: 16
    It is also happening with 2009 and SQL 2005. It seems that system does not check license limit while reconnecting the client if session table is deleted manually or by NAS.
    Works fine with version 5.1
Sign In or Register to comment.