Analyzing the SourceSafe Database
To keep the database in good shape and to ensure it is running as fast as possible, SourceSafe uses the Analyze utility, which looks out for the following problems:
Parent-child mismatch: Possible situations include those in which a parent (project) assumes it has a child (file or subproject) but the child disagrees; a child assumes it has a parent but the parent disagrees; or child and parent don't reference each other, but the child counts are off.
Corrupt database files: Files that can contain corrupted data include
Names.dat
, which stores file names longer than 34 characters;Rights.dat
, which stores relationships between users and project rights;Status.dat
, which contains checkout status information for files;Um.dat
, which stores all users of a Visual SourceSafe database; andVersion.dat
, which stores the Visual SourceSafe version.Removal of unused items from the database.
It is recommended to run the Analyze utility every week. If you don't run this utility for more than 30 days, when logging in to the Visual SourceSafe Administrator or the Visual SourceSafe Explorer using the Admin account you will be prompted to run it.
Note
Before starting the Analyze utility, make sure no users are logged in and lock the database.
The utility is located in Visual SourceSafe installation folder and it is represented by the analyse.exe
file. While running, it will display the progress in its main window as shown in the following figure:
Analyze has the following command-line options:
Usage: analyze [options] [@<response file>|<List of files>] <SourceSafe data path>
-? or -h Display this message.
-b<folder> Specify the folder to use for backup.
-c Compress unused space.
-d Delete unused items.
-db Delete backup.
-dc Disable common messages (bad case in physical file
names).
-df Disable free space check.
-dw Run SourceSafe 2005 reference checking only.
-f Automatically fix files with corruptions.
-fl Automatically fix files with corruptions and re-build
the label cache.
-fp Automatically fix files with corruptions and remove
invalidly named physical files.
-i- When the analysis is complete the program exits.
-refv6 Run SourceSafe 6 reference checking instead of
SourceSafe 2005 reference checking.
-s Slow project rebuild (slower but more rigorous scan for
child items).
-x Do not attempt to lock the database when analyzing. If
-x is specified, -c, -d, and -f are not allowed.
-v1 Show only critical errors.
-v2 Show only significant errors.
-v3 Show all errors and inconsistencies.
-v4 Show errors, inconsistencies, and informational notes.
You can display these options by executing analyze.exe -h
.