My Oracle Support Banner

Error: 'System.Data.SqlClient.SqlError: MDF File Cannot Be Overwritten. It Is in Use by Database' When Restoring a Database in SQL Server (Doc ID 2247514.1)

Last updated on FEBRUARY 26, 2020

Applies to:

Primavera P6 Professional Project Management - Version and later
Primavera P6 Enterprise Project Portfolio Management - Version and later
Information in this document applies to any platform.


When attempting to restore data from <DATABASE_NAME1> using the .bak file into a new empty <DATABASE_NAME2>, the following error occurs:


System.Data.SqlClient.SqlError: The file '<DIR>\<DATABASE_NAME1>.mdf' cannot be overwritten. It is being used by database '<DATABASE_NAME1>'.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.