## Microsoft® Visual SourceSafe® 6.0d

© 2002 Microsoft Corporation. All rights reserved.

Other product and company names herein may be the trademarks of their respective owners.

Visual SourceSafe Readme includes updated information for the documentation provided with Microsoft Visual Studio -- Development System for Windows® and the Internet. The information in this document is more up-to-date than the information in the Help system.

###

Contents - Click any of the items below

##### Release Description

##### Known Problems

> Login to Local Visual SourceSafe Database Fails

> Installing on a Novell Network Server

> MBCS/DBCS Users

> Unicode Files

> Technical Support Phone Numbers

> Windows 2000 Logo Compliance

##### Getting Started

> Before You Run Setup

##### Installation

> Visual SourceSafe 6.0d Setup

> Installing Visual SourceSafe 6.0d over Visual SourceSafe 6.0 SP6, Visual SourceSafe 6.0c, or Earlier

> Installation Options

> Installing Visual SourceSafe Standalone Version

> Installing Multiple Versions of Visual Studio 6.0 Products "Side-by-Side" on the Same Computer

> Using NetSetup to Install VSS from a Network Server

> Deleting VSS

##### General Notes and Tips

> New Features in VSS 6.0

> Maintaining Your VSS Database

> Loss of Network Connection Produces Numerical Error Message

> System Date/Time

> Using the Command Line After Running a Client Setup

> Details on Defining a Shadow Folder in Visual SourceSafe

> VSS Home Page

> Microsoft Knowledge Base

> VSS Newsgroup

##### Best Practices

> Introduction

> General Database Recommendations

> How Visual SourceSafe Tracks Files

> Finding and Repairing Data Corruption

> Backup and Restore

### Visual SourceSafe 6.0d Release Description

Visual SourceSafe (VSS) version 6.0d is a re-release. It contains a modified installation program and updated VSS files containing all bug fixes made since VSS 6.0 released.

The installation program for VSS 6.0d has been modified to ensure an upgrade of your existing VSS 6.0 installations. For the latest installation notes, see Installation.

### Known Problems

#### Login to Local Visual SourceSafe Database Fails

Users that do not log in as an Administrator or Power User on the local computer cannot access a local SourceSafe database when it is installed to the default location on a Windows NT 4.0, Windows 2000 or Windows XP NTFS partition. If you attempt to access a SourceSafe database under these conditions the following error appears, "Unable to open user login file ...\VSS\data\loggedin\username.log" where username is your SourceSafe login name.

To work around this issue either install the SourceSafe database to a UNC path or log in as a Power User or Administrator.

For more details about this issue, see http://www.microsoft.com/windows2000/techinfo/planning/security/secdefs.asp.

#### Installing on a Novell Network Server

Novell NetWare servers can be configured to handle either long file names or file names in the 8.3 file name format. If the Novell NetWare server can handle only file names in the 8.3 format, the regular Visual Studio installation process cannot install on the Novell NetWare server. To install VSS on a Novell NetWare server that can handle only file names in the 8.3 format, use the following steps.

To install from the Visual Studio compact discs (CDs):

1. Insert Disk 2.
2. Switch to the VSS_SS folder.
3. Run the following command: setup.exe /F
4. Click Server Applications.
5. When prompted for the installation location, change it to the Novell NetWare Server.

To install from the Visual SourceSafe standalone CDs:

1. Insert the Visual SourceSafe CD.
2. Run the following command: setup.exe /F

MBCS/DBCS Users

VSS 6.x handles MBCS (multibyte character sets) and DBCS (double-byte character sets) differently from earlier versions of VSS. If you are upgrading an existing installation of VSS that has a file called ssud.dll, rename it so that VSS 6.x does not recognize it. For example, rename the file to ssud.bak. If you do not rename it, you may have trouble in the input method editor (IME) with font association (FA) turned off or it may generate GPFs when dialog boxes that are new to VSS 6.x are displayed.

#### Unicode Files

Visual SourceSafe cannot handle Unicode files. When a file is first added to SourceSafe, SourceSafe automatically detects whether the file is in text or binary format. If Unicode files are added as text format files, SourceSafe can corrupt them.

To work around this issue, add all Unicode files to SourceSafe as binary format files. You can override the file type automatic detection feature by clicking the Advanced button in File Add dialog box when you are adding a file. If the Unicode file has already been added, you can access the file properties in SourceSafe and change the file type to Binary.

#### Technical Support Phone Numbers

The Technical Support phone number (900) 555-2300 is no longer in service. If you need technical support, go to the Product Support Services page on the Microsoft Corporation Web site (http://support.microsoft.com). The fees are:

- $195 for Web Response; choose "online support request".
- $245 for 800 number 1-800-936-5800 (for all developer support issues)

#### Windows 2000 Logo Compliance

Visual SourceSafe is not certified for the Windows 2000 logo. Visual SourceSafe and its Setup program do not comply with the Application Specification for Windows 2000 at http://msdn.microsoft.com/certification/appspec.asp and have not been independently tested by VeriTest for compliance to the Application Specification for Windows 2000. For details on certification for Windows, see http://msdn.microsoft.com/certification/.

### Getting Started

#### Before You Run Setup

- Review the hardware and software requirements.

### Installation

#### Visual SourceSafe 6.0d Setup

- Visual SourceSafe 6.0d requires Internet Explorer version 4.01 SP1 or later to enable the Help system. Visual SourceSafe 6.0d does not include a distribution of Internet Explorer, so you must install it before you install VSS 6.0d. You can find the latest version of Internet Explorer at http://www.microsoft.com/windows/ie/. The VSS 6.0d Setup program checks for the minimum required version of Internet Explorer and displays a message if it does not detect it. You can continue the installation, but it is strongly recommended that you quit the VSS 6.0d Setup program and install Internet Explorer version 4.01 SP1 or later before resuming Setup.
- If you are installing Visual SourceSafe on Windows NT 4.0, Visual SourceSafe requires Windows NT 4.0 Service Pack 6 (SP6) or later. Visual SourceSafe 6.0d does not include a distribution of Windows NT 4.0 SP6, so you must install it before you install VSS 6.0d. You can find the latest service packs for Windows NT 4.0 at http://www.microsoft.com/ntserver/nts/downloads/recommended/SP6/allSP6.asp. The VSS 6.0d Setup program checks for the minimum required Windows NT 4.0 configuration and displays a message if it does not detect it. You can continue the installation, but it is strongly recommended that you quit the VSS 6.0d Setup program and install Windows NT 4.0 SP6 or later before resuming Setup.
- If you already have VSS 6.0 installed on your system, the VSS 6.0d Setup program upgrades your current installation to version 6.0d. Click Yes when you are asked to upgrade and select the same installation you currently have on your system.
- VSS 6.0d is a minor release to VSS 6.0 and cannot run side-by-side with another installation of VSS 6.0. Either upgrade your existing VSS 6.0 installation to 6.0d or do not install VSS 6.0d on the same system.
- If you upgrade your existing server share installation to VSS 6.0d, your clients can upgrade to VSS 6.0d by rerunning the Netsetup program and choosing to upgrade their existing installation.
- Slow Setup: When you install VSS 6.0d, Setup performs a drive check which, especially for larger drives, can be very time consuming.

#### Installing VSS 6.0d Over VSS 6.0 SP6, Visual SourceSafe 6.0c, or Earlier

When you run the VSS 6.0d Setup program on a computer that has VSS 6.0 with SP1, SP2, SP3, SP4, SP5, or SP6 installed, the Setup program displays the following message:

> The Installation Wizard has detected an older version of Visual SourceSafe 6.0 installed on your computer. Visual SourceSafe 6.0d does not support side-by-side installation with other versions of Visual SourceSafe 6.0. The topic "Installing VSS 6.0d over VSS 6.0c, VSS 6.0 SP6, or Earlier" in the Visual SourceSafe 6.0 readme describes the valid configurations that Visual SourceSafe 6.0d supports. To upgrade your existing Visual SourceSafe 6.0 installation with Visual SourceSafe 6.0d, continue with Setup and accept the upgrade installation path when prompted.

> Do you want to continue?

This warning is valid because installing VSS 6.0d side-by-side with VSS 6.0 is not supported. Answer Yes to this message and to a subsequent message asking you if you are certain you want to continue.

When Setup continues, it states that you have an older version of the product already installed and asks whether you would like to upgrade it. Click Next to accept the selected folder location. When prompted for the specific installation type, select the type already installed on your system.

#### Installation Options

##### General Notes

The source code control database maintained by VSS must be on a drive that is accessible to all users working on projects controlled by VSS. The most versatile method of working with VSS is to perform a server installation to a network drive and a Netsetup installation on each workstation.

#### Installing Visual SourceSafe Standalone Version

##### Installing the Shared Database Server

A shared database server installation creates a database and installs the Administrator program and utilities, the client programs, and NetSetup for client installation from a server. For users who will need only the client programs, NetSetup is the recommended installation method. NetSetup copies the core executable files and libraries onto the user's hard disk and then configures registry settings to use the database that has been created on the server.

If you are upgrading VSS, a new database is not created.

To install Visual SourceSafe Shared Database Server version

1. Insert the VSS compact disc in the CD-ROM drive of the server or a computer connected to the server.
2. Double-click Setup.exe.
3. Follow the instructions in the Setup Wizard.
4. When prompted to select the installation type, click Shared Database Server.
5. Secure your database.

After you have installed VSS, you must create your VSS users and grant them permissions to run NetSetup.

##### Installing Standalone VSS

A Standalone installation creates a database and installs the Administrator program and utilities and the client programs. If you are upgrading VSS, a new database is not created.

To install Visual SourceSafe Standalone version

1. Insert the VSS compact disc in the CD-ROM drive of the computer.
2. Double-click Setup.exe.
3. Follow the instructions in the Setup Wizard.
4. When prompted to select the installation type, click Standalone.
5. Secure your database.

##### Installing a Custom Version

A custom installation installs only the Visual SourceSafe components that you select. You can choose from the following options during a custom installation.

Option | Description
--- | ---
Administrative Programs | Installs the Visual SourceSafe Administrator program and utilities
Client Programs | Installs the Visual SourceSafe Explorer and command-line programs for client users.
Conversion Utilities | Installs utilities to convert databases from other version control systems to the Visual SourceSafe format.
Create SourceSafe Database | Installs or converts Visual SourceSafe database directories and files. If you are upgrading, a new database is not created.
Enable SourceSafe Integration | Registers Visual SourceSafe for integration into the Visual Studio .NET development environment.
Help files | Installs the Visual SourceSafe Help files.
Network Client Setup | Installs NetSetup for client installation from a server.

To perform a custom installation

1. Insert the VSS compact disc in the CD-ROM drive.
2. Double-click Setup.exe.
3. Follow the instructions in the Setup Wizard.
4. When prompted to select the installation type, click Custom.
5. Select the options that you want to install, and then click Continue.
6. Secure your database.

#### Installing Multiple Versions of Visual Studio 6.0 Products Side-by-Side on the Same Computer

Visual Studio products with the same version and in the same language—Visual C++® and Visual Basic® version 6.0 in English, for example—can be installed separately on the same workstation. Microsoft supports such installations. The Visual Studio 6.0 Installation Wizard detects if other versions of the 6.0 product line have been installed on a workstation.

Mixing different language versions, point releases, or product tiers on the same workstation is generally not supported. This means that the installation can fail, one or more of Visual Studio 6.0 products may not work even if the installation succeeds, or in the worst case, you may not be able to remove any of the products completely.

If the wizard generates a warning during installation, the safest action is to uninstall the Visual Studio 6.0 product before proceeding. The detection scheme checks for the following scenarios:

- Users installing different language versions of the same product. For example, Japanese Visual Basic and English Visual Basic. Installation of certain combinations is supported.

Product | Supported Installation
Visual Basic | Install in two different locations
Visual C++ | No side-by-side installation is supported.
Visual FoxPro | Install in two different locations
Visual InterDev | Install in the same location. You must reinstall after removing one version.
Visual J++ | Install in the same location. You must reinstall after removing one version.
Visual SourceSafe | Install in the same location. You must reinstall after removing one version. Note The UI language chosen when you run Visual SourceSafe is based on the system's language settings. If that language is not installed for Visual SourceSafe, it uses English instead.
MSDN | Install in default directory.

- Users installing different tiers of Visual Studio 6.0 products. For example, Visual J++ Standard Edition and Visual InterDev Professional Edition. Installing different tiers of the same product on the same workstation is not supported.
- Users installing point releases. Upgrading a later point release of Visual Studio over an earlier point release is supported. However, installing earlier versions over later versions is not supported.
- Users installing stand-alone versions of Visual Studio 6.0 products over the versions installed from Visual Studio 6.0 Professional or Enterprise. For example, Visual FoxPro 6.0 over Visual Studio Professional 6.0. Installing a stand-alone version of the same language versions (English) of Visual Studio 6.0 products is supported. It is safe to install Visual FoxPro 6.0 (English) from the stand-alone version on a workstation that already has Visual Basic 6.0 installed from Visual Studio Professional Edition.

#### Using NetSetup to Install VSS from a Network Server

The client programs are Visual SourceSafe Explorer and the command-line program. For users who need only the client programs, NetSetup is the recommended installation method. NetSetup copies the core executable files and libraries onto you computer's hard disk and then configures registry settings to use the database that has been created on the server.

> Note A Visual SourceSafe license for each client is required to use NetSetup.

To install using NetSetup:

1. Contact your administrator for the location of Netsetup.exe, setup procedures, and the CD-Key.
2. In Windows Explorer, navigate to the main folder containing the VSS Server installation.
3. Double-click Netsetup.exe.
4. Follow the instructions in the Installation Wizard, using Change Folder to change the default installation path.
5. Click OK.

#### Deleting VSS

If you delete a VSS installation (including the database) and then attempt to run Setup, Setup may try to install VSS in the Recycle bin (if the old database is found here). This happens only if the Recycle bin hasn't recently been emptied. To remedy the problem:

1. Empty the Recycle bin.
2. Run Setup again, and verify that the default directory for VSS is no longer the Recycle bin.

### General Notes and Tips

#### New Features in VSS 6.0

Microsoft VSS 6.0 adds many new features. Some of the highlights include:

- Create database – Available in the Visual SourceSafe Admin application. With it, you can create a new VSS database in any location. To use this command, on the Tools menu, click Create Database.
- Archive and restore - Now available in the Visual SourceSafe Admin application in addition to the command line.
- Label promotion - You can promote, or add, a file to an existing label.
- Move files - When you move a file, VSS automatically shares the file to a new project and then deletes it from the original project. In the new project, the file appears as shared.
- Compare differences in multiple projects - You can compare differences in a project against another project, compare in two different local folders, or compare a project against any directory, not just its working directory.
- Deploy individual files from the interface - In VSS 6.0, using the VSS Explorer, you can now deploy a file as well as an individual folder.
- Filter history information - You can now view history of files and projects without including labels.
- Clean temp directory option - A quick, easy way to delete all files from the temp directory used by VSS, provided the files are not open.
- Check external hyperlinks - In VSS 6.0, Check Hyperlinks now works on external hyperlinks, or jumps outside the project, as well as internal hyperlinks, or jumps within the project.
- Create desktop shortcuts to VSS databases (from VSS Explorer) - You can create a shortcut on your desktop that opens a specified VSS database in the specified project.
- HTML Help - This version uses HTML Help rather than WinHelp.

#### Maintaining Your VSS Database

It is still advisable to back up the drive where your VSS database resides regularly. It is important to use full backups, not incremental or differential backups, to avoid problems.

In addition, you should run the ANALYZE program periodically to maintain database integrity. If a corruption is found, the ANALYZE program can usually repair the problem. Updates to the ANALYZE tool are posted periodically on the VSS Web site, http://www.msdn.microsoft.com/ssafe/downloads/updates.asp. You can check that site to see if there is a version of ANALYZE more recent than the one shipped with this product.

To run ANALYZE:

1. Click Start and point to Programs.
2. Click Microsoft Visual SourceSafe (if you installed VSS with Microsoft Visual Studio, click Microsoft Visual Studio, then click Visual SourceSafe).
3. Click either Analyze VSS DB or Analyze & Fix VSS DB.

> Note It is always advisable to run the Analyze utility and back up older databases before upgrading them to the 6.x format.

#### Loss of Network Connection Produces Numerical Error Message

If you are using VSS on a remote database and you lose your connection to the server, the following error occurs:

> "unknown error - 20038," (or similar)

If you see this error, you have lost your network connection.

To correct the situation

1. Restore your network connection.
2. Restart VSS to continue your work.

#### System Date/Time

VSS uses the date and time that your local computer stores. If your computer is not synchronized with other computers, unpredictable results can occur. For instance, you check in a file after someone else, but VSS determines your checkin happened first because your system clock was off.

The best solution for this problem is to synchronize your local date and time with the network on a regular basis. With Windows NT this can be done with a Domain Time Source Server. Check the http://www.novell.com/ site for information on time synchronization with Novell NetWare servers.

#### Using the Command Line after Running a Client Setup

If you are working from the command line and receive the following message "No VSS database (SRCSAFE.INI) found. Use the SSDIR environment variable or run netsetup.", set the SSDIR variable. This tells VSS where to find the Srcsafe.ini file for the VSS server installation to which you want to connect. You can do this by typing the following at the command prompt:

> set ssdir=\\server\share\vss

Where \\server\share\vss is the folder where the Srcsafe.ini file is located.

Note There should not be a space between the equal sign and the location of the VSS server installation. For example, the following will not work:

> set ssdir= \\server\share\vss.

#### Details on Defining a Shadow Folder in Visual SourceSafe

A shadow folder is a live mirror (on the file system) of the projects in the Visual SourceSafe (VSS) database.

For a shared database, you must set up the shadow folder with a Universal Naming Convention (UNC) path, such as \\Server\Share\Shadow, to avoid failure when changes are made from a computer other than the one used to set up the shadow.

For example, instead of defining the shadow folder as D:\VSSShadow, you can define the shadow folder as: \\server\D\Shadow.

Confirm that all the Visual SourceSafe users have read/write access to the UNC directory.

If you create a shadow folder for a VSS project, the Windows user permissions for the VSS folders are not inherited by the shadow folder. Grant Read and Write permissions for the shadow folder to all VSS users, and grant only Read permissions to any Windows users who require read-only access to the shadow folder.
It is recommended that you create a shadow folder on a different share from the VSS database so that Windows users with read-only access to the shadow folder do not have any access permissions for the share that contains the database. It is also recommended that you create a shadow folder for a specific VSS project, not for the root project $, so that Windows users who have access to the shadow folder have access to only that VSS project and not to your entire database.
Note When you delete a file or project from a VSS project, that file or project is not deleted from the shadow folder.

#### VSS Home Page

Microsoft VSS has a home page on the Internet. This home page features a variety of information including articles on VSS, a self-running demonstration that you can download, a collection of helpful VSS utilities, and much more. The URL for the home page is: http://www.msdn.microsoft.com/ssafe.

#### Microsoft Knowledge Base

If you encounter problems or have questions not addressed here or in the online documentation, you can search the Microsoft Knowledge Base at http://support.microsoft.com/support. The Knowledge Base is also available on the MSDN Library Visual Studio 6.0.

#### VSS Newsgroup

You can exchange information with other VSS users by visiting a newsgroup on the Internet. For details, see http://communities.microsoft.com/newsgroups

Note Microsoft does not provide support for messages posted to the newsgroup.

### Best Practices

The most up-to-date SourceSafe Best Practices Guide can be found at: http://msdn.microsoft.com/library/default.asp?URL=/library/techart/vssbest.htm. This guide is in English only.

#### Introduction

Under normal operation in a stable environment, Visual SourceSafe provides excellent storage and security for your current source data and past revisions. However, as with any database product, data corruption can occur. This section outlines recommended practices to help avoid corruption problems. Although all the practices can help minimize the impact of corruption, one of the most valuable is using a data repair utility called Analyze. The Analyze tool ships with Visual SourceSafe. It checks for and repairs many common data write errors. Run Analyze on your Visual SourceSafe database with your regular full backup schedule to ensure the stability and security of your source data.

Important When using Visual SourceSafe, make sure that you are running the latest version of the applications. Microsoft periodically releases service packs for our applications that correct known issues. We recommend that you install the service packs as soon as possible.

Customers who want to upgrade their Visual SourceSafe client to the latest Visual Studio Service Pack releases should use the Service Pack installations instead of running netsetup.exe again.

#### General Database Recommendations

##### Database Size

Under normal use, your Visual SourceSafe database should not exceed 3 to 5 GB. To determine an appropriate size, consider the amount of free space on the server, the relationship among the projects being stored, the amount of file history you need to access quickly, and user tolerance for reduced performance. Although Visual SourceSafe does not have a size limitation, on very large databases it takes longer to perform normal operations and maintenance tasks, such as running Analyze. Visual SourceSafe does not limit the number of databases you can put on a server.

To reduce potential file size, keep projects that are not interrelated in separate databases. You can use the Archive and Restore utilities included in Visual SourceSafe version 5.0 and later to move projects to another database or to remove outdated history from a project.

##### Location

Although you can store Visual SourceSafe databases on any Microsoft Windows®-compatible file server (Windows NT, Novell, and so on), database performance is best on Windows NT. Network operations are generally faster. In addition, in the Windows-based server environment you can run Analyze and other highly intensive file I/O operations directly on the server, often dramatically decreasing execution time.

##### Analyze Frequency

Use the Analyze tool shipped with Visual SourceSafe to detect and repair problems in the database structure. When you run Analyze regularly, especially in high-use situations, you can discover small problems and fix them before they become worse. Run Analyze weekly or, at minimum, monthly as part of regular maintenance.

While running Analyze directly on your production database, you must lock out users. To minimize the impact, restore your regular backup to another location and run Analyze on that copy. Another way that you can create a duplicate on-line copy of your VSS database is to use the ROBOCOPY utility from the Windows NT Resource Kit. This utility copies all the files in a folder and subfolders; however, if a file is in use, it will retry the copy instead of just failing. You can use this method to create a backup of your database on another server as well. If you detect problems in the backup that need to be resolved, you can then lock out users from the production database while making any necessary fixes. If Analyze returns no errors, you do not need to interrupt user connections. This method also checks the validity of the backup strategy.

Each time you run the Analyze utility, create a list of all items in the database. This list is useful in determining which logical file name is related to an error based on the file name (for example, Abcaaaaa.a) for which the error is reported.

To create the physical list

- At the command prompt, type:

  > SS PHYSICAL $/ -R–O@PHYSICAL.TXT

For more detailed information on Analyze, see Finding and Repairing Data Corruption later in this document.

##### Free Disk Space

Caution Do not allow Visual SourceSafe or the Analyze tool to run out of disk space while running. Running out of disk space in the middle of a complex operation can create serious database corruption.

Visual SourceSafe does check for disk space. However, due to performance concerns, it does not check for space on every disk write operation. To avoid possible database corruption, make sure there is enough free space on the server so that a complete copy of the database can be created during normal Analyze operations.

##### Sharing and Branching

Use the Sharing and Branching features of Visual SourceSafe with discretion. Avoid Sharing or Branching across top-level projects because it complicates the process of archiving a project and restoring it into another database. Moreover, when you branch files and then delete them, the space is not recovered until all copies of the branched file in the database are destroyed.

##### Number of Users

The acceptable number of users varies depending on the performance of the server and the network. When you control the size of the database, performance improves, and more users can access the database with reasonable performance. The number of full-access users you have determines the number of licenses that you need for Visual SourceSafe.

##### Server Rights

All users must have permission to modify files in the Data folder and its subfolders in the directory tree. These permissions must also be applied to the share permissions. If a user receives the message “Unable to create user login file,” that user does not have the proper permissions to the VSS database location.

Each database has its own User and Rights management systems. You cannot interrelate these files.

##### Ss.ini and SSAdmin.ini Files

Users' Ss.ini files are limited to 64 KB and a maximum of 10 different computer-specific settings. Each time a user logs on from a different computer, the Ss.ini saves the window positions and other computer-specific information. If you are experiencing unusual user-specific problems, try deleting unnecessary entries in the user's Ss.ini file.

##### Working Folders

To maintain file integrity, make sure that all users have their own working folders for all projects. When multiple users share a working folder, a file checked out by one user can be modified by anyone with access to that folder. Maintaining separate working folders ensures that users modify only files they have checked out themselves.

##### System Clocks

Synchronize the dates and system clocks for all Visual SourceSafe client computers with the Visual SourceSafe server. This prevents checkin and checkout operations from appearing to happen out of sequence and affects any labels that are applied. Synchronizing dates and system clocks is particularly important when users from different time zones access the same database.

You can set up a computer running Windows NT Server to act as a Domain Time Source server for users to synchronize their local date and time with the network. For additional information, see the Knowledge Base article "How to Set Up and Synchronize with Domain Time Source Servers (search on article ID Q131715).

##### New Databases

Avoid creating a new database by copying an existing one. Doing so can potentially cause problems because the globally unique identifier (GUID) in the Um.dat will be the same for both databases. For details on how to create a new database, see Knowledge Base article Q123467, "How to Create a New Database in SourceSafe."

##### Moving Databases or Visual SourceSafe Installations

To move a Visual SourceSafe installation, copy the entire VSS folder and all of its subfolders to the new location. However, do not use XCOPY to do this because it does not copy some zero-byte files. Instead, use Windows Explorer to copy the folder(s). After you have copied the installation, Visual SourceSafe clients must change the #include statement in their local Srcsafe.ini file to reflect the new location. No other modifications are necessary. To move just the database itself, perform the same operation on the Data folder and then modify the DATA_PATH line of the server Srcsafe.ini instead of the client Srcsafe.ini. When specifying the DATA_PATH, use the UNC method (\\SERVER\SHARE). For details, see Knowledge Base article Q176909, "HOWTO: Move a VSS Database or Project to New Location."

Tip After you have moved the VSS location, you can create a Srcsafe.ini file in the old location with a #include statement pointing to the new SrcSafe.ini location. This provides time for users to change their links.

##### Integrated Environments

When using Visual SourceSafe through the integration in the development environments (Microsoft Visual Basic®, Microsoft Visual C++®, Microsoft Access, Microsoft FrontPage®, and so on) use the integrated component to perform Visual SourceSafe operations that can be done within that environment. For example, do not check out and check in files from both the Visual SourceSafe Explorer and integrated environments. This is very important because Visual SourceSafe does not understand the links between the source files the way the integrated development environment does. For instance, in Visual Basic a form can be made up of a FRM and a FRX file. Visual Basic knows to check out both files at the same time, but SourceSafe does not. Checking only one file out in the Visual SourceSafe Explorer causes the files to get out of sync in Visual Basic and hence corrupted.

#### How Visual SourceSafe Tracks Files

Visual SourceSafe is a file-based version control system that is designed for use on multiple, industry-standard network servers. No special program needs to be run on the server during normal use. The core of a Visual SourceSafe database is the Data directory; it has a unique structure that is designed for maximum flexibility. A Visual SourceSafe database consists of the following files and folders.

File/folder | Description
SrcSafe.ini | Visual SourceSafe database global settings and configuration information for all users.
Users.txt | List of all users of the Visual SourceSafe database.
Data\Aaaaaaaa.cnt | Physical name of last file added to the database.
Data\Crcs.dat | CRC information used to speed up the get and check-out processes (Visual SourceSafe 6.0 format databases only).
Data\Names.dat | Long file name information.
Data\Rights.dat | User and project security information.
Data\Status.dat | Visual SourceSafe Explorer cache file (used to speed up the display of the Visual SourceSafe Explorer).
Data\Um.dat | User management information (names and passwords) and the database identifier (GUID).
Data\Version.dat | Visual SourceSafe database version.
Data\A…Z (folders) | Folders containing log files and data files.
Data\Backup (folder) | Contains analyze log file (analyze.log), list of bad files (analyze.bad), and backups of files changed by Analyze.
Data\Labels (folder) | Label cache information used for label promotion (Visual SourceSafe 6.0 format databases only).
Data\Locks (folder) | Used if Visual SourceSafe locking is enabled.
Data\Loggedin (folder) | Contains user logon files and an Admin.lck file if the database is locked.
Users (folder) | Contains Template.ini, which stores default values for the Ss.ini file for new users. The Users folder also contains a subfolder for each user. This subfolder contains an Ss.ini file defining user-specific settings. The Admin folder also contains Ssadmin.ini, which defines administrator settings.

Visual SourceSafe creates two files in the Data directory for every file and project that you add to Visual SourceSafe (with one exception described later in this section). These file pairs are distributed evenly across the A through Z subdirectories in the Data directory. The file without an extension (such as QRBAAAAA) is the log file for the file type being stored. The log file contains internal information for Visual SourceSafe, such as who added the file, where it exists, and all the differences between the versions of the file. The file with an .a or .b extension (such as QRBAAAAA.A) is the most recent version of the actual file, stored under a Visual SourceSafe physical name. Each time a file is checked in, the extension it is saved with alternates between .a and .b.

When a user checks in a file, it is copied from their working directory to the Data directory and renamed with the physical name and either an .a or .b extension, whichever is not currently there. Visual SourceSafe then calculates the differences between the .a and .b files and stores it in the log file (the file without an extension). After the log file is updated, the old copy of the data file is deleted. Under normal circumstances you should never have both .a and .b extensions for one physical file name.

Caution Never rename an .a or .b file in the DATA folder. Although doing so appears to correct the immediate problem that you are experiencing (such as: The file QRBAAAAA.A not found.), it will make the previous versions of the file unrecoverable. If you receive this error, restore the file pair from a recent backup.

When you share a file from another project, no new file pair is created in the Visual SourceSafe database. Instead, Visual SourceSafe creates a reference in the original file's log, noting that the file also exists in another project.

#### Finding and Repairing Data Corruption

Use the Analyze tool, located in the Microsoft Win32® directory, to check for and correct corruption problems. You should run it as frequently as is practical—once a week is recommended, or at a minimum, once a month. Analyze checks all the files in the Visual SourceSafe Data directory for corruption or disconnected links and often repairs these with proper switch settings. Because Analyze is so thorough, it can be slow to run. The amount of time that Analyze takes to run depends on the contents and structure of the database, such as the amount of sharing and branching and the total number of files.

For best performance, all users should log off Visual SourceSafe before you run Analyze.exe. If you use the -F switch to repair problems, users must log off. However, if you want to run Analyze.exe without requiring users to log off, you can use the -X switch.

Note Due to the amount of file I/O required, you can dramatically improve performance by running Analyze locally (that is, on the server) rather than across the network.

Analyze has several switches you can use to tell it what to do when running. Do not try to use every switch at once. The more Analyze is required to do, the longer it takes to run.

When you run Analyze, it executes in the following four passes.

1. Analyze checks every file in the Data directory to make sure that it is valid and is not corrupt.
2. Analyze checks the relationships between parents (projects) and children (files and projects).
3. Analyze checks the relationships between shared and branched files.
4. Analyze checks the files Um.dat, Rights.dat, and Names.dat and performs cleanup operations.

Analyze supports the following switches.

Switch | Description
-B<folder> | Specifies the folder to use for backup.
-C | Compresses unused space. (This simply removes blank space and does not compress the log files.) This pass can generate a large number of files in the backup folder and should be used only when there is plenty of disk space available.
-D | Deletes unused files.
-DB | Deletes the Backup folder. Caution If you find corruption, create backup copies of logs before running Analyze with the -DB switch.
-F | Automatically fixes corrupted files. (Requires users to log off database.)
-I- | When the analysis is complete, the program quits. (Useful if running in a batch script.)
-V1 | Displays only critical errors. (This is the default setting, if no -V switch is used.)
-V2 | Displays only significant errors.
-V3 | Displays all errors and inconsistencies.
-V4 | Displays errors, inconsistencies, and informational notes.
-X | Does not attempt to lock the database when analyzing. (Recommended only when users must remain logged on while Analyze.exe runs; -X cannot be used with -F. If Analyze tries to access a file that is in use while in this mode, it will quit and you will need to re-run it at a later time.)

Running Analyze in the following order provides good coverage.

Command line | Description
Analyze –V4 <database path> | The first pass should always locate problems before trying to fix them.
Analyze -F –V4 <database path> | If errors are reported in the first pass, run Analyze again in fix mode to correct them.
Analyze -F -C –V4 <database path> | Run this pass when 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, it is extremely important that you have enough disk space available when running a Compress pass on your database.

Each time Analyze runs, it places an Analyze.log file in the Backup folder along with a file called Analyze.bad. The Analyze.bad file contains a list of all files in which Analyze found problems. 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. The errors and messages reported by Analyze are discussed at length in Knowledge Base article Q152807, "INFO: Error Messages from Analyze Tool of Visual SourceSafe."

Analyze can also re-create the Status.dat, Names.dat, and Rights.dat files. To do this, rename or delete the files you want rebuilt, and run Analyze -F. Analyze re-creates 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. The Rights.dat file is re-created, but as an empty structure; you need to add permissions for each user again.

Microsoft occasionally updates the Analyze tool to include more checking or to improve performance. For the latest version of Analyze, visit the Microsoft Visual SourceSafe Web site located at http://msdn.microsoft.com/ssafe/default.asp.

#### Backup and Restore

Backups should be performed regularly as part of the daily or weekly file maintenance and security process. When backing up your Visual SourceSafe database, make sure you are getting a full backup of the database. Although you can use incremental backups, you should avoid them because some of the files from the database may not be able to be restored. If users are logged on to Visual SourceSafe and actively using the product, the files they have open will not be backed up by most standard backup utilities. There are several backup and copy utilities that can back up open files. However, if you use these utilities and someone is actively updating a file in Visual SourceSafe when the file is backed up, the backup may be corrupted.

Note Do not schedule Analyze to run at the same time as a backup of the database. If the backup program has files open that Analyze is trying to open, Analyze will shut down unexpectedly.

Visual SourceSafe automatically closes any files opened by Visual SourceSafe or an integrated application after 15 minutes of inactivity. (This requires Service Pack 3 of Visual SourceSafe 5.0 or later.) The user still appears to be logged on to Visual SourceSafe and the files will be reopened when they start working again. However, the Rights.dat and Status.dat files remain open any time users are logged on and will not be backed up. You can rebuild these if needed using the Analyze utility. Each time the administrator modifies the rights by project information for a Visual SourceSafe database, Visual SourceSafe copies the Rights.dat file to a Rights.bak file. If necessary, you can rename the Rights.bak file during a restore process.

Caution Never restore a complete backup of a database over an existing database. Visual SourceSafe maintains very complex links between files. Restoring a whole database backup over an existing database may confuse the links between files and cause incorrect versions of the files to be displayed in the database.

##### Prevent Power Loss

A disaster-recovery study by Contingency Planning Research found that power loss caused 27 percent of data-center disasters in which there was actual data loss in addition to loss of service. This figure includes power outages due to environmental disasters such as snowstorms, tornadoes, and hurricanes. To minimize these disasters, invest in an uninterruptible power supply (UPS). Windows NT Server includes built-in support for UPS.

##### Install Fault-Tolerant Storage

RAID technology minimizes data loss due to problems accessing a hard disk. RAID is a fault-tolerant disk configuration in which part of the physical storage capacity contains redundant information about the data stored on the disks. You can regenerate the data using this redundant information if one of the disks or the access path to it fails or if a sector on the disk cannot be read.

- Install RAID Level 1 for the operating system and logs.
- Install RAID Level 5 or RAID 0+1 for data.

For information about how to make your server more reliable, see the following resources:

http://www.microsoft.com/windows2000/techinfo/howitworks/management/relavail.asp

http://www.microsoft.com/NTServer/nts/deployment/planguide/HighAvail.asp