Access 2019 Unable to Compact or back up DBs

%3CLINGO-SUB%20id%3D%22lingo-sub-1906836%22%20slang%3D%22en-US%22%3EAccess%202019%20Unable%20to%20Compact%20or%20back%20up%20DBs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1906836%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3EHelp.%20I've%20recently%20installed%20a%20standalone%20copy%20of%20access.%26nbsp%3B%20I%20have%20some%20experience%20of%20using%20earlier%20versions.%26nbsp%3B%20Whenever%20I%20try%20to%20either%20compact%20or%20back-up%20a%20db%2C%20an%20error%20message%20tells%20me%20that%20my%20file%20is%20in%20use.%26nbsp%3B%20I%20have%20eliminated%20the%20possibility%20of%20old%20lock%20files%20and%20have%20ensured%20the%20folders%20I'm%20using%20all%20have%20full%20permissions.%26nbsp%3B%20I've%20also%20tried%20'clearing%20the%20air'%20via%20a%20blank%20db%20as%20advised%20elsewhere.%26nbsp%3B%20Whether%20I%20attempt%20to%20initiate%20this%20process%20from'Database%20Tools%20compact%20%26amp%3B%20Repair'%20or%20via%20'Home%2FInfo'%2C%20the%20results%20are%20always%20'Could%20not%20Use%20-%20file%20nnn%20already%20in%20use'.%26nbsp%3B%20I%20realise%20that%20I%20can%20set%20'Compact%20on%20Close'%20but%20this%20is%20not%20an%20answer%20and%20is%20no%20help%20at%20all%20for%20Backing%20up.%26nbsp%3B%26nbsp%3B%20Am%20I%20doing%20something%20obviously%20wrong%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1906836%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1920100%22%20slang%3D%22en-US%22%3ERe%3A%20Access%202019%20Unable%20to%20Compact%20or%20back%20up%20DBs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1920100%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F874669%22%20target%3D%22_blank%22%3E%40jadedalan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3EHow%20do%20you%20open%20it%2C%20just%20double-click%3F%3COL%3E%3CLI%3EIf%20yes%2C%20try%20press%20and%20hold%20Shift%20key%2C%20then%20double-click%2C%20do%20not%20release%20your%20finger%20until%20application%20opens.%26nbsp%3B%3C%2FLI%3E%3CLI%3Epress%20and%20hold%20Shift%20key%20again%2C%26nbsp%3Buse%20compact%20%26amp%3B%20repair%3C%2FLI%3E%3CLI%3Euse%20backup%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3CLI%3Echeck%20if%20its%20Shared%20or%20Exclusive%2C%20make%20it%20shared%26nbsp%3B%3CUL%3E%3CLI%3EFile%5Coptions%5Cclient%20settings%5Cadvanced%2C%20see%20open%20default%20mode%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EI%20hope%20that%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1925105%22%20slang%3D%22en-US%22%3ERe%3A%20Access%202019%20Unable%20to%20Compact%20or%20back%20up%20DBs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1925105%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F126074%22%20target%3D%22_blank%22%3E%40George%20Hepworth%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20George%3C%2FP%3E%3CP%3EIt%20happens%20with%20all%20dbs.%26nbsp%3B%20Ones%20carried%20forward%20from%20earlier%20version%20of%20access%2C%20new-ish%20ones%20and%20a%20couple%20I've%20created%20just%20to%20see%20if%20I%20can%20make%20compact%20and%20back%20up%20work.%26nbsp%3B%20I%20have%20db%20access%20set%20to%20'shared'.%26nbsp%3B%20If%20I%20try%20and%20start%20a%20compact%20whilst%20the%20db%20is%20open%20via%20the%20'Compact%20and%20repair%20etc'%20icon%20on%20the%20'Database%20Tools'%20toolbar%20then%20I%20immediately%20get%20an%20error.%26nbsp%3B%20The%20same%20happens%20If%20I%20close%20the%20db%20and%20start%20a%20dialogue%20via%20'file%2Finfo%2Fopen%20file%20location'.%26nbsp%3B%20As%20soon%20as%20I%20select%20a%20db%20-%20the%20same%20error%20-%20'see%20below'%26nbsp%3B%20Everything%20I've%20said%20also%20applies%20to%20back%20ups.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1925107%22%20slang%3D%22en-US%22%3ERe%3A%20Access%202019%20Unable%20to%20Compact%20or%20back%20up%20DBs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1925107%22%20slang%3D%22en-US%22%3Ealso%20all%20my%20work%20is%20local%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1925159%22%20slang%3D%22en-US%22%3ERe%3A%20Access%202019%20Unable%20to%20Compact%20or%20back%20up%20DBs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1925159%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F874669%22%20target%3D%22_blank%22%3E%40jadedalan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat's%20puzzling%20indeed.%20I%20can%20think%20of%20nothing%20relevant%20that%20would%20be%20impeding%20the%20C%26amp%3BR.%3C%2FP%3E%3CP%3EI%20will%20send%20out%20for%20the%26nbsp%3BCavalry...%26nbsp%3B%3C%2FP%3E%3CP%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1925201%22%20slang%3D%22en-US%22%3ERe%3A%20Access%202019%20Unable%20to%20Compact%20or%20back%20up%20DBs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1925201%22%20slang%3D%22en-US%22%3EIt's%20not%20beyond%20the%20bounds%20of%20possibility%20that%20I'm%20doing%20something%20dumb%2C%20but%20I%20hope%20not%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi

Help. I've recently installed a standalone copy of access.  I have some experience of using earlier versions.  Whenever I try to either compact or back-up a db, an error message tells me that my file is in use.  I have eliminated the possibility of old lock files and have ensured the folders I'm using all have full permissions.  I've also tried 'clearing the air' via a blank db as advised elsewhere.  Whether I attempt to initiate this process from'Database Tools compact & Repair' or via 'Home/Info', the results are always 'Could not Use - file nnn already in use'.  I realise that I can set 'Compact on Close' but this is not an answer and is no help at all for Backing up.   Am I doing something obviously wrong?

18 Replies
Highlighted

@jadedalan 

  • How do you open it, just double-click?
    1. If yes, try press and hold Shift key, then double-click, do not release your finger until application opens. 
    2. press and hold Shift key again, use compact & repair
    3. use backup
  • check if its Shared or Exclusive, make it shared 
    • File\options\client settings\advanced, see open default mode

I hope that helps.

Highlighted

@jadedalan 
Is this a problem with only one accdb, or does it happen with any accdb you open?

Does any automation code run at startup?

If not, does this happen if you open the accdb and immediately try to run compact & repair before doing ANYTHING else?

Are you trying to compact & repair an accdb in a folder on your local computer, or in a network share?

Highlighted

@George Hepworth 

Hi George

It happens with all dbs.  Ones carried forward from earlier version of access, new-ish ones and a couple I've created just to see if I can make compact and back up work.  I have db access set to 'shared'.  If I try and start a compact whilst the db is open via the 'Compact and repair etc' icon on the 'Database Tools' toolbar then I immediately get an error.  The same happens If I close the db and start a dialogue via 'file/info/open file location'.  As soon as I select a db - the same error - 'see below'  Everything I've said also applies to back ups. 

Highlighted
also all my work is local
Highlighted

@jadedalan 

That's puzzling indeed. I can think of nothing relevant that would be impeding the C&R.

I will send out for the Cavalry... 

.

Highlighted
It's not beyond the bounds of possibility that I'm doing something dumb, but I hope not
Highlighted
I've already mentioned this, but it may be worth repeating - I only bought this 'standalone' version (2019) of Access about a week ago and it hasn't worked from day one
Highlighted

@jadedalan 

Perhaps you haven't registered the license for it yet?

Perhaps you should try a repair or re-install, since it's that new.

Highlighted

@jadedalan 

I don't know if we covered the issue of Trusted Locations?

TrustedLocations2020.png

Highlighted

I've seen this when the database was in a SharePoint library. Is that the case here? Even placing the file locally was not enough, I had to copy the file to another PC to unlock it to be able to work with it properly, then copy it back.

Highlighted

@jadedalan 

I notice that the screen shot you provided starts with a D:\ drive, although the rest is blacked out. Is D:\ a second hard drive in your computer? Or maybe a mapped drive? Maybe another location such as a DVD or CD Drive? I don't imagine that's the case, but to be thorough, let's identify the location to be certain.

Does this problem persist if you copy an accdb to the C:\ drive as well?

Highlighted

@George Hepworth 

Thanks for all your suggestions.  So - one at a time.

  • I'm not using share point
  • My d drive is a standard HDD which I use as a data drive.  I copied an access db to a folder on the C drive and made it a trusted location
  • I appear to be licensed. I downloaded this from Microsoft.  The only option I can find is 'change your license', which when I proceed, asks me if I want a different one.  I presume from that, that I am.  I also recall vaguely that it was part of the initial activation process
  • Repair behaves the same way as compact, understandably I guess

I'm left with the option to re-install, which I will when I get to grips with how to.  Via the downloaded install exe I guess.

 

I've tried, both with the DB open (in shared mode) and with another db open, via the file/info/enter path.  I'm presuming either of these should work (and neither do).  Is this a correct assumption or is there a preferred route?

 

Thanks Again

 

Alan

Highlighted

@jadedalan 

It sounds like you've covered all bases. Thanks for the recap.

I am definitely grasping at straws, it seems. But one last thing to try. Have you started Access as an Administrator?

 runasadmin.png

Highlighted

@George Hepworth 

Good thought and one I hadn't had - unfortunately, nada.  I'll reinstall.  at least I can copy dbs via Windows explorer.  I can't lose the thought that's it's something to do with running a standalone version, but then again, I can't be the only one.

 

Alan

Highlighted
Alan, I have occasionally had the "in use" issue attempting to compact and repair when one or more objects were open. Closing all open objects, then attempting to compact worked for me in those situations.
Highlighted

@jadedalan 

Actually, the fact that this is the first time I've encountered an unexplained problem like this does suggest it's not related to having a stand-alone version of Access. Otherwise, we'd see more reports like it.

 

I think we covered this, but if you press and hold down the Enter Key while opening any accdb, and then IMMEDIATELY do the compact & repair before doing anything else, does that not work?

Highlighted

Have you rebooted your machine?

Is this a Microsoft Store (App) version of Access?

Have you tried a full Online repair?

 

If you go the route of uninstalling and reinstalling, be sure to use Option 2 from https://support.microsoft.com/en-us/office/uninstall-office-from-a-pc-9dd49b83-264a-477a-8fcc-2fdf5d... to perform the uninstall.

Highlighted

@jadedalan 

FWIW, something just came up in another forum that might have some bearing on this problem.

The issue arises when a file is copied under Windows " ... and the file is not open, Windows places a full lock on the file during the copy.

 

If the file is an Access database, and someone tries to open it in Access either directly or via a linked table during the time it’s being copied, Access behaves as if there were read only. Non-updateable errors get triggered.

 

That seems okay, but a side-effect is that the database seems to stay locked by Windows. So even after the Windows file copy is over, there’s still a lock that prevents Access from editing the data. Closing Access makes no difference and there’s no laccdb or ldb lock file.

 

We’ve overcome the file lock by rebooting the server hosting the database but that’s a pretty drastic remedy. We had a situation where the database was sitting on an external hard disk from the PC, and unplugging the USB cable and plugging it back in seemed to cause Windows to break the lock, and was much better than rebooting it."

 

Another very long shot, but it might be worth considering as well. Assuming you haven't solved the problem otherwise.