Database frequently corrupting. Can't solve. Please help. (1 Viewer)

MS1234

Registered User.
Local time
Yesterday, 21:36
Joined
Nov 28, 2016
Messages
17
Hi,
Would very much appreciate people's input here as I am struggling to solve this and it is causing our users a lot of headaches. I am at my wit's end.

I have an ACCDB 2016 Access database hosted on a single 2012 R2 server, split SQL back end, MS Office 2016. Each user connects to the server via remote desktop and a login script copies the ACCDB from a central location to their local documents which is where they access it.

The users are randomly getting corruption on the database. The errors and behaviour include:
  • Error messages about can't find macro, can't find VBA code when clicking on something (as if the macro and VBA coding have vanished underneath)
  • Error message Cannot open database '', expression may not result in name of a macro or event procedure, detected database in an inconsistent state, cannot be opened because VBA project cannot be read, unrecognized database format etc
  • User using the database then leaves it idle for a while, comes back, can't click anything (one or more of the errors above), then crashes
  • User using the database and the above happens as they are actively using it (although the idle one above is more common than this one)

I have tried the following without success:
  • Create new blank database, import everything into it (this seemed to work well for a while and then the corruption started again)
  • Decompile / recompile / compact/repair
  • Removing references, adding references
  • Creating ACCDE
  • Repairing Office
  • Ensuring Windows and Office up to date via Windows Update

More info:
  • I have been developing the master ACCDB for the last 10 months under my adminatrative remote desktop on the server, I have never once encountered the corruption the users are getting
  • The users each have a restricted remote desktop on the server, locked down by GPO (can't access internet, can only open office docs, etc)
  • I have a test login with the same restrictions as the users that I have used the database in for hours and days at a time without encountering the error (ie it's very hard to replicate, random)
  • The users will get the corruption on average two or three times per day - no pattern to when, which screen/report, which user, sometimes not at all - all "random"
  • I managed to copy one of the user's database when they got the error and the VBA code in the database was inaccessible (in fact it looked like it just wasn't there)

Thanks
 

isladogs

MVP / VIP
Local time
Today, 05:36
Joined
Jan 14, 2017
Messages
18,247
You've certainly covered most of the 'fixes' that would normally be suggested

You didn't say whether all users also have A2016.
Also whether each has their own copy of the Access FE (though I'd be surprised if they don't)

One other thing you could try is whether there are fixable errors in MSysObjects.
See this post which I wrote after dealing with some of the issues you describe:
How to remove 'deleted database objects' from the MSysObjects table

Also do you maintain a persistent connection between FE & BE?
That would both improve performance & reduce potential issues with connections being continually re-created
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 00:36
Joined
Feb 19, 2002
Messages
43,371
copies the ACCDB from a central location to their local documents which is where they access it.
Please verify that this is actually happening. Look at your master copy and make sure its date doesn't change. If its date changes, some people are opening the master copy directly and so they are not set up correctly. It could be the shortcut that is a problem or they could just be opening the app by navigating to the master folder.
 

Minty

AWF VIP
Local time
Today, 05:36
Joined
Jul 26, 2013
Messages
10,371
I'd echo what Pat said, it sounds as if someone is opening the master copy.

I found after a similar episode some one had "helpfully" created a shortcut to the master copy instead of the local one.

You can also make the copy location read only except to Admin users, that should stop people running it from the master location, and maybe lead you to the culprit.
("My shortcut isn't working...") ;)
 

MS1234

Registered User.
Local time
Yesterday, 21:36
Joined
Nov 28, 2016
Messages
17
Managed to trace it to group policy File Copy (User Config - Preferences - Files). This is used to copy the accdb from central location to user's documents folder at remote desktop logon. The file seems to copy fine when they log on (replaces the one that's there). They are definitely then using the local copy of the file (checked this) and then at some point the corruption occurs while they're using it. I removed the File Copy, copied the central db to their local folder manually, and the corruption doesn't occur. Anybody know why this would be? Is there an alternative to GPO file copy I could try.

Thanks
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 23:36
Joined
Feb 28, 2001
Messages
27,236
There are methods by which you launch a batch file that copies the FE file to the desired location and then launches it. Search in the forum for "Automatically Update Front End" as a topic. I don't have that reference offhand but it should be easy to find.
 

Minty

AWF VIP
Local time
Today, 05:36
Joined
Jul 26, 2013
Messages
10,371
I'm not super familiar with GPO file copy, but I know that we used to suffer a weird issue where the file copy hadn't completed before the end user was able to try opening it, possibly caused by having the DB FE as a startup item?

As The Doc suggests - we switched to an Access driven updater and haven't suffered the same issues since.
 

MS1234

Registered User.
Local time
Yesterday, 21:36
Joined
Nov 28, 2016
Messages
17
Could you share the details of how your updater works and how to create it. That would be most helpful to me. Thanks
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 00:36
Joined
Feb 19, 2002
Messages
43,371
I use a batch file. This is the Citrix version which is probably similar to what you want for Remote Desktop. It uses tokens to substitute the user's USERID>

md %USERPROFILE%\DwgLog
del %USERPROFILE%\DwgLog\DrawingLog.accdb
copy "\\BSCCTIMBERLINE1\Timberline Office\AccessApps\Data\CommonFE\DrawingLog.accdb" %USERPROFILE%\DwgLog
%USERPROFILE%\DwgLog\DrawingLog.accdb
 

MS1234

Registered User.
Local time
Yesterday, 21:36
Joined
Nov 28, 2016
Messages
17
thanks, I have the batch file working, where should the batch file reside - network share or local profile. If on network share and say, two people launched their db shortcuts at the same time, so two people running the same batch file at the same time - does that cause issues?
 

Users who are viewing this thread

Top Bottom