Skip to main content

ATG - Clean up CORE and PUB schemas

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;

Comments

Popular posts from this blog

Configure LDAP SSO for BCC and Endeca Workbench

If you want to setup your BCC with a SSO server along with LDAP validation you can follow the next steps, this is all for OOTB configs: LDAP In Memory Server Feel free to clone and build:  https://github.com/kwart/ldap-server Then you can start it with:  java -jar ldap-server.jar -b 127.0.0.1 -p 10389 ldap_test.ldif Lastly, you can validate connectivity with this command:  ldapsearch -h localhost -p 10389 -x -D "uid=admin,ou=system" -w secret Just make sure that you defined user and organization appropriately. CIM Setup SSO Run <ATG_ROOT>/home/bin/cim.sh Select options as follows: Platform-Guided Search Integration [8] Content Administration Choose Commerce AddOns: [4] Single Sign On (SSO) [D] Done [1] Commerce Only SSO Authentication [1] LDAP Server Authentication [1] Non-Switching Datasource Don't include demo application [2] Index by Product [A] Select Application Server [2] Weblogic Enter Weblogic home path: /your/weblogic/wlserver/path Enter domain path: /your/...

Fix broken sequence on parent-child relationship tables for PUB schema

Whenever you find an error like this (for category-product relationship for example) ERROR [nucleusNamespace.atg.commerce.catalog.ProductCatalog-ver]  Error reading list or array index from the database. Expected: "0", got "1". The following property was not read: " {fixedChildProducts,pType=List,IDesc=[ItemDesc: category],table=dcs_cat_chldprd,cols=child_prd_id   ,pBI=atg.beans.MergedDynamicBeanInfo@5409e0ad,pIDesc=null   ,cType=interface atg.repository.RepositoryItem,cBI=[ItemDesc: product],cIDesc=[ItemDesc: product],colHandle=null}", for item id: "2350:36". This means the data base table holding this property does not have sequential integers starting with 0 in its multi-column. This should only happen if the database table was modifie d directly (outside of Dynamo).: java.lang.Exception It means sequence_num column doesn't contain a consecutive sequence number for the category on all of its products, this is, if category has ...