Enables you to bring a Q engine online or take it offline.
sp_engine "online | offline | can_offline | shutdown | q_online | q_offline | q_can_offline | q_shutdown" , [ engine_id]
returns information on whether an engine can be brought offline. If the engine cannot be brought offline, you see the spids of the Adaptive Server sessions that prevent the engine from being offline. You cannot use this parameter to specify a Q engine.
the ID of the engine.
The type of the engine that you specify must match the command (online, q_online, and so on). For example, you cannot specify a non-Q engine with q_offline, and you cannot specify a Q engine with offline.This parameter is required for offline, q_offline, can_offline, q_can_offline, shutdown, and q_shutdown.This parameter is not required for online, q_online.
brings an engine online. The value of sp_configure "max online Q engines" must be greater than the current number of Q engines online, You must use quotes because online is a reserved keyword. You cannot use this parameter to specify a Q engine.
brings an engine offline. You can also use engine_id to specify an engine to bring offline. You cannot use this parameter to specify a Q engine.
returns information on whether a Q engine can be brought offline. If the engine cannot be brought offline, you see the spids of the Adaptive Server sessions that prevent the engine from being offline. You must use engine_id to specify whether a Q engine can be taken offline.
brings a Q engine offline. You must use engine_id to specify an engine to bring offline.
brings the next Q engine online.
forces a Q engine offline. If there are any tasks with an affinity to this engine, they are killed after a five-minute wait. You must use quotes, as shutdown is a reserved keyword. You must use engine_id to specify whether the Q engine can shut down.
forces an engine offline. If there are any tasks with an affinity to this engine, they are killed after a five-minute wait. You must use quotes, as shutdown is a reserved keyword. You cannot use this to specify a Q engine.
Manually brings a Q engine online:
sp_engine 'q_online' go
(return status=0) 02:00000:00000:2005/06/08 12:52:21.09 kernel Network and device connection limit is 1014. 02:00000:00000:2005/06/08 12:52:21.24 server Initialized Unilib version 7.2. 02:00000:00000:2005/06/08 12:52:21.24 kernel Q engine 2, os pid 20025 online 02:00000:00000:2005/06/08 12:52:21.33 kernel LDAP dynamic libraries successfully loaded. 02:00000:00000:2005/06/08 12:52:21.38 kernel IBM MQ dynamic libraries successfully loaded.
Takes a Q engine offline:
1> select engine, status from sysengines 2> go
engine status ------ ------------ 0 online 1 online_q 2 online_q (3 rows affected)
1> sp_engine 'q_offline', 1 2> go
(return status = 0) 00:00000:00000:2005/06/08 12:55:54.25 kernel engine 2, os pid 20025 offline
1> select engine, status from sysengines 2> go
engine status ------ ------------ 0 online 1 online_q (2 rows affected)
Checks to see whether you can take a Q engine offline:
1> select engine, status from sysengines 2> go
engine status ------ ------------ 0 online 1 online_q (2 rows affected)
1> sp_engine 'q_can_offline', 1 2> go
spid: 13 has outstanding rtms-connection connections.
Shuts down a Q engine:
1> select engine, status from sysengines 2> go
engine status ------ ------------ 0 online 1 online_q (2 rows affected)
1> sp_engine 'q_shutdown', 1 2> go
(return status = 0)
1> select engine, status from sysengines 2> go
engine status ------ ------------ 0 online (1 row affected)
online, offline, can_offline, and shutdown affect only non-Q engines. You see an error if you specify a Q engine with these parameters.
q_online, q_offline, q_can_offline, and q_shutdown affect only Q engines. You see an error if you specify a non-Q engine using these parameters.
You cannot shut down or take engine 0 offline.
You can determine the status of an engine, and which engines are currently online with the following query:
select engine, status from sysengines where status = "online"
online and shutdown are keywords and must be enclosed in quotes.
You can bring engines online only if max online Q engines is greater than the current number of engines with an online status, and if enough CPU is available to support any additional engines.
An engine offline can fail or might not immediately take effect if there are server processes with an affinity to that engine.
You must be a System Administrator to bring engines online or take them offline.