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/...

BCC Project Details With SQL Queries

Troubleshooting BCC projects can sometimes be a little tedious if you have to deal with the UI (someone mentioned flash?) while sifting through project assets, sometimes you just want to check if an asset exists on a given project, in what project was an asset updated, the history of a project, etc. etc. While BCC does a good job at presenting such data, sometimes it can get stuck depending on the number of assets it has or even the system resources. Feel free to use the following queries to soothe your pain a little bit:.

Import xml data into BCC with startSQLImport

Sometimes you need to ingest product catalog versioned data (or any other data) into BCC and be able to publish as a project, for that, startSQLImport has been added to ATG to ease your life, this post is based on a previous one about startSQLRepository approach , feel free to look for any additional questions you may have or in case you want to explore that option. Information for configuring it is out there on Oracle docs, however, there are some tricks you might be missing, I'm going to detail steps for getting it up. First of all, make sure you read through Oracle's documentation: https://docs.oracle.com/cd/F25148_01/Platform.11-3-2/ATGContentAdminProgGuide/html/s0513startsqlimport01.html Configure your datasources for database access In order to get started with the utility you need to configure the FakeXADataSource component to allow the utility to connect to your database, you can see documentation from Oracle in  here ....