remove the 'in use' property from the .mdf and .ldf files without needing to stop the mssql service?

  • I have placed the database files for my DB in a Dropbox folder. Now the .mdf and .ldf files arent synced because they are 'in use'.

    Since its on a work machine I dont have admin access to stop/start the MSSQL service.

    I've already tried detaching the DB, which I thought would remove the 'file in use' issue, but without luck.

    I also cant move the files after detaching the DB, but also doesnt work.

    How can I remove the 'in use' property from the .mdf and .ldf files without needing to stop the mssql service?

  • What is the full message of the error you receive? Do you get an error in the event log?

    This seems like it is potentially a permissions issue on the files. More detail on the errors in the event log will help determine that.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • If the files are detached, they should not be in use. You can grab filemon (http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx) and check that.

    I would lean towards permissions as well.

  • It sounds like you're trying to make backups of your DB by using a simple file copy and paste. I wouldn't recommend you rely on that kind of backup unless this is a database that spends almost all of its time detached. Instead, use the BACKUP command (http://msdn.microsoft.com/en-US/library/ms186865.aspx) and make that backup go to your DropBox folder. You can create a job that does this every day.

    /* Anything is possible but is it worth it? */

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

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