Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Database restore failed becuse mdf cannot be overwritten. It is being used by another database

$
0
0

Hi, 

I have a two SQL 2012 databases in Development Environment as below:

1. LT_MSCRM (Main Development Database; Same database name is used across Testing and Live servers)

2. LTTEST_MSCRM (Just Created to practice something)

I have take the database back of LT_MSCRM from Testing server and want to restore it on LTTEST_MSCRM in Dev. Its failing because of the following error.

System.Data.SqlClient.SqlError: The file 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\LT_MSCRM.mdf' cannot be overwritten.  It is being used by database 'LT_MSCRM'. (Microsoft.SqlServer.SmoExtended)

Can anyone please suggest me any workaround.

Thanks in advance.


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>