views:

94

answers:

4

I am constrained by the following, no way around it:

  1. Read-Only Data: Microsoft Access
  2. JET 4.0 OLDB
  3. ASP.NET 2.0
  4. Shared Host, very little control.
  5. OR Mapper - LLBL Gen Pro

The app is a read-only tool that reads a lot of Microsoft Access Databases in the APP_Data folder. Works fine mostly.

Under load it starts failing accessing the Access MDBs.

What is the best strategy for accessing the Access MDBs to limit errors in accessing them? Right now I try, then Thread.Sleep(500) on an error then try again.

+1  A: 

How frequently does the data change? If it's read-only can you load the data from the databases into cache and read it from there instead of directly from the databases?

What kind of specific errors getting. I assume they are connection errors?

Wil P
Read only, but very large. Can't get it all into RAM on the server I have. Errors are connection errors.
BahaiResearch.com
Bummer, can you put some of the larger data in the file system (possibly in xml) and read it from there or do you need the RDBMS to access the data?
Wil P
+2  A: 

I think there may be ways to modify the isolation/concurrency/locking options when accessing the Access databases to eliminate overhead of managing locks. Perhaps try "Mode=Share Deny None;" in the connection string. I would not use this if you are modifying data in any way at anytime though as it's pretty much throwing out all the isolation/concurrency management that you get with a database. Use at your own risk.

AaronLS
Still can only have 1 active result set on the connection at a time right, regardless of the Mode. Meaning all requests would be processed sequentially so under high load subsequent requests would have to wait for earlier requests to finish in order to get their data, right?
Wil P
I honestly have no idea on that. I was only thinking specifically of the way Access handles locks, since there is no "database server", it manages locks by writing metadata out to a file which is then read by other applications. My hope would be that specifying "Share Deny None" would eliminate alot of this overhead of writing and checking for these locks.
AaronLS
Yea, Understood. I think what you're saying is a good suggestion. I just think he is still going to run into bottlenecks using Access directly, regardless.
Wil P
My strategy is to limit the issues, but accept there will be some. In those cases I will force the page to refresh and hope that next attempt will pass. So far this happens infrequently.
BahaiResearch.com
+1  A: 

This is a horrible solution but if you truly are "lost on a desert island with only these tools" and the access databases are completely read-only, then create multiple copies of each of them and allow only a certain number of connection into any of them at a time. For example, if you have 2 access databases, MdbAA and MdbBB then create copies like:

  • MdbAA01
  • MdbAA02
  • MdbAA03
  • MdbBB01
  • MdbBB02
  • MdbBB03

Then when a request comes for MdbAA, see how many requests are currently accessing MdbAA01, if over the threshold, then try MdbAA02, etc. Do the same for any requests to the MdbBB file.

Like I said this is very bad solution but if you truly have no choice then it might work for you. But realistically it sounds like the app has outgrown Access (and the shared host) so it is time to upgrade the architecture.

Jeff Widmer
A: 

Spend a bit of money and get some sql storage. How much time have you spent working on fitting a crutch to a broken sounding system?

If the project is worth doing then it's worth investing some cold hard cash.

If a business is trying to force you down this route, explain why the option you have is not viable. If you suggested the option in the first place, grow a pair and explain why you were wrong, but this is how you can fix it.

Sorry if that comes off as flippant.

ilivewithian
-1: it does come off as flippant. More importantly, it makes some parochial assumptions. What makes you think that cold, hard, cash exists for this project. People might need that cash in order to eat once or twice a week, yet the project could be _very_ well worth doing.
John Saunders