Release : 8.35
Component : CA Business Service Insight
The following procedure enables moving all system’s metrics from ACE2 engine to PSL Writer (i.e. ACE1).
1. Stop all ACE2 services (best disable them):
a. ‘Oblicore – ACE on JBOSS Application Server’
b. ‘Oblicore – ACETransition’
c. ‘Oblicore – PslWorkerXXX’ (XXX stands for any number) – Note that there might be multiple PSL Workers.
2. If there are any ‘Oblicore – PSLWriterXXX’ services running then stop them too.
3. Execute the following update command on the database: UPDATE T_GLOBAL_RULES SET PSL_INSTANCE_ID = 0 , ASSIGNED_PSL_INSTANCE_ID = null and commit it.
4. Execute ClearAllPSL_BSI8.sql (attached the code sample for your review) for clearing all PSL data, so that the engine will reload it all from scratch.
Note: Take precaution before using the below code and take measures for break situation. Run this on a TEST environment before implementing on PROD
declare
slaName varchar2(200) := 'SLA_NAME';
begin
for crs in (select unique rule_id rid from t_rules_time_units where rule_id in (select psl_rule_id from t_rules where global_rule_id in ( select global_rule_id from t_global_rules where sla_id in (select sla_id from t_slas where sla_name = slaName) )))
loop
update t_rules_time_units t
set t.last_complete_psl_record_date=null,
t.last_psl_record_date=null,
t.last_psl_cycle_date=null,
t.first_complete_psl_record_date=null,
t.first_complete_modify_date=null,
t.last_rt_error_code=NULL,
t.last_rt_error=null,
t.min_time_new_raw_data=null,
t.min_time_of_correction=null,
t.min_time_not_used=null,
t.min_time_of_exception=null,
t.min_time_of_version=null,
t.infra_proc_last_handled = to_date('02/01/1970', 'dd/mm/yyyy'),
t.cancelled_agent_was_processed = 0
where t.rule_id=crs.rid;
update t_formulas t
set t.last_infra_processor_date=null,
t.initial_digest=null,
t.prev_raw_data_id=null ,
t.prev_cycle_time=to_date('02/01/1970', 'dd/mm/yyyy')
where t.formula_id in (select r.formula_id from t_rules r where r.rule_id=crs.rid);
delete from t_psl_corrections t
where t.rule_id=crs.rid;
delete from t_psl_exceptions t
where t.rule_id=crs.rid;
delete from t_psl_0_year t
where t.rule_id=crs.rid;
delete from t_psl_0_quarter t
where t.rule_id=crs.rid;
delete from t_psl_0_month t
where t.rule_id=crs.rid;
delete from t_psl_0_week t
where t.rule_id=crs.rid;
delete from t_psl_0_day t
where t.rule_id=crs.rid;
delete from t_psl_0_hour t
where t.rule_id=crs.rid;
delete from t_psl_1_all t
where t.rule_id=crs.rid;
delete from t_rule_state_lines t
where t.state_id in (select x.state_id from t_rule_states x where x.rule_id=crs.rid);
delete from t_rule_states t
where t.rule_id=crs.rid;
delete from t_formula_events t
where t.formula_id in (select x.formula_id from t_rules x where x.rule_id=crs.rid);
delete from t_formula_cluster_item_events t
where t.formula_id in (select x.formula_id from t_rules x where x.rule_id=crs.rid);
delete from t_formula_infrastruct_versions t
where t.formula_id in (select x.formula_id from t_rules x where x.rule_id=crs.rid);
delete from t_slalom_outputs t
where t.rule_id=crs.rid;
delete from t_intermediate_data t
where t.metric_id=crs.rid;
delete from t_formula_intermediate_events t
where t.formula_id in (select x.formula_id from t_rules x where x.rule_id=crs.rid);
delete from t_formula_metrics t
where t.formula_id in (select x.formula_id from t_rules x where x.rule_id=crs.rid);
COMMIT;
end loop;
exception when others then
rollback;
end;
5. This step causes all ACE2 data to be cleared out. Execute through SQL command window: EXEC prc_ace2_reload;
6. (optional) Execute on the database: truncate table t_log
7. (optional) To have all existing contract parties assigned to PSL Writer 0 execute on the database: update t_customer_psl_instances set psl_instance_id = 0 and commit it.
Now on the UI ‘Administration’ tab -> ‘ACE Management’ -> ‘ACE Instance Management’ -> the instance 0 will be shown for all existing contract parties.
8. (optional) To have ACE1 as the default engine, so that all new metrics will be assigned to ACE1: In the UI goto ‘Administration’ tab -> ‘Site Settings’ -> ‘Advanced’ -> ‘Configuration\ACE2’ folder -> ‘is ACE2 the default engine’ -> set to 0 (zero).
9. (optional) Using the UI (‘ACE Instance Management’ page) to distribute the contracts among the different PSL Writers.
10. Start all relevant PSL Writer services