Upgrade to 4.0.5.15922 fails...
Moderator: SourceGear
Upgrade to 4.0.5.15922 fails...
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.
Please help urgently
Dave
(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.
Please help urgently
Dave
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
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