Database Cleaning in Synergy Gabriel Ben-harosh Hasson February 2010
Agenda <ul><li>Agenda </li></ul><ul><ul><li>Collapse command </li></ul></ul><ul><ul><li>Clean cache command </li></ul></ul...
Collapse Command <ul><li>Collapse command  </li></ul><ul><ul><li>Description </li></ul></ul><ul><ul><ul><li>The collapse c...
Collapse Command <ul><ul><ul><li>All collapsed objects are removed from the database. If you collapse a project, its membe...
Collapse Command – cont’ <ul><ul><li>Options and arguments  </li></ul></ul><ul><ul><ul><li>file_spec  </li></ul></ul></ul>...
Collapse Command – cont’ <ul><ul><li>Examples </li></ul></ul><ul><ul><li>ccm collapse commands.txt,6:ascii:1 -from command...
Collapse Command – cont’ <ul><ul><li>ccm query &quot;has_attr('source') and not is _bound() and create_time<time('-10:0:0:...
Database Structure bin cache archive st_root pt lib guild include bitmaps db dcm etc Synergy Database bin  - Model scripts...
Clean Cache <ul><ul><li>Clean Cache command  </li></ul></ul><ul><ul><li>Description </li></ul></ul><ul><ul><ul><li>The con...
Clean Cache <ul><ul><li>Description – cont’ </li></ul></ul><ul><ul><ul><li>Any deleted archived cache file is restored to ...
Clean Cache – cont’ <ul><ul><li>Options and arguments  </li></ul></ul><ul><ul><ul><li>-s|-status status  </li></ul></ul></...
Clean Cache – cont’ <ul><ul><ul><li>-t|-type type  </li></ul></ul></ul><ul><ul><ul><li>Specifies the type of the object ve...
Clean Cache – cont’ <ul><ul><li>Examples </li></ul></ul><ul><ul><li>ccm clean_cache -type csrc -cutoff_time &quot;-45:0:0:...
Save Offline And Delete (SOAD) <ul><ul><li>SOAD command  </li></ul></ul><ul><ul><ul><li>Objects that are saved offline are...
Save Offline And Delete (SOAD) <ul><ul><li>SOAD Scope </li></ul></ul><ul><ul><ul><li>A “Query” to find the object for dele...
Save Offline And Delete (SOAD) <ul><ul><li>Browsing/Editing a SOAD Scope </li></ul></ul><ul><ul><ul><li>Click “Browse Scop...
Save Offline And Delete (SOAD) <ul><ul><li>Creating a SOAD Scope </li></ul></ul><ul><ul><ul><li>Select “New” to create a n...
Save Offline And Delete (SOAD) <ul><ul><li>SOAD Preview and Delete </li></ul></ul><ul><ul><ul><li>Select “New” to create a...
Save Offline And Delete (SOAD) <ul><ul><li>Using SOAD with DCM </li></ul></ul><ul><ul><ul><li>Database should be initializ...
Save Offline And Delete (SOAD) <ul><ul><li>Receive a SOAD DCM Package (Restore) </li></ul></ul><ul><ul><ul><li>Go to Tools...
Delete Old Baselines <ul><ul><li>Delete Old Baselines </li></ul></ul><ul><ul><ul><li>To free space in the database we can ...
Delete Old Baselines <ul><ul><li>Delete a Baseline </li></ul></ul><ul><ul><ul><li>Go to Admin    Browse Baseline </li></u...
Delete Old Baselines <ul><ul><li>Baseline deletions process uses SOAD </li></ul></ul>
Delete Old Working Projects <ul><ul><li>Delete Old Working Projects </li></ul></ul><ul><ul><ul><li>To free space we can de...
Delete Old Working Projects <ul><ul><ul><li>Delete a user old working projects and objects. </li></ul></ul></ul>
Thank You
Upcoming SlideShare
Loading in...5
×

Synergy Database Cleaning

2,377

Published on

In time, Synergy database can grow significantly.
This presentation is offering several ways to reduces the database size.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,377
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • A conflict, as defined by SYNERGY/CM, is a potential configuration problem within a project. SYNERGY/CM considers source object versions and their associated tasks together. By using this relationship and your project’s update properties, SYNERGY/CM is able to show you potential problems within your project. Detecting and resolving conflicts immediately following a update helps you avoid potential problems with your build before you actually run it! NOTE It is important to do Detect Membership Conflicts immediately following update to ensure the conflict output is consistent. Don’t worry about the details of how to actually detect and resolve conflicts here. You will get to see that elsewhere in this training class. Remember, this is just one of the steps in the build cycle.
  • A conflict, as defined by SYNERGY/CM, is a potential configuration problem within a project. SYNERGY/CM considers source object versions and their associated tasks together. By using this relationship and your project’s update properties, SYNERGY/CM is able to show you potential problems within your project. Detecting and resolving conflicts immediately following a update helps you avoid potential problems with your build before you actually run it! NOTE It is important to do Detect Membership Conflicts immediately following update to ensure the conflict output is consistent. Don’t worry about the details of how to actually detect and resolve conflicts here. You will get to see that elsewhere in this training class. Remember, this is just one of the steps in the build cycle.
  • A conflict, as defined by SYNERGY/CM, is a potential configuration problem within a project. SYNERGY/CM considers source object versions and their associated tasks together. By using this relationship and your project’s update properties, SYNERGY/CM is able to show you potential problems within your project. Detecting and resolving conflicts immediately following a update helps you avoid potential problems with your build before you actually run it! NOTE It is important to do Detect Membership Conflicts immediately following update to ensure the conflict output is consistent. Don’t worry about the details of how to actually detect and resolve conflicts here. You will get to see that elsewhere in this training class. Remember, this is just one of the steps in the build cycle.
  • Synergy Database Cleaning

    1. 1. Database Cleaning in Synergy Gabriel Ben-harosh Hasson February 2010
    2. 2. Agenda <ul><li>Agenda </li></ul><ul><ul><li>Collapse command </li></ul></ul><ul><ul><li>Clean cache command </li></ul></ul><ul><ul><li>Save Offline And Delete (SOAD) </li></ul></ul><ul><ul><li>Delete old baselines </li></ul></ul><ul><ul><li>Delete old working projects and objects </li></ul></ul>
    3. 3. Collapse Command <ul><li>Collapse command </li></ul><ul><ul><li>Description </li></ul></ul><ul><ul><ul><li>The collapse command enables you to delete object versions from the database and adjust history links. You use this command when the object you delete has successors. </li></ul></ul></ul>Foo.c~4 Foo.c~5 Foo.c~6 Foo.c~7 <ul><ul><li>Synopsis </li></ul></ul><ul><ul><ul><li>ccm collapse [-from file_spec ] file_spec [ file_spec ...] </li></ul></ul></ul><ul><ul><ul><li>ccm collapse -all file_spec [ file_spec ...] </li></ul></ul></ul>
    4. 4. Collapse Command <ul><ul><ul><li>All collapsed objects are removed from the database. If you collapse a project, its members are unused and the project is removed. </li></ul></ul></ul><ul><ul><ul><li>Note: Collapse will not work on objects used in a project </li></ul></ul></ul><ul><ul><li>Description – cont’ </li></ul></ul>
    5. 5. Collapse Command – cont’ <ul><ul><li>Options and arguments </li></ul></ul><ul><ul><ul><li>file_spec </li></ul></ul></ul><ul><ul><ul><li>Specifies the first object version in a range to be collapsed. </li></ul></ul></ul><ul><ul><ul><li>-from Specifies the last object version in a range. The collapse is performed from the last object in a range to the first, inclusive. (See the first example below.) </li></ul></ul></ul><ul><ul><ul><li>Caution: Working objects will also be collapsed if they are not project members. Use caution when you use the -all option. </li></ul></ul></ul><ul><ul><ul><li>-all </li></ul></ul></ul><ul><ul><ul><li>Indicates that all versions of the file or directory (that is, the entire history) specified by file_spec will be collapsed. </li></ul></ul></ul>
    6. 6. Collapse Command – cont’ <ul><ul><li>Examples </li></ul></ul><ul><ul><li>ccm collapse commands.txt,6:ascii:1 -from commands.txt,7:ascii:1 </li></ul></ul><ul><ul><li>ccm collapse top,int_20080512_2:project:1 </li></ul></ul><ul><ul><li>Starting Collapse Process... Unable to remove commands.txt,7:ascii:1 : it is a member of a project. commands.txt,6:ascii:1 removed. Collapse complete with 1 success and 1 failure. </li></ul></ul><ul><ul><li>top,int_20080512_2:project:1 removed </li></ul></ul>
    7. 7. Collapse Command – cont’ <ul><ul><li>ccm query &quot;has_attr('source') and not is _bound() and create_time<time('-10:0:0:0') and handle_source_as='ascii' and type !='project'“ </li></ul></ul><ul><ul><ul><li>ReadMe.txt,1.1.1 integrate train01 ascii </li></ul></ul></ul><ul><ul><ul><li>commands.txt,3.1.1 integrate ccm_root ascii </li></ul></ul></ul><ul><ul><ul><li>commands.txt,3.1.2 integrate ccm_root ascii </li></ul></ul></ul><ul><ul><ul><li>commands.txt,4 integrate ccm_root ascii </li></ul></ul></ul><ul><ul><li>ccm collapse @ </li></ul></ul><ul><ul><ul><li>ReadMe.txt,1.1.1:ascii:1 removed. </li></ul></ul></ul><ul><ul><ul><li>commands.txt,3.1.1:ascii:1 removed. </li></ul></ul></ul><ul><ul><ul><li>commands.txt,3.1.2:ascii:1 removed. </li></ul></ul></ul><ul><ul><ul><li>commands.txt,4:ascii:1 removed. </li></ul></ul></ul>
    8. 8. Database Structure bin cache archive st_root pt lib guild include bitmaps db dcm etc Synergy Database bin - Model scripts and executables not used on the Windows platform. db - Information about the database, in particular, the parameters and the RDBMS database name. dcm - Information for DCM. include - ACCENT model include files for this database and ObjectMake defaults. lib - ACCENT model libraries for this database. In addition, initialization files, help files, triggers, and migrate rules are stored in the lib directory. pt - Contains parameter files used by Telelogic Synergy and Change. st_roo t - Synergy storage root, used to store source files, product files (such as executables, object files and libraries) and archived sources
    9. 9. Clean Cache <ul><ul><li>Clean Cache command </li></ul></ul><ul><ul><li>Description </li></ul></ul><ul><ul><ul><li>The contents of an object’s source attributes are stored in files in the cache directory. When an object transitions to the integrate state, it triggers the source file to be archived. </li></ul></ul></ul><ul><ul><ul><li>clean_cache command is used to remove these archived cache files on demand. </li></ul></ul></ul><ul><ul><li>Synopsis </li></ul></ul><ul><ul><ul><li>ccm clean_cache [-t|-type type] [-s|-status status] [-c|-cutoff_time time] [-u|-used] [-v|-verbose] </li></ul></ul></ul>
    10. 10. Clean Cache <ul><ul><li>Description – cont’ </li></ul></ul><ul><ul><ul><li>Any deleted archived cache file is restored to the cache when needed. </li></ul></ul></ul><ul><ul><ul><li>To run Clean Cache command an active session is required </li></ul></ul></ul><ul><ul><ul><li>Clean Cache command can run during work time </li></ul></ul></ul>
    11. 11. Clean Cache – cont’ <ul><ul><li>Options and arguments </li></ul></ul><ul><ul><ul><li>-s|-status status </li></ul></ul></ul><ul><ul><ul><li>Specifies the status of the object versions for which cache files </li></ul></ul></ul><ul><ul><ul><li>are deleted. By default, versions in non-modifiable states are </li></ul></ul></ul><ul><ul><ul><li>selected. </li></ul></ul></ul><ul><ul><ul><li>-c|-cutoff_time time </li></ul></ul></ul><ul><ul><ul><li>Specifies that cache files are deleted only for object older than </li></ul></ul></ul><ul><ul><ul><li>time. The time default removes files older than 14 days </li></ul></ul></ul><ul><ul><ul><li>(-c &quot;-14:0:0:0&quot;). </li></ul></ul></ul>
    12. 12. Clean Cache – cont’ <ul><ul><ul><li>-t|-type type </li></ul></ul></ul><ul><ul><ul><li>Specifies the type of the object versions for which cache files are deleted. The default is to delete cache files for all types. </li></ul></ul></ul><ul><ul><ul><li>-u|-used </li></ul></ul></ul><ul><ul><ul><li>Deletes cache files, regardless if they are used in any projects, with or without work areas. </li></ul></ul></ul><ul><ul><ul><li>By default, cache files that are used in a project with a work area are not deleted. </li></ul></ul></ul><ul><ul><ul><li>Our recommendation: Run the Clean Cache command at least once a month with the –u arguement </li></ul></ul></ul>
    13. 13. Clean Cache – cont’ <ul><ul><li>Examples </li></ul></ul><ul><ul><li>ccm clean_cache -type csrc -cutoff_time &quot;-45:0:0:0“ </li></ul></ul><ul><ul><li>Selecting 'csrc' versions with source older than Sunday, December 27, 2009 12:00:00 AM that are not used in work areas </li></ul></ul><ul><ul><li>Successfully removed 24 cache file(s) </li></ul></ul><ul><ul><li>ccm clean_cache -status &quot;released&quot; -cutoff_time &quot;-1:0:0:0“ </li></ul></ul><ul><ul><li>Selecting versions with status 'released' and with source older than Tuesday, February 09, 2010 12:00:00 AM that are not used in work areas </li></ul></ul><ul><ul><li>Successfully removed 19 cache file(s) </li></ul></ul>
    14. 14. Save Offline And Delete (SOAD) <ul><ul><li>SOAD command </li></ul></ul><ul><ul><ul><li>Objects that are saved offline are saved in a DCM package that can be received at a later time. Note: To save objects offline, the current database must be initialized for DCM. </li></ul></ul></ul><ul><ul><ul><li>This feature uses scopes to define what should be deleted. You can define a new scope, use pre-defined (default) scopes, or modify an existing user-defined. </li></ul></ul></ul><ul><ul><ul><li>SOAD can be run from CLI as well as GUI </li></ul></ul></ul><ul><ul><li>Description </li></ul></ul><ul><ul><ul><li>Save Offline and Delete (SOAD) is used to remove unwanted data, or to save data offline before deleting it from the database. </li></ul></ul></ul>
    15. 15. Save Offline And Delete (SOAD) <ul><ul><li>SOAD Scope </li></ul></ul><ul><ul><ul><li>A “Query” to find the object for deletion </li></ul></ul></ul><ul><ul><ul><li>Selecting a scope: </li></ul></ul></ul><ul><ul><ul><ul><li>Tools  Save Offline And Delete </li></ul></ul></ul></ul>
    16. 16. Save Offline And Delete (SOAD) <ul><ul><li>Browsing/Editing a SOAD Scope </li></ul></ul><ul><ul><ul><li>Click “Browse Scopes”: </li></ul></ul></ul>
    17. 17. Save Offline And Delete (SOAD) <ul><ul><li>Creating a SOAD Scope </li></ul></ul><ul><ul><ul><li>Select “New” to create a new scope </li></ul></ul></ul>
    18. 18. Save Offline And Delete (SOAD) <ul><ul><li>SOAD Preview and Delete </li></ul></ul><ul><ul><ul><li>Select “New” to create a new scope </li></ul></ul></ul><ul><ul><ul><li>Caution: After selecting “Preview”, Clicking the “Delete” button will start the delete immediately. </li></ul></ul></ul>
    19. 19. Save Offline And Delete (SOAD) <ul><ul><li>Using SOAD with DCM </li></ul></ul><ul><ul><ul><li>Database should be initialized to DCM </li></ul></ul></ul><ul><ul><ul><li>Select a Path for the DCM package </li></ul></ul></ul><ul><ul><ul><li>Select a package name </li></ul></ul></ul>
    20. 20. Save Offline And Delete (SOAD) <ul><ul><li>Receive a SOAD DCM Package (Restore) </li></ul></ul><ul><ul><ul><li>Go to Tools  DCM  Receive </li></ul></ul></ul><ul><ul><ul><li>Select “Receive Save Offline Package </li></ul></ul></ul>
    21. 21. Delete Old Baselines <ul><ul><li>Delete Old Baselines </li></ul></ul><ul><ul><ul><li>To free space in the database we can delete old baselines (including baseline projects and products). </li></ul></ul></ul><ul><ul><ul><li>Delete intermediate baselines (non official baselines). </li></ul></ul></ul><ul><ul><ul><li>Delete baselines for inactive releases. </li></ul></ul></ul>
    22. 22. Delete Old Baselines <ul><ul><li>Delete a Baseline </li></ul></ul><ul><ul><ul><li>Go to Admin  Browse Baseline </li></ul></ul></ul><ul><ul><ul><li>Select the relevant baseline and click Delete. </li></ul></ul></ul>
    23. 23. Delete Old Baselines <ul><ul><li>Baseline deletions process uses SOAD </li></ul></ul>
    24. 24. Delete Old Working Projects <ul><ul><li>Delete Old Working Projects </li></ul></ul><ul><ul><ul><li>To free space we can delete old working projects and objects </li></ul></ul></ul><ul><ul><ul><li>Delete a user old working projects and objects (including tasks, project grouping etc…). </li></ul></ul></ul><ul><ul><ul><ul><li>By the user </li></ul></ul></ul></ul><ul><ul><ul><ul><li>By Build Manager/CM Admin </li></ul></ul></ul></ul><ul><ul><ul><li>Default scope deletes only projects and product. </li></ul></ul></ul>
    25. 25. Delete Old Working Projects <ul><ul><ul><li>Delete a user old working projects and objects. </li></ul></ul></ul>
    26. 26. Thank You

    ×