MS Access Forum / General 1 / March 2005
Multi-User Access MDE File Growing and Growing.......
|
|
Thread rating:  |
Sonic - 09 Mar 2005 20:29 GMT I have an MDE file that is growing exponentially (from 3,900 KB to over 132,000 KB today). I am not saving data in this MDE, although I use a mix of offline and SQL tables for Read Only querying. I also have many forms and some reports and queries. Many people use this DB on a daily basis and there is constantly someone in it, virtually every minute.
The DB tends to crash every couple of weeks. I am wondering if the size of this could be the cause of the crashes or just the multi-user environment aspect of this.
Is there any way that I can some how "compact" the DB without having all of the users either logging out or being kicked out of the DB (by us in the IS department)? We have to replace the DB with a compacted MDE about every 2 weeks.
Thanks.
PC Datasheet - 09 Mar 2005 21:07 GMT Check two things. First is the database split into a front end and a back end with the backend on the server and a copy of the front end on each station. It sounds like the database is one file and all the users are running it over the network. This will give you the problems you describe. Second, look at the programming in the database. Are records being constantly added to temp tables and then later deleted. This is a sure cause of bloating.
BTW, if you ever need outside help with your database applications, please contact me at my email address below.
-- PC Datasheet Your Resource For Help With Access, Excel And Word Applications resource@pcdatasheet.com www.pcdatasheet.com
> I have an MDE file that is growing exponentially (from 3,900 KB to over > 132,000 KB today). I am not saving data in this MDE, although I use a [quoted text clipped - 12 lines] > > Thanks. Arno R - 09 Mar 2005 22:56 GMT BTW, you never seem to learn that advertising is 'not done' in this ng. BTW, can't you just share your knowledge just like others do?
Arno R.
> BTW, if you ever need outside help with your database applications, please > contact me at my email address below. > > -- > PC Datasheet PC Datasheet - 10 Mar 2005 21:54 GMT BTW, were the words in my response to Sonic too big for your little mind to comprehend or are you just plain ignorant? Here is the first part of my response ----
"Check two things. First is the database split into a front end and a back end with the backend on the server and a copy of the front end on each station. It sounds like the database is one file and all the users are running it over the network. This will give you the problems you describe. Second, look at the programming in the database. Are records being constantly added to temp tables and then later deleted. This is a sure cause of bloating."
In the scheme of things I contributed to the newsgroup. Your response contributed absolutely zilch. In the future, if you don't have anything to contribute, don't waste the newsgroup's time and keep your little mind and your ignorance closed.
Steve PC Datasheet
> BTW, you never seem to learn that advertising is 'not done' in this ng. > BTW, can't you just share your knowledge just like others do? [quoted text clipped - 6 lines] > > -- > > PC Datasheet Arno R - 11 Mar 2005 12:44 GMT Well Steve, are we going to be offensive here ?
My response was really meant to be a contribution to this group, because this group can do very well without your explicit advertising. Your sig alone would be more than enough. (and you know that, because this has been told you many times)
Well Steve, so I meant by the word *just* that it would be *just* enough when you share your knowledge and *just* leave the advertising behind. Maybe that's *just* too difficult to grasp for a mind like yours...
Who is 'playing' ignorant here in this ng ? Asking questions while using other identities (often female) that's 'great minded' heh?
Well Steve, I just feel sorry for you...
Arno R.
> BTW, were the words in my response to Sonic too big for your little mind to > comprehend or are you just plain ignorant? Here is the first part of my [quoted text clipped - 27 lines] >> > -- >> > PC Datasheet Tim Marshall - 11 Mar 2005 12:56 GMT > My response was really meant to be a contribution to this group, because this group can do > very well without your explicit advertising. There's nothing wrong with the sig. His blatent solicitation was a bit over the top, however.
 Signature Tim http://www.ucs.mun.ca/~tmarshal/ ^o< /#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake /^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Sonic - 10 Mar 2005 12:12 GMT The DB is not split, it is one file being run over the network. And as far as records being added to a table and then later deleted, I don't have anything being added or deleted in this DB. There are queries being run, but nothing is being saved by these (outside of the normal temp tables that Access uses when queries are being run). No make tables queries are present in this DB.
J. Clay - 10 Mar 2005 18:03 GMT You should immediately work on getting this split and having each user with his/her own front end on their workstation and the back end on the server. This is considered a requirement by most if not all Access developers and experts.
Jim
> The DB is not split, it is one file being run over the network. And as > far as records being added to a table and then later deleted, I don't > have anything being added or deleted in this DB. There are queries > being run, but nothing is being saved by these (outside of the normal > temp tables that Access uses when queries are being run). No make > tables queries are present in this DB. Di - 09 Mar 2005 21:20 GMT Unfortunately databases can only be compacted when a single user is in it, well as far as I have seen anyway.
I have not yet seen multiple users as a problem but size will cause slow downs and eventually people get tired of waiting and keep hitting enter because they think it's not working, this can cause your crash or it simply runs out of memory.
I found that the "size blow up" problem was exacerbated by cross version users, ie 2000, XP and 2003 using the same database. If you have any of that going on try making versions for these users, the tables are just links so the data will all be dumped in the same spot.
I was also told to empty and close recordsets in my vb code after use.
If you have the original, code in an autocompact which checks for users and compacts when the person who opens it is the only user.
D...
Sonic - 10 Mar 2005 12:19 GMT Everyone is running 2000 in our company, so the cross versions do not apply in this case. We have checked for recordsets in all of the codes and have emptied and closed them as well. I do have the original code and will put in the autocompact as you suggested. I'll also have to send out a message to instruct everyone to close out of the DB when leaving for the day. Occasionally, users will keep this open overnight. Thanks for the suggestions.
Tim Marshall - 11 Mar 2005 14:57 GMT > Everyone is running 2000 in our company, so the cross versions do not > apply in this case. We have checked for recordsets in all of the codes [quoted text clipped - 3 lines] > leaving for the day. Occasionally, users will keep this open > overnight. Thanks for the suggestions. Sonic, you're missing the major point. You should not have multiple instances of the same mde open at any one time. Make individual copies for each user and have them operate it from their PC.
Here's what I do in such cases to prompt users to do their own compacting when the mde/mdb gets a bit large.
I use a custom menu and create a menu or tool bar (depends on what you want). When in edit menu mode I hold the control key down (make sure you do this or you will regret it -see hereafter as to why) and click on the Compact & Repair menu item (found in Tools->Database Utilities->Compact & Repair) and drag it to my tool bar.
If you don't hold the control key down when doing this, your standard menu "loses" the Compact & Repair menu item!
I then change the caption to "Optimization of <App Name> is STRONGLY Recommended!", or something similar, and put an image there - my favourite is the little bell from the Change button Image menu item when right clicking a menu item in customize menu mode.
Next, I run a routine like the following on start up - usually on a splash form's on open event, though I suppose you could put it in a module and run it from an autoexec macro if you wanted:
Dim strPath as string 'location of front end Dim lngSize as Long 'size of front end
'Check for overall file size 'If larger than recommended size, make compact menu item visible 'otherwise, make it invisible
strPath = Access.CurrentDb.NAME
lngSize = FileLen(strPath)
If lngSize > 5000000 Then
CommandBars("mnuMain").Controls.Item(6).Visible = True
Else
CommandBars("mnuMain").Controls.Item(6).Visible = False
end if
In the above example, the commandbars lines assume there are 5 other menu items on my custom menu bar "mnuMain" before the compact menu item. Adjust as per your own application.
With respect to the size the FE must be before the user is prompted, what I usually do is compact the finished front end and then set the lngsize "trigger" above to twice that of the compacted size.
The above is for a front end. Like your SQL back end, I usually write my apps against non Jet (in my case, Oracle) back ends. Similar code can be constructed for maintenance of Jet back ends, though of course the menu on action function will be a procedure using the CompactDatabase command....
 Signature Tim http://www.ucs.mun.ca/~tmarshal/ ^o< /#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake /^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Tony Toews - 11 Mar 2005 21:54 GMT >I'll also have to >send out a message to instruct everyone to close out of the DB when >leaving for the day. Occasionally, users will keep this open >overnight. Thanks for the suggestions. HOW TO: Detect User Idle Time or Inactivity in Access 2000 (Q210297) http://support.microsoft.com/?kbid=210297 ACC: How to Detect User Idle Time or Inactivity (Q128814) http://support.microsoft.com/?kbid=128814
However we found that the code which runs on the timer event must be disabled for the programmers. Otherwise weird things start happening when you're editing code.
Also print preview would sometimes not allow the users to run a menu item to export the report to Excel or others. So you had to right click on the Previewed report to get some type of internal focus back on the report so they could then export it. This was also helped by extending the timer to five minutes.
The downside to extending the timer to five minutes was if a person stays in the same form and at the same control for considerable parts of the day, ie someone doing the same inquiries, the routine didn't realize that they had actually done something. I'll be putting in some logic sometime to reset this timer whenever they do something in the program.
Tony -- Tony Toews, Microsoft Access MVP Please respond only in the newsgroups so that others can read the entire thread of messages. Microsoft Access Links, Hints, Tips & Accounting Systems at http://www.granite.ab.ca/accsmstr.htm
Fred Zuckerman - 10 Mar 2005 16:55 GMT > I have an MDE file that is growing exponentially (from 3,900 KB to over > 132,000 KB today). I am not saving data in this MDE, although I use a [quoted text clipped - 12 lines] > > Thanks. You could use the "Compact On Close" option (Tools > Options > General). It is generally frowned upon in this group. But it only compacts for the last person exitting the application. Which is just what you want. One problem you may experience is that whoever is the last one out, may get tired of waiting for the compacting to complete and they may choose end-task... Fred Zuckerman
Tony Toews - 11 Mar 2005 21:55 GMT >I have an MDE file that is growing exponentially (from 3,900 KB to over >132,000 KB today). I am not saving data in this MDE, although I use a >mix of offline and SQL tables for Read Only querying. I also have many >forms and some reports and queries. Many people use this DB on a daily >basis and there is constantly someone in it, virtually every minute. You really, really want to split the MDB into a front end containing the queries, forms, reports, macros and modules with just the tables and relationships. The FE is copied to each network users computer. The FE MDB is linked to the tables in the back end MDB which resides on a server. You make updates to the FE MDB and distribute them to the users, likely as an MDE.
See the "Splitting your app into a front end and back end Tips" page at http://www.granite.ab.ca/access/splitapp/ for more info. See the Auto FE Updater downloads page http://www.granite.ab.ca/access/autofe.htm to make this relatively painless.. It also supports Terminal Server/Citrix quite nicely.
Tony -- Tony Toews, Microsoft Access MVP Please respond only in the newsgroups so that others can read the entire thread of messages. Microsoft Access Links, Hints, Tips & Accounting Systems at http://www.granite.ab.ca/accsmstr.htm
|
|
|