Microsoft KB Archive/133054

From BetaArchive Wiki
Knowledge Base


How to detect and fix database corruption errors in Visual SourceSafe for Windows 6.0 and in SourceSafe

Article ID: 133054

Article Last Modified on 2/7/2007



APPLIES TO

  • Microsoft Visual SourceSafe 6.0 Standard Edition
  • Microsoft Visual SourceSafe 3.1 Standard Edition
  • Microsoft Visual SourceSafe 3.04
  • Microsoft SourceSafe
  • Microsoft SourceSafe
  • Microsoft SourceSafe
  • Microsoft SourceSafe



This article was previously published under Q133054

INTRODUCTION

The Data directory in Microsoft Visual SourceSafe and in Microsoft SourceSafe includes a database that contains all the files and projects. Although every precaution has been taken to guarantee the integrity of all SourceSafe files, there are certain events that can cause the data in this database to become corrupted.

Errors that relate to the Data directory, to file names such as aacpaaaa, or to missing files such as abaaaaaa.b can occur.

Many factors can cause a SourceSafe database to become corrupted. These factors include the following:

  • Power loss
  • System hangs (stops responding)
  • User terminates a long process
  • Bad network connections
  • Running out of disk space
  • Network problems
  • Operating system problems


MORE INFORMATION

Data can become corrupted if you use the FIX* tools with a Visual SourceSafe 4.x or 5.x database.

To analyze and to resolve the database problems that SourceSafe is experiencing, follow these steps:

  1. Use the Analyze program (Analyze.exe) to search for database corruption or database errors. To run the Analyze program, use the following command:

    analyze sourcesafe data directory

    To run the Analyze program in unattended mode, use the -I- option. For more information about this option, visit the following Microsoft Developer Network (MSDN) Web site:

    The Analyze program goes through the database and reports possible problems. If database errors or corrupted database files are discovered, continue through the following steps.

    The Analyze program is primarily used to scan a SourceSafe database for integrity and for errors. We recommend that administrators run the Analyze program every one to three months to verify that there are no problems in the SourceSafe database.
  2. If there are permissions problems, "unable to checkout files" errors, "losing checkout status" errors, or any other errors that refer to the Status.dat file or to the Rights.dat file, run the Ddconv.exe program or the Ddconvw.exe program. These programs update a SourceSafe database from an older format to the current format. By default, these programs are installed in the \Admin subdirectory.

    These programs are primarily used by installation scripts. The installation scripts use these programs to verify that the format of an installed SourceSafe database is correct after an update has occurred. The Ddconv.exe program is also used to create a new SourceSafe database. (For more information, see the Mkss utility.) During installation, if SourceSafe cannot find all the installed databases, the administrator may have to run this utility manually. The administrator can also use the Ddconv.exe tool together with the -s option to rebuild files in the database.
  3. If the Analyze program returns errors that refer to "FREE CHAIN," and if you are using a 3.x version of Microsoft SourceSafe, run the Fixfree program (Fixfree.exe). The Fixfree program fixes many database errors that the Analyze program reports. For example, the Fixfree program fixes the following database errors:
    • Invalid extended header structure
    • Error in extended header
    • Error processing checkout free chain
    • Checkout free chain contains a loop
    • Checkout chain contains a loop
  4. If the Analyze program returns errors that refer to "PROJECT FILE," and if you are using a 3.x version of Microsoft SourceSafe, run the Fixproj program (Fixproj.exe). You can use the Fixproj program to fix many project errors. For example, the Fixproj program fixes the following project errors:

    Message 1

    File Not Found: filename.a or b.

    Message 2

    Error reading PRJ INT entry: num of 38 bytes read.

    Message 2

    Error in project file.

    For more information, click the following article number to view the article in the Microsoft Knowledge Base:

    123427 Use Fixproj.exe to fix project errors in SourceSafe

  5. If the Analyze program returns errors that refer to "PARENT CHAIN," and if you are using a 3.x version of Microsoft SourceSafe, run the Fixprnt program (Fixprnt.exe). The Fixprnt program fixes many database errors that the Analyze program reports. For example, the Fixprnt program fixes the following database errors:

    Message 1

    Error in Parent Chain.

    Message 2

    Parent not found.

    The Fixprnt program removes references to projects that no longer exist. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

    130178 Fixprnt fixes database errors reported by Analyze.exe

  6. If the Analyze program returns errors that refer to "Cannot find file filename.b" or "Cannot find file filename.a," the best workaround is to save a copy of the correct current file. Recover both files (filename and filename.a or filename.b) as they existed on the backup. Then, update the files in SourceSafe to the current versions.

    If the filename.a file or the filename.b file refers to a project, use the Fixproj program to rebuild the project file.
  7. If the Analyze program returns errors that refer to any other type of problem, contact Microsoft Product Support Services for help. For a complete list of Microsoft Product Support Services telephone numbers, and for information about support costs, visit the following Microsoft Web site:


REFERENCES

For command information, see the Administrator's Help file in SourceSafe.

Keywords: kbhowto kbtshoot kbtool kbdsd KB133054