Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 22 total |
Disconnecting Users in Remote Sessions. |
Mon, Apr 19 2010 6:59 PM | Permanent Link |
Steve Gill | If I have a number of users connected to the database (via Remote sessions) and I want to perform an operation that requires exclusive access (eg. a repair), how do I disconnect them? Do I iterate through all of the active sessions and drop them one-by-one in SQL using " DISCONNECT SERVER SESSION"?
Regards, Steve |
Tue, Apr 20 2010 7:51 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Steve,
<< If I have a number of users connected to the database (via Remote sessions) and I want to perform an operation that requires exclusive access (eg. a repair), how do I disconnect them? Do I iterate through all of the active sessions and drop them one-by-one in SQL using " DISCONNECT SERVER SESSION"? >> You would need to use REMOVE SERVER SESSION, but yes, that is how you would do it. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Apr 20 2010 6:16 PM | Permanent Link |
Steve Gill | Hi Tim,
<< You would need to use REMOVE SERVER SESSION, but yes, that is how you would do it.>> Thanks. I wrote a stored procedure to do it and it seems to work perfectly. Regards, Steve |
Wed, Apr 21 2010 3:54 AM | Permanent Link |
Uli Becker | Steve,
> Thanks. I wrote a stored procedure to do it and it seems to work perfectly. Just out of interest. How do your applications react when they are disconnected from the server? Uli |
Wed, Apr 21 2010 1:52 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< Just out of interest. How do your applications react when they are disconnected from the server? >> They're probably not happy about it. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Apr 21 2010 3:45 PM | Permanent Link |
Uli Becker | Tim,
> They're probably not happy about it. I think so. The reason of my question is, that I am looking for a way to react to a disconnection. We talked about that in another thread. My idea is like that: 1. The application is disconnected 2. The application tries to reconnect and to reopen all tables and queries that were opened before. 3. After a timeout it shuts down. Sounds easy, seems to be difficult. Uli |
Wed, Apr 21 2010 5:54 PM | Permanent Link |
Steve Gill | Hi Uli,
<< The reason of my question is, that I am looking for a way to react to a disconnection. We talked about that in another thread. My idea is like that: 1. The application is disconnected 2. The application tries to reconnect and to reopen all tables and queries that were opened before. 3. After a timeout it shuts down. Sounds easy, seems to be difficult. >> Actually I haven't got to that part yet. The plan is to display a message to the user when it occurs and then hopefully close the application gracefully - maybe. Not the best solution but the problem is, with some sites having over 100 users spread over a wide area, it's not practical for the administrator to go around and tell everyone to log out. There's also the problem of people still being logged in and not at their desks (and their workstations are locked). What I would really like to do is use the yet-to-be-released messaging layer (hint, hint, Tim <vbg>) to send out a message to all applications to shut themselves down in 5 minutes or whatever. Another idea I thought of is to have a special table that has just one record with a flag field, eg. Shutdown = True. The application could periodically check this field and when it switches from False to True for example, display a message to the user that it's closing time and no more drinks will be served, then shut itself down. But this is different than what you need. I think you're looking for a way to handle non-planned disconnections rather than forced ones. Steve |
Thu, Apr 22 2010 1:19 PM | Permanent Link |
Uli Becker | Steve,
<< The plan is to display a message to the user when it occurs and then hopefully close the application gracefully - maybe. >> That's what I am doing now. I am using the OnRemoteReconnect event: Application.MessageBox(MyMessage),'',16); Continue := false; StopAsking := true; Mainform.close; << it's not practical for the administrator to go around and tell everyone to log out. >> True. << Another idea I thought of is to have a special table that has just one record with a flag field, eg. Shutdown = True...>> Interesting approach. <<I think you're looking for a way to handle non-planned disconnections rather than forced ones.>> Both. In my case I have remote connections to some networks of my clients. There are different applications (EDB-based) running on a number of workstations there. Some of them are running unattended. In order to exchange EDBServer e.g. I have to disconnect all sessions, install the server and restart it. At the end I have to restart all these applications on each workstation. Not that funny. So I am looking for a possibility of an automatic reconnection during a certain time frame. Uli |
Thu, Apr 22 2010 6:12 PM | Permanent Link |
Steve Gill | Hi Uli,
<<At the end I have to restart all these applications on each workstation. Not that funny. So I am looking for a possibility of an automatic reconnection during a certain time frame.>> I need to handle that too at some stage so I'd be interested in what you come up with. Steve |
Fri, Apr 23 2010 5:38 AM | Permanent Link |
John Hay | Uli
> At the end I have to restart all these applications on each workstation. > Not that funny. > > So I am looking for a possibility of an automatic reconnection during a > certain time frame. I guess the main problem is that anything "data dependent" in the application becomes invalid in this situation. After trying the automatic reconnect (in DBISAM admittedly) I found it was easier and more consistent to restart the application. You can do this as part of your app eg procedure restart; var handle:thandle; appnamehar; begin appname := pchar(application.exename); shellexecute(handle,apname,nil,nil,sw_shownormal); application.terminate; end; John |
Page 1 of 3 | Next Page » | |
Jump to Page: 1 2 3 |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |