Vault server cannot access DB after restoring backup

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

Moderator: SourceGear

Post Reply
aprole
Posts: 25
Joined: Wed Sep 29, 2010 12:24 pm

Vault server cannot access DB after restoring backup

Post by aprole » Thu Sep 27, 2012 10:20 am

Hello,

There was a hard drive on our vault server machine, and luckily we had a backup of the database. So we installed the same version of vault server on a new machine, then after loading the database backup, this message is displayed on the vault admin web client at the login screen:

Login Failed: The Vault Server could not establish a connection to the database. Please check the server's log for detailed information. (FailDBConn)

We have tried restarting the machine, resetting IIS server, and resetting the database, but we are still getting this message. Please advise.

Alex Prole

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

Re: Vault server cannot access DB after restoring backup

Post by lbauer » Thu Sep 27, 2012 10:28 am

When you install Vault server and you have an existing database, it is always best to have the database in SQL Server before you install Vault Server. The Vault Server installer will upgrade the database, create the proper associations between the SQL Database and the Vault Server, and create the necessary permissions and database user.

Right now, there are no associations between the restored database and Vault Server.

So I would recommend uninstalling Vault Server, leaving the databases (sgvault and sgmaster) when prompted, then reinstalling.
Linda Bauer
SourceGear
Technical Support Manager

aprole
Posts: 25
Joined: Wed Sep 29, 2010 12:24 pm

Re: Vault server cannot access DB after restoring backup

Post by aprole » Thu Sep 27, 2012 11:00 am

Reinstalling the vault server worked, thanks! There is now an issue with the shadow folders service though... They are not being generated on the server, and when trying to access the shadow folders menu in the web admin client for the repository, this error is displayed:

The Shadow Folder Service has a configuration error. A valid Cache Path was not specified, and the Shadow Folder Service was unable to create the cache in the default location. Please specify a valid "shadowfolder_cachepath" in the appSettings of the Shadow Folder Service's web.config file.

This is vault server 5.0.4.18845 on a windows server 2003 machine if that helps.

Thanks,
Alex

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

Re: Vault server cannot access DB after restoring backup

Post by lbauer » Thu Sep 27, 2012 11:11 am

See if this helps:

http://support.sourcegear.com/viewtopic ... 13&t=11576

You may need to re-set your shadow folders, since that info is in the Shadowfolder web.config file, and Vault probably created a new one on this machine.
Linda Bauer
SourceGear
Technical Support Manager

aprole
Posts: 25
Joined: Wed Sep 29, 2010 12:24 pm

Re: Vault server cannot access DB after restoring backup

Post by aprole » Thu Sep 27, 2012 12:21 pm

Thank you for the link. After following the instructions I was able to access the Shadow Folders page and add them. However, they are not getting populated. The folders were already created and had some stuff in them before we added them to the shadow folders list... does that matter? Also we have "Optimize for speed" for all of the folders, which is the default option.

Thanks,
Alex

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

Re: Vault server cannot access DB after restoring backup

Post by lbauer » Fri Sep 28, 2012 8:08 am

We'd like to see a copy of the Vault Server log and the Vault Shadow folder log. The Server log is called sgvault.log and is in %windir%\temp\sgvault on the server machine. The shadow folder log is in SGshadowfolder.

Send the logs zipped up to support at sourcegear.com, Attn: Linda. Please include a link to this forum post.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply