Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2007
    Posts
    3

    Unanswered: physical files can not be deleted after database detached

    I have detached the database via sp_detach_db in a job, (I was trying to use a job to detach the database, then make copies of the mdf file, then attach the databases as different copies, somehow the job failed due to file locked) I tried to delete the physical files, but they were still locked. I tried several times, two of them I was able to delete the mdf files, but not the ldf file. The other one both mdf file and ldf file can not be deleted. I was not able to see the database via Management studio.

    Can anyone help?

    Thanks

  2. #2
    Join Date
    Nov 2003
    Location
    London
    Posts
    169
    Stop the sql server service (if you can), then try and delete the files

  3. #3
    Join Date
    Jun 2007
    Posts
    3
    after stopping sql service, still can not delete the log files. could it be a network security setup?

  4. #4
    Join Date
    Nov 2003
    Location
    London
    Posts
    169
    do you have local admin rights on the server?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •