How to kill session?

vikram7_dabasvikram7_dabas Member Posts: 611
if the user is idle for more than four minutes then thats user session should be killed(Means navision should close if idle time is more than 4 minutes)one of our client wants this requirement.How we will do this?Its a user specific :?:
Vikram Dabas
Navision Technical Consultant

Comments

  • rajpatelbcarajpatelbca Member Posts: 178
    you can download this and look into the code it might be help you.

    http://www.mibuso.com/forum/viewtopic.p ... in+session

    Kill Idle Navision Sessions (SQL scripts)
    http://www.mibuso.com/dlinfo.asp?FileID=367
    Session Killer
    http://www.mibuso.com/dlinfo.asp?FileID=71

    just you have to filter those records form session and delete then session will be automatically terminated.

    if you want to terminate session automatically then create procession only report and add it in job queue.


    Regards,
    Experience Makes Man Perfect....
    Rajesh Patel
  • krikikriki Member, Moderator Posts: 9,110
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • maheshmahesh Member Posts: 115
    I would recommend to not give such solution to client otherwise they won't buy license for more users. Think from business point of view.... :-k
    because we are in service industry which has no end........!!!
    Best Regards,
    Mahesh Jain
    mahesh@reliconservices.com
  • Vineeth.RVineeth.R Member Posts: 121
    Hai Raj Patel BCA

    I saw the killing session coding in the link u sent but i didnt understand something..I saw a variable Timer of type Automation was declared but what SUBTYPE(Automation server list) was used for creating a Timer variable??? please advise..
    you can download this and look into the code it might be help you.

    http://www.mibuso.com/forum/viewtopic.p ... in+session

    Kill Idle Navision Sessions (SQL scripts)
    http://www.mibuso.com/dlinfo.asp?FileID=367
    Session Killer
    http://www.mibuso.com/dlinfo.asp?FileID=71

    just you have to filter those records form session and delete then session will be automatically terminated.

    if you want to terminate session automatically then create procession only report and add it in job queue.


    Regards,
    Thanks and Regards
    Vineeth.R
  • vikram7_dabasvikram7_dabas Member Posts: 611
    The Session killer will only run on the SQL database or in Native database,or we can run Session killer on both the databases.
    Vikram Dabas
    Navision Technical Consultant
  • srinivas.chittemsrinivas.chittem Member Posts: 142
    Hi,Guys

    The following code is helpful to kill the Navision Sessions....
    There are no more lines to add for this...As it is use the code...

    But u should write the code Codeunit 1 in Application Management ..
    Write 1 in On Run() and 2 define a function and write it....

    Here session is virtual table ..........

    Next Run the schedular with codeunit 1 to every 1 min.... What ever the time u given in section 2 ..the session automatically kill.....




    1.
    OBJECT Codeunit 50025 NAS session monitor 
    { 
      OBJECT-PROPERTIES 
      { 
        Date=10/21/07; 
        Time=[ 8:15:10 PM]; 
        Modified=Yes; 
        Version List=Mibuso,ara3n; 
      } 
      PROPERTIES 
      { 
        SingleInstance=Yes; 
        OnRun=BEGIN 
                IF ISCLEAR(Timer) THEN 
                  CREATE(Timer); 
    
                Timer.StartTimer(6000); 
              END; 
    
      } 
     
    2.
     CODE 
      { 
        VAR 
          Timer@1004 : Automation "{DDADD7CC-AD56-4CA6-9C85-22AE76BF21A1} 3.0:{E7414D60-2D83-44C7-826A-FD14557299F0}:'CP Timer'.cTimer" WITHEVENTS; 
          Session@1000000000 : Record 2000000009; 
    
        EVENT Timer@1004::TimerEvent@1(); 
        BEGIN 
          Session.SETRANGE("My Session",FALSE); 
          Session.SETFILTER("Idle Time",'>15 min'); 
          IF Session.FINDSET THEN REPEAT 
            Session.DELETE; 
            COMMIT; 
          UNTIL Session.NEXT = 0; 
        END; 
    
        BEGIN 
        END. 
      } 
    } 
    
    

    Hope so it is useful
    Regards,
    srinivas
    "Delighting Customers.... Through Delivery Excellence" .
  • vikram7_dabasvikram7_dabas Member Posts: 611
    By making report to kill session.Will it work on Native database or on SQL Database or on Both?
    Vikram Dabas
    Navision Technical Consultant
  • rajpatelbcarajpatelbca Member Posts: 178
    it will work in SQL Server option. but i am not sure about Native database.
    i think it should work. :-k
    Experience Makes Man Perfect....
    Rajesh Patel
  • vikram7_dabasvikram7_dabas Member Posts: 611
    This setup will help me in both DBs Native as well as SQL?
    Vikram Dabas
    Navision Technical Consultant
  • rajpatelbcarajpatelbca Member Posts: 178
    yes sure.
    Experience Makes Man Perfect....
    Rajesh Patel
  • SavatageSavatage Member Posts: 7,142
    mahesh wrote:
    I would recommend to not give such solution to client otherwise they won't buy license for more users. Think from business point of view.... :-k
    because we are in service industry which has no end........!!!

    You want clients to buy more licenses becuase you won't tell them that they can close dead/unused sessions? #-o

    As an end user I would greatly appreciate info like this and a happy customer is a long term customer. Not telling the customer about a close session feature is just bad business. Why not setup the G/L all wrong too so they have to keep coming back for you to correct all the wrong postings [-X
  • David_SingletonDavid_Singleton Member Posts: 5,479
    if the user is idle for more than four minutes then thats user session should be killed(Means navision should close if idle time is more than 4 minutes)one of our client wants this requirement.How we will do this?Its a user specific :?:

    :shock: FOUR MINUTES !!!!

    They will spend more time logging back into NAV all day than they will spend working.
    David Singleton
  • SavatageSavatage Member Posts: 7,142
    :shock: FOUR MINUTES !!!!
    They will spend more time logging back into NAV all day than they will spend working.

    :lol::lol: I didn't even see that.. So True.. 20 - 30 mins I can see, 4 is a bit quick. 8)
Sign In or Register to comment.