SAMPLE: Analyze5.Exe Utility for Visual SourceSafe

Last reviewed: January 15, 1998
Article ID: Q139566
The information in this article applies to:
  • Microsoft Visual SourceSafe for Windows NT, versions 4.0, 4.0a, 5.0
  • Microsoft Visual SourceSafe for Windows 95

SUMMARY

The Analyze version 5.00.2327 utility detects and validates all files in the database. It also allows you to fix any potential errors and remove files that are no longer active in the SourceSafe database.

This utility is a 32-bit utility that can run from Windows NT or Windows 95 in conjunction with the 32-bit SourceSafe libraries. However, when you run it with the -f switch, it will attempt to fix any data file in the SourceSafe Data directory, regardless of which platform the file originated from.

The following file is available for download from the Microsoft Software Library:

 ~ Analyze5.exe (size: 976238 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from Online Services

MORE INFORMATION

To install this utility, create a blank directory and copy Analyze5.exe, to that directory and run it. This is a self-extracting file that contains Analyze.exe version 5.00.2327:

   ssapi.dll
   ssus.dll
   mfc42.dll
   msvcrt.dll
   readme.txt

NOTE: Do not install these files in the VSS\WIN32 directory because it might disable the use of the 32-bit version of Visual SourceSafe.

When you run Analyze version 5.00.2327, all messages will scroll in the Analyze Results window. In that window, Analyze reports any errors it encounters and the fixes it performs when it attempts to fix the problem. This information is also recorded in the Analyze.log file. Analyze has a progress indicator in the status bar to let the user know how far along it is.

If Analyze makes any changes to a file it stores the file in a Backup directory which by default is a subdirectory of the SourceSafe Data directory or of the directory where Analyze is run. If the process does not finish, you can recover the original files as they were before Analyze started.

By default, Analyze locks the data files while it analyzes them. Therefore, no one should be in SourceSafe as you analyze the data files.

Switches

There are several switches in Analyze that allow you to perform functions on your database or individual files in the Data directory. These switches are:

Switch     Description

<none>     Analyze.exe with no parameters reports any errors that it
           encounters in the database. This is similar to the behavior
           of previous versions of Analyze. For example:

           ANALYZE c:\ss\data
           ANALYZE f:\ss\data\a\abaaaaaa

           The user will see the Analyze Results window displayed in
           Windows NT or Windows 95. This window scrolls any errors
           it encounters.

-f         Fix. This enables Analyze to fix most of the errors it
           encounters. As already mentioned, for this to be successful, no
           users should be in SourceSafe. However, they can have files
           checked out. The administrator should wait until the database is
           in this state before running Analyze with the -f switch.

           There needs to be at least 16 MB of free hard drive space
           available to run Analyze with the -f switch. In addition, enough
           hard drive space should be made available for the BACKUP
           directory. This will be determined by the number of corrupted
           files that analyze encounters.

           Example:

           ANALYZE ..\data -f

-i-        This switch allows you to keep the results window from
           appearing. Example:

           ANALYZE f:\ss\data -i-

-v         Verbose Logging. This allows Analyze to return all information
           about the Analyze process to the lower pane. The upper pane is
           reserved for error conditions and there is no way to turn it
           off. This switch has four option parameters that indicate the
           amount of verbosity reported. By default, it runs as -V1 that
           only shows the errors. The -v4 option would show all errors and
           informational messages. The other two, -v2 and -v3, fall in
           between. If no number is included, it defaults to -V1.

-c         Compress. The -c switch allows Analyze to compress unused
           comments that may exist in log files and thereby release disk
           space. However, this process is considerably slower and should
           not be run on a frequent basis. An example of how you'd wind up
           with extraneous information would be if you add a file and
           supply a comment at the time of the Add. Later, go to Properties
           on that file and change the comment. Now both comments are
           stored in the data file. However, you cannot access the first
           comment from SourceSafe ever again. So, if you run Analyze with
           -C and it discovers two comments for a file, it rewrites the
           data file and leaves out the older comment. While this switch
           can reduce the size of the database in some cases, it usually
           does not make a significant difference.

-d         Delete. This allows Analyze to delete files that no longer have
           valid references in SourceSafe, such as files that were once
           branched into another project but no branched versions of the
           file are now active in the database. Analyze will do an
           extensive comparison between projects and determine which
           files can be successfully removed from the Data directory.
           However, this can drastically slow down the Analyze process so
           you may not want to perform this feature frequently. Allow
           enough time for successful completion when you use the -d
           switch. This switch reduces the size of the database only if
           there are files that are in the condition mentioned in the
           previous paragraph.

-b         This allows you to specify a different backup directory. Make
           sure there is enough space in this location to hold your entire
           Data directory contents should this be necessary.

-x         This instructs Analyze not to lock the files as it analyzes the
           database, so users can still use SourceSafe while running
           Analyze. This switch, however, cannot be used with the -f, -d,
           and -c switches.
Keywords          : kberrmsg kbtshoot
Version           : WINNT:4.0,4.0a,5.0;
Platform          : NT WINDOWS
Solution Type     : kbfile


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 15, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.