压缩访问数据库 [英] compressing an access database

查看:68
本文介绍了压缩访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ms访问数据库,我已将其拆分为前端和后端数据库。

用户将数据输入数据库(存储在后端)后,数据库增长大约50 MB。


然后用户运行应用程序(存储在前端DB中的VB模块),后端数据库增长到大约1.6 GB。当数据库关闭时,它返回到50-100 MB之间的大小



随着数据库大小的增加,应用程序的性能会变慢,这就是为什么我需要压缩它。



如果应用程序部分停止,数据库关闭并重新打开,然后重新启动应用程序,它会执行直到DB再次增长。当我尝试通过VB作为来自前端DB的模块执行压缩时,我收到一个错误,即后端DB不处于独占模式



我想知道的是,当后端数据库打开并链接到前端数据库时,如何关闭后端数据库以允许我运行压缩,然后允许我将其重新连接到前端数据库



或者有没有人更好地建议如何在不进行压缩的情况下释放数据库中的空间?

I have a ms access database that I have split into a front and backend database.

After the user enters data into the database (stored in the backend), the DB grows to about 50 MB.

The user then runs the application (VB module stored in the front end DB) and the backend database grows to about 1.6 GB. When the database is closed it returns to a size between 50-100 MB



The performance of the application slows as the database grows in size which is why I need to compress it.



If the application is stopped part way and the DB is closed and re-opened and then the application is restarted it performs well until the DB grows again. When I tried to perform a compress via VB as a module from the front end DB, I get an error that the backend DB is not in exclusive mode



What I would like to know is how do I close the backend database when it is open and linked to the front end database to allow me to run the compress and then allow me to re-connect it to the front end database



Or does someone have a better suggestion on how to free up the space in the DB without doing a compress?

推荐答案


我有一个ms访问数据库,我已将其拆分为前端和后端数据库。


用户之后将数据输入数据库(存储在后端),数据库增长到大约50 MB。


然后用户运行应用程序(存储在前端数据库中的VB模块)和后端数据库增长到大约1.6 GB。当数据库关闭时,它返回到50-100 MB之间的大小



随着数据库大小的增加,应用程序的性能会变慢,这就是为什么我需要压缩它。



如果应用程序部分停止,数据库关闭并重新打开,然后重新启动应用程序,它会执行直到DB再次增长。当我尝试通过VB作为来自前端DB的模块执行压缩时,我收到一个错误,即后端DB不处于独占模式



我想知道的是,当后端数据库打开并链接到前端数据库时,如何关闭后端数据库以允许我运行压缩,然后允许我将其重新连接到前端数据库



或者有人有更好的建议如何在不进行压缩的情况下释放数据库中的空间?
I have a ms access database that I have split into a front and backend database.

After the user enters data into the database (stored in the backend), the DB grows to about 50 MB.

The user then runs the application (VB module stored in the front end DB) and the backend database grows to about 1.6 GB. When the database is closed it returns to a size between 50-100 MB



The performance of the application slows as the database grows in size which is why I need to compress it.



If the application is stopped part way and the DB is closed and re-opened and then the application is restarted it performs well until the DB grows again. When I tried to perform a compress via VB as a module from the front end DB, I get an error that the backend DB is not in exclusive mode



What I would like to know is how do I close the backend database when it is open and linked to the front end database to allow me to run the compress and then allow me to re-connect it to the front end database



Or does someone have a better suggestion on how to free up the space in the DB without doing a compress?



这类问题很难回答,因为如果我们告诉你你想要的答案......我们真的没有帮你解决实际问题。


我只能假设您的数据库大量使用临时表。每当临时表被写入并随后被清除时,它所用的空间仍由数据库分配。关闭并重新打开数据库的紧凑和修复将处理这个,因为你已经发现。


为了能够做到这一点,你将必须得到所有您的用户退出。通常,除非您的数据库接近2gb或者您的应用程序遇到性能损失,否则您应该在夜间过程中执行任何类型的维护。


让我们知道你的想法...希望你不必要求你的用户退出数据库只是因为它正在增长。

J


These kinds of questions are difficult to answer, because if we tell you the answer you want...we really aren''t helping you with the actual problem.

I can only assume that your database makes extensive use of temp tables. Anytime a temp table is written to, and subsequently cleared out..the space it took to store it is still allocated by the database. Closing and reopening the database with a compact and repair will handle this as you''ve already found out.

In order to be able to do this, you will have to get all of your users to log out. Generally, unless your DB is approaching 2gb or there is a performance hit to your application, you should perform any kind of maintenance during a nightly process.

Let us know your thoughts...and hopefully you won''t have to ask your users to exit the database just because it''s growing.
J



我有一个ms访问数据库,我已将其拆分为前端和后端数据库。

用户将数据输入数据库(存储在后端)后,数据库增长到大约50 MB。


然后用户运行应用程序(存储VB模块)在前端DB)和后端数据库增长到约1.6 GB。当数据库关闭时,它返回到50-100 MB之间的大小



随着数据库大小的增加,应用程序的性能会变慢,这就是为什么我需要压缩它。



如果应用程序部分停止,数据库关闭并重新打开,然后重新启动应用程序,它会执行直到DB再次增长。当我尝试通过VB作为来自前端DB的模块执行压缩时,我收到一个错误,即后端DB不处于独占模式



我想知道的是,当后端数据库打开并链接到前端数据库时,如何关闭后端数据库以允许我运行压缩,然后允许我将其重新连接到前端数据库



或者有人有更好的建议如何在不进行压缩的情况下释放数据库中的空间?
I have a ms access database that I have split into a front and backend database.

After the user enters data into the database (stored in the backend), the DB grows to about 50 MB.

The user then runs the application (VB module stored in the front end DB) and the backend database grows to about 1.6 GB. When the database is closed it returns to a size between 50-100 MB



The performance of the application slows as the database grows in size which is why I need to compress it.



If the application is stopped part way and the DB is closed and re-opened and then the application is restarted it performs well until the DB grows again. When I tried to perform a compress via VB as a module from the front end DB, I get an error that the backend DB is not in exclusive mode



What I would like to know is how do I close the backend database when it is open and linked to the front end database to allow me to run the compress and then allow me to re-connect it to the front end database



Or does someone have a better suggestion on how to free up the space in the DB without doing a compress?



在VB模块中发布代码,导致后端数据库的大小急剧膨胀到1.6 GB。我认为这里是prioblem的所在。

Post the code in the VB Module which causes the size of the Backend Database to drastically bloat to 1.6 GB. I think here is where the prioblem lies.


代码正在按预期进行。它正在分析数据并找到使用表来保存临时数据的最佳方案。

我只有一个用户使用数据库,这是通过前面启动应用程序的人结束数据库。


你知道一种从前端断开后端数据库的方法,允许我关闭后端数据库,然后以编程方式运行压缩函数吗?
The code is doing as expected. It is analysing the data and finding the best scenario which uses tables to hold the temporary data.

I only have one user using the database and this is the person starting the application via the front end database.

do you know of a way to disconnect the backend database from the front end to allow me to close the backend database to then programmatically run the compress function?


这篇关于压缩访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆