Cannot copy some of the mdf and ldf file

  • Hi,

    There is a user database which has 1 mdf, 6 ndf and 4 ldf files. I have taken the database offline. I cannot move all the files. For 3 ndf files I am getting the error "Access is denied. Make sure that disk is not full or write proctected and the file is not currently in use."

    Any idea?

    I have admin access to that server.

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

  • Process explorer can help you identifying who is locking the files.

    Probably it's SQL Server (sqlservr.exe).

    -- Gianluca Sartori

  • Sumanta Roy (1/26/2012)


    Hi,

    There is a user database which has 1 mdf, 6 ndf and 4 ldf files. I have taken the database offline. I cannot move all the files. For 3 ndf files I am getting the error "Access is denied. Make sure that disk is not full or write proctected and the file is not currently in use."

    Any idea?

    I have admin access to that server.

    admin access does not guarantee you have access to the files, although you could gain access by taking ownership. If the NTFS ACLs have been stripped and only the SQL Server service account or a small subset of users has permission then you won't be able to access them. So, go to the folder and\or file properties and check the NTFS ACLs to see who or what has access.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Thanks Perry. It worked fine now.

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

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

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