Database move fails

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

Moderator: SourceGear

Post Reply
gmagana
Posts: 145
Joined: Wed Feb 18, 2004 10:51 am
Location: Santa Ana, CA, USA

Database move fails

Post by gmagana » Fri Oct 29, 2004 9:02 am

As part of my backup testing I am trying to restore the database from a database backup to a different server and have it work. I am not having success. Note that the target's machine's initial Vault installation worked, so I know that at least it worked with the default database...

Here is what I have done:

- I have read the KB article on moving the sgvault database ( http://support.sourcegear.com/viewtopic ... g+database )

1) I restore the database on the target machine. I make sure that the database is restored successfully.

2) On the target machine I make sure there is no sgvaultuser login (per the KB doc)

3) I am running on SQL authenthication, so I run the appropriate codes as outlined on the KB article. I get no error messages.

4) The target machine has both the IIS and SQL server running on it, so I should not need to change the connectstring property from that of the original Vault installation, so I make sure I can login from osql providing the parameters that are in the connectstring property. It works. This is the connect string:

Code: Select all

<add key="ConnectString" value="Application Name='SourceGear Vault Server'; Connection Reset='false'; Server=(local); Database=sgvault; User ID=sgvaultuser; pwd=VAULTS_ADMIN_PWD" />
5) I proceed to try to log in through the Vault client or the admin tool, and both fail ("Failed to connect to DB"). Here is the sgvault log:

Code: Select all

----10/29/2004 7:54:41 AM    sgvaultsystem--()--
	System Started
	Version 2.0.6.2219
	Cache Level = 1
	DataBase Buffer Size = 256
	LogFile Path = C:\WINNT\Temp\sgvault
	Log Level = Quiet
	Archive Log = Weekly
	ReverseDNS Lookup = True
	Maximum HTTP Request Length = 102400
	Overwrite Log on Startup = False
	Session Timeout = 4320
	SGVault Working Directory = C:\WINNT\Temp
----10/29/2004 7:54:41 AM    sgvaultsystem--()--
	Vault Failed to establish a connection to the database.
----10/29/2004 7:54:41 AM    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
----10/29/2004 7:54:42 AM    --localhost(127.0.0.1)--SSL Disabled
	Vault Failed to establish a connection to the database.
----10/29/2004 7:54:42 AM    gmagana--localhost(127.0.0.1)--SSL Disabled
	Vault Failed to establish a connection to the database.
What's strange is that I have never connected to this database successfully, so why would there be orphaned sessions? I'm thinking the orphaned sessions message might be bogus since Vault cannot even connect to the database, so how could it know there are orphaned records?

What can I try now?
gabriel magana-gonzalez

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

Post by jclausius » Fri Oct 29, 2004 9:53 am

gabriel magana-gonzalez:

Were you using SQL Authentication before the move? If so, do you have the original web.config?

When using SQL authentication, the password is encrypted by the server's installation routine.

You posted:

Code: Select all

pwd=VAULTS_ADMIN_PWD
Is VAULTS_ADMIN_PWD the encrypted password created by the Vault installer, or is it plain text?

A) If it is encrypted, the sgvaultuser you create / sync up (sp_change_users_login) / and grant permissions must have the same password as the old SQL Server sgvaultuser's password.

B) If you are using a plain text password, do you want web.config to store use that plain text password? Or would you want the Vault installer to create a new password in encrypted form?
Jeff Clausius
SourceGear

Post Reply