A Visual SourceSafe database is file system database. User- and database-level options are stored in initialization files and file, project, and database metadata is written to binary files on disk.
Contents of a Visual SourceSafe Database
A Visual SourceSafe database consists of the files and folders defined in the following table. These items are stored in the Data directory of the Visual SourceSafe installation.
Reflects the physical name of the last file added to the database.
Contains cyclic redundancy check (CRC) information used to speed up the get and checkout operations.
Contains errors generated by the DDCONV utility.
Contains information about long file names, that is, names longer than 34 characters. Do not edit or delete this file.
Contains user and project security information and specifies the relationships between users and project rights.
Contains global database settings and configuration information for all users.
Contains checkout status information for database files. This file is a cache file used to speed up the display of Visual SourceSafe Explorer.
Contains user management information (names and passwords) and the database identifier (GUID). Do not edit or delete this file.
Contains the Visual SourceSafe database version information.
- A-Z (folders)
Contain log files and data files.
- Backup (folder)
Contains a log file for the ANALYZE utility (Analyze.log), a list of files with errors for ANALYZE (Analyze.bad), and backups of files changed by ANALYZE.
- Labels (folder)
Contains label cache information used for label promotion of files from one project to another.
- Locks (folder)
Contains locked files used if Visual SourceSafe locking is enabled.
- Loggedin (folder)
Contains user login files and an Admin.lck file if the database is locked.
Visual SourceSafe creates two files in the Data directory for every file and project that you add to a database. It distributes file pairs evenly across the A through Z folders in this 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. Every time a file is checked in, the extension with which it is saved alternates between .A and .B.
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 log of the original file, noting that the file also exists in another project.
When you check in a file, Visual SourceSafe copies the file from your working folder to the Data directory and renames it with the physical name and either an .A or .B extension, whichever is not currently there. Visual SourceSafe then calculates the difference between the .A and .B files and stores the difference (delta) in the log file. After the log file is updated, Visual SourceSafe deletes the old copy of the data file. Under ordinary circumstances, you should never have both .A and .B file name extensions for one physical file name.
Never rename an .A or .B file in the Data directory. Doing this appears to correct the immediate problem that you are experiencing, for example, the file QRBAAAAA.A not found. However, renaming the file makes the previous file versions unrecoverable. To correct such an error, you must restore the file pair from a recent backup.
Files Used for Controlling a Database
Visual SourceSafe controls its databases using several special files that store metadata about the data items. Information in these files includes initialization variables, options selected using the SourceSafe Options dialog box, window and toolbar positions, and dialog preferences. Visual SourceSafe Explorer, Visual SourceSafe Administrator, and the command line utility SS automatically update these files as you use the programs to interact with the database.
A Visual SourceSafe database uses its Srcsafe.ini file to store global settings and configuration information for all users. Visual SourceSafe reads this file on startup and does not use it again. Therefore, changes made during operation do not affect any currently running Visual SourceSafe clients. You must exit the client program and then start it again to see changes. The following is an example of a Srcsafe.ini file:
; srcsafe.ini ; ; Three of these variables — Data_Path, Users_Path, and Users_Txt — ; must be in Srcsafe.ini. Any other variable here can be overridden in ; Ss.ini. Similarly, any Ss.ini variable can be placed in Srcsafe.ini ; to set a system "default," which individual users can still override ; in Ss.ini. The two important paths used by VSS. Data_Path = data Temp_Path = temp ; This tells Admin where to put personal directories for new users. Users_Path = users ; From this, find Users.txt; from that, in turn, find Ss.ini for user. Users_Txt = users.txt ; The following line contains common file groupings. File_Types = VB(*.asp;*.bas;*.cls;*.ct?;*.dca;*.dep;*.dob;*.dox;*.ds?;*.fr?; *.log;*.oca;*.pag;*.pgx;*.res;*.swt;*.vb?),VC(*.bmp;*.c;*.cpp;*.cur;*.cxx;*.def; *.ds?;*.h;*.hpj;*.hpp;*.hxx;*.ico;*.inl;*.mak;*.rc;*.rc2;*.rgs),VID(*.asa;*.asp; *.css;*.dbp;*.dtq;*.htm*;*.pkp;*.sln;*.sql;*.txt;*.vip;*.wdm),VJ(*.java;*.vjp; *.pkp;*.sln;*.txt),VFP(*.cdx;*.db?;*.dc?;*.fpt;*.fr?;*.idx;*.lb?;*.mn?;*.mpr; *.pj?;*.prg;*.qpr;*.sc?;*.vc?)
For each database user, Visual SourceSafe creates an Ss.ini file defining user-specific settings in the Users\<username> directory. Every time a user logs in from a different computer, the Ss.ini file saves the window positions and other computer-specific information. An Ss.ini file is limited to 64 KB and a maximum of ten different computer-specific settings. The following is an example of an Ss.ini file:
| SS.INI ; | This file contains all the variables that "customize" VSS | to your particular needs. The Ss.ini variables are documented in | Online Help. Only a few of them are placed in this file by default. | C programmers should remove the semicolon from the following line, to | uncomment it. Other programmers REPLACE line with different masks. | Relevant_Masks = *.c, *.h, *., *.asm | The following line prevents you from being asked for a check out | comment. Checkout_Comment = - Project = $/Samples Maximized (Win) = No Sort_Order = Date [$/Features] [$/MyProject]
A user designated as a database administrator will also have an Ssadmin.ini file, stored in Users\Admin. This file contains the windows and toolbar settings for Visual SourceSafe Administrator. The global database settings configured by the database administrator through this client program are stored in Srcsafe.ini.
A Template.ini file, placed in the Users directory, stores default values for the Ss.ini files of the database users. Visual SourceSafe uses this file as a template for new users. If you are the database administrator and have to make configuration settings that will apply to all new users, make the changes to this file. The settings will then appear in the Ss.ini file for each new user. You will have to make the corresponding changes manually for each existing user.
Visual SourceSafe places a Users.txt file in the Users directory. This file lists all users of the Visual SourceSafe database.
Database Security and Access
Visual SourceSafe makes use of the user name and the user password to provide access to a database. Access depends on sharing permissions and project rights, which must be assigned by the database administrator after database creation. For more information, see.