When you run ANALYZE, it executes in the following passes:
-
Checks every file in the Data directory to make sure that it is valid and not corrupt.
-
Checks the relationships between parents (projects) and children (files and subprojects).
-
Checks the relationships between shared and branched files.
-
Checks the files Um.dat, Rights.dat, and Names.dat and performs cleanup operations.
When you analyze a database, ANALYZE creates a file called Analyze.bad in the Backup directory and uses the file to list all corrupted files. ANALYZE also uses the Backup directory to keep the original versions of files that have been repaired.
As it runs, ANALYZE writes output to a results window that can contain two panes. The output information scrolls within a pane. All results of ANALYZE are logged to the file Analyze.log, which is placed in the Backup directory and replaced each time ANALYZE runs.
Note |
|---|
| You must close any open results windows before rerunning ANALYZE. |
The top pane of the results window contains summary information, as shown in the next example.
Visual SourceSafe Analyze Version 8.0
Copyright (C) Microsoft Corporation. All rights reserved.
Database analysis in progress @ 7/05/05; 5:23p.
Analysis complete @ 7/05/05; 5:23p
No errors or inconsistencies found.
The example below shows the summary information provided when you run ANALYZE using the -V or -V4 option for verbose output. When you use the -V option, the information is written to the bottom pane of the results window.
Started analyzing user management system.Successfully completed analyzing the user management system.Rebuilding corrupted project for item aaaaaaaa.Building the project list.Checking cross-file relationships.Checking parent/child relationships.Validating the Security System.Writing a new copy of 'c:\vss\data\a\aaaaaaaa'.The count of children of item 'aaaaaaaa', as given in its header, does not match the number of children found on disk. The count will be adjusted.The count of subprojects of item 'aaaaaaaa', as given in its header, does not match the number of subprojects found on disk. The count will be adjusted.
Running ANALYZE in the order shown in the next table provides good coverage. If you still have errors after the second run, you can check the Microsoft Knowledge Base at http://www.microsoft.com/kb) articles Q152807 and Q176909 for more information.
- analyze –V4 <database path>
-
Indicates the first pass to locate problems before you try to fix them.
- analyze -F –V4 <database path>
-
Indicates a second pass in fix mode to run if errors are reported in the first pass.
- analyze -F -C –V4 <database path>
-
Indicates a pass to run if you have "Found a DIFF" and "Found a COMMENT" errors that you want removed.
Caution Since the DIFF and COMMENT messages can occur in a large number of files, you must have enough disk space available to run this compress pass on your database.
When ANALYZE fixes a file, it first creates a copy of the file in the Backup folder so that the repair can be undone if necessary. Each time ANALYZE runs, it requires that the Backup folder is either empty or does not exist. If there is sufficient disk space, it is a good practice to rename the Backup folders instead of deleting them. This history can prove very useful in troubleshooting corruption issues.
ANALYZE rebuilds the Rights.dat file, and all information about rights for individual users and projects is lost. When you run Visual SourceSafe again, each user has the read/write or read-only rights for the entire database that were assigned when that user was added to the database user list. As the database administrator, you must set rights for individual users and projects again. Alternatively, you can clear the Enable Rights and Assignments commands check box on the SourceSafe Options dialog box, Project Rights tab to use the basic read/write or read-only rights.
ANALYZE can also recreate the Status.dat and Names.dat files. To do this, rename or delete the files you want rebuilt, and run ANALYZE -F. ANALYZE recreates the Names.dat file with the spaces in long file names appearing as underscores. You then need to rename the file using Visual SourceSafe Explorer.