Killing sessions in pre 4.0 Native database

UrmasUrmas Member Posts: 76
edited 2005-04-06 in NAV Tips & Tricks
Just had such problem in one daughter company where the licenses were used up. And - naturally the solution is quite simple.

You can download a freeware application from SysInternals webpage http://www.sysinternals.com named "tcpview". This nice program displays all established TCP connections from your Native database server. Also it allows you to terminate the connection easily.
In order to do so, you have to run it on the server, but this should not be a problem for a administrator.

I added also a small piece of code to codeunit 1 to extract the computername from environment and connect it with session ID, so I know what computer I have to disconnect. I think there is also a way extracting the connecting port somehow, so also exact session in computer can be terminated.

Comments

  • orbitalsalmonorbitalsalmon Member Posts: 33
    An issue i've come across is a user will have multiple clients running on the PC, but only logged into one of them. Navision doesn't seem to care whether the user is logged in or not, if the client app is loaded it will take up a license.

    Will this app be able to kill connections from clients that are not logged in? (i.e. shut down the client)
  • UrmasUrmas Member Posts: 76
    Yes - it will kill the connection. However the client application itself is not terminated and user receives an communication error if he/she tries to access database through it. The Navision licence is freed immideately after the connection has been terminated - it is dependant of connection, not the state of client application.
    It can be tricky to understand what connection belongs to what application (if an user uses more than one of those). One way to do it is to record the actual port the client is using on application startup in database using information obtained from Netstat.
Sign In or Register to comment.