Restoring orphaned Fortress Database files

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

Moderator: SourceGear

Post Reply
Nidonocu
Posts: 8
Joined: Sun Jan 13, 2008 8:21 am

Restoring orphaned Fortress Database files

Post by Nidonocu » Thu Aug 14, 2008 3:28 am

While upgrading to SQL Server 2008 Express, I suffered a number of problems which resulted in me having to uninstall SQL and reinstall it from scratch. Once this was done though, I'm not sure how to reintegrate my Fortress database back in to the main installation.

My previous install and Fortress database files are safe and sound at: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

The new installation and the new master databases and so on are at: C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA

Since this is express edition, I currently don't have management studio available (its not released yet for express edition). How can I restore the database?
Nidonocu C:\>

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Restoring orphaned Fortress Database files

Post by Beth » Thu Aug 14, 2008 8:58 am

You might want to check out the SQL command line.
With that, you should be able to run a typical restore command such as:

Code: Select all

RESTORE DATABASE sgvault
FROM DISK = 'C:\somepath\sgvault.bak'
WITH MOVE 'sgvault' to 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DAT\sgvault.mdf',
     MOVE 'sgvault_log' to 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DAT\sgvault_log.ldf'  
You would also need to restore the sgmaster database and sgdragnet databases in the same manner.
Beth Kieler
SourceGear Technical Support

Nidonocu
Posts: 8
Joined: Sun Jan 13, 2008 8:21 am

Re: Restoring orphaned Fortress Database files

Post by Nidonocu » Sun Aug 17, 2008 5:31 am

Thanks for the help, however, since it was mdf and ldf files I needed to restore from, using the RESTORE command wouldn't work. I was not aware of this command line utility though and further searching allowed me to use the Method One listed here to import my existing database files.

Thanks all the same. :)
Nidonocu C:\>

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Restoring orphaned Fortress Database files

Post by Beth » Mon Aug 18, 2008 9:26 am

Ohhhh, ok. Then there should be an attach command. Here's a MSDN article that should help: How to: Attach a Database File to SQL Server Express
Beth Kieler
SourceGear Technical Support

Post Reply