Unable to restore from .sgvbak file in 3.18

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

Moderator: SourceGear

Post Reply
_jesse
Posts: 3
Joined: Sat Jun 03, 2006 10:06 pm

Unable to restore from .sgvbak file in 3.18

Post by _jesse » Sat Jun 03, 2006 10:11 pm

I am trying to move my repository from SQL Server 2000 to SQL Server 2005. First, I used the Vault Admin Tool to do create a backup. It created c:\windows\system32\SourceGear Backup.sgvbak.

Then I uninstalled sourcegear, and reinstalled it, creating the repository database in SQL 2005 this time.

I launched the admin tool, clicked on the backup tab, and... my backup wasn't listed. So I tried moving the backup file to C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup, but still it didn't show up in the Admin Tool.

So I tried using SQL Server Management Studio to manually restore from the .sgvbak file, but it said, "The backup set holds a backup of a database other tahn the existing 'sgvault' database. RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3154)"

What am I doing wrong?

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

Post by jclausius » Sun Jun 04, 2006 10:08 am

The steps are out of order. The backup should be restored BEFORE installing the server

- Uninstall your existing Vault Server and choose to remove your EMPTY database on this installation.

- Next, follow these steps - Moving the Vault Database except for the Uninstall in Step B-1. Since you have already uninstalled, all that is required is the installation.
Jeff Clausius
SourceGear

_jesse
Posts: 3
Joined: Sat Jun 03, 2006 10:06 pm

Could not find stored procedure 'spchangepassword'

Post by _jesse » Sun Jun 04, 2006 10:47 am

Thanks, Jeff -- I'm getting closer, now, but still not quite back up and running.

I uninstalled Vault Server and deleted the empty db.

Then I tried to use SQL Server Mgmt Studio to restore from my .sgvbak file, but I kept getting error messages.

So I used DTS to simply copy the database directly from the SQL 2000 server to the SQL 2005 server.

Then I reinstalled Vault Server, but here's what I got:

Checking for IIS Version...Requesting Vault Admin user password...OK
Connecting to the SQL Server...OK
Verifying the SQL Server requirements...OK
Checking for an existing Vault database...Found.
Asking for database's fate...Keep existing.
Upgrading the existing Vault database...
This may take a long time. Do NOT stop this process!
Checking the installed database version...OK
Grant database access to PT1\ASPNET...OK
Could not find stored procedure 'spchangepassword'.
Vault Setup is exiting due to a failure or cancellation. Error Code = -1280


What now?

Thanks!

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

Post by jclausius » Mon Jun 05, 2006 7:24 am

DTS will not work for transferring a sgvault database.

My guess is the restore is failing because of backup paths or some missing option within the restore command.

The easiest thing to do is to take a look at using Detach, move the sgvault*.* files to the SQL Server 2005 machine, and attach. Let me know if you need assistance on detach/attach.

If you still want to go with the Restore command, you'll need to show me the command you are using to restore the database, along with which destination directory for the restore.
Jeff Clausius
SourceGear

_jesse
Posts: 3
Joined: Sat Jun 03, 2006 10:06 pm

Detach / reattach worked

Post by _jesse » Mon Jun 05, 2006 1:48 pm

Thanks again, Jeff. I detached, moved the datafiles, then reattached in SQL 2005, and everything seems to be working correctly.

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

Post by jclausius » Mon Jun 05, 2006 1:58 pm

I'm glad it is running.

For clarity's sake, you still need to run the installation after attaching the database. This will make sure the schema against the database is up to date.
Jeff Clausius
SourceGear

Post Reply