The Vault Server could not establish a connection ...

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

Moderator: SourceGear

Post Reply
BenM
Posts: 10
Joined: Fri Dec 21, 2007 12:12 am
Location: Australia

The Vault Server could not establish a connection ...

Post by BenM » Fri Dec 21, 2007 12:36 am

Hi all. I'm currently stuck with a Vault Error, any assistance would be much appreciated.

Background: (possibly unrelated?)
I used the admin tool (http://myserver/vaultservice/admin/) to do a backup of my local vault database, so that I could place it on our company's server.

I'm trialling Vault locally as a better branching/merging alternative to our corporate VSS, and with the whole company going on holidays for the next couple of weeks I didn't want to lose it all.

Symptoms/Troubleshooting
Some time later I've opened Vault, and I get the message:
The Vault Server could not establish a connection to the database. Please check the server's log for detailed information. (FailDBConn)

The admin tool (web page) reports:
Object reference not set to an instance of an object.

The first thing I did, after I failed to open the [sgvault] table with the SQL manager express software, was to restart the SQL service. This temporarily 'fixed' it (I was able to log in to vault without error), and then it failed again and provided the FailDBConn error thereafter, including after subsequent SQL restarts.

I've read the kb at:
http://support.sourcegear.com/viewtopic.php?p=2450

and the feedback I can provide is that the IIS interfaces are all still working as advertised, however the log file is reporting a fault accessing [sgvault]. The intriguing part of this though is that I now appear to be able to open that database using the SQL manager tool.

I'm stumped.

A copy of my log is attached (machine & network names have been changed).

[edited to add: Vault 4.0.6 (15954), MSSQL Server 2005 Express Edition SP2 2005.90.3042.0]
Attachments
sgvault.log.txt
log file.
(73.53 KiB) Downloaded 182 times

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

Post by lbauer » Fri Dec 21, 2007 9:06 am

Are Vault and the SQL Server database on the same machine? or have you moved the database to another machine?

The Vault installer creates a SQL Server database user that Vault uses to communicate with the database. If you're using Windows Authentication for SQL Server, by default, Vault uses the machine/aspnet account or Network Service (Win 2003). In your case, the Vault Server is using MYPC0000\ASPNET to communicate with the database.

If Vault and the database are on the same machine, check to see if there is a logon in SQL Server for MYPC0000\ASPNET and that the account has the role of dbowner.
Last edited by lbauer on Thu Dec 27, 2007 4:19 pm, edited 1 time in total.
Linda Bauer
SourceGear
Technical Support Manager

BenM
Posts: 10
Joined: Fri Dec 21, 2007 12:12 am
Location: Australia

Post by BenM » Sat Dec 22, 2007 10:20 pm

Thanks muchly, as SQL and Vault are on the machine I'll have a look into the user account issue.

BenM
Posts: 10
Joined: Fri Dec 21, 2007 12:12 am
Location: Australia

Post by BenM » Sun Jan 06, 2008 5:54 pm

Just as a follow-up, changing the database permission for the sgvault user to dbowner fixed it. In addition, it was also helpful to change the database to multi_user, as it was set to single_user (helpful for running the db tools etc). Perhaps something got changed after the backup.

Whatever the cause, hopefully this helps if others have a similar error.

Post Reply