When I was tried to restore the database but the restore of database is failed and showing the following error message.
ERROR MESSAGE:
TITLE: Microsoft SQL Server Management StudioAfter Clicking the show details button It shows the bellow message,
------------------------------ Restore of database 'ShoppingZone' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks) ------------------------------
ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: File "ShoppingZone" cannot be restored over the existing "C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQL\DATA\ShoppingZone.mdf". Reissue the RESTORE statement using WITH REPLACE to overwrite pre-existing files, or WITH MOVE to identify an alternate location. (Microsoft.SqlServer.SmoExtended) For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=16.100.46437.65+(SMO-master-A)&LinkId=20476 ------------------------------
BUTTONS: OK
------------------------------
Restore of database 'ShoppingZone' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)SOLUTION:
------------------------------
Program Location:
at Microsoft.SqlServer.Management.RelationalEngineTasks.RestoreDatabaseTaskFormComponent.PerformTask(ITaskExecutionContext context)
at Microsoft.SqlServer.Management.RelationalEngineTasks.RestoreDatabaseTaskFormComponent.Perform(ITaskExecutionContext context)
at Microsoft.SqlServer.Management.TaskForms.TaskExecutionManager.ExecuteTaskSequence(ISfcScriptCollector collector)
===================================
System.Data.SqlClient.SqlError: File "ShoppingZone" cannot be restored over the existing "C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQL\DATA\ShoppingZone.mdf". Reissue the RESTORE statement using WITH REPLACE to overwrite pre-existing files, or WITH MOVE to identify an alternate location. (Microsoft.SqlServer.SmoExtended)
------------------------------
For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=16.100.46437.65+(SMO-master-A)&LinkId=20476
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Smo.RestorePlan.Execute()
at Microsoft.SqlServer.Management.RelationalEngineTasks.RestoreDatabaseTaskFormComponent.PerformTask(ITaskExecutionContext context)
Go to the following location:
"C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQL\DATA\"
Search for the database.mdf file and change the database name.
Right-click on the "Databases" node in the Object Explorer and select "Restore Database..."
In the "General" section, select the source file. You can choose to restore from a disk.
Click the "OK" button to start the restore process.
Post your comments / questions
Recent Article
- How to create custom 404 error page in Django?
- Requested setting INSTALLED_APPS, but settings are not configured. You must either define..
- ValueError:All arrays must be of the same length - Python
- Check hostname requires server hostname - SOLVED
- How to restrict access to the page Access only for logged user in Django
- Migration admin.0001_initial is applied before its dependency admin.0001_initial on database default
- Add or change a related_name argument to the definition for 'auth.User.groups' or 'DriverUser.groups'. -Django ERROR
- Addition of two numbers in django python
Related Article