delete of .mdf files

  • Hello,

    Can anyone tell me way I can delete .mdf files even when they are attached to a running SQL Server or MSDE?

  • Ok, I have got to know, why would you want to, or need to?  Just curious what circumstances would prompt this necessity.

    James.

  • I have a situation that a database has missing from a system running MSDE. I dont know if it was an acident or not. Never the less I was convinced that a .mdf file could not be deleted when the sql service was rinning, so I tried some tests and, surprise, I could delete several databases in that MSDE system. Not convinced I tried other tests even in machines running SQL server and I got the same results.

    Is it a configuration? Is a bug? Is it normal?

    Miguel

  • That would be possible particularly in MSDE and SQL Express as they close the database when there a no active connections. In SQL Server if the database is set to Auto Close, then you'll also be able to to delete the files.

    --------------------
    Colt 45 - the original point and click interface

  • Phil is correct, be careful what you delete, just because it's not being used now doesn't mean there isn't an appliction out there depending on it.  It's a real bummer to find out the hard way that a database was still needed after you have deleted it.  Always keep a backup some place, just in case.

    James.

Viewing 5 posts - 1 through 4 (of 4 total)

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