Moving 5.1.2 to new enviornment

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

Moderator: SourceGear

Post Reply
akhan
Posts: 2
Joined: Wed Dec 26, 2012 11:07 am

Moving 5.1.2 to new enviornment

Post by akhan » Mon Jan 07, 2013 2:40 pm

I've seen topics on migration but want to confirm for my case.

We are using 5.1.2 and are testing prior to moving to a new environment. On our QA box we restored the sgvault and master databases then installed 5.1.2 standard. During the installation the databases were picked up and the installation was a success.

Now we are getting ready to do our actual migration to our new environment, is this above process the only way to move Vault server to a new environment? Meaning we must move the databases then install the application.

What we were hoping for is a way to have vault standard already installed and simply refresh database when we are ready. But I already tried that and my installation didn't pick up the refreshed database.

Thanks in advance

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

Re: Moving 5.1.2 to new enviornment

Post by lbauer » Mon Jan 07, 2013 4:26 pm

is this above process the only way to move Vault server to a new environment? Meaning we must move the databases then install the application.
A SQL database has a SQL user account from with the SQL Server it was originally attached to. So just restoring a backup to a new Vault server doesn't work, as that account ID is different in the new SQL Server.

You can use queries to change the account used by the Vault database in SQL Server:
http://support.sourcegear.com/viewtopic.php?t=924

But sometimes it's easier to reinstall, and let the installer handle the configuration details.
Linda Bauer
SourceGear
Technical Support Manager

akhan
Posts: 2
Joined: Wed Dec 26, 2012 11:07 am

Re: Moving 5.1.2 to new enviornment

Post by akhan » Tue Jan 08, 2013 1:35 pm

lbauer wrote:
is this above process the only way to move Vault server to a new environment? Meaning we must move the databases then install the application.
A SQL database has a SQL user account from with the SQL Server it was originally attached to. So just restoring a backup to a new Vault server doesn't work, as that account ID is different in the new SQL Server.

You can use queries to change the account used by the Vault database in SQL Server:
http://support.sourcegear.com/viewtopic.php?t=924

But sometimes it's easier to reinstall, and let the installer handle the configuration details.

Thank you for your help. I had a few questions:

We are moving from SQL Server 2005 to SQL Server 2008 and Windows Server 2003 to Windows Server 2008R2 SP2 Extended Edition 64 bit, do the changes in the platform make a difference in our attempt to only restore Vault by restoring the database only?

Additionally we do not know the password for the sgvault user so we cannot use the script provided but if we change the password for the sgvault user can we then use the scripts provided? also would we need to make changes anywhere in vault if we were to update the sgvault user password?

one last thing our new sql server is using both windows and sql server authentication. if we create a ASP.net process account what would we need to change in the vault installation to use this new account instead of the sql server authenticated account?

thank you again!!

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

Re: Moving 5.1.2 to new enviornment

Post by lbauer » Wed Jan 09, 2013 2:00 pm

do the changes in the platform make a difference in our attempt to only restore Vault by restoring the database only?
The version of SQL Server does not make a difference, just the fact that you are moving to a different SQL server.
we do not know the password for the sgvaultuser
When you install Vault using SQL Server authentication, the installer creates the sgvaultuser account in SQL Server and gives it the same password as the password you created for the Vault Admin account.

If you don't remember the previous Admin password, then I think you can change the sgvaultuser password and use the script. You will also need to change the sgvaultuser password in the Vault Service web.config file to match the password in SQL Server.

Look for this section in the web.config file:

Code: Select all

<!-- SQLSERVERMODE-add key="ConnectString" value="Application Name='SourceGear Vault Server'; Connection Reset='true'; Server=(local); Database=sgvault; User ID=UUUUUUUU; pwd=PPPPPPPP" />SQLSERVERMODE- -->
    <add key="ConnectString" value="Application Name='SourceGear Vault Server'; Connection Reset='true'; Server=(local); Database=sgvault; Integrated Security='true'" />   
The uncommented sections determine how Vault Service connects to the sgvault database.
The example above shows the server is using Windows authentication.

The Vault Server installer ecrypts the sgvaultuser password in the web.config file. But if you are manually creating sgvaultuser, you can change "pwd" to "password" in the web. Also comment out Windows auth and uncomment SQL Server auth.
Example:

Code: Select all

<add key="ConnectString" value="Application Name='SourceGear Vault Server'; Connection Reset='true'; Server=(local); Database=sgvault; User ID=sgvaultuser password=somepassword" />

If you want to use Windows authentication and a custom domain account, then you need to add that account to SQL Server with the script, and uncomment these lines in the web.config:

Code: Select all

   <!-- IMPERSONATEPROCESS-identity impersonate="true" userName="AAAAAAAA" password="BBBBBBBB"/>IMPERSONATEPROCESS- -->
Change it so it looks something like this:
<identity impersonate="true" userName="mydomain\username" password="mypwd"/>
If your sgvault database is in place, you can uninstall, leaving the database when prompted, then reinstall, and the installer will detect the database and make these configuration changes for you.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply