Try OpenEdge Now
skip to main content
Database Administration
Reference : Startup and Shutdown Commands : PROSHUT command
 

PROSHUT command

Shuts down the OpenEdge database server and individual processes. Before you shut down the broker, have all application users quit their sessions. If necessary, you can disconnect users by using the PROSHUT command's Disconnect a User or Unconditional Shutdown parameters.

Syntax

proshut db-name [ -b | -by| -bn
                 | -C list | -C disconnect username
                 | -F | -Gw
                 | -H host-name | -S service-name
                 | -shutdownTimeout [ immed | maximum |n
[ h | m | s]]
                 | -cpinternal codepage | -cpstream codepage
                ]...

Parameters

db-name
Specifies the database the server is running against.
-b
Directs PROSHUT to perform a batch shutdown. 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 PROSHUT to perform an unconditional batch shutdown and to disconnect all active users. Note that PROSHUT does not give users any notice before disconnecting them.
-bn
Directs PROSHUT to perform a batch shutdown only if there are no active users.
-C list
Lists all of the users connected to the database. The list is printed out to the screen without any page breaks. Use of this parameter is limited to local non-networked connections only.
-C disconnect usernum
Allows you to initiate a disconnect for the specified user. This is similar to option 1 of the PROSHUT menu. Use of this parameter is limited to local non-networked connections only.
-F
Starts an emergency shutdown. 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.
-Gw
For DataServers, specifies the DataServer broker to shut down.
-H host-name
Specifies the machine where the database server runs. If issuing the shutdown command from a remote machine, specify the host name.
-S service-name
Specifies the database server or broker process. If issuing the shutdown command from a remote machine, specify the service name.
-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 timeout value is reached, normal shutdown proceeds. If not specified, the default is 10 minutes. The table below describes the shutdown timeout parameter.
Table 63. shutdownTimeout values
Value
Meaning
Range
immed
Shutdown occurs in approximately 60 seconds, regardless of transaction backout status
maximum
Shutdown occurs in a maximum of 24 hours, after all no
n
Specifies the shutdown timeout value in seconds
60 - 86400
ns
Specifies the shutdown timeout value in seconds
60 - 86400
nm
Specifies the shutdown timeout value in minutes
1 - 1440
nh
Specifies the shutdown timeout value in hours
1 - 24
The -shutdownTimeout parameter is ignored when forced shutdown (-F) is specified.
-cpinternal codepage
An internationalization startup parameter that identifies the code page used in memory.
-cpstream codepage
An internationalization startup parameter that identifies the code page used for stream I/O.
When you enter the PROSHUT command without the -by, -bn, or -F parameters, the following menu appears:
1 Disconnect a User
2 Unconditional Shutdown
3 Emergency Shutdown (Kill All)
x Exit
The following table lists the menu options and their actions:
Option
Action
1
Prompts you for the number of the user you want to disconnect.
2
Disconnects all users and shuts down the database.
3
Prompts you to confirm your choice. If you cancel the choice, you cancel the shutdown. If you confirm the choice, PROSHUT displays the following message:     Emergency shutdown initiated...PROSHUT marks the database for abnormal shutdown, kills all remaining processes connected to the database, and deletes shared-memory segments and semaphores. The database is in a crashed state. PROSHUT performs normal crash recovery when you restart the database and backs out any active transactions.
x
Cancels the shutdown without taking any action.

Notes

*You can shut down using the PROMON utility's Shut Down Database menu option.
*The user who shuts down the server must have started it, or be root (on UNIX).
*When you initiate PROSHUT over a network, the amount of time that it takes to actually shut down all of the OpenEdge processes and to free any ports varies depending on the number of clients, brokers, and servers that must be shut down. The PROSHUT command might return control to the terminal before all of the processes are stopped and resources are freed.
*Specifying -shutdownTimeout allows the database a specified amount of time to halt activity before initiating immediate database 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
*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 timeout interval, the database is immediately shutdown by stopping all database output and killing all active users.
*If you specified a unique value for -cpinternal or -cpstream when you opened the database, you must specify that same value for -cpinternal or -cpstream when you close the database with the PROSHUT command. If you do not, PROSHUT uses the values for -cpinternal and -cpstream found in the main startup parameter file created during installation (such as OpenEdge-install-dir/startup.pf). If the values of -cpinternal or -cpstream specified for your database do not match the values specified in the main startup parameter file, you receive the following error message:
Code page conversion table for table-name to table-name was not found. (6063)
*Unconditional forced shutdown (-byF) is not allowed on a database started with no integrity (-i).
*Forced shutdown (-F) on a database started with no integrity (-i) requires two confirmations. The first confirmation requires you to acknowledge that the database was started with no integrity and you are initiating a forced shutdown. The second confirmation is the normal forced shutdown confirmation. You must answer y to both for the shutdown to execute. This type of shutdown can cause database corruption.