Can not Login

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
PatrickM
Posts: 6
Joined: Thu Mar 11, 2004 8:55 pm
Location: Haarlem - The Netherlands
Contact:

Can not Login

Post by PatrickM » Fri Jun 04, 2004 4:07 am

Hi,

I'm trying to login into the vault client with Username: PatrickM
but the client refuses and spits out errormessage:
A database error has occured (FailDBReader)

The sgvault log produces the info as shown below:
----6/4/2004 11:55:15 AM patrickm--EDPWS2003(172.20.10.103)--SSL Disabled
Violation of PRIMARY KEY constraint 'PK__#tbltreerevfolde__350D45EA'. Cannot insert duplicate key in object '#tbltreerevfolders__________________________________________________________________________________________________00010000002C'.
----6/4/2004 11:55:15 AM patrickm--EDPWS2003(172.20.10.103)--SSL Disabled
GetCheckOutListChanges returned: FailDBReader


Any clues what to do next?

P.S. Login into the admin or sourcesafe import tool succeeds! (with username: PatrickM)
Patrick Molijn
Sr. Software Engineer
JF Hillebrand IT

PatrickM
Posts: 6
Joined: Thu Mar 11, 2004 8:55 pm
Location: Haarlem - The Netherlands
Contact:

Post by PatrickM » Fri Jun 04, 2004 5:25 am

Probing the queries with SQL Profiler provided some info.
declare @P1 bit
set @P1=1
exec dbo.spgetlockedfilechangeswithsecurity @txid = 81513, @userid = 2, @repid = 1, @sessionid = N'gpc5o3vvys3gn355edeel445', @lastsecuritychange = 'Jun 30 1850 10:00:00:000PM', @refreshlist = @P1 output
select @P1

Output:
Server: Msg 2627, Level 14, State 1, Procedure spgetlockedfilechangeswithsecurity, Line 104
Violation of PRIMARY KEY constraint 'PK__#tbltreerevfolde__47B734F5'. Cannot insert duplicate key in object '#tbltreerevfolders__________________________________________________________________________________________________000100000028'.
The statement has been terminated.

Further investigation shows that the function:
ufngettreerevisionfolders returns a table which contains duplicate rows on the combination
treelevel, fullpathhash, parentpathhash, objID
This (seems / is) the primary key of the #tbltreerevfolders table.

Hope this helps a little bit to quickly solve the problem.
(If duplicates allowed then the spgetlockedfilechangeswithsecurity should elminate those (eg. group by or distinct) or primary key constraint not correct)
Patrick Molijn
Sr. Software Engineer
JF Hillebrand IT

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

Post by jclausius » Fri Jun 04, 2004 7:12 am

What version of Vault server are you using?
Jeff Clausius
SourceGear

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

Post by jclausius » Fri Jun 04, 2004 7:17 am

If you are using Vault 2.0.3, can you send me (privately - hit the email button below) the results (in CSV format) of this query:


SELECT trf.treelevel, trf.fullpathhash, trf.parentpathhash, v.objid, v.objverid FROM dbo.ufngettreerevisionfolders(1, 81513) trf
INNER JOIN tblfsobjectversions v ON (v.objverid = trf.objverid)
Jeff Clausius
SourceGear

PatrickM
Posts: 6
Joined: Thu Mar 11, 2004 8:55 pm
Location: Haarlem - The Netherlands
Contact:

Post by PatrickM » Fri Jun 04, 2004 9:23 am

Sorry,

I'm using Vault 2.0.3 and ran the query. Emailed the output to Jeff.
Hope a solution will come soon
Patrick Molijn
Sr. Software Engineer
JF Hillebrand IT

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

Post by jclausius » Fri Jun 04, 2004 10:22 am

OK. I have everything. Give me some time to analyze what is going on here.
Jeff Clausius
SourceGear

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

UPDATE -

Post by jclausius » Sat Jun 05, 2004 7:39 am

We solved this offline.

It seems one of the tables used as a shortcut to build the repository tree had a duplicate folder row. Removing the row resolved the problem.
Jeff Clausius
SourceGear

Post Reply