Tuesday, August 18, 2020

ATG BCC -- Remove struck Projects - SQL + RQL

 -- Removing locks of the project if any
delete from avm_asset_lock where workspace_id in
(select id from avm_devline where name in
(select workspace from epub_project where project_id = 'prj448130'));

-- Remove workspace
delete from avm_workspace where ws_id in
(select id from avm_devline where name in
(select workspace from epub_project where project_id = 'prj448130'));

-- Remove Devline
delete from avm_devline where name in
(select workspace from epub_project where project_id = 'prj448130');

-- delete history of the project
delete from EPUB_PR_HISTORY where project_id in
(select project_id from epub_project where project_id = 'prj448130');

-- delete history of the process
delete from EPUB_PROC_HISTORY where process_id in
(select process_id from epub_process where project = 'prj448130');

-- delete task information of process
delete from EPUB_PROC_TASKINFO where id in
(select process_id from epub_process where project = 'prj448130');

-- delete states of project (if any)
delete from EPUB_WORKFLOW_STRS where id in
(select ID from EPUB_IND_WORKFLOW where process_id in
(select process_id from epub_process where project = 'prj448130'));

delete  from EPUB_IND_WORKFLOW where process_id in
(select process_id from epub_process where project = 'prj448130');


-- delete the deployment
delete from epub_deployment where deployment_id in
(select deployment_id from epub_deploy_proj where project_id='prj448130');

-- delete the deployment data
delete from epub_deploy_proj where project_id='prj448130';

-- finally delete the process
delete from epub_process where project = 'prj448130';

Invalidate Caches

1) /dyn/admin/nucleus/atg/deployment/DeploymentRepository/
2) /dyn/admin/nucleus//atg/epub/PublishingRepository/
3) /atg/epub/version/VersionManagerRepository/

Now navigate to :
/atg/epub/PublishingRepository/
if the project name exists in BCC Home, check this RQL , if it returns data


<print-item item-descriptor="project" id="prj252141" />
<print-item item-descriptor="process" id="prc252141" />

if so, remove them in the below reverse order

<remove-item item-descriptor="process" id="prc444019" />
<remove-item item-descriptor="project" id="prj444019" />


<print-item item-descriptor="project" id="prj252141" />
<print-item item-descriptor="process" id="prc252141" />

No comments:

Post a Comment