none
Error restoring SQL 2000 db to SQL 2008 - The WITH MOVE clause can be used to relocate one or more files. (Microsoft.SqlServer.Smo)

    Question

  • Hi,

    While trying to restore a SQL 2000 db into SQL 2008, I get this error:

    ------------------------------

    Restore failed for Server 'S2B22347'.  (Microsoft.SqlServer.SmoExtended)

    ADDITIONAL INFORMATION:

    System.Data.SqlClient.SqlError: File 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Build51_Testing_db.mdf' is claimed by 'CCHRI_UAT_Tran'(3) and 'CCHRI_UAT_Data'(1). The WITH MOVE clause can be used to relocate one or more files. (Microsoft.SqlServer.Smo)

    ------------------------------

    The script looks something like this:

    RESTORE

     

    DATABASE [Build51_Testing_db] FROM DISK = N'C:\Shival\Build51_Testing_db_bkp' WITH FILE = 1, MOVE N'CCHRI_UAT_Data' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Build51_Testing_db.mdf', MOVE N'CCHRI_UAT_Tran' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Build51_Testing_db.mdf', MOVE N'CCHRI_UAT_Index' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Build51_Testing_db.mdf', MOVE N'CCHRI_UAT_Log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Build51_Testing_db.LDF', MOVE N'CCHRI_UAT_Log1' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Build51_Testing_db.LDF', NOUNLOAD, REPLACE, STATS = 10

    GO

    Please help me resolve this.

    Shival

    Wednesday, March 24, 2010 10:42 AM

Answers

All replies