Skip to content

Instantly share code, notes, and snippets.

@CedricL46
Last active February 19, 2021 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CedricL46/4462639c6e7c341bd8b0cc5238c07132 to your computer and use it in GitHub Desktop.
Save CedricL46/4462639c6e7c341bd8b0cc5238c07132 to your computer and use it in GitHub Desktop.
--Performance/Development Action
--Script to mass abort all running instances. (Usefull during perf testing to keep volumetry between runs)
update YOUR_YOUR_SOA_USER.composite_instance set state=16 where state=32;
update YOUR_YOUR_SOA_USER.work_item set state = 10, modify_date = sysdate where state<5;
update YOUR_YOUR_SOA_USER.cube_instance ci set ci.state = 8 ,
ci.scope_revision = (select cit.scope_revision+1 from YOUR_YOUR_SOA_USER.cube_instance cit where cit.ecid = ci.ecid) ,
ci.modify_date = sysdate where ci.state < 4;
update YOUR_YOUR_SOA_USER.dlv_message set state = 3 where state in (0, 2);
update YOUR_YOUR_SOA_USER.dlv_subscription set state = -1 where state=0;
COMMIT;
-- Delete all data (Only in Dev/VBox env to restart fresh)
truncate table YOUR_SOA_USER.edn_clusters;
truncate table YOUR_SOA_USER.edn_retry_count;
truncate table YOUR_SOA_USER.edn_log_messages;
truncate table YOUR_SOA_USER.EDN_EVENT_ERROR_STORE;
truncate table YOUR_SOA_USER.audit_details;
truncate table YOUR_SOA_USER.audit_trail;
truncate table YOUR_SOA_USER.brdecisionunitofwork;
truncate table YOUR_SOA_USER.composite_instance;
truncate table YOUR_SOA_USER.cube_instance;
truncate table YOUR_SOA_USER.cube_scope;
truncate table YOUR_SOA_USER.document_dlv_msg_ref;
truncate table YOUR_SOA_USER.dlv_message;
truncate table YOUR_SOA_USER.dlv_subscription;
truncate table YOUR_SOA_USER.document_ci_ref;
truncate table YOUR_SOA_USER.instance_payload;
truncate table YOUR_SOA_USER.headers_properties;
truncate table YOUR_SOA_USER.reference_instance;
truncate table YOUR_SOA_USER.composite_sensor_value;
truncate table YOUR_SOA_USER.wi_fault;
truncate table YOUR_SOA_USER.mediator_case_detail;
truncate table YOUR_SOA_USER.mediator_case_instance;
truncate table YOUR_SOA_USER.mediator_instance;
truncate table YOUR_SOA_USER.mediator_case_detail;
truncate table YOUR_SOA_USER.MEDIATOR_CASE_INSTANCE;
truncate table YOUR_SOA_USER.mediator_instance;
truncate table YOUR_SOA_USER.EDN_LOG_MESSAGES;
alter table YOUR_SOA_USER.B2B_DATA_STORAGE disable constraint B2B_DS_DOC_ID_FK ;
truncate table YOUR_SOA_USER.XML_DOCUMENT;
alter table YOUR_SOA_USER.B2B_DATA_STORAGE enable constraint B2B_DS_DOC_ID_FK ;
--commit;
truncate table YOUR_SOA_USER.wfassignee;
truncate table YOUR_SOA_USER.wfcomments;
truncate table YOUR_SOA_USER.wfmessageattribute;
truncate table YOUR_SOA_USER.wfroutingslip;
truncate table YOUR_SOA_USER.wfheaderprops;
truncate table YOUR_SOA_USER.WFTASKASSIGNMENTSTATISTIC;
truncate table YOUR_SOA_USER.wftaskhistory;
truncate table YOUR_SOA_USER.work_item;
truncate table YOUR_SOA_USER.wftaskhistory_tl;
COMMIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment