How to Recover a VSS Database After You’ve Lost the Admin Password
It’s happened to us before, eh? Lost the Admin password and we’re frantically looking through the TechNet CDs, VSS documentation, newsgroups – anywhere we can get our hands on the steps needed to recover a VSS database. Well, here it is.
I’ve resorted to using this more times than I care to remember. Let’s hope you don’t need it too often, either.
NOTE: You must be an administrator to follow these steps.
Basically, It’s Simple
In the event of a lost admin password or corrupt user file, a new user file and rights file needs to be created. Doing this removes all users except GUEST and ADMIN, which are reset to SourceSafe defaults. All other users must be recreated. In addition, all rights will be lost and therefore will have to be recreated.
Actually, It’s a Pain
The theory is simple, the details are a pistol! Here’s the step-by-agonizing-step procedure for recovering a VSS database without the Admin password.
If you are running SourceSafe 3.04 or later, skip to the next step, otherwise find out the serial numbers by doing the following:
– Run SS\ADMIN\SERIALIZ -s .
– Make a note of the serial number(s) that the program returns.
Create a temporary directory, such as C:\SSTEMP.
Print the USERS.TXT file, located in the main directory of the SourceSafe server installation. This will give you a list of current users that you can use later to add back into SourceSafe.
If you are using VSS 5 or older, run MKSS .
This executable can be found in the server copy of SourceSafe. If you are running SourceSafe 3.x, MKSS can be found in the ADMIN or WINNT directory. If you are running Visual SourceSafe 4.0, MKSS can be found in either the WIN or WIN32 directory. For example: MKSS C:\SSTEMP.
If you are using VSS 6, use the Admin tool to create a new database in the temporary folder
Run DDCONV . This executable can be found in the server copy of SourceSafe. If you are running Visual SourceSafe 4.0, DDCONV is located in either the WIN or WIN32 directory. For example: DDCONV C:\SSTEMP
If you are running SourceSafe 3.04 or later, skip to the next step, otherwise, reset the serial numbers by doing the following:
– Run SERIALIZ -s .
– Repeat this step for each serial number.
Copy the UM.DAT file from the temporary directory to the SourceSafe data directory. Rename or Delete the RIGHTS.DAT and STATUS.DAT files in the SourceSafe data directory.
If you are running Visual SourceSafe 4.0, download the latest version of Analyze from the Microsoft Web site at http://www.microsoft.com/ssafesupport and run ANALYZE.EXE with the -F switch. If you have Visual SourceSafe 5.0 or higher, you can run the Analyze in the Win32 subdirectory with the -F parameter.
Finally, with the administrator program, add all the users back into the system, using the USERS.TXT printout that you made in step 3. If you get “Access denied…” or “…directory
Me Enjoying 🙂