3.1 Vault upgrade database failure - Cannot insert duplicate

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
CareBear
Posts: 14
Joined: Mon May 10, 2004 6:21 am
Location: Kristiansand, Norway

3.1 Vault upgrade database failure - Cannot insert duplicate

Post by CareBear » Mon Aug 01, 2005 4:32 am

I have a similar problems that this guy had:

http://support.sourcegear.com/viewtopic.php?t=4380


The installation log

Upgrading the existing Vault database...
This may take a long time. Do NOT stop this process!
Checking the installed database version...OK
Upgrading SourceGear Vault database schema...OK
Checking Vault share information...OK
Checking Vault folder entry information...Violation of PRIMARY KEY constraint 'PK__#folderentries__48306636'. Cannot insert duplicate key in object '#folderentries______________________________________________________________________________________________________0000000DB0CC'.
Violation of PRIMARY KEY constraint 'PK__#folderentries__48306636'. Cannot insert duplicate key in object '#folderentries______________________________________________________________________________________________________0000000DB0CC'.
Violation of PRIMARY KEY constraint 'PK__#folderentries__48306636'. Cannot insert duplicate key in object '#folderentries______________________________________________________________________________________________________0000000DB0CC'.
Violation of PRIMARY KEY constraint 'PK__#tblskeleton__0074BF59'. Cannot insert duplicate key in object '#tblskeleton________________________________________________________________________________________________________0000000DB0CC'.
Violation of PRIMARY KEY constraint 'pk_tblfolderentries'. Cannot insert duplicate key in object 'tblfolderentries'.
Working on repository: 2
The statement has been terminated.
The statement has been terminated.
The statement has been terminated.
The statement has been terminated.
The statement has been terminated.
Check Folder Entries has completed
Vault Upgrade Setup is exiting due to a failure or cancellation. Error Code = 453


We have previously had some nasty issues with our repository that we've previously gotten support on which we we're able to fix. We ran some SQL Scripts that we got from SourceGear, and perhaps this included an fix or something that made this upgrade fail?

I'm now restoring the 3.0.7 database and continue to run on that, but please advise me to how I can successfully upgrade.


Regards,
Sondre

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Aug 01, 2005 7:05 am

Sondre:

Can you please contact me by email. (Click on the link below).

Thanks.
Jeff Clausius
SourceGear

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Tue Aug 02, 2005 6:15 am

Just so we have the info close at hand, at one time, did we manually change some items in the database?

In any case, here's what we'll need to do to get to the bottom of this:
1) Create a copy of the database so we don't interfere with other Vault users.

2) Run two scripts we'll provide which will check the Vault database for consistencies.

3) From these two scripts, we'll next run a third script (but for a repository at a time), until we can identify the repository which is having the problem. From this we'll have to check for other consistency issues.

Once these have been identified, we can apply the changes to your live server, and the upgrade should be ready to go.

Just contact me (link below) or "support at sourcegear dot com" by email, so we can send you the scripts.
Jeff Clausius
SourceGear

Locked