I created a backup file from one instance and I was going to restore the file in a new Instance, which is SQL server R2. And It didn't work, I got this error.
This is the error I am getting when I try to back up a database:
System.Data.SqlClient.SqlError: The operating system returned the error '32(The process cannot access the file because it is being used by another process.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\dboff.mdf'. (Microsoft.SqlServer.Smo)