Feedback
Did this article resolve your question/issue?

   

Article

How to use PROSHUT to disconnect a user from command line?

Information

 
TitleHow to use PROSHUT to disconnect a user from command line?
URL NameP48144
Article Number000149698
EnvironmentProduct: Progress
Version: 8.x, 9.x
Product: OpenEdge
Version: All Supported Versions
OS: All supported platforms
Other: RDBMS
Question/Problem Description
How to disconnect a user from the database without using Option 1 of the PROSHUT menu?
How to disconnect a user from a database without using PROMON > 8.  Shut Down Database > 1  Disconnect a User ?
How to disconnect a user using PROSHUT from the command line?
How to script connected user disconnections ?
How to terminate a user connection from the command line?
What does PROSHUT -C disconnect do?
 
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
The PROSHUT command has a disconnect parameter which allows a DBA to disconnect a client by making use of the associated user number from command line.

$   proshut dbname -C disconnect <usernum>

Example: proshut dbname -C disconnect 13

The PROSHUT command with the disconnect Option followed by the user number, then initiates a disconnect of the user / client from the database which performs the same function as:
  • Option 1 Disconnect a User of the PROSHUT Menu or
  • PROMON > 8.  Shut Down Database > 1  Disconnect a User
The proshut -C disconnect <usernum> command however does not provide a listing of users connected to the database as the PROSHUT and PROMON Menus display.  Rather the proshut command with the disconnect Option expects that the user number to be disconnected has already been identified.  The user number can be obtained:
  • By running: PROSHUT -list
  • From database log file (dbname.lg).  
  • programmatically with Virtual System Tables:
  1. _Connect VST table.  Refer to Article How to disconnect all self and remote users from a database? for an example of disconnecting all current users that can be disconnected.
  2. _MyConnection VST table. Refer to Article How to retrieve user number and PID of DB connection   

The "proshut -C disconnect" command can only be run from the same machine the database is started.
  • This parameter is limited to local non-networked connections only
  • You can run: "proshut dbname -S <portnumber>", from a remote machine and then from the menu presented, Select: Option 1 Disconnect a User and enter the user number to disconnect. 
  • You cannot use the "-S" with "disconnect", it will fail with "You cannot run the DISCONNECT from a remote machine. (2259)"
Workaround
Notes
Last Modified Date5/28/2021 10:56 PM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.