FailDBConn error after database restore

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

Moderator: SourceGear

Post Reply
pshoey
Posts: 3
Joined: Fri Sep 16, 2005 7:58 am

FailDBConn error after database restore

Post by pshoey » Fri Sep 16, 2005 8:01 am

After a disk failure, I have restored backups of the vault db but I am not able to login in either the admin tool or the client. I have uninstalled and reinstalled vault server, but I get the same result.

The server log shows the following lines:

----9/16/2005 7:56:23 AM --()-- Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----9/16/2005 7:56:23 AM --()-- Vault Failed to establish a connection to the database.
----9/16/2005 7:56:23 AM --()-- Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----9/16/2005 7:56:23 AM --()-- Vault Failed to establish a connection to the database.
----9/16/2005 7:56:23 AM --()-- The session information was not removed from the database. Please check sgvault.dbo.tblsessions within SQL Server. There may be orphaned sessions stored within the database. Error: FailDBConn

Please advise.

Regards

Peter Shoebridge

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Fri Sep 16, 2005 9:12 am

You may need to delete and recreate the sgvaultuser login and database user in MS SQL Server. The password should match the password for the Vault Admin.

The sgvaultuser database login / user must be dropped from the restored database before running the grantdbaccess.

If Vault was installed using SQL Server authentication mode, run this query, substituting the Vault Admin password for 'VAULTS_ADMIN_PWD.
Code:

Code: Select all

USE [master] 
IF ( NOT EXISTS (SELECT sid FROM syslogins WHERE name = 'sgvaultuser') ) 
EXEC sp_addlogin N'sgvaultuser', N'VAULTS_ADMIN_PWD', N'sgvault' 
GO-- next access should be granted in the vault database 
USE [sgvault] 
EXEC sp_grantdbaccess N'sgvaultuser' 
EXEC sp_addrolemember N'db_owner', N'sgvaultuser' 
GO  
Linda Bauer
SourceGear
Technical Support Manager

pshoey
Posts: 3
Joined: Fri Sep 16, 2005 7:58 am

Post by pshoey » Fri Sep 16, 2005 9:28 am

I deleted the sgvaultuser and ran the sql you posted above, but I still have the same problem.

----9/16/2005 9:24:47 AM peter--c-24-8-191-225.hsd1.co.comcast.net(24.8.191.225)--SSL Enabled Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----9/16/2005 9:24:47 AM peter--c-24-8-191-225.hsd1.co.comcast.net(24.8.191.225)--SSL Enabled Vault Failed to establish a connection to the database.
----9/16/2005 9:26:13 AM admin--c-24-8-191-225.hsd1.co.comcast.net(24.8.191.225)--SSL Enabled Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----9/16/2005 9:26:13 AM admin--c-24-8-191-225.hsd1.co.comcast.net(24.8.191.225)--SSL Enabled Vault Failed to establish a connection to the database.

Please help!!

Thanks

Peter

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Fri Sep 16, 2005 9:50 am

Email me at Linda at SourceGear.com and we'll try a workaround.
Linda Bauer
SourceGear
Technical Support Manager

pshoey
Posts: 3
Joined: Fri Sep 16, 2005 7:58 am

Post by pshoey » Fri Sep 16, 2005 1:32 pm

I sent you email, I really need to get this sorted out before the weekend.

Help!!

Peter

superic

Post by superic » Mon Sep 19, 2005 11:58 am

I had a similar (or the same) problem after restoring the Vault database on a different server with a different installation of Vault. I found that running the Vault Server install exe again and selecting Repair fixed the db connetion error. The Repair method found my existing Vault database and asked me if I wanted to keep it -- which I said yes and everything ran as expected. It was totally painless once you figured out how to fix it :-)

Eric

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Mon Sep 19, 2005 12:10 pm

Pshoey had tried uninstalling and reinstalling without success. On his final reinstall, he also deleted all references to the web service from IIS admin. After that reinstall, Vault started working again, though it's not clear why previous reinstalls didn't work. :?
Linda Bauer
SourceGear
Technical Support Manager

Post Reply