Empty the tables that contain temporary results
This wizard empties some tables of the file that contain temporary results, to reduce the size of the database. Its description in the Files Maintenance list reads: "This maintenance enables you to empty some tables that contain temporary results to reduce the database size, you can also empty part of useless information from some tables according to the available options". For the working steps see Empty the temporary tables.
Emptying is final, and there is no undo. After emptying, the program shrinks the whole database, which can take long with large files. Take a backup before you run it.
Opening the wizard
- On the File tab click Tools, then Files Maintenance. Select Empty the tables that contain temporary results and click Execute. Selecting it shows the warning frame "This operation is dangerous …" (the frame shows for every operation whose severity is above low). Run files maintenance explains how to open the window.
- The wizard also starts from the favorites menu on the Tools page, from Quick Launch search and from a Maintenance tile on the desktop.
- The operation is in the list in single file and multiple files mode, provided your edition includes accounting (Available maintenance operations).
- You need the Files Maintenance permission (conditions). Users Management > Operations also lists a permission named Empty the tables that contain temporary results; the program checks it only to show or hide the desktop tile, not when you start the operation from the window, the favorites menu or Quick Launch. The wizard has one page and no backup page, and its Next and Back buttons are disabled.
- A similar list of tables appears in the step that empties the temporary tables in a scheduled task.
The page
The page title is "Empty tables logs that contain temporary results". Under it is a sentence that explains the maintenance: "This maintenance enable you to empty some tables that contain temporary results to reduce the database size, you can also empty part of useless information from some tables according to the available options". Then a grid with three rows and five columns, and below it a status line and a progress bar that stays hidden until you click Start.
The tables
| Row | What the table holds | State when the page opens |
|---|---|---|
| Maintenances Log | The items of the maintenance log in the file: what the maintenance wizards recorded, operations and errors. | Empty: Yes. Store other: NO. |
| Customer price of last year | A table that holds customer prices of last year. | Empty: NO. |
| Last purchase price of last year | A table that holds last purchase prices of last year. | Empty: NO. |
The last two tables relate to carrying material prices over from the file of the previous year (Audit materials prices of last year file). Emptying them deletes what was carried into them.
The columns
| Column | Description | Required | Values and rules |
|---|---|---|---|
| Table Name | The name of the table the program empties. | No | Display only. |
| Empty | Whether the program empties this table. | At least one row set to "Yes" | A list: "NO" or "Yes". When you change it to "NO", the cells of the next three columns in the row are cleared. |
| Store other | Whether the program keeps the newest items of the table and deletes only the older ones. | No | A list: "NO" or "Yes". Editable only in the Maintenances Log row, and only if Empty is "Yes". With "NO" the whole table is deleted. |
| Duration | The number of days or months the program keeps. | When Store other is "Yes" | A number greater than zero, such as 30. Editable only if Store other is "Yes". If you enter zero or non-numeric text, the program rejects it and sets the cell back to 0. If you leave it empty after choosing "Yes", the program uses 0. |
| Day/Month | The unit of Duration. | No | A list: "Day" or "Month". Editable only if Store other is "Yes". The first value is "Day". |
Gray cells cannot be edited. Store other and the columns after it work in the Maintenances Log row only, so those cells stay gray in the other two rows, and if you set Empty to "Yes" in them the whole table is deleted.
Example: in the Maintenances Log row set Empty to "Yes", Store other to "Yes", Duration to 30 and Day/Month to "Day". The program deletes the log items recorded more than 30 days ago and keeps the newer ones.
| Button | What it does |
|---|---|
| Start | Checks that at least one table is set to "Yes" in Empty, then starts emptying with no confirmation question. |
| Cancel | Before Start it asks "Are you sure you want to exit and cancel the maintenance operation?". During the run it is disabled. |
| Next and Back | Disabled. |
If you click Start without changing anything, the program empties the whole maintenance log.
What happens on Start
- The program records the operation in the log file and in the maintenance log.
- It deletes from every table set to "Yes" in Empty. In Maintenances Log with Store other set to "Yes" it deletes the items older than Duration in days or months. In every other case it deletes the whole table.
- The program shrinks the whole database to recover the space that was freed.
- The message "Operation successfully completed" appears and the wizard closes.
Messages
| Message | Why it appears | What to do |
|---|---|---|
| Must select "Yes" in "Empty" field to one table at least | You clicked Start while every Empty cell is "NO". | Set Empty to "Yes" in at least one row. |
| Are you sure you want to exit and cancel the maintenance operation? | You clicked Cancel before Start. | Yes closes the wizard without emptying, and No keeps you here. |
| Operation successfully completed | The emptying and the shrink ended. | Nothing. |
| An error was encountered while performing the operation. | The emptying failed with a database error. | Try again; if it repeats, contact technical support. |
Related
This page applies to alameen ERP 10, version 10.1.79.764.