We are using vault client/server version 4.1.1 (18060). The repository was originally created several years ago in a 3.x version. One of our developers was having trouble checking in a file this afternoon and soon after none of the developers were able to access the repository.
We currently have 2 repositories. The second repository works without a problem.
I've looked at many forum messages trying to find assistance but I haven't been able to figure out the root cause of the issue.
In the Vault Server log we began seeing the following error:
System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK__ufngettreestruct__1E9A6CE7'. Cannot insert duplicate key in object 'dbo.@resulttree'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
I've looked at all of the forum posts that I I could find relating to this error and have not been able to find a solution.
When I try to open something from source control via Visual studio I am presented with the repositories. If I select the first repository, I get an error message stating 'You have no rights to view any items in this repository'. I get the same message if I attempt to login using the Vault Client. I have profiled SQL server several times to try and track down the error and it seems to originally have been originating from the call following call: exec dbo.spgettreestructure @repid=2,@txid=27581. When I try to execute this in SSMS, I get the same violation of the primary key constraint. I have narrowed the @txid parameter down to the exact id that the sproc no longer runs. It works fine with any @txid < 26004. If I try @txid =< 26004, i get the primary key violation.
I keep transaction log backups of all of my databases and tried to restore sgvault to several different states - a couple from earlier today and several into the end of last week. Regardless of the restore time I am experiencing problem.
A couple of other details:
The problem is occuring on 7 different developer machines
I have tried restarting IIS, SQL and restoring a previous version of database
I have cleared the local cache in the vault client and reinstalled the client
At this point I'm stuck on how to proceed in resolving this issue. Right now my developers can only work offline and it will become increasingly difficult to get things done without the ability to access the repository.
Please let me know how I should proceed. Thanks for your help.
can't access vault repository - Violation of constraint
Moderator: SourceGear
Re: can't access vault repository - Violation of constraint
I'd like to take a closer look at this. Could you send an email to support at sourcegear.com (attn: Beth) with a link to this forum thread?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support