Database Maintenance and Data Health\Integrity Check



Data integrity and stability of StarTeam is of the upmost importance.  It is imperative that regular maintenance\ checks are performed by the Star Team Administrator, which is outlined in this guide.

Caution:  Before running any form of maintenance, it is recommended that Star Team database and Vault have been backed up in a synchronised state.

Database Scripts

Star Team provides database maintenance scripts with every install of the Server application.  These scripts can be located within the DBScripts folder (Star Team installation directory).  Maintenance scripts have been provided for Oracle and SQL database.  Three scripts are essential and have been outlined below:

1. starteam_sqlserver_dbcc.sql

The starteam_sqlserver_dbcc.sql script rebuilds the database indexes and performs a consistency check on the database objects.  This script builds the indexes and updates the statistics in the database distribution pages.

2. starteam_sqlserver_dbcc_reindex.sql

This script rebuilds all the indexes in the database. It is extremely important to run this script from time to time.

3. starteam_sqlserver_dbcc_showcontig.sql

This script gives information on database fragmentation.

** It is recommended each of these scripts is run once a week **

Caution:  Be sure to backup your StarTeam database, as necessary, and verify these backups periodically. You should restore and test backups of your StarTeam project data on a test system. Restoring and testing your backups helps to ensure that your data is being backed up correctly.

Online Purge

From Star Team 2009 Server onwards Online Purge functionality has been implemented.  This feature is available from the Star Team Server Administration Tool.  

A purge process deletes unwanted data from the database and removes deleted archives from the vault.   The Online Purge will require database resources when in operation; it is not excessive, however, recommended to run during low Star Team usage.

Caution:  Online Purge will remove physical data from the StarTeam database tables and it is irreversible.

Vault Verify

Integrity checks are performed on the Vault for the specified Star Team “Server Configuration”.  It is recommended that the following parameters are used:

• -check {missing | corrupt | stray | all}

Determines which integrity checks to perform:

Missing:   Checks for missing files by comparing the database against archive files actually present

Corrupt:   Checks the integrity of existing archive files (MD5, name, folder, and .gz file format)

Stray:   Checks for extraneous files based on the database. This option cannot be used if the server configuration is in use.

All:   Performs all integrity checks.

• -repair

The “-repair” option specifies that an attempt should be made to correct archive file problems.  Corrupt archives are moved to the 'corrupt file folder' (C:\Temp\VVCorruptFile).  If they correspond to valid file revisions, they are then treated as missing.  Missing archive recovery is attempted from other vault files.  Stray archives are moved to the 'stray file folder' (C:\Temp\VVStrayFiles).

Note: -repair is ignored if the StarTeam <configuration> is in use.

Vault Verify example:

Note:  The above example is in simplistic form where StarTeam and Database reside on the same machine.  Other parameters will be required if database is located on another machine.  These parameters can be found within the “ST_CmdTools_Help_en.pdf” which will be located in the Star Team Server documentation folder (installation directory).


How To-Best Practice
Comment List