2

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!

Mat
  • 1,536
  • 1
  • 17
  • 21
user66827
  • 215
  • 2
  • 3
  • 9
  • 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 Answers3

0

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

Jay
  • 1
  • 1
0

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

qxotk
  • 1,434
  • 2
  • 15
  • 26
  • 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 01: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. – qxotk Oct 15 '11 at 03:20
0

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

user66827
  • 215
  • 2
  • 3
  • 9