Network Management
Database restore failed The WITH MOVE clause can be used to relocate one or more files. (Microsoft.SqlServer.Smo)
You are trying to restore Orion DB backup to SQL server . When restoring a database in Microsoft SQL Server Management Studio, you receive the following dialog box similar to something below: Restore failed for Server ‘myserver’. (Microsoft SqlServer.SmoExtended) System.Data.SqlClient.SqlError: File ‘C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\mydatabase.mdf’ is claimed by ‘mydatabase_FG1′(3) and ‘mydatabase'(1). The WITH MOVE clause can be used to relocate one
First published date
Last published date
Overview
You are trying to restore Orion DB backup to SQL server.
When restoring a database in Microsoft SQL Server Management Studio, you receive the following dialog box similar to the following:
Restore failed for Server ‘myserver’. (Microsoft SqlServer.SmoExtended)
System.Data.SqlClient.SqlError: File ‘C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\mydatabase.mdf’ is claimed by ‘mydatabase_FG1′(3) and ‘mydatabase'(1). The WITH MOVE clause can be used to relocate one or more files. (Microsoft.SqlServer.Smo)
Product section
Resolution
Note: Restoring DB is out of SolarWinds scope of support. Please consult your DBA before making/following any changes within the DB as the provided steps are only for demo/test lab.
On the Restore Database – mydatabase window inside of Microsoft SQL Server Management Studio:
- Click on the Options page.
- Underneath Restore the database files as: label, make sure all of the “Restore As” values are unique. In this case, rename each *.mdf file to its “Original File Name” column value.
Before
After
Disclaimer: Please note, any content posted here is provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software or documentation that you purchased from SolarWinds, and the information set forth herein may come from third parties. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment. You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any.