简体   繁体   中英

Trying to restore SQL Server 2012 Express to 2014

I am having trouble restoring a database backup from my current host (SQL Server 2012 Express) to my new host (SQL Server 2014).

I am using MyLittleBackup and it is reporting the error below.

There seems to be duplicate MDF files in the script it runs.

Why are there duplicates and how can I fix it?

.Net SqlClient Data Provider

File 'C:\\Program Files\\Microsoft SQL Server\\MSSQL10_50.MSSQLSERVER\\MSSQL\\DATA\\rbkkipfb_xxx_data.mdf' is claimed by 'ftrow_Products and Brands'(3) and 'xxx_dat'(1). The WITH MOVE clause can be used to relocate one or more files. File 'C:\\Program Files\\Microsoft SQL Server\\MSSQL10_50.MSSQLSERVER\\MSSQL\\DATA\\rbkkipfb_xxx_data.mdf' is claimed by 'ftrow_ProductsAndBrands'(4) and 'xxx_dat'(1). The WITH MOVE clause can be used to relocate one or more files. RESTORE DATABASE is terminating abnormally.

USE [master] GO

ALTER DATABASE [rbkkipfb_xxx] SET SINGLE_USER WITH ROLLBACK IMMEDIATE GO

RESTORE DATABASE [rbkkipfb_xxx] FROM DISK=N'C:\\inetpub\\mylittlebackup\\data\\MLBUpload\\MSSQL\\rbkkipfb_xxx\\636124445992698861_xxx.bak' WITH RECOVERY , FILE=1 , REPLACE , MOVE N'ftrow_ProductsAndBrands' TO N'C:\\Program Files\\Microsoft SQL Server\\MSSQL10_50.MSSQLSERVER\\MSSQL\\DATA**rbkkipfb_xxx_data**.mdf' , MOVE N'ftrow_Products and Brands' TO N'C:\\Program Files\\Microsoft SQL Server\\MSSQL10_50.MSSQLSERVER\\MSSQL\\DATA**rbkkipfb_xxx_data**.mdf' , MOVE N'xxx_dat' TO N'C:\\Program Files\\Microsoft SQL Server\\MSSQL10_50.MSSQLSERVER\\MSSQL\\DATA**rbkkipfb_xxx_data**.mdf' , MOVE N'xxx_log' TO N'C:\\Program Files\\Microsoft SQL Server\\MSSQL10_50.MSSQLSERVER\\MSSQL\\DATA\\rbkkipfb_xxx_log.ldf' , NOUNLOAD, STATS = 10 GO

ALTER DATABASE [rbkkipfb_xxx] MODIFY FILE (NAME=N'ftrow_ProductsAndBrands', MAXSIZE=10485760KB ) GO

ALTER DATABASE [rbkkipfb_xxx] MODIFY FILE (NAME=N'xxx_log', MAXSIZE=10485760KB ) GO

ALTER DATABASE [rbkkipfb_xxx] SET MULTI_USER WITH ROLLBACK IMMEDIATE GO

Edit: I think this is due to full text indexes, can I restore without them?

I have had to restore databases with full-text, I don't know any way to NOT restore them.

You could try removing the indexes from the source database backup, doing another backup, and then doing your restore.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM