Snapshot dropped, spares files remain...

  • Application folks have a process by which a job drops and creates database snapshots. In one particular, odd case, a snapshot has been dropped, but the sparse files from those snapshots remain on disk. The snapshot does not appear in sys.databases, the sparse files are not in sys.master_files... but I can't delete them without getting the "in use" error... I'm assuming that's SQL Server using them, but perhaps I'm wrong.

    Anyone seen anything like this before? any lightweight way to tell if it's SQL Server locking those files?

  • NJ-DBA (11/10/2011)


    Application folks have a process by which a job drops and creates database snapshots. In one particular, odd case, a snapshot has been dropped, but the sparse files from those snapshots remain on disk. The snapshot does not appear in sys.databases, the sparse files are not in sys.master_files... but I can't delete them without getting the "in use" error... I'm assuming that's SQL Server using them, but perhaps I'm wrong.

    Anyone seen anything like this before? any lightweight way to tell if it's SQL Server locking those files?

    Well, stopping the service did enable me to delete the files, so it was SQL Server locking them... not sure what was going on... would still be interested if anyone has seen something similar.

  • We had this issue over the weekend on a SQL 2008 R2 instance. Does anyone know why this happens? Is there a patch for this?

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply