Dynamically starting, stopping, or restarting a listen thread

You can dynamically start, stop, or stop and start a listen thread for a SOCTCP or TLITCP network protocol without interrupting existing connections. For example, you might want to stop listen threads that are unresponsive and then start new ones in situations when other server functions are performing normally and you do not want to shut down the server.

The listen thread must be defined in the sqlhosts file for the server. If necessary, before start, stop, or restart a listen thread, you can revise the sqlhosts entry.
To dynamically start, stop, or restart listen threads:
  1. Run one of the following onmode -P commands:
    • onmode -P start server_name
    • onmode -P stop server_name
    • onmode -P restart server_name
  2. Alternatively, if you are connected to the sysadmin database, either directly or remotely, you can run one of the following commands:
    • An admin() or task() command with the start listen argument, using the format
      EXECUTE FUNCTION task("start listen", "server_name");
    • An admin() or task() command with the stop listen argument, using the format
      EXECUTE FUNCTION task("stop listen" ,"server_name");
    • An admin() or task() command with the restart listen argument, using the format
      EXECUTE FUNCTION task("restart listen", "server_name");
For example, either of the following commands starts a new listen thread for a server named ifx_serv2:
onmode -P start ifx_serv2
EXECUTE FUNCTION task("start listen", "ifx_serv2");

Copyright© 2019 HCL Technologies Limited