When restoring a full DB backup to a different SQL Server 2005 Express server, I receive the following message:
The file or filegroup "mydatabase_log" cannot be selected for this operation. RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3219)
I've checked the restore options to make sure that filenames are valid locations for it to restore to.
Any suggestions?
When the database size and performance requirements make a full database backup impractical, you can create a file backup instead. A file backup contains all the data in one or more files (or filegroups). For more information about file backups, see Full File Backups (SQL Server) and Differential Backups (SQL Server).
Error Message is very clear about the cause of restore failure. Since we detached the database, the mdf and ldf files are still available at the location when the database was created. It’s good that SQL is not over writing the files by itself unless we specify explicitly.
Privacy policy. Thank you. This topic describes how to restore files and filegroups in SQL Server by using SQL Server Management Studio or Transact-SQL. The system administrator restoring the files and filegroups must be the only person currently using the database to be restored. RESTORE is not allowed in an explicit or implicit transaction.
If someone is using the database, the restore operation will fail. To resolve the issue, you will need to disconnect the active users. You can do so, by following any of these methods: NOTE: Before disconnecting the users, use SQL stored procedure ‘sp_who’ to check all users currently using the db.
To restore files and filegroups. After you connect to the appropriate instance of the SQL Server Database Engine, in Object Explorer, click the server name to expand the server tree. Expand Databases. Depending on the database, either select a user database or expand System Databases, and then select a system database.
I fixed it by using Restore Database instead of Restore Files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With