Did this article resolve your question/issue?



How to terminate a database remote server process from a script?

« Go Back


TitleHow to terminate a database remote server process from a script?
URL NameHow-to-terminate-a-database-remote-server-process-from-a-script
Article Number000180011
EnvironmentProduct: Progress
Version: 9.1E
Product: OpenEdge
Version: 10.x, 11.x
OS: All Supported Operating Systems
Question/Problem Description
How to terminate a database remote server process from a script?
Is it possible to trim _mprosrv and _sqlsrv2 processes without using the PROMON utility in interactive mode?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Terminating any process using a kill / taskill command is not recommended. Specifically for remote Server Processes, it does not guarantee that there will be no users connected to the server process at the time the PID is killed which will result in a DBDOWN if that session was holding latches in shared memory at the time.

Unlike the KILL / taskill command, PROMON verifies that no users are currently connected to the process prior to terminating it.
  • Since Progress 9.1E and later, a _mprosrv (ABL remote server process) can be terminated using PROMON. 
  • Since OpenEdge 10.1C and later, the capability to terminate a _sqlsrv2 (SQL remote server process) was added to PROMON.
Never-the-less, caution should be exercised prior to terminating a remote server process to ensure that there are no users currently connected to the process being terminated, and no exclusive locks or latches are being held by the remote server process itself (for example remote servers cleaning up after disconnected clients).

Login Brokers (primary or secondary) cannot be terminated with this functionality. The Login Broker is the Broker that the client/server connection initially connects to with -S port that the Login Broker was started with _mprosrv, as opposed to the remote Server the client communicates with (on the -minport -maxport range) once connection is established which can be terminated with this PROMON utility.

In interactive mode the following PROMON menu actions terminate a remote server: 

R&D > 4: Administrative Functions > 7. Server Options > 7. Terminate a server > [server number] 

To script terminating a remote server process, use PROMON in non-interactive mode by providing and input file to the command.
Create a file, (trimsrv.txt) with the following entries, replacing the [server number] placeholder with the number of the remote server to terminate:

[server number]
(carriage return after [server number])

Add the following command to your script: 
promon dbname -NL < trimsrv.txt 

To correlate the server number to be terminated with the process id, refer to Article How to terminate a remote server process?   

Last Modified Date11/20/2020 7:09 AM
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.