Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
263 views
in Technique[技术] by (71.8m points)

MS Access - Compact and Repair Large Database

I have a fairly large (1.36 GB) access database I need to run the "Compact and Repair" database tools on. Smaller databases (less than 500 MB) work without issue.

It starts out fine, but I get an error popup that says: "The query cannot be completed. Either the size of the query result is larger than the maximum size of a database (2 GB) or there is not enough temporary storage space on the disk to store the query result".

According to Microsoft, Access creates a copy of the Database, then runs the utility so it could be that in order to compact, the database has to be under 1 GB?

Is there a way to run compact and repair on a large database? Why could you create a database that's 2 GB in size, but can't run a built-in utility on it?

question from:https://stackoverflow.com/questions/65893574/ms-access-compact-and-repair-large-database

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The only method seems to be:

  1. Create a new empty database
  2. Import all objects from the current (too large) database
  3. Copy specialities like custom properties (if any) from the current database
  4. In the new database, do Compile and Save the code modules
  5. Check everything, just in case. However, there should be no issues

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...