onmode -z: Kill a database server session

Read syntax diagramSkip visual syntax diagram
Syntax:

>>-onmode-- -z--sid--------------------------------------------><

Element Purpose Key considerations
-z sid Kills the session that you specify in sid This value must be an unsigned integer greater than 0 and must be the session identification number of a currently running session.

To use the -z option, first obtain the session identification (sessid) with onstat -u, then execute onmode -z, substituting the session identification number for sid.

When you use onmode -z, the database server attempts to kill the specified session. If the database server is successful, it frees any resources that the session holds. If the database server cannot free the resources, it does not kill the session.

If the session does not exit the section or release the latch, the database server administrator can take the database server offline, as described in Taking the Database Server to Offline Mode with the -k Option, to close all sessions.

This command has an equivalent SQL administration API function.


Copyright© 2019 HCL Technologies Limited