Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
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

3 Answers 3

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

share|improve this answer

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

share|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
up vote 0 down vote accepted

It turned out that this database wasn't being used anymore and I ended up reformatting.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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