How to prematurely terminate a long running analyze?
The analyze command will run for the specified period. At times the period specified may be too long and instead of waiting for it to gracefully exit, the user may be better off terminating it and issuing the command afresh with a smaller time interval. The commands “abort config” or “deactivate config” are used to achieve this, and the former is preferred as it is more robust than the latter which can sometimes leave remnant processes or queues that the user subsequently need to manually clean up.
Here is a test:
1. There is no SharePlex child process running when sp_cop is started:
sp_ctrl (alvsupu15:5438)> status
Brief Status for alvsupu15
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 12410 23-Nov-16 19:10:21
Cmd & Ctrl Running 22491 06-Dec-16 15:55:12
There are no active configuration files
sp_ctrl (alvsupu15:5438)> list config
File Name State Datasource
-------------------------------------------------- ---------- ---------------
config1 Inactive o.ORA11GR2
Last Modified At: 29-Apr-16 13:10 Size: 125
ORA_config Inactive o.SOURCE_SID
Last Modified At: 19-Jan-16 16:24 Size: 151
2. The analyze is launched for a day on a config file:
sp_ctrl (alvsupu15:5438)> analyze config config1 1 days
sp_ctrl (alvsupu15:5438)> status
Brief Status for alvsupu15
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 12410 23-Nov-16 19:10:21
Cmd & Ctrl Running 22491 06-Dec-16 15:55:12
Capture Running 22509 06-Dec-16 15:56:21
Analyze Running 22511 06-Dec-16 15:56:22
System is used as a source machine
There is 1 active configuration file
3. The user decides to end the analyze by issuing “abort config”. Thereafter no processes associated with analyze are seen as the analyze exits:
sp_ctrl (alvsupu15:5438)> abort config config1
sp_ctrl (alvsupu15:5438)> status
Brief Status for alvsupu15
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 12410 23-Nov-16 19:10:21
Cmd & Ctrl Running 22491 06-Dec-16 15:55:12
There are no active configuration files
sp_ctrl (alvsupu15:5438)>