Submit a ticketCall us

Have You Auto Renewed? If not, you're missing out.
The SolarWinds Renewal Program comes with a host of benefits including the most recent product updates, 24/7 technical support, virtual instructor-led training and more. Experience all of this with the convenience of Auto Renewal, and never worry about missing any of these great benefits. Learn More.

Home > Success Center > Network Performance Monitor (NPM) > Database Restore Over another DB / DB backup Restore Error Restore failed for server Microsoft.SqlServer.SmoExtended

Database Restore Over another DB / DB backup Restore Error Restore failed for server Microsoft.SqlServer.SmoExtended

Updated April 8th, 2016

Overview

Restore failed for server.(Microsoft.SqlServer.SmoExtended).
System.Data.SqlClient.SqlError: The file 
'C:\ProgramFiles\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\test1_MSCRM.mdf' 
cannot be overwritten. It is being used by database 'test1_MSCRM'. (Microsoft.SqlServer.Smo)

 

You have following error while restoring the DB 

This Error can bee seen if you are trying to restore the DB backup to another DB Or Restoring the DB backup to another DB 

 

dberr.PNG

 

sqlrest.PNG

Environment

  • NPM all versions 
  • SQL Server 2005 and all versions 

Cause 

You cannot restore overwrite the files. While restoring you created the new DB with different name but forgot to change the file name for .mdf and .ldf which was taken while Backup.

Resolution

  1. Click on Options.
  2. At right side, Under ‘Restore the database file as:‘ section. The first column represent the original file names of file type .mdf and .ldf and right most column represents the file name which you want to provide and restore the DB file as.
    • dbasdf.PNG

 

  1. Click on the browse button and scroll all the way to see the file name and change it to your preferred name(test2_MSCRM.mdf and test2_MSCRM.ldf). (Whatever you want to name according to the DB name )
    • dfasdfasdf.PNG
  2. After changing the restore database file name as, my DB restore succeeded.

 

 

Last modified

Tags

Classifications

Public