In case you want to clean up your environments a little bit you can make use of the following scripts:
DEFINE CORE_SCHEMA = '<atg_core_name>';
DEFINE PUB_SCHEMA = '<atg_pub_name>';
-- Delete server host names
DELETE FROM &CORE_SCHEMA..rout_instance;
DELETE FROM &CORE_SCHEMA..das_sds;
DELETE FROM &PUB_SCHEMA..das_sds;
DELETE FROM &CORE_SCHEMA..rout_host_inf;
commit;
-- Delete projects not checked in
DELETE FROM &pub_schema..epub_pr_history WHERE project_id IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0);
DELETE FROM &pub_schema..epub_proc_history WHERE process_id IN (SELECT process_id FROM &pub_schema..epub_process WHERE PROJECT IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0));
DELETE FROM &pub_schema..epub_proc_taskinfo WHERE ID IN (SELECT process_id FROM &pub_schema..epub_process WHERE PROJECT IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0));
DELETE FROM &pub_schema..epub_ind_workflow WHERE process_id IN (SELECT process_id FROM &pub_schema..epub_process WHERE PROJECT IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0));
DELETE FROM &pub_schema..avm_asset_lock WHERE workspace_id IN
(SELECT ID FROM &pub_schema..avm_devline WHERE NAME IN
(SELECT workspace FROM &pub_schema..epub_project WHERE project_id IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0)));
DELETE FROM &pub_schema..avm_workspace WHERE ws_id IN
(SELECT ID FROM &pub_schema..avm_devline WHERE NAME IN
(SELECT workspace FROM &pub_schema..epub_project WHERE project_id IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0)));
DELETE FROM &pub_schema..epub_process WHERE PROJECT IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0) ;
DELETE FROM &pub_schema..epub_project WHERE checked_in = 0;
commit;
-- Delete database assets
DELETE FROM &pub_schema..epub_wf_server_id;
DELETE FROM &pub_schema..epub_coll_workflow;
DELETE FROM &pub_schema..epub_workflow_info;
DELETE FROM &pub_schema..epub_file_asset;
commit;
-- Delete pending deployment.
DELETE FROM &pub_schema..epub_deployment;
-- Delete Meta data files from BCC.
DELETE FROM &pub_schema..das_depl_depldat;
DELETE FROM &pub_schema..das_depl_options;
DELETE FROM &pub_schema..das_depl_repmaps;
DELETE FROM &pub_schema..das_depl_item_ref;
DELETE FROM &pub_schema..das_depl_progress;
DELETE FROM &pub_schema..das_thread_batch;
DELETE FROM &pub_schema..das_deploy_data;
DELETE FROM &pub_schema..das_dd_markers;
DELETE FROM &pub_schema..das_deploy_mark;
DELETE FROM &pub_schema..das_rep_mark;
DELETE FROM &pub_schema..das_file_mark;
DELETE FROM &pub_schema..das_dep_fail_info;
DELETE FROM &pub_schema..das_deployment;
DELETE FROM &pub_schema..das_gsa_subscriber;
-- Deleting InternalScenarioManager subscribers
DELETE FROM &pub_schema..dsi_server_id;
-- Deleting ScenarioManager subscribers
DELETE FROM &pub_schema..dss_server_id;
commit;
-- Delete message tables
delete &pub_schema..dms_client;
delete &pub_schema..dms_limbo;
delete &pub_schema..dms_limbo_body;
delete &pub_schema..dms_limbo_delay;
delete &pub_schema..dms_limbo_msg;
delete &pub_schema..dms_limbo_props;
delete &pub_schema..dms_limbo_ptypes;
delete &pub_schema..dms_limbo_replyto;
delete &pub_schema..dms_msg;
delete &pub_schema..dms_msg_properties;
delete &pub_schema..dms_queue;
delete &pub_schema..dms_queue_entry;
delete &pub_schema..dms_queue_recv;
delete &pub_schema..dms_topic;
delete &pub_schema..dms_topic_entry;
delete &pub_schema..dms_topic_sub;
delete &pub_schema..dss_scenario_info;
delete &pub_schema..dss_template_info;
delete &pub_schema..dss_xref;
delete &pub_schema..das_gsa_subscriber;
delete &pub_schema..dss_coll_scenario;
delete &core_schema..dms_client;
delete &core_schema..dms_limbo;
delete &core_schema..dms_limbo_body;
delete &core_schema..dms_limbo_delay;
delete &core_schema..dms_limbo_msg;
delete &core_schema..dms_limbo_props;
delete &core_schema..dms_limbo_ptypes;
delete &core_schema..dms_limbo_replyto;
delete &core_schema..dms_msg;
delete &core_schema..dms_msg_properties;
delete &core_schema..dms_queue;
delete &core_schema..dms_queue_entry;
delete &core_schema..dms_queue_recv;
delete &core_schema..dms_topic;
delete &core_schema..dms_topic_entry;
delete &core_schema..dms_topic_sub;
delete &core_schema..dss_scenario_info;
delete &core_schema..dss_template_info;
delete &core_schema..dss_xref;
delete &core_schema..das_gsa_subscriber;
delete &core_schema..dss_coll_scenario;
commit;
DEFINE CORE_SCHEMA = '<atg_core_name>';
DEFINE PUB_SCHEMA = '<atg_pub_name>';
-- Delete server host names
DELETE FROM &CORE_SCHEMA..rout_instance;
DELETE FROM &CORE_SCHEMA..das_sds;
DELETE FROM &PUB_SCHEMA..das_sds;
DELETE FROM &CORE_SCHEMA..rout_host_inf;
commit;
-- Delete projects not checked in
DELETE FROM &pub_schema..epub_pr_history WHERE project_id IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0);
DELETE FROM &pub_schema..epub_proc_history WHERE process_id IN (SELECT process_id FROM &pub_schema..epub_process WHERE PROJECT IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0));
DELETE FROM &pub_schema..epub_proc_taskinfo WHERE ID IN (SELECT process_id FROM &pub_schema..epub_process WHERE PROJECT IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0));
DELETE FROM &pub_schema..epub_ind_workflow WHERE process_id IN (SELECT process_id FROM &pub_schema..epub_process WHERE PROJECT IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0));
DELETE FROM &pub_schema..avm_asset_lock WHERE workspace_id IN
(SELECT ID FROM &pub_schema..avm_devline WHERE NAME IN
(SELECT workspace FROM &pub_schema..epub_project WHERE project_id IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0)));
DELETE FROM &pub_schema..avm_workspace WHERE ws_id IN
(SELECT ID FROM &pub_schema..avm_devline WHERE NAME IN
(SELECT workspace FROM &pub_schema..epub_project WHERE project_id IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0)));
DELETE FROM &pub_schema..epub_process WHERE PROJECT IN (SELECT project_id FROM &pub_schema..epub_project WHERE checked_in = 0) ;
DELETE FROM &pub_schema..epub_project WHERE checked_in = 0;
commit;
-- Delete database assets
DELETE FROM &pub_schema..epub_wf_server_id;
DELETE FROM &pub_schema..epub_coll_workflow;
DELETE FROM &pub_schema..epub_workflow_info;
DELETE FROM &pub_schema..epub_file_asset;
commit;
-- Delete pending deployment.
DELETE FROM &pub_schema..epub_deployment;
-- Delete Meta data files from BCC.
DELETE FROM &pub_schema..das_depl_depldat;
DELETE FROM &pub_schema..das_depl_options;
DELETE FROM &pub_schema..das_depl_repmaps;
DELETE FROM &pub_schema..das_depl_item_ref;
DELETE FROM &pub_schema..das_depl_progress;
DELETE FROM &pub_schema..das_thread_batch;
DELETE FROM &pub_schema..das_deploy_data;
DELETE FROM &pub_schema..das_dd_markers;
DELETE FROM &pub_schema..das_deploy_mark;
DELETE FROM &pub_schema..das_rep_mark;
DELETE FROM &pub_schema..das_file_mark;
DELETE FROM &pub_schema..das_dep_fail_info;
DELETE FROM &pub_schema..das_deployment;
DELETE FROM &pub_schema..das_gsa_subscriber;
-- Deleting InternalScenarioManager subscribers
DELETE FROM &pub_schema..dsi_server_id;
-- Deleting ScenarioManager subscribers
DELETE FROM &pub_schema..dss_server_id;
commit;
-- Delete message tables
delete &pub_schema..dms_client;
delete &pub_schema..dms_limbo;
delete &pub_schema..dms_limbo_body;
delete &pub_schema..dms_limbo_delay;
delete &pub_schema..dms_limbo_msg;
delete &pub_schema..dms_limbo_props;
delete &pub_schema..dms_limbo_ptypes;
delete &pub_schema..dms_limbo_replyto;
delete &pub_schema..dms_msg;
delete &pub_schema..dms_msg_properties;
delete &pub_schema..dms_queue;
delete &pub_schema..dms_queue_entry;
delete &pub_schema..dms_queue_recv;
delete &pub_schema..dms_topic;
delete &pub_schema..dms_topic_entry;
delete &pub_schema..dms_topic_sub;
delete &pub_schema..dss_scenario_info;
delete &pub_schema..dss_template_info;
delete &pub_schema..dss_xref;
delete &pub_schema..das_gsa_subscriber;
delete &pub_schema..dss_coll_scenario;
delete &core_schema..dms_client;
delete &core_schema..dms_limbo;
delete &core_schema..dms_limbo_body;
delete &core_schema..dms_limbo_delay;
delete &core_schema..dms_limbo_msg;
delete &core_schema..dms_limbo_props;
delete &core_schema..dms_limbo_ptypes;
delete &core_schema..dms_limbo_replyto;
delete &core_schema..dms_msg;
delete &core_schema..dms_msg_properties;
delete &core_schema..dms_queue;
delete &core_schema..dms_queue_entry;
delete &core_schema..dms_queue_recv;
delete &core_schema..dms_topic;
delete &core_schema..dms_topic_entry;
delete &core_schema..dms_topic_sub;
delete &core_schema..dss_scenario_info;
delete &core_schema..dss_template_info;
delete &core_schema..dss_xref;
delete &core_schema..das_gsa_subscriber;
delete &core_schema..dss_coll_scenario;
commit;
Comments
Post a Comment