This wide- and large- screen layout may not work quite right without Javascript.

Maybe enable Javascript, then try again.

Home Visual Source Safe

Multiple VSS Databases

This material on VSS is an archive from fall 1998, about two decades ago. First I changed jobs so I no longer had any association with VSS. Then after a couple more years I changed careers completely so I wasn't associated with high tech at all. Then after even more years I retired altogether. 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.

VSS continues to be used and to provide integration with other products, even though the VSS software product itself has been retired. Almost all VSS consulting services have disappeared. Microsoft Mainstream Support is no longer available for any version of VSS. And the end is near even for Microsoft Extended Support for VSS2005. As a result, roll your own support may become more important, and the experience with VSS related by these pages may turn out to be quite useful to some despite its great age.

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 never had any detailed knowledge of the user interfaces or feature set of VSS2005, and so simply assumed most parts of this material still applied.

In Knowledge Base article Q127104 and in the VSS6 documentation, Microsoft recommended against using multiple VSS6 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: (N) 42.67995, (W) -70.83761
 (North America> USA> Massachusetts> Boston Metro North> Ipswich)

Email comments to Chuck Kollars
Time: UTC-5 (USA Eastern Time Zone)
 (UTC-4 summertime --"daylight saving time")

Chuck Kollars headshot Chuck Kollars' other web presences include Chuck's books and Chuck's movies.

You may also wish to look at Dad's photo album.

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