Completely delete project from versioned DB
Find out the Project Id using the following query.
select project_id from epub_project where display_name='<Your Project Name>';
Execute the following queries using the project id.
-- 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 = '<Your Project ID>'));
-- delete history of the project
delete from EPUB_PR_HISTORY where project_id in
(select project_id from epub_project where project_id = '<Your Project ID>');
-- delete the project
delete from epub_project where project_id = '<Your Project ID>';
-- delete history of the process
delete from EPUB_PROC_HISTORY where process_id in
(select process_id from epub_process where project = '<Your Project ID>');
-- delete task information of process
delete from EPUB_PROC_TASKINFO where id in
(select process_id from epub_process where project = '<Your Project ID>');
-- 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 = '<Your Project ID>'));
delete from EPUB_IND_WORKFLOW where process_id in
(select process_id from epub_process where project = '<Your Project ID>');
-- finally delete the process
delete from epub_process where project = '<Your Project ID>';
commit;
Thank you So Much.. it Worked...
ReplyDeleteExcellent
ReplyDeleteThanks a lot!
ReplyDeleteYou are welcome!!
ReplyDeleteThe problem with the approach is there would be assets sitting in orphan state in database which would create issues in future. So i would recommend to bring the project to author state and delete the project so it ensures are the data constraints are deleted properly and not running into issue in future.
ReplyDeleteatg sucks
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis works fine.
ReplyDeleteI was not able to delete my project at BCC because of some strange error but these SQL commands + publishing instance reset did the trick.
Thank You very much.
please help me on this error :::
ReplyDeleteAttempt to recover deployment '186100001' failed because it does not match the current deployment, '192400001', found in the database. Complete Status : file = /u01/home/app/atg/soft/jboss-eap-6.1/ATG-Data/FACL/servers/stg-falabella-ca-cl/Publishing/deployment/data/dep-stat-1511294995483 : target = Production : deployedSnapshot = 191307 : deployedSnapshotTimestamp = 1510605876263 : state = 203 : stateString = ERROR_LOCK : stateTimestamp = 1511294995243 : previousState = 201 : errorMessage = The target is locked by a different deployment initiated by cluster with ID : falabellaCluster : deploymentID = 186100001 : deploymentBeginTimestamp = 1511271037858 : deploymentLastBeginTimestamp = 1511294995236 : deploymentLastExecutionTime = 0 : deploymentTotalExecutionTime = 0 : deploymentProjectIDs = [Ljava.lang.String;@7cc560d3 : deploymentToSnapshot = null : deploymentFromSnapshot = null : deploymentType = 2 : deploymentMode = 11 : deploymentRevert = false : deploymentServer = desacloud357:40150 : deploymentCreateInitiator = admin : deploymentStopInitiator = null : deploymentDeleteInitiator = null : deploymentCommitted = false : deploymentSwitched = false : deploymentRollback = false : deploymentRollbackInitiator = null
try delete this file and bounce you bcc and watch the startup logs
ReplyDeletefile = /u01/home/app/atg/soft/jboss-eap-6.1/ATG-Data/FACL/servers/stg-falabella-ca-cl/Publishing/deployment/data/dep-stat-1511294995483