Try OpenEdge Now
skip to main content
Database Administration
Database Basics : Starting Up and Shutting Down : Stopping a server or broker : PROSHUT command
 
PROSHUT command
To shut down a database server with the PROSHUT command, enter one of the following:
proshut db-name[ -b | -by | -bn | -H host-name| -S service-name |
                  -shutdownTimeout [ immed | maximum |n[ h | m | s]]
                                      -F | -Gw
db-name
Specifies the database the server is running against.
-b
Indicates a batch shutdown will be performed. When no client is connected, the database automatically shuts down. When one or more clients are connected, PROSHUT prompts the user to enter "yes" to perform an unconditional batch shutdown and to disconnect all active users; or "no" to perform a batch shutdown only if there are no active users. The -b parameter combines the functionality of the -by or -bn parameters.
-by
Directs the broker to perform an unconditional batch shutdown and to disconnect all active users.
-bn
Directs the broker to perform a batch shutdown only if there are no active users.
-H host-name
Specifies the machine where the database server runs. You must specify the host name if you issue the shutdown command from a machine other than the host.
-S service-name
Specifies the database server or broker process service name. A TCP network requires the -S parameter.
-shutdownTimeout [ immed | maximum |n[ h | m | s]]
Specifies the amount of time for normal database activity to stop and users be disconnected before immediately shutting down (killing users still connected). If all normal activity ceases before the time out value is reached, normal shutdown proceeds. Table 62 describes the shutdown time out parameter. If not specified, the default is 10 minutes. The minimum shutdown time out value is 60 seconds (immed) and the maximum time out value is 24 hours (maximum). The -shutdownTimeout parameter is ignored when forced shutdown (-F) is specified.
-F
Forces an emergency shutdown, on UNIX systems only. To use this parameter, you must run PROSHUT on the machine where the server resides. This parameter is not applicable for remote shutdowns or DataServer shutdowns.
Using -by with -F causes an emergency shutdown.
-Gw
For DataServers, specifies the DataServer broker to shut down.
For complete PROSHUT syntax, see PROSHUT command.
When you enter the PROSHUT command without the -by, -bn, or -F parameters, the PROSHUT menu appears:
1 Disconnect a User
2 Unconditional Shutdown
3 Emergency Shutdown (Kill All)
x Exit
The table below lists the PROSHUT menu options and their actions.
Table 15. PROSHUT menu options
Option
Action
1
Prompts you for the number of the user you want to disconnect.
2
Stops all users and shuts down the database. If you have multiple servers, PROSHUT stops them all. To stop a specific server process, use the appropriate operating system command.
3
Prompts you to confirm your choice. If you cancel the choice, you cancel the shutdown. If you confirm the choice, PROSHUT waits for five seconds before taking any action, then displays the following message:
      Emergency shutdown initiated...
PROSHUT marks the database for abnormal shutdown and signals all processes to exit. After 10 more seconds, PROSHUT kills all remaining processes connected to the database, and deletes shared-memory segments and semaphores. The database is in a crashed state. The database engine performs normal crash recovery when you restart the database and backs out any active transactions.This option is available only if the database is on the same machine where you are logged in.
x
Cancels the shutdown without taking any action.
If you want to run the shutdown command noninteractively and avoid the PROSHUT menu, issue the PROSHUT command using either of the parameters described in the table below.
Table 16. PROSHUT Parameters
Parameter
Action
Kill Users (-by)
Unconditional batch shutdown; kills all active users
Proceed If No Users (-bn)
Batch shutdown only if there are no active users
When using the shutdown command from a machine other than the host, in a TCP/IP network, you must use the Host Name (-H) and Service Name (-S) parameters. The Host Name is the machine where the database server is running. The Service Name is the name of the database server or broker process, as defined in the /etc/services file on UNIX. For example, the following command shuts down the sports database from a remote machine in a BSD UNIX network:
proshut sports -H host-name -S sports-broker -by
Normal shutdown attempts to ensure that all database activity has ceased before initiating an immediate shutdown. The database is considered "active" if any of the following is true:
*There is forward movement of the before-image "cursor" indicating database update activity.
*There are active database connections.
*There are live transactions that have not been backed out.
Normal shutdown backs out live transactions and disconnects inactive connections.
Specifying -shutdownTimeout allows the database a specified amount of time to halt activity before initiating immediate shutdown. The database is considered "active" if any of the following is true:
*There is forward movement of the before-image "cursor" indicating update activity.
*There are active connections (excluding asynchronous page writers, the watchdog, the after-image management daemon, Replication, shutdown, and PROMON).
*There are live transactions that have not been backed out
Normal shutdown proceeds until all activity ceases or the specified amount of time elapses. At the end of the time out interval, the database is immediately shutdown by stopping all database output and killing all active users.
By default, normal shutdown has a maximum of 10 minutes to cease database activity and shutdown cleanly. The shutdown time out can range from one minute to 24 hours. For example, to give shutdown 1 hour to complete, you would specify the following:
proshut mydb -by -shutdownTimeout 1h
For more information on PROSHUT, see PROSHUT command.