Restore of Vault Database

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

Moderator: SourceGear

Post Reply
PeteMiller
Posts: 2
Joined: Wed Sep 28, 2005 2:48 pm

Restore of Vault Database

Post by PeteMiller » Wed Sep 28, 2005 3:00 pm

One of our developers accidently deleted a repository. Unfortunatly, it was not until several days later that he noticed that he needed the repository.

I have restored a database copy from the night before the deletion and its sitting on my sql server. Is there a way to point my Vault Client to point to the other database so he can check to see whats missing?

If I can't do that, my other option would be to rename the current vault database and drop in the restored version. Then reverse the process when complete.

Any other suggestions?

Pete Miller
Sr. Database Administrator

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

Post by lbauer » Wed Sep 28, 2005 9:12 pm

Do you have both databases on the same instance of SQL Server? Have you renamed one of them?

The Vault Client doesn't connect directly to a database; it's the Vault Server that actually makes the connection. You might be able to modify the connection string in the Vault Service web.config file to point to the backup.

Another possibility is to temporarily restore the database to another machine and install Vault on that machine, pointing it to the database.
Linda Bauer
SourceGear
Technical Support Manager

PeteMiller
Posts: 2
Joined: Wed Sep 28, 2005 2:48 pm

Post by PeteMiller » Thu Sep 29, 2005 10:07 am

Well, I currently have two databases on 1 instance of SQL Server. I was really asking where I could change the database name just so we can check the repository to find what's missing. I'll try that web.config file.

Thanks,
Pete

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

Post by lbauer » Thu Sep 29, 2005 10:58 am

The database name is in Web.config in the app setting section at the end of the config file. Edit the connect string which is not commented out:

<appSettings>
<add key="ConfigPath" value="C:\Inetpub\wwwroot\VaultService\Vault.config" />
<!-- SQLSERVERMODE-add key="ConnectString" value="Application Name='SourceGear Vault Server'; Connection Reset='true'; Server=server; Database=sgvault; User ID=UUUUUUUU; pwd=PPPPPPPP" />SQLSERVERMODE- -->
<add key="ConnectString" value="Application Name='SourceGear Vault Server'; Connection Reset='true'; Server=server; Database=sgvault; Integrated Security='true'" />
</appSettings>
Linda Bauer
SourceGear
Technical Support Manager

Post Reply