Creative Commons Chuck Kollars' VSS

Chuck Kollars' Personal Home Page

Multiple VSS Databases


This material on VSS is an archive from fall 1998. First I changed jobs so I no longer had an association with VSS. Then after a couple more years I changed careers completely so I'm no longer associated with high tech at all. I've left the VSS material on this site for use by others, even though I no longer remember exactly what it's about or even understand some of it.

This material was originally posted on a website whose address has changed. Its old address may have been any of www.shore.net/~ckollars/xxxxx or www3.shore.net/~ckollars/xxxxx or www.primushost.com/~ckollars/xxxxx or www3.primushost.com/~ckollars/xxxxx. Its current address is simply www.ckollars.org/xxxxx

This material reflects experience with VSS5. The user interfaces and the feature set in VSS6 were virtually identical, so almost all of this material continued to apply for several years. But I have no detailed knowledge of the user interfaces or feature set of the now current VSS2005 and so don't know which parts of this material still apply.

In Knowledge Base article Q127104 and in the VSS6 documentation, Microsoft recommends against using multiple VSS databases in simple cases. The support that was in some earlier versions of the product using Data Path doesn't seem to work at all well in some cases. And at first it can seem that VSS isn't even capable of operating with multiple databases. On the other hand, there are sometimes good reasons for using multiple VSS databases. And mechanisms for accessing multiple databases ­­sometimes better than the original Data Path mechanism­­ are available in every case (although often poorly documented).

Considerations for Multiple VSS Databases

Pro

Con

Configuration Recommendations

If possible do not use the project security option of VSS. Project security information is stored per-database. And even in the single database case maintenance of project security is relatively difficult. It's very difficult to maintain project security with multiple VSS databases. There's seemingly no way to synch up user rights across databases or to maintain rights for all the databases using a single interface. Your best bet is to just turn the project security option completely off.

Create in your head one overarching project hierarchy for all the databases. Sketch in this project hierarchy skeleton (at the very least the top couple levels of it) in every database. In each database at any given time some of these projects will be real while others will be empty (or will be present only as a "placeholder"). Doing this makes it much easier to rebalance the databases later by using SSARC/SSRESTOR to move a project from one database to another without losing any of the history information.

You can point the User_Path of all the databases to the same folder, and thus share a single set of SS.INI files among all databases. Users will probably like this because options changes they make while using one database will be in effect for all the other databases too. (The VSS default is to have a separate user folder of SS.INI files for each database. But you don't have to accept the default.) This should be relatively easy to maintain, although you may have to do a little manual editing outside of SSADMIN when you add a new user.

Accessing Multiple VSS Databases

From the VSS GUI

To start up the GUI pointing to a particular database, either check the "open this database next time I run Visual SourceSafe" box on the File|OpenSourceSafeDatabase... dialog, or specify

      ssexp -s\\server\share\pathtofoldercontainingSRCSAFE.INI
in the shortcut or menu item that starts VSS. You can create several different shortcut icons each of which launches VSS against a different database this way.

To change to a different database after the VSS GUI is already running, use the File|OpenSourceSafeDatabase... dialog and [Browse] if necessary to the folder containing the SRCSAFE.INI file of the database you want to select. Once you do this VSS will add an item to the menu of possible databases by creating a registry entry. Next time you use the File|OpenSourceSafeDatabase... dialog the database will appear in the menu and you won't have to [Browse] to it.

From the SS Command Line CUI

Set the SSDIR environment variable to the folder containing the SRCSAFE.INI file of the database you want to operate on before invoking any SS commands. None of the SS commands takes a database selector as a command line line switch; they all use this same environment variable. Documentation of this is largely lacking. Documentation of most SS commands doesn't mention it at all. But it works!

Remember that if you use SET inside a command box, it affects only that command box not other existing command boxes or new command boxes or direct system launches. You should either make the setting through System|Properties.../Environment and then launch a new command box, or run all the SS commands in the same command box you just ran SET in.

From the MSDEV IDE

Typically project (.DSP) files contain information that points back to the VSS database where files for that project are kept. Typically for existing projects you don't need to worry about selecting which VSS database to use at all.

But MSDEV does get confused in special cases. One of these cases is if you manage to define different projects in the same workspace (.DSW file) as being stored in different VSS databases. MSDEV doesn't expect this to happen, and doesn't handle it very cleanly. You will have to change the MSDEV option Tools|Options.../SourceSafe[Advanced...]/Integration to Database=Prompt. Then every time you open a different project you will have to answer [Cancel] to the question "...Would you like to connect to this project?", [YES] to the question "...Would you like to browse for the project?", [Browse], and then select the correct VSS database.

When creating new projects you can handle choosing which VSS database to use in either of two ways. If you set Tools|Options.../SourceSafe[Advanced...]/Integration to Database=Use Default, all new projects will be put in the VSS database that your local SRCSAFE.INI points to. If on the other hand you set Tools|Options.../SourceSafe[Advanced...]/Integration to Database=Prompt, you will be presented with a menu of known VSS databases and asked to make a selection when you create a new project.


Location: N42 40.86' W070 50.35'
 (North America> USA> Massachusetts> Boston> North Shore> Ipswich)
Time: UTC-5 (USA Eastern Time Zone)
 (UTC-4 summertime --"daylight savings time")
Email comments to Chuck Kollars

 

All content on this Personal Website (including text, photographs, audio files, and any other original works), Some Rights Reserved unless otherwise noted, are available to anyone for re-use (reproduction, modification, derivation, distribution, etc.) for any non-commercial purpose under a Creative Commons License.