RADE

Source Code Manager

adl_clean

Cleaning databases and file server

Quick Reference

Abstract

The adl_clean command cleans objects in databases and in file servers.


Synopsis

adl_clean -del_ws [-db|-database database...] {-for_more_than del_time_span}|{-before del_date} [-during time_span]|[-until last_date] [-nb_in_group nb_elts] -nb_to_commit nb_rows [-h|-help|-?] (1)
adl_clean -del_soft_obj_in_ws_tree [-db|-database database...] [-tree ws_tree_name...] {-for_more_than del_time_span}|{-before del_date} [-during time_span]|[-until last_date] -nb_in_group nb_elts -nb_to_commit nb_rows (2)
adl_clean -finish_group [-db|-database database...] [-during time_span]|[-until last_date] -nb_to_commit nb_rows (3)
adl_clean -file_cont_in_db [-db|-database database...] [-during time_span]|[-until last_date] -nb_in_group nb_elts [-during time_span]|[-until last_date] (4)
adl_clean -file_cont_in_srvr [-cs|-contents_server contents_server] [-during time_span]|[-until last_date] (5)

[Top]

Usage

This command cleans all the databases or all contents server of the site, or the ones that have been specified.

(1) Clean the deleted workspaces.

The workspaces that have been deleted for more than a time span or before a date are cleaned.

(2) Clean the data associated with the software objects seen as deleted in the workspace trees.

The data associated with the software objects seen as deleted are cleaned. Neither the software objects nor their modifications are cleaned themselves.
The software objects that are considered are those which have been deleted for more than a time span or before a date.
The analysis of the software objects is limited by the number nb_elts, and then the effective cleaning begins. The cleaning is performed software object by software object (with exceptions).
The SCM commands support no inconcistency in all that is associated with the software objects. So no job can be started in a workspace tree while a software
object's effective cleaning is running with it.
If an effective cleaning is interrupted, it'll have to be terminated before the workspace tree will be unlocked.

(3) Finish the cleaning of the previous group.

If any, the previous group cleaning finishes.
Because of database storage consideration, the cleaning can't be performed with one transaction:
- the objects to be cleaned are grouped nb_elts by nb_elts
- the cleaning of a database table is committed every nb_rows rows

(4) Clean file contents in database.

File contents in database are cleaned.
The deleted workspaces cleaner have to be run before.

(5) Clean file contents in contents server.

Warning : this cleaning step cleans nothing in database. Only contents server is involved.
File contents that are not referenced anymore by elements of the cleaning step (4) are cleaned.
The file contents in database cleaner have to be run before.

[Top]

Options

adl_clean accepts the following options:  

-h|-help|-? Help of the command
-db|-database database... Clean all databases or the specified databases.
-cs|-contents_server contents_server Clean all contents server or the specified contents server.
-del_ws Clean the deleted workspaces.
-for_more_than del_time_span Clean the objects deleted for more than the specified time span, with the format [YYYY/MM/]DD[-hh[:mm[:ss]]] or hh:mm[:ss] (if you specify an integer, it's a number of days).
-before del_date Clean the objects deleted before the specified date, with the format YYYY/MM/DD-hh:mm:ss where time is optional (00:00:00 by default).
-during time_span A database table cleaning can begin during time_span, with the format [YYYY/MM/]DD[-hh[:mm[:ss]]] or hh:mm[:ss] (if you specify an integer, it's a number of days).
-until last_date A database table cleaning can begin until last_date, with the format YYYY/MM/DD-hh:mm:ss where time is optional (00:00:00 by default).
-nb_in_group nb_elts Number of objects to be cleaned together (group).
-nb_to_commit nb_rows Number of rows to commit together.
-del_soft_obj_in_ws_tree Clean the data associated with the software objects seen as deleted in the workspace trees.
-tree ws_tree_name... Clean only the specified workspace trees
-finish_group Finish the cleaning of the previous group.
-file_cont_in_db Clean file contents in database.
-file_cont_in_srvr Clean file contents in contents server.

[Top]

Examples

Clean deleted workspaces for more than 20 days on database ADL2. This process will end at 11:30 pm on October 20th. In database, commit is done by group of 100 elements :

adl_clean -del_ws -db ADL2 -for_more_than 20 -until 2003/10/20-23:30:00 -nb_to_commit 100

2003/10/17-23:06:05: Cleaning the deleted workspaces in the database ADL2.

 > 2003/10/17-23:06:05: Begin of the group.
 > 2003/10/17-23:06:05: Inserting Id for the table adl.workspace.
    2003/10/17-23:06:05: 5 Id to clean have been inserted.
 > 2003/10/17-23:06:06: Checking the table adl.workspace_revision.
 > 2003/10/17-23:06:06: Inserting Id for the table adl.config_branch.
    2003/10/17-23:06:06: 3 Id to clean have been inserted.
 > 2003/10/17-23:06:06: Cleaning the table adl.attached_component.
    2003/10/17-23:06:06: 2 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.checked_out_elem.
    2003/10/17-23:06:06: 0 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.cfg_rev_in_ws.
    2003/10/17-23:06:06: 4 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.config_revision.
    2003/10/17-23:06:06: 4 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.inv_cfg_rev_group.
    2003/10/17-23:06:06: 0 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.perhaps_changed_so.
    2003/10/17-23:06:06: 1 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.so_chg_evt_grp_cr.
    2003/10/17-23:06:06: 4 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.so_chg_fgt_info.
    2003/10/17-23:06:06: 0 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.so_chg_grp_cfg_rev.
    2003/10/17-23:06:06: 4 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.config_branch.
    2003/10/17-23:06:06: 3 rows have been deleted.
    2003/10/17-23:06:06: 3 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.deleted_ws_group.
    2003/10/17-23:06:06: 0 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.history_event.
    2003/10/17-23:06:06: 3 workspaces for history have been inserted and 0 ones have been updated..
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.last_ws_refresh.
    2003/10/17-23:06:06: 8 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.perhaps_attached.
    2003/10/17-23:06:06: 2 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.promotion_request.
    2003/10/17-23:06:06: 0 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.publication.
    2003/10/17-23:06:06: 3 rows have been deleted.
    2003/10/17-23:06:06: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:06: Cleaning the table adl.refreshed_ws_group.
    2003/10/17-23:06:08: 30 rows have been deleted.
    2003/10/17-23:06:08: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:08: Cleaning the table adl.so_chg_merge.
    2003/10/17-23:06:08: 0 rows have been deleted.
    2003/10/17-23:06:08: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:08: Cleaning the table adl.workspace_counter.
    2003/10/17-23:06:08: 9 rows have been deleted.
    2003/10/17-23:06:08: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:08: Cleaning the table adl.workspace_revision.
    2003/10/17-23:06:08: 4 rows have been deleted.
    2003/10/17-23:06:08: 0 Id to clean have been deleted.
 > 2003/10/17-23:06:08: Cleaning the table adl.workspace.
    2003/10/17-23:06:08: 5 rows have been deleted.
    2003/10/17-23:06:08: 5 Id to clean have been deleted.
 > 2003/10/17-23:06:08: End of the group.
 
 > 2003/10/17-23:06:08: Begin of the group.
   ...
 

 

Clean file contents in database ADL2. The size of group is 200.

adl_clean -file_cont_in_db -db ADL2 -nb_in_group 200

> 2003/10/17-23:06:40: Cleaning the table file_cont_in_srvr.
   2003/10/17-23:06:40: 200 Id to clean have been deleted.

> 2003/10/17-23:06:41: Cleaning the table file_cont_in_srvr.
   2003/10/17-23:06:41: 200 Id to clean have been deleted.

> 2003/10/17-23:06:42: Cleaning the table file_cont_in_srvr.
   2003/10/17-23:06:42: 200 Id to clean have been deleted.

> 2003/10/17-23:06:43: Cleaning the table file_cont_in_srvr.
   2003/10/17-23:06:43: 26 Id to clean have been deleted.
 

 

Clean file contents in all contents server.

adl_clean -file_cont_in_srvr

 2003/10/17-23:07:32 : Cleaning the file contents in file server andretidsy:25039.

   2003/10/17-23:07:33: 8 Id to clean have been deleted.
 
 2003/10/17-23:07:33 : End of the cleaning the file contents in file server andretidsy:25039.
 

[Top]


References

[Top]


History

Version: 1 [October 2003] Document created

[Top]


Copyright © 2001, Dassault Systèmes. All rights reserved.