Vault web service on machine A, SQL on machine B?

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

Moderator: SourceGear

Post Reply
ancap
Posts: 21
Joined: Fri Feb 20, 2004 12:36 pm

Vault web service on machine A, SQL on machine B?

Post by ancap » Sat Feb 28, 2004 5:14 pm

What we are trying to do is one machine a publicly exposed web server with Vault web service, and another non-public SQL server machine used for the repositories - typical tiering. It seems that despite initially assuming a SQL server on the same machine, Vault should be able to handle this. Indeed Vault's web.config has a 'ConnectString' property for the SQL server that would suggest this is configurable.

I've changed the ConnectString on a Vault 2.0 server to instead point to another SQL 2000 machine (with just sa login for now). Attempts to connect to Vault with the client, however, result in failed DB connection, log messages:

----2/28/2004 1:56:37 PM sgvaultsystem--()--
Vault Failed to establish a connection to the database.
----2/28/2004 1:56:37 PM sgvaultsystem--()--
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

I have verified that the log messages are actually different if I say point to a nonexistent server or use a bad userid or pwd. Therefore I assume initial login is succeeded, but maybe there is some query Vault is then performing that is causing it to reject and close the database.

Thanks for any ideas or suggestions on how to get the Vault database to be on a different machine than the Vault web service.

Aaron

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Sun Feb 29, 2004 4:08 pm

aaron:

imho, your setup should be the most common setup for vault, when access to the vault server is open to the internet.

what does your connect string look like? did you originally install vault using sql server authentication when both servers were on the same machine?

there are two options we can examine:

option 1) basically, you will have to set up a connection string using sql server authentication. using sql server mode authentication, the pwd attribute is encrypted. you will need to set up a sql login, grant dbo/public access to that login within the vault database, and encrypt the password...

OR

option 2) you can uninstall the vault server (keeping your database - DO NOT DROP OR DELETE THE DATABASE), detach / backup, move the database to the new server, and attach / restore. once complete, reinstall the vault server.

either method will work, but in most cases the option 2 is the easiest road to travel.

post back how you'd like to proceed.
Jeff Clausius
SourceGear

ancap
Posts: 21
Joined: Fri Feb 20, 2004 12:36 pm

Post by ancap » Wed Mar 03, 2004 9:14 pm

It's somewhat puzzling that just changing the connection string and restarting IIS didn't do the trick, but uninstall/reinstall and choosing a different SQL server at that point (your option 2) worked. Thanks for responding.

Aaron

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Mar 03, 2004 11:26 pm

aaron:

if you moved the database, you would have to do a couple of other things:

1) create a sql login for whatever was in the connect string ( by default sgvaultuser ).
2) assuming you used the login as the old server (sgvaultuser), you would then have to re-map the database user to the new sql login using sp_change_users_login.

re-installing takes care of these issues for you.
Jeff Clausius
SourceGear

Post Reply