Export (0) Print
Expand All

How to: Split a Database

Visual Studio 2005

If no files or labels are associated with the root project ($/) of your database, you can split the database in two using the Archive Projects and Restore Projects commands in Visual SourceSafe Administrator, or the associated maintenance tools SSARC and SSRESTOR. However, this method of splitting a database has the following limitations:

  • Does not copy the user list and user access rights from one database to another.

  • Does not allow you to move files from the root project ($/) of one database to the root project of another database.

If the database that you want to split contains files that reside in the root project or files that are shared with or grouped by label with files that reside in the root project, you cannot use the archive and restore method to split your database. A root project cannot be restored into another database because a project of that name already exists. To work around this limitation, you must copy the database as described below, and then delete projects you do not need in the new database.

To split a database using archive and restore functionality:

  1. Create an empty database (database 2) to populate.

  2. Restrict all users from the database to archive (database 1).

  3. Back up the projects for database 1. See How to: Archive a Database.

  4. Restore the archived projects in database 2. See How to: Restore a Database from an Archive.

  5. Copy the Srcsafe.ini file from database 1 into database 2.

  6. Edit the Srcsafe.ini to correct any relative URLs or shadow folder paths it might contain to reflect database 2.

    Note   When you delete an archived project from the new database, the project's shadow folder information is not removed from the Srcsafe.ini file. Optionally, you can remove it.

  7. Unlock database 1 and notify your users that it is available.

  8. Secure database 2 as described in Securing a Database.

To split a database by copying:

  1. Lock all users out of the database to split ("database 1").

  2. In Windows Explorer, copy the directory for database 1 to a new location (for "database 2"). The directory contains the Srcsafe.ini file, the Data directory, the Users directories, etc.

  3. For database 2, rename Um.dat as Um.dat.bak.

  4. Using Visual SourceSafe Administrator, create a new empty database ("database 3").

  5. In Windows Explorer, copy Um.dat from the Data directory of database 3 to the Data directory of database 2.

  6. In the database 2 Data directory, rename Rights.dat as Rights.dat.bak.

  7. Now run ANALYZE with the -F option on database 2, to rebuild Rights.dat according to specifications in Um.dat. See ANALYZE Utility.

  8. In Visual SourceSafe Explorer, open database 2 and confirm that you can access data using the Admin account.

  9. Now use Windows Explorer to delete Um.dat.bak and Rights.dat.bak from the Data directory of database 2.

  10. From database 2, delete all projects and files that you want to keep in database 1.

  11. Now access database 1, and delete all projects and files that you are keeping in database 2.

  12. Unlock database 1 and notify your users that it is available.

  13. Secure database 2 as described in Securing a Database.

  14. Delete database 3.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft