Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have a SQL Server 2005 box running Windows Server 2003 R2 Std 64bit. We have two production databases residing on one partition (which is an iSCSI software target), that partition got apparently got corrupted and the databases are not working properly and pulling all kinds of consistency check errors.

We have created a new iSCSI target and introduced it to the SQL server as a new disk partition. we have good backups that we can use for restoration (Both native SQL backups and symantec Backup Exec backups).

The question is, how to restore these two databases to the new partition and make SQL server aware of the change?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

When you're restoring the database go to the Options and edit the Restore as field.

You can manually enter here where do you want data and log files to be (change the default location it gives you to the new disk partition).

The picture is from SQL express 2008R2 but it's the same for 2005

enter image description here

share|improve this answer
    
Thanks, now i'm getting this error when i try to run the restore from a SQL native .bak file: TITLE: ------------------------------ ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: The tail of the log for the database "XXXXX" has not been backed up. Use BACKUP LOG WITH NORECOVERY to backup the log if it contains work you do not want to lose. Use the WITH REPLACE or WITH STOPAT clause of the RESTORE statement to just overwrite the contents of the log. (Microsoft.SqlServer.Smo) –  Zero Subnet Oct 18 '12 at 15:34
    
seems that logs aren't backed up properly, you can try ticking the first option Overwrite existing database, or go back to General and on To a point in time select some time in the past when the log backup stops. You might have lost some data, depending what transactions were in the tail of the log –  Alen Oct 18 '12 at 15:42
    
Thanks, this worked. –  Zero Subnet Oct 19 '12 at 1:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.