The DELETE on the Session table is for 3.70 not 3.60, and only SQL.
All that is really needed is a Program that can Route TCP/IP port connections. What I normally do for a client wanting this, is as follows: 1/ Buy and install an IP routing program such as “Wingate” http://www.wingate.com/ 2/ Redirect the Navision server to pass through this program (i.e. in the Hosts and Sessions files set up to point to a different Port). 3/ Set the TCP/IP timeout session on the Navision server to say 5 minutes. 4/ When you need to disconnect a user, go to the Wingate console and disconect. 5 minutes later (Depending on the timeout), the session will be freed up. Also if you have users that must NOT be disconnected, then just have them connect directly to the server port. There is also a hardware solution, 1/ Not necessary 2/ Not necessary 3/ As above 4/ Pull the network connection out of the Bub/switch and wait 5 minutes [:-)]
But wouldn’t it be nice if some programmer in Vedbaeck made a function that could kill sessions from within the client… [:)] /Lars
Of course that would be the best [V], but this is a work around that works. PS Tarek, if you develop your session killer for Native database, that would be a great tool.
You should configure the keepalivetime property on your server. What it does is that it checks if a sends a packet over the network to check if a session is still reachable and if it isn´t it will cut it off and throw the user out of the database. It is especially handy when you have a session that was terminated abnormally (Ctrl+Alt+Del) while it was locking a table. You can prevent major table lockings like this. It will also throw out unused sessions that are “hanging” in your database as you described. The frequency that check is performed is controlled by a parameter and by default it is 2 hours. You can put this down to 2 or 3 minutes if I remember correctly and you should do that. Check it out for further details at http://www.winguides.com/registry/display.php/891/ To disconnect clients that are still available but idle it is best to use the client manager for ExpandIT. Check that out at www.expandit.com
Does ExpandIT Solution disconnect a client based on Navision Client <–> Navision Server communication(Transactions) or based on Mouse Clicks & Key Pressed on the client side ? Also I’m not too sure if ExpandIT Solution is expensive or not, so if they offer such a solution for less than $100 USD then I think it’s not worth the effort I had planned to put in my solution.
When you use the ExpandIT solution you open the client in a kind of a shell that wrappes the fin.exe. It then shuts it done when the timeout you choose is expired. Actually they have 2 solutions, 1 is to this as I desctibed the other one is to centrally kill the client (called ExpandIT Client Control) and then you also have a program for the administrator that basically talks to this “shell” program and and tels it to kill the session (called ExpandIT Client Manager). It´s a sort of a workaround but it is more sophisticated solution than a keyboard/mouse emulation. I am not so sure about the price but it is more than 100$. I think it is closer to 700$. I have used this a few times and it seems to work fine.
Hi all, in my opinion, killing sessions by fiddeling with the TCP settings on the server does not give an acceptable result. Of course it’s fine that another user can use the session, BUT the user with the killed session will be very annoyed. When he returns from his (or hers, excuse me, ladies!) coffe break, and tries to run his Navision, he will get an error message about the server not responding etc = call system admin etc. I would not like to get all these angry, complaining calls, all day long! The client program must be terminated, which puts the user back in a normal situation, where he just restarts the program. And, finally, final wish to Tarek: Of course the session killer shouldn’t get active, unless you are close to having used up all your licensed sessions. So this semms to have to be built into Navision itself. Good luck Tarek, we’re relying on you now! Pelle
Hello Pelle, I was thinking of something a bit less avanced than what you’re describing. My Initial plan was to have a form when you could view all the Navision users (basically the session table) and select one or many users and issue a KILL for those users, this would kill the the sessions at the server side, the client would be disconnect but that would not close the client (that’s the application fin.exe) At least not in the 1st version [:D]
I’ll put in my voice to say that having a native session killer would be a VERY useful tool for our organization. We support six native Navision databases worldwide, some with a very small number of user licenses. If we ‘lose’ one or two licenses because of hanging sessions, that can have a significant impact on that office. The suggested cost ($100 USD) certainly wouldn’t make a developer a millionaire, but it would gain him a lot of respect and, to me, would likely be a feature that should be made available as part of the base set of tools available for native Navision.
“KeepAliveTime” in the registry will allow you to disconnect crashed clients. The default is 2 hours, to change that to 5 minutes, do the following: For Windows 2000: — Start Copy & Paste here — Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters] “KeepAliveTime”=dword:000493E0 — End Copy & Paste — Save the file as “ModifyTCP.reg” and open it in the server. This will create the necessary entries or replace them if they are already exist. You will need an administrator privilege in order do that. Changes will take effect after you restart your computer. The value above “000493E0” is 300000 decimal. The unit is in milliseconds. Change that if needed. Other parameters you should be aware of: - KeepAliveInterval: Default is 1000 milliseconds(1 Second). If the first KeepAlive packet was lost, Windows will try again after 1 second, it will retry 5 times before terminating the TCP/IP connection by default. - TcpMaxDataRetransmissions: Default is 5 retries. If you want to change these 2 additional parameters, add the following 2 lines at the end of the registry file above. These will make TCP/IP retry 10 times, 5 seconds apart: “TcpMaxDataRetransmissions”=dword:0000000A “KeepAliveInterval”=dword:00001388 From MSKB: KeepAliveTime Key: Tcpip\Parameters Value Type: REG_DWORD - Time in milliseconds Valid Range: 1 - 0xFFFFFFFF Default: 7,200,000 (two hours) Description: The parameter controls how often TCP attempts to verify that an idle connection is still intact by sending a keep alive packet. If the remote system is still reachable and functioning, it will acknowledge the keep alive transmission. Keep alive packets are not sent by default. This feature may be enabled on a connection by an application. KeepAliveInterval Key: Tcpip\Parameters Value Type: REG_DWORD - Time in milliseconds Valid Range: 1 - 0xFFFFFFFF Default: 1000 (one second) Description: This parameter determines the interval separating keep alive retransmissions until a response is received. Once a response is receive, the delay until the next keep alive transmission is again controlled by the value of KeepAliveTime. The connection will be aborted after the number of retransmissions specified by TcpMaxDataRetransmissions have gone unanswered. TcpMaxDataRetransmissions Key: Tcpip\Parameters Value Type: REG_DWORD - Number Valid Range: 0 - 0xFFFFFFFF Default: 5 Description: This parameter controls the number of times TCP will retransmit an individual data segment (non connect segment) before aborting the connection. The retransmission timeout is doubled with each successive retransmission on a connection. It is reset when responses resume. The base timeout value is dynamically determined by the measured round-trip time on the connection. Related Microsoft Knowledge Base Articles: Windows TCP/IP Registry Entries for Windows 95/98/ME: http://support.microsoft.com/default.aspx?scid=kb;en-us;158474 TCP/IP & NBT Configuration Parameters for Windows NT and Windows 2000: http://support.microsoft.com/default.aspx?scid=kb;en-us;120642 TCP/IP and NBT Configuration Parameters for Windows XP http://support.microsoft.com/default.aspx?scid=kb;EN-US;314053 When a user leaves Navision at the login prompt or cancels it, the session cannot be terminated by using KeepAlive. I made a program for this purpose that close idle clients, see my website if you are interested…
killing a session from native database, i do not think it is impossible someone who can work with windows api , can do this. i was able to stop the server from a navision client(native database) and it disconnect all the clients inluding myself.
I already know what ‘undocumented’ Windows API calls that would kill another process’ TCP/IP connection. It’s somewhat difficult to do and changing “KeepAliveTime” in the registry is much easier.
hi Tarek, do you think if it is developed , someone is ready to buy if price is under $100.
hi i guess freeware are available for the purpose. so no question of buying[:D] Hari
Just wanted to mention to those of you using Citrix or a TS environment. It is then possible to set an idle timeout for the session. This is done in Windows User Manager.
quote:
Originally posted by ajayjain
do you think if it is developed , someone is ready to buy if price is under $100.
Erm… we did [8D] We bought Shaman’s software two days ago - first tests yielded very promising results. Installation is easy, all clients can be monitored (and killed [}:)]) from a server application running on my PC [:D] Alright, enough promotion. Shaman, do I get an extra discount for this review? [:D]
Thanks Heinz. The program doesn’t kill the client, it tries to close it normally, like any user does, so there is no lose of data or loss of system resources. In Windows 98 for example, if one kills the task with a program like Task Killer, Windows has to be restarted every now and then because killing a task does not release GDI and system resources, not to mention that it doesn’t wait for the CPU to become idle if the user left a report running for a long time. I know of away to terminate the task and at the same time release GDI and system resources, I will include this method in a right click menu as a last resort option. I am currently experimenting with remote controlling the client so you can interact with Navision and respond to some popup windows that prevents Navision from closing normally sometimes. This will make the program usable with other programs such as PeachTree. Look for an update either today or Monday…
Hey Shaman, It sounds like you have a nice product, probably not the first, and probably not the only. So why not use the Anouncements forum [8D] to let everyone know what it does. That’s what the forum is for, and we would like to see activity. PS: those others of you out there that have Client shutdown products could also let us know about them, ideally the Anouncements forum will become a library of such products and services. PPS: I am not sure if you are aware, but I started a Navision Share ware concept for Navision on NOLUG/MBSonline back in 1996 (well it was Nolug then [;)]). Basically it was a dismal failure, only one person ever paid for any of the products offered. So just make sure you work out how to sell the product, especially when it is low cost like this.