SQL Authentication broken after Database Move

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
shenderson
Posts: 14
Joined: Wed Jun 23, 2004 9:36 am
Contact:

SQL Authentication broken after Database Move

Post by shenderson » Mon Apr 18, 2005 9:09 am

We are using Vault 2.0.6. Before upgrading to the latest version of Vault, we decided to move our database to a new server. When we moved the database and changed the server name on the connection string in the web.config for the VaultService, we are unable to get the server to connect using SQL authentication. We ran traces on the server and there is no communication with the server. I think we narrowed down the problem to the use of the encrypted password on the connection string.

In this article:
http://support.sourcegear.com/viewtopic ... web+config
It states that you must use the original password that was encrypted in the install routine for the old sgvaultuser that is recreated in the new database. I think we made a mistake by copying the password in its encrypted format into the new login.

My question is this:
Is there something that the vault database expects in the new login that requires you to use the same password even though you can change them in SQL and the web.config?

Is there a way to reinitialize vault to not use encrypted passwords?

Also, we were able to connect to the new database using Windows authentication, but we would prefer not to do it this way.

Thanks,

Shane
_________________________
Shane Henderson, MCAD
Technical Architect
Match.com
shane.henderson@match.com

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

Post by jclausius » Mon Apr 18, 2005 9:22 am

If you've moved the database, you will need to create a new sgvaultuser SQL Login - using the same password.

Once the sgvaultuser has been created, you will need to synchronize this user with the sgvaultuser found in the existing sgvault database (assuming it wasn't deleted before the move). This can be done with sp_change_users_login 'Auto_Fix', 'sgvaultuser'.

That is all that is required. If the passwords are incorrect you have two options:

1) Install the new version of Vault. The installation routine will encrypt the password and update SQL Server' sgvaultuser with the correct password.

2) Use PASSWORD=plain_text_password in the connect string in web.config. If you see PWD=encrypted_string, this value is configured by the installation routine, and requires an ecrypted string.

HTH
Jeff Clausius
SourceGear

shenderson
Posts: 14
Joined: Wed Jun 23, 2004 9:36 am
Contact:

Post by shenderson » Mon Apr 18, 2005 11:34 am

so can we change the encrypted string to a plain text password?
_________________________
Shane Henderson, MCAD
Technical Architect
Match.com
shane.henderson@match.com

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

Post by jclausius » Mon Apr 18, 2005 11:55 am

Yes, but you need to change the connect string to use PASSWORD instead of PWD.

PWD=encrypted_string

OR

PASSWORD=plain_text_string
Jeff Clausius
SourceGear

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

Post by jclausius » Mon Apr 25, 2005 8:13 pm

I guess I should clear this up a bit. You can use an encrypted string, but this is created by the installation routine. To re-create the encrypted password, uninstall and reinstall the Vault server ( make sure the keep the database ). This will create the correct connect string with the encrypted password in PWD.
Jeff Clausius
SourceGear

Locked