If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Control over DB size
I had a Access DB with 2 tables. After creation the size of DB was 400 KB.
To this DB records were addded & removed frequently. Curently there is only one record in both tables in the DB. The size of the DB kept on increasing & it is now 1.9 MB. Ideally the size of DB should be few KB more or less than the initial size. Is there any settings that allow to control the DB size? Can anybody explain what happens inside & why DB behaves like this? Thanks & regards, senthil |
#2
|
|||
|
|||
Senthil,
Deleting records (among other things) leaves behind unused space in an .mdb file. Unfortunately, Access is not very good at releasing unused space - actually it doesn't on its own, which is what causes databases to bloat over time. This can be dealt with by regular compaction (Tools Database Utilities Compact and Repair database). If you have Access 2000 or later, you can set it to auto-compact on exit (Tools Options, General tab, Compact on Close - this setting is .mdb specific, not global). This will save you a lot of frustration on a single user database, as well as on the FE of a split multiuser one. The BE of a multiuser database is a different story though, this technique won't work there. In that case, the best practice IMHO is a few lines of code in another .mdb or an .exe to compact the database, scheduled to run nightly (an open database cannot be compacted). HTH, Nikos "Senthil" wrote in message ... I had a Access DB with 2 tables. After creation the size of DB was 400 KB. To this DB records were addded & removed frequently. Curently there is only one record in both tables in the DB. The size of the DB kept on increasing & it is now 1.9 MB. Ideally the size of DB should be few KB more or less than the initial size. Is there any settings that allow to control the DB size? Can anybody explain what happens inside & why DB behaves like this? Thanks & regards, senthil |
#3
|
|||
|
|||
Hi Nikos,
Thanks it worked. I have another doubt. Will compact option work even when i open and close the mdb programmatically? Thanks & Regards, Senthil "Nikos Yannacopoulos" wrote in message ... Senthil, Deleting records (among other things) leaves behind unused space in an ..mdb file. Unfortunately, Access is not very good at releasing unused space - actually it doesn't on its own, which is what causes databases to bloat over time. This can be dealt with by regular compaction (Tools Database Utilities Compact and Repair database). If you have Access 2000 or later, you can set it to auto-compact on exit (Tools Options, General tab, Compact on Close - this setting is .mdb specific, not global). This will save you a lot of frustration on a single user database, as well as on the FE of a split multiuser one. The BE of a multiuser database is a different story though, this technique won't work there. In that case, the best practice IMHO is a few lines of code in another .mdb or an .exe to compact the database, scheduled to run nightly (an open database cannot be compacted). HTH, Nikos "Senthil" wrote in message ... I had a Access DB with 2 tables. After creation the size of DB was 400 KB. To this DB records were addded & removed frequently. Curently there is only one record in both tables in the DB. The size of the DB kept on increasing & it is now 1.9 MB. Ideally the size of DB should be few KB more or less than the initial size. Is there any settings that allow to control the DB size? Can anybody explain what happens inside & why DB behaves like this? Thanks & regards, senthil |
#4
|
|||
|
|||
Senthil,
I think it will. Give it a shot and verify! Nikos "Senthil" wrote in message ... Hi Nikos, Thanks it worked. I have another doubt. Will compact option work even when i open and close the mdb programmatically? Thanks & Regards, Senthil "Nikos Yannacopoulos" wrote in message ... Senthil, Deleting records (among other things) leaves behind unused space in an .mdb file. Unfortunately, Access is not very good at releasing unused pace - actually it doesn't on its own, which is what causes databases to bloat over time. This can be dealt with by regular compaction (Tools Database Utilities Compact and Repair database). If you have Access 2000 or later, you can set it to auto-compact on exit (Tools Options, General tab, Compact on Close - this setting is .mdb specific, not global). This will save you a lot of frustration on a single user database, as well as on the FE of a split multiuser one. The BE of a multiuser database is a different story though, this technique won't work there. In that case, the best practice IMHO is a few lines of code in another .mdb or an .exe to compact the database, scheduled to run nightly (an open database cannot be compacted). HTH, Nikos "Senthil" wrote in message ... I had a Access DB with 2 tables. After creation the size of DB was 400 KB. To this DB records were addded & removed frequently. Curently there is only one record in both tables in the DB. The size of the DB kept on increasing & it is now 1.9 MB. Ideally the size of DB should be few KB more or less than the initial size. Is there any settings that allow to control the DB size? Can anybody explain what happens inside & why DB behaves like this? Thanks & regards, senthil |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can I control file size of a word.doc file? | Govman | General Discussion | 2 | September 26th, 2004 06:11 AM |
How do I use Calendar Control 8.0 to limit report content | Pete Sperling | Setting Up & Running Reports | 1 | August 12th, 2004 03:11 PM |
How can I move the focus to a control on a subform? | Brandon | General Discussion | 7 | July 17th, 2004 01:39 AM |
Large file size | Tweety | General Discussion | 1 | June 17th, 2004 01:35 AM |
Need help on changing text size | Luke Sineath | Page Layout | 7 | June 11th, 2004 05:53 AM |