Upgrade to 4.0.5.15922 fails...

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

Moderator: SourceGear

Post Reply
DBLogic
Posts: 11
Joined: Tue Jun 05, 2007 8:40 am

Upgrade to 4.0.5.15922 fails...

Post by DBLogic » Wed Nov 14, 2007 2:16 pm

Just tried upgrading to 4.0.5 from 4.0.4 and during the SQL update it terminates as follows -

(Extract from install log) -

Executing commands in master_upgrade.sql
Read master_upgrade.sql from our resources.
Upgrading SourceGear master database schema...OK
DoSqlCommandsFromFile completed successfully.
Executing commands in vault_upgrade.sql
Read vault_upgrade.sql from our resources.
Upgrading SourceGear source control database schema...OK
DoSqlCommandsFromFile completed successfully.
Executing commands in master_sp.sql
Read master_sp.sql from our resources.
Upgrading SourceGear master stored procedures...OK
DoSqlCommandsFromFile completed successfully.
Executing commands in vault_sp.sql
Read vault_sp.sql from our resources.
Upgrading SourceGear source control stored procedures...Error executing SQL command in vault_sp.sql-------
CREATE PROCEDURE [dbo].[spgetobjectversionsincludingtrunk]( @objid [bigint], @version [bigint]) WITH ENCRYPTION
AS
BEGIN

-- Copyright 2002-2006 SourceGear LLC. --
-- All rights reserved. See Vault License Agreement --
-- for more information. --

DECLARE @errval [int],
@objid_param [bigint],
@version_param [bigint],
@keepgoing [int]

SET NOCOUNT ON

SELECT @objid_param = @objid,
@version_param = @version,
@keepgoing = 1

DECLARE @tmptable TABLE
(
version [bigint],
objverid [bigint]
)

WHILE (@keepgoing = 1)
BEGIN
INSERT INTO @tmptable (version, objverid) (
SELECT v.objversion, v.objverid FROM dbo.tblfsobjectversions v WITH(ROWLOCK) WHERE v.objid = @objid_param AND v.objversion <= @version_param)
IF (EXISTS(SELECT version from @tmptable where version = 1))
SET @keepgoing = 0
ELSE
BEGIN
SELECT @objid_param=o.baselineobjid, @version=v.objversion FROM tblfsobjectorigins o
INNER JOIN tblfsobjectversions v ON v.objverid = o.baselineobjverid
WHERE o.objid = @objid_param

IF (@@ROWCOUNT = 0)
SET @keepgoing = 0
END
END

SELECT * from @tmptable ORDER BY version ASC

SET NOCOUNT OFF
RETURN @errval
END
--------
Database 'sgvault' is already open and can only have one user at a time.
Vault Setup is exiting due to a failure or cancellation. Error Code = -1280
Database 'sgvault' is already open and can only have one user at a time.
Vault Setup is exiting due to a failure or cancellation. Error Code = -1280ExitCode on exit: -1280

I've tried restoring the databases and trying again with the same error. Also attempting to reinstall 4.0.4 also fails with the same error.

As the previous version is uninstalled I'm now left without any way of getting back to where I was before starting the update. :cry:
Please help urgently

Dave

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Wed Nov 14, 2007 3:01 pm

When you were trying to go back to 4.0.4, was that with a restored database? Had you restored the previous version of both sgvault and sgmaster?

DBLogic
Posts: 11
Joined: Tue Jun 05, 2007 8:40 am

Post by DBLogic » Wed Nov 14, 2007 3:05 pm

Hi Beth

Yes I did restore both databases so they should have been back to 4.0.4 but the installation appeared to still try to update them.

At the moment we are completely isolated from all of our source :cry:

Dave

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Wed Nov 14, 2007 3:42 pm

Can you send me an email at support at sourcegear.com? I will have a few things to send to you. Add (attn: Beth) and a link to this forum post.

DBLogic
Posts: 11
Joined: Tue Jun 05, 2007 8:40 am

Post by DBLogic » Wed Nov 14, 2007 4:00 pm

Email sent.

Many thanks
Dave

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Wed Nov 14, 2007 4:10 pm

I've replied. If you don't see an email from support with an attachment, check your email filters as our emails are sometimes filtered out.

DBLogic
Posts: 11
Joined: Tue Jun 05, 2007 8:40 am

Post by DBLogic » Thu Nov 15, 2007 9:23 am

Still having problems. Full email sent with log etc.

I would appreciate a quick response as we are still non operational :(

DBLogic
Posts: 11
Joined: Tue Jun 05, 2007 8:40 am

Post by DBLogic » Thu Nov 15, 2007 10:42 am

Latest Update: -

It appears that the failed 4.0.5 upgrade (or reinstall attempts) left a 4.0.5 DLL in the server bin folder with the 4.0.4 reinstall didn't clear. Switching this to a backup 4.0.4 version has allowed us back in :)

For reference. As the failed upgrade uninstalled 4.0.4 and reinstalling 4.0.4 using the same databases failed with the same error as above I had to delete both databases, perform a clean install of 4.0.4 , restore backups of the two databases and then IISReset. So far (1 hour in) we appear to be working OK.

Questions -

1. Should my method above be OK and not cause any possible future problems ?
2. How do I upgrade to 4.0.5 (my original problem!)?

Thanks
Dave

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Mon Nov 19, 2007 4:48 pm

I responded to the user offline. The user ran a test upgrade on another machine and it worked. User will try again on the production machine. We haven't yet identified what is different about the production machine.

Post Reply