Submit a ticketCall us

Get a crash course on Network Monitoring delivered right to your inbox
This free 7-day email course provides a primer to the philosophy, theory, and fundamental concepts involved in IT monitoring. Lessons will explain not only how to perform various monitoring tasks, but why and when you should use them. Sign up now.

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
14:59, 13 Jan 2017

Tags

Classifications

Public