cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete all act tables data that is configured with Oracle.

monika_b
Champ in-the-making
Champ in-the-making
Hi, I have configured my Activiti with Oracle DB. I have tested this table performing few activiti implementations that populated act tables.

I want to delete all the data persisting in ACT tables. Deleting the child references then parent is troublesome. Is there some existing DML script that I can use for clean up of activiti tables?

Please help.
6 REPLIES 6

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Monika.

to drop tables you can use:

drop table ACT_GE_PROPERTY cascade constraints;
drop table ACT_RU_VARIABLE cascade constraints;
drop table ACT_GE_BYTEARRAY cascade constraints;
drop table ACT_RE_DEPLOYMENT cascade constraints;
drop table ACT_RU_IDENTITYLINK cascade constraints;
drop table ACT_RU_TASK cascade constraints;
drop table ACT_RE_PROCDEF cascade constraints;
drop table ACT_RU_EXECUTION cascade constraints;
drop table ACT_ID_MEMBERSHIP cascade constraints;
drop table ACT_ID_GROUP cascade constraints;
drop table ACT_ID_USER cascade constraints;
drop table ACT_ID_INFO cascade constraints;
drop table ACT_RU_JOB cascade constraints;
drop table ACT_HI_PROCINST cascade constraints;
drop table ACT_HI_ACTINST cascade constraints;
drop table ACT_HI_TASKINST cascade constraints;
drop table ACT_HI_DETAIL cascade constraints;
drop table ACT_HI_COMMENT cascade constraints;
drop table ACT_HI_ATTACHMENT cascade constraints;
drop table ACT_RU_EVENT_SUBSCR cascade constraints;
in the qa module

Regards
Martin

monika_b
Champ in-the-making
Champ in-the-making
Thanks Martin. This is a very useful script. But still actually I required the script to clean up activiti data preserving the tables.

Though: I got deleted one by one already checking child constraint eachtime. Still a script will be very useful.

jbarrez
Star Contributor
Star Contributor
Programmatically, you could query *all* deployments, loop over them and delete them setting the 'cascade' option to true. That would effectively remove all data in your db.

monika_b
Champ in-the-making
Champ in-the-making
Thanks jbarrez. Would use this logic when require in future.

jbarrez
Star Contributor
Star Contributor
No, no sql script. The engine can do it for you though.

karrahahu1
Champ in-the-making
Champ in-the-making
Deleting the child references then parent is troublesome. Is there some existing DML script that I can use for clean up of activiti tables????