How To Detect and Fix Database Corruption Errors in SourceSafe (133054)



The information in this article applies to:

  • Microsoft SourceSafe for Windows 3.04
  • Microsoft SourceSafe for Windows 3.1
  • Microsoft SourceSafe for Windows NT 3.04
  • Microsoft SourceSafe for Windows NT 3.1
  • Microsoft SourceSafe for MS-DOS 3.04
  • Microsoft SourceSafe for MS-DOS 3.1
  • Microsoft Visual SourceSafe, 32-bit, for Windows 6.0

This article was previously published under Q133054

SUMMARY

The SourceSafe Data directory includes a database that contains all of your files and projects. Although every precaution has been taken to ensure 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.

SourceSafe database corruption can be caused by a variety of factors, for example:
  • 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 corruption occurs 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 to search for database corruption or database errors. To execute the Analyze program, use the following command:

    Analyze SourceSafe Data directory

    To run the Analyze program in unattended mode, use the -i- option. For example, if you want to run Analyze overnight and write the results to a text file, use the following syntax:

    Analyze -i- path to data > c:\output.txt

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

    Analyze.exe is primarily used to scan a SourceSafe database for integrity or errors. Microsoft recommends that administrators run it every one to three months to verify that there are no problems in their SourceSafe database.
  2. If there are access rights problems, "unable to checkout files" errors, "losing checkout status" errors, or any other errors that refer to the Status.dat or Rights.dat file, run the Ddconv.exe or 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 used primarily by installation scripts to verify that the format of an installed SourceSafe database is correct after an update has occurred. Ddconv.exe is also used to create a new SourceSafe database (see the Mkss utility for more information). During installation, if SourceSafe cannot find all of the installed databases, the administrator may have to run this utility manually. The administrator can also use Ddconv.exe (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 Microsoft SourceSafe versions 3.x, run the Fixfree program. Fixfree.exe fixes a variety of database errors that are reported when you run Analyze.exe, such as the following:
    • 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 Microsoft SourceSafe versions 3.x, run the Fixprj program. You can use Fixprj.exe to fix a variety of project errors, such as the following:
    • File Not Found: filename.a or b.
    • Error reading PRJ INT entry: num of 38 bytes read.
    • Error in project file.

    For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

    123427 SourceSafe: Use FIXPRJ.EXE to Fix Project Errors

  5. If the Analyze program returns errors that refer to "PARENT CHAIN," and if you are using Microsoft SourceSafe versions 3.x, run the Fixpar program. Fixpar.exe repairs various database errors that Analyze.exe reports, such as the following:
    • Error in Parent Chain.
    • Parent not found.

    Fixpar.exe removes references to projects that no longer exist.For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

    130178 FIXPAR 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 file in SourceSafe to the current version.

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

REFERENCES

Refer to the Administrator's help file in SourceSafe for command information.

Modification Type:MinorLast Reviewed:7/1/2004
Keywords:kbdsd kbhowto kbtool kbtshoot KB133054 kbAudDeveloper