I'm trying to create a backup file of a database in SQL 2005. When I try to execute the backup operation I get an error saying "cannot access this file, it is in use by another process". Any advice on what I have to do to get this working?

Thanks!

link|improve this question

56% accept rate
Please post actual error codes and messages; what happens when you run BACKUP DATABASE [yourdatabase] TO DISK='C:\temporarybackup.bak' WITH COPY_ONLY ? – adaptr Oct 18 '11 at 15:59
feedback

2 Answers

Are you able to put the database in single-user mode? Try to back it up that way as a test.

link|improve this answer
feedback

Any chance you have another program running against that database, for example Visual Studio, or have log file open in notepad or something?

link|improve this answer
I don't believe so. I have a ColdFusion app that reads from the database - nothing that writes to it. – user66827 Oct 15 '11 at 1:10
I know I've seen this, just can't remember exactly what I did to resolve it...did you check to ensure that you're backing up to a file backup device, and not to the database itself? I think that's how it happened to me, I hadn't added a file device and properly set it as destination for the backup. – jmsmcfrlnd Oct 15 '11 at 3:20
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.