views:

270

answers:

1

Our VSS database appears to be horribly out of shape. I've been trying to archive and run "analyze" and keep getting "Access to file [filename] is denied. The file may be read-only, may be in use, or you may not have permission to write to the file. Correct this problem and run analyze again." No one is logged into SourceSafe (including myself) and I'm running the analyze utility from the VS command prompt as follows:

analyze -v -f -bbackuppath databasepath

I get similar errors if I try and create project archives from the ssadmin tool.

The database is on a network share, and we're running VSS 2005 v8.0.50727.42. I'd love to be able to do this, as it would be a first step in a move away from VSS.

Thanks in advance.

More Info Every time I run analyze, the file that spawns the access denied message changes. It's almost as if running analyze unlocks that file so that the next time I get through to the next one.

+1  A: 

I had this issue with our VSS database as well when we tried to most recently analyze and repair.

We did a few things to get it working.

  1. Turned off the network share, apparently we still had users accessing the share that we couldn't see, this helped most of the time.
  2. Otherwise we copied the repository locally, then ran analyze on it from there.

Neither solution is ideal, but we were in a critical situation and it was the only way we got it to work.

Mitchel Sellers
After you copied it locally and ran analyze, did you then remove the original on the network share and copy the "fixed" version back up?
AJ
Yes, that is exactly what we did.
Mitchel Sellers