Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    jwreding is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    34

    Back-End corruption with split database on LAN

    I will attempt to explain this as best I can, but it is difficult because the problem is so vague. I am not as much looking for a drop-dead answer as I believe there is none, but more brainstorming on troubleshooting paths. Here is the scenario:

    1. The back-end is stored on a Windows Server 2012 on a gigabit network with 2 Dell managed switches. It is an .accdb file designed in Access 2010.

    2. Approximately 15 users are in the system all day. All of the users are local and use the front-end to manipulate the data. They are using Access 2010 runtime.

    3. Client machines are all in good working order with gigabit Intel NICs.

    The problem:



    In the DB is a table (called Loads) that contains about 30 fields and 65k records. All data is manipulated in the front-end via native Access queries (meaning I don't have any proprietary SQL code in my VBA). Mostly by forms bound to Select queries. There are many other tables, but the Loads table is the main scope of this problem.

    Randomly, out of what seems like nowhere, users will be unable to open any forms or reports. They will get an "unrecognized database format" error on the front-end. Some users can continue to do things for a while, but eventually they will all get this error. When I try to open the back-end, I get the message that the database is in an inconsistent format. I have to get everyone to close the front-end and run a compact/repair on the back end. Sometimes it repairs fine and I can have people get back in, other times it gets weird as follows:

    Other times, I run the repair operation and I get a table that pops up called "MSysCompactError." Now, I know what this table is and why it exists, but the results in it are strange. I attached a screenshot for reference because it's too difficult to explain clearly.

    Now the times when I get this compact error table, I open the Loads table and it shows a certain number of records that have been deleted. This number always agrees with the number of deleted records mentioned in the error table. However, the record isn't really deleted, it's just had all of its fields nulled out with the exception of one or two that are full of ## characters. It gets weirder.

    Not only are records randomly deleted, but other records are randomly duplicated. I'm not just talking about the ID field being reused for another record, I'm talking like someone copied the row, clicked a new row, and pasted the entire record, unique ID and all. All of the info is exactly the same. I switch to design view and the primary key designation is gone. It's like Access is violating its own rules and then nuking the primary key. I have to remove the duplicate records and then reset the PK. The PK is not an AutoNumber, it is a Long Integer that I increment using the DMax() function. I only invoke this function at the instant before saving the record, so the chance of a conflict is minimal, and it has worked this way for over 2 years so I do not think it is related to this problem.

    The number of records deleted and number of records duplicated are always the same. However, they do not seem to be related in any way. They have different FKs, and are not necessarily adjacent to one another in the recordset (in fact they almost never are). The affected records are always within the past month or so of being created, and that is approximately the window of activity for editing records (anything older is frequently accessed but infrequently edited). That tells me that it is not 100% random, and that someone is "touching" these records somehow and making them go crazy.

    Obviously the above is evidence of corruption, but from where? This process has been working fine the majority of the past couple of years. It first occurred about a month ago out of the blue (I had not made any changes to the front or back ends in quite a while). At the time, I just kept repairing it and after the 5th or 6th time, the problem stopped occuring. It was fine for several weeks until it occurred again yesterday morning. I repaired it twice and it behaved the rest of the day. It happened again twice in one hour today, and now is going on 3 hours without a problem. I also cannot find any consistency with the time of day that it happens.

    We are not having any known connectivity problems. We also use Quickbooks and it freaks out at the least hint of a network interruption, which it has not been doing. The server is extremely robust and as I said the workstation NICs are in good shape. I have checked all active ports on the switch and none are showing any packets with errors. The front-end file is excluded from virus scanning on the workstations, and the back-end file is excluded on the server.

    I would appreciate any input as to what I can test or change next to work towards a solution. This problem is so vague and random I am pulling out what is left of my hair to even come up with a possible fix. I have already created a blank database and imported the front and back ends into fresh files. That seemed to have no effect at all. Some other things I plan on trying:

    1. Isolate the Loads table into a different back-end file.

    2. Create a quick and dirty transaction log to identify if one workstation is the culprit. This seems like a complex undertaking and adding a lot of overhead, but it may be my only hope.

    Any other suggestions, whether on the network or specific to Access? Has anyone come across crazy problems of a similar nature?

    Thanks in advance for help and suggestions. I can't really post my file to this thread as it is a 7MB front end and 20MB back end and anything I remove could be the source of the problem. I can perhaps attach specific tables, queries, or forms if anything would possibly help. But as I said, these have all been functioning perfectly for months without any changes.
    Attached Thumbnails Attached Thumbnails compacterror.JPG  

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Does each user have a copy of the front end on their own machine or are all the users trying to use a single front end.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    jwreding is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    34
    Whoops, guess I forgot that part. Yes it is a locally installed copy of the FE.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Quote Originally Posted by jwreding View Post
    Whoops, guess I forgot that part. Yes it is a locally installed copy of the FE.
    My guess is that this is the main cause of your corruption. AFAIK each user should always have their own copy of the front end, linked to a single back end.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    jwreding is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    34
    Sorry again for being unclear. What we have is what you are referring to. A copy of the front end that is installed locally on each workstation, which is linked to a single back-end on the server. It has been this way since day 1.

  6. #6
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332
    It sounds like you have some problems with record locking.

    Do any of your forms have the Recordset type set to "Dynaset Inconsistent State"?

    Also, you may have bad data. Check your date fields especially. Sometimes all it takes is a date which is set for 9/13/211 and the whole thing goes wonky.

  7. #7
    jwreding is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    34
    Xipoo,

    After I stopped laughing at your avatar, I checked my main form that manipulates the Loads table. Unfortunately, yes, it does have the Dynaset (Inconsistent Updates) property set. People have asked for so much information from other tables to appear on this form that it got to the point where it could not be edited, so I changed the property to allow editing. Keep in mind that I do not allow editing of info in related tables, that is all displayed in locked text boxes. Only those fields that come from the Loads table can be changed.

    I understand that this might cause corruption at the record level, but would it cause the crazy duplication of one record and deletion of another? That seems extreme.

    I just checked the data in all of my date/time fields. Nothing is amiss.

    I will remove some fields from this query/form and change it to a regular Dynaset and see if the problem occurs again. Crazy thing is, it may work for another month before crapping out again. I guess if it does, I will revive this thread.

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Two things stand out for me. Well, one depends on an answer to a question. Are you using intrinsic referential integrity tools? Perhaps this is culprit to random records seemingly being duplicated (inconsistent state). The other thing is your statement, "I increment using the DMax() function". I would guess a domain function may not react fast enough, especially if another user does not save the integer they retrieved in a timely manner.

    These were my thoughts as I read your post and then I viewed your screenshot.

    I will avoid asking why you are not using Autonumber and then suggest using a separate table dedicate to retrieve a new PK value. Maybe you can use autonumber in this new, dedicated table. Maybe you can index no duplicates the long integer in the new table and when an error occurs the error log will indicate trouble in the new table, hence isolating the culprit.

  9. #9
    jwreding is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    34
    ItsMe...thanks for the reply.

    I selectively use the built-in referential integrity enforcement between the Loads table and others, but not for every single FK. Just the ones that are important. I have started migrating away from this and enforcing with proper data entry through code on the forms rather than the Access engine, but I still have many remnants in the Relationships window.

    I realize not using the AutoNumber seems dumb, but I do have my reasons for incrementing in this way. I use AutoNumber in many other tables, but not this one. I'm not saying that I am perfect, but I have incremented the PK using this method for over 2 years and have never had a PK conflict. The form is set up so that it writes the values to the table, then grabs the PK value instantly before saving. So even if others create records while a user is filling out their own values, it will recognize this and increment properly. There is no time lapse between grabbing the PK value and saving the record.

    A full workday has passed since I changed the Inconsistent Updates property back to regular Dynaset. I had to remove several joins in the query because it would not be editable otherwise. Looking back, having all of those joins on the query was probably a bad idea, especially because many were outer joins. But the users kept asking for more info on this form while still being able to edit it. I guess I caved too easily. Anyway, I removed the joins and changed the properties and have not had any problems since. So I think this is "solved" for now but again if it happens down the road I will revive this thread and finish pulling out the hair that I have left.

    Thanks all for your help.

  10. #10
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332
    Quote Originally Posted by jwreding View Post
    ItsMe...thanks for the reply.

    I selectively use the built-in referential integrity enforcement between the Loads table and others, but not for every single FK. Just the ones that are important. I have started migrating away from this and enforcing with proper data entry through code on the forms rather than the Access engine, but I still have many remnants in the Relationships window.

    I realize not using the AutoNumber seems dumb, but I do have my reasons for incrementing in this way. I use AutoNumber in many other tables, but not this one. I'm not saying that I am perfect, but I have incremented the PK using this method for over 2 years and have never had a PK conflict. The form is set up so that it writes the values to the table, then grabs the PK value instantly before saving. So even if others create records while a user is filling out their own values, it will recognize this and increment properly. There is no time lapse between grabbing the PK value and saving the record.

    A full workday has passed since I changed the Inconsistent Updates property back to regular Dynaset. I had to remove several joins in the query because it would not be editable otherwise. Looking back, having all of those joins on the query was probably a bad idea, especially because many were outer joins. But the users kept asking for more info on this form while still being able to edit it. I guess I caved too easily. Anyway, I removed the joins and changed the properties and have not had any problems since. So I think this is "solved" for now but again if it happens down the road I will revive this thread and finish pulling out the hair that I have left.

    Thanks all for your help.
    This is one of the many reasons why in general, I steer away from bound forms. They are certainly useful in many situations but I like having a bit more control over the CRUD by using recordsets and currentdb.execute SQL commands. I have also started to steer away from the JET engine for handling my SQL calls. I prefer either pass-through queries or ADO. When the SQL server handles data requests, it tends to reduce the chances of record locking collision and SQL Server has better performance with indexing and maintenance.

    It also really helps to track down problematic queries. We've spent countless hours trying to track down why a the CPU/Memory usage on MS SQL is high and when we run the profiler we see the queries in the format which the JET engine requests them from SQL Server and not in the format of how they are written in Access. Quite annoying.... but I'm definitely diverting from the topic here.

  11. #11
    jwreding is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    34
    I hate to revive this thread, but the issue seems to be cropping up again. After nearly a month of no issues, we started randomly getting the "unrecognized database format" error (on the front end...when you open the BE it is the "inconsistent state" message). This time around, no corruption is actually happening. All I have to do is open the DB exclusively, run a compact/repair (it automatically prompts for one since it thinks it is messed up), and everything is good to go. I am not having the crazy duplicate or missing row problems as before. Also, as long as the user stays connected via the FE, they can continue to use the app. Only if the connection is broken and they try to reconnect does it refuse them. This leads me to believe the database thinks it is corrupted but it is really not. I am seriously at a loss now. It can go an entire day without happening, or it can happen twice in an hour. Each time it is extremely disruptive because I have to ask everyone to close their front end so I can open the BE exclusively. It only takes about 5 minutes in total but it's more of a disruption to the users, which I do not like.

    Any more help or guidance on this? I am totally at my wit's end. I have gone through every query and ensured there are no others with the Inconsistent Updates property set. Totally refactoring the app to eliminate bound forms is not really feasible at this point.

    Thanks again in advance.

  12. #12
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by jwreding View Post
    ...Also, as long as the user stays connected via the FE...
    Can you elaborate on the comment?

  13. #13
    jwreding is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    34
    Well generally everyone opens the FE at the start of the day. But sometimes people will randomly close it or someone will come in late. When the pseudo-corruption happens, anyone who still has the FE open can continue to work in it and the DB accepts their changes and additions like nothing is wrong. But those who do not have it open, then try to open it, get the "unrecognized database format" error. Similarly, if I have the BE open already, it is fine, but if I close and reopen it I get the repair message. If this is still unclear I apologize and will try to restate it.

  14. #14
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Nope, that is pretty clear. I just wanted to understand a little better. It seems your comment regarding Access considering the DB to be corrupt is correct. If it were corrupt, at some point someone would get kicked off or a runtime exception would occur. Plus, the compact and repair would then offer errors in a new table and or an existing table would have a record or two that indicated "Deleted" in its fields or something close.....

    Any logs indicating what is going wrong this time around? I will re-read the thread when I get a chance a little later.

  15. #15
    jwreding is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    34
    I feel pretty dumb asking this, but...what logs are you referring to? The application logs in Windows just repeat the "inconsistent state" dialog box that appears when you try to open the BE after it is "corrupted."

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Split Database Back End password
    By eww in forum Access
    Replies: 4
    Last Post: 05-30-2014, 11:09 AM
  2. Moving the Back End of a split Access DB.
    By Robeen in forum Access
    Replies: 1
    Last Post: 11-06-2013, 12:09 PM
  3. Replies: 1
    Last Post: 11-23-2012, 03:08 PM
  4. Database Corruption
    By aytee111 in forum Access
    Replies: 2
    Last Post: 09-19-2012, 08:29 AM
  5. Split db Import tbl into the back end
    By webisti in forum Access
    Replies: 5
    Last Post: 05-31-2012, 01:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums