Reconstruct tables relations
This maintenance deletes the existing relations between the tables of the company file and creates the relations that the program defines again. It does not change your data. This page explains how to run it. Everything about the page is in Reindex files and rebuild relations.
Before you begin
- Take a backup of the file (Back up a company file). The wizard does not ask for a backup, and the maintenance list shows it with the warning frame "This operation is dangerous …".
- Ask the other users to leave the file. The program reserves the file for you alone while the Files Maintenance window is open (Run files maintenance).
- You need the Files Maintenance permission, which guards the Files Maintenance window (Run files maintenance). The program checks no permission of its own for this operation when you run it from the window. Its desktop tile shows only for a user who has a permission of the same name on the Operations page of Users Management. The item does not show if the file works in multi-file mode.
- Do not turn off the computer during the operation.
Steps
-
Click File, then Tools, then the large part of the Files Maintenance button. If a message asks you to close the open windows, click Yes.
-
In the list, click Reconstruct Tables Relations. Its description shows under its name inside the warning frame. Click Run.
-
Read the notice on the page, then click Start. The page has no fields, and the program does not ask for confirmation before it starts.
-
Wait. Cancel is disabled during the run, so you cannot stop the operation. The program writes "Create External Keys" in the stage line.
-
When the message "Operation successfully completed" appears, click OK. The wizard closes and you return to the Files Maintenance window.
-
Click Close so that the program releases the file.
Result
All the relations between the tables of the file are deleted, then the relations that the program defines for the file are created. In the usual setup this is a limited set, so the wizard does not bring back every relation that existed. The deletion and the creation run in one transaction, so the file is not left without relations if the operation fails. The program shows no report of what was created.
If something goes wrong
| Message | Why it appears | What to do |
|---|---|---|
| The files are in exclusive mode, you can't log on to the files now. | Another user works on the same file in exclusive mode. | Wait until that user finishes, then try again. |
| An error has occurred while rebuilding the relations | The operation failed. A message from SQL Server that explains the error comes before it, if there is one. All the changes are cancelled and the relations stay as they were. | Read the earlier message, check that nobody else is working on the file, and try again. If the error repeats, contact technical support. |
| Operation successfully completed | The operation finished. | Click OK. |
Related
This page applies to alameen ERP 10, version 10.1.79.764.