error message, database in use

I’m not able to find Bill’s full reply to the first query about “Error Message: Database already in use”. I found someone who quoted part of it but I want to find the entire message. I looked back a couple of months through Bill DeVille’s posts without result, and searched for variants of the error message.

Something so devastating (database won’t open) should be easier to find…


See if in your DT files there’s one called “locked”.

If so, trash it. Then try re-starting DT.

Thanks for that instant reply! but, messed-up person that I am, I can’t remember where those DBs are stored; can’t find it in DTPro help; and Spotlight has tied up my old machine so much I have turned it off long ago so searching the Finder is problematic…

Try your Home Folder: Application Support: DevonThink Pro (or whichever version of DT you use). With DT Pro, it’s also possible to store databases in project files, within the Documents folder.

PS: As a Spotlight replacement, try EasyFind, available from the DT site. (free)

“Database in use” often means that something was wrong with your computer (an OS problem, a memory error) and the database was locked to prevent damage to the database or the internal backup files.

Sometimes something as simple as a restart clears up the memory or OS problem. Sometimes it’s advisable to do some maintenance on the operating system/disk directory.

Start with Disk Utility and run the permissions repair and verify disk routines. If the verify disk routine returns an error, restart while holding down the Shift key. The boot process will take longer than usual, as some diagnostic and repair routines are running. When bootup is complete, restart normally.

Launch DT Pro. If the same error message is displayed, try hitting the Ignore button. If your database comes up, run Tools > Verify & Repair to check integrity.

If the database doesn’t open, quit DT Pro. We will go through two options, one very simple, the other a bit more complex.

[1] Locate your database. If you are using DT Pro or DT Pro Office, the odds are that it’s in your Documents folder. It will have the suffix “.dtBase” in it’s file name. (My instructions would be quite different for a DEVONthink Persona database.)

Select the DT Pro package file, which has a shell icon. Click on the Actions button in the Finder toolbar and select the option to show package contents.

Examine the folder contents. If you see at the top level a file with “lock” in the file name, delete it. Close the folder, whereupon it will revert to a database package file.[list=]

Double-click the package file to launch DT Pro and open the database. If it opens, run Tools > Verify & Repair. If all is well, run Tools > Backup & Optimize.

If that doesn’t work, move on to option 2:

[2] Locate the DT Pro database file as above. Assuming it’s in your Documents folder, move it to, e.g. the Desktop.

[2a] Now create a new folder in your Documents folder.

[2b] In your Desktop, locate the database package file and select it. Click on the Finder toolbar Actions button and select the option to show package contents.

[2c] In the resulting folder, if there’s a folder named “Files”, select, then copy (Option-drag) to the folder you created in your Documents folder.

[2d] Back to the open folder in your Desktop, select and open the folder named “Backup”, which is the most recent internal backup folder in your database. Select, then copy (Option-drag) all of the files inside “Backup” to the folder you just created in your Documents folder.

[2e] Select the folder to which you just dragged data. Press Command-I to open the Info panel. Rename the folder, preferably with the same name as your original database, making certain that the suffix “.dtBase” (without quotes, but case is important) is part of the file name.

[2f] Press Return and close the Info panel. The folder should now be a package file, with the name you just gave it. Double-click on it to open it under DT Pro.

[2g] As above, run Tools > Verify & Repair, etc.

Discussion of option 2: If all goes well, you will have a sound database, but will have lost all new content or modifications since the most recent internal backup.

If the new database is corrupt, you will have to use the next most recent internal backup folder inside your original database, “Backup0”. Discard the bad database file in your Documents folder, create a new folder and repeat the steps in [2] above, this time using “Backup0” contents instead of “Backup” contents.

Suggestion: Although I haven’t had to resort to Tools > Restore Backup in more than two years, I like to have current backups just in case.

When I’ve been making changes in my database, the next time I want to take a break I invoke Scripts > Export > Backup Archive. This takes only seconds. When I return from break, the database is ready to go. It has been verified, optimized and has current internal and external backups. The external backup archive, stored at a location of your choosing, is the smallest possible compressed and dated version of your database. Just in case a hard drive were to die, or my laptop were to be stolen, I like to store a copy of the external archive on an external device.

Hope this helps.