How to: Add a Database
Visual SourceSafe allows you to add a database to your team environment by either creating a new empty database or using an existing database. You can add a database using the Add SourceSafe Database wizard in either Visual SourceSafe Explorer or Visual SourceSafe Administrator. You may also add an existing database to the list of available databases with the Add SourceSafe Database wizard, such as one created by using the MKSS utility.
Note
The Add SourceSafe Database wizard is also available from a SourceSafe plug-in in Visual Studio. For more information, see Using Visual SourceSafe in Microsoft Visual Studio.
Best Practices for Creating a Database
It is recommended to create a new empty database so that you can secure the database and the maintenance tools and backups separately. This allows you to restrict users who have access to the maintenance tools. Most users should be allowed to connect only to the new database.
Do not create new Visual SourceSafe databases in the Program Files directory of Windows. Instead, use a separate shared folder, for example, Visual SourceSafe Databases.
When the size of a single Visual SourceSafe database approaches 5 GB, consider creating additional databases on the same computer but in separate file shares. An overly large database causes the Visual SourceSafe maintenance tools to take an excessive amount of time (several hours) to complete their work.
Consider using separate databases for completely independent development projects. Advantages include the following:
Improved security because of more precise definition of users who have access to certain projects. Remember that a user who has access to a single database is able to view and manipulate all the projects it contains.
Limited impact of routine maintenance. Maintenance procedures, such as backup, require locking of the database. When you lock the database, non-administrator users are prevented from accessing it.
Limited impact of data repair. Corruption of a large database requires that you take it offline for repair. With separate databases, database repair affects only the users of the affected database and you do not hinder the workflow of all users.
Ease of backup. When a project ends, it is easy to archive the project database without affecting other projects.
To add a database using the Add SourceSafe Database wizard
If using Visual SourceSafe Administrator, on the File menu, click New Database. If you prefer to use Visual SourceSafe Explorer, on the File menu, click Open SourceSafe Database and then click Add. Either method opens the Add SourceSafe Database wizard.
The first step of the wizard is just a welcome page. Click Next when you are ready.
The next step of the wizard allows you to enter a location, or browse for one. Click Next when finished.
Now the wizard allows you to specify a friendly name to help you remember the database connection. Click Next to proceed.
Visual SourceSafe offers two work styles, Lock-Modify-Unlock and Copy-Modify-Merge, as described in Work Styles. Select the work style for your team environment and click Next.
The last step of the wizard summarizes the file share settings for your database. Check these settings and click Back if you need to make changes.
When you are finished with your database settings, return to the final step of the wizard and click Finish. The wizard creates the database as you have requested.
Go to the database path that you have specified to make sure that the database is available as expected. It will have a Srcsafe.ini file in the installed Data directory for Visual SourceSafe.
To add an existing database
Open the command shell.
At the command prompt, navigate to the root directory for Visual SourceSafe.
Type the following, supplying the location in which to create the database:
MKSS <path to database folder>
For example, type:
MKSS d:\vss\data
Go to the database path that you have specified to make sure that the database is available as expected. It will have a Srcsafe.ini file in the installed Data directory for Visual SourceSafe.
For more information about the MKSS utility, see MKSS Utility.
See Also
Reference
Add SourceSafe Database Wizard
MKSS Utility