Skip to main content

When to use files maintenance

Files maintenance is a set of operations that correct the company file or rebuild part of it, such as auditing balances, regenerating entries and reindexing. The system administrator usually runs them, because some change the whole file and cannot be undone. This page explains what each operation repairs, how the wizards work, and what to do before you start.

You open the Files Maintenance window from the File tab and pick an operation, as described in Run files maintenance. The available maintenance items list the conditions that show each operation in the list.

You can also start an operation from the favorites list on the Tools page, from the Quick Launch window (Ctrl+Q) and its search results, or from the operation's tile on the desktop. The difference between these routes is in Getting the file to yourself.

When you need maintenance​

Run a maintenance operation when you see a specific problem in the file, not on a schedule. Examples:

  • An account or material balance does not match its movements: Audit Accounts Balances and Audit Materials Balances and Prices.
  • Bills were entered out of date order and purchase prices and cost came out wrong: Reprice Bills and Generate their Entries.
  • Bills without entries, or entries that must be rebuilt after the materials accounts changed: the entry operations under Entries and bills.
  • A slow or large file: Reindex Files and Shrink Database.
  • A problem in the database itself that the other operations do not fix: Create new file and transfer data.

Read the operation's own page before you run it. Take a backup first if the operation changes data.

The operations​

The tables below list every operation in the list, with the meaning the program gives in its description. The last column shows whether the wizard starts with the Make a Backup page (its description). Not every operation appears for every file. All of them need accounting in your key. Some are hidden in multi-file mode, when a tax system is on, or because of the file: Reprice Bills and Generate their Entries does not appear for a file that belongs to a profit center, and Renumber Bills does not appear when the option Force invoices numbering by invoice type is on. In a subscription file, operations above your subscription level are hidden. The details are in the available maintenance items.

Balances and prices​

OperationWhat it repairsStarts with the backup page
Audit Accounts BalancesRereads the entries, calculates debit and credit, then calculates each account's balance.No
Audit Materials Balances and PricesAudits the bills that moved materials, looks for negative quantities and unit errors, tries to fix them, and shows what it fixed and what it could not.Yes
Fixed Weighted average accountCalculates the fixed weighted average price for the group of materials and accounting periods you choose.No
Audit materials prices of last year fileRecalculates material prices from the previous year's file and carries them into the current file, then audits the prices against the current file's movements.Yes
Reprice Bills and Generate their EntriesCorrects the last purchase price, the average price and the customer's last sale price when bills were entered out of date order.Yes
Insert Expiry Date in Output BillInserts the expiry date in output bills.Yes

Entries and bills​

OperationWhat it repairsStarts with the backup page
Audit FilesChecks that the files are consistent and finds errors such as an unbalanced entry or a bill without its entry.Yes
Generate Entries And Post BillsGenerates entries for unposted bills, which are bills of a type that does not generate its entry automatically.Yes
Delete Automatic Entries and Cancel Posting BillsDeletes all entries generated from bills, whether generated automatically or manually, and cancels the posting of bills to warehouses.Yes
Posting Entry VouchersPosts the unposted entries that come from bill types and entry types.Yes
Regenerate EntriesDeletes the entries generated automatically from bills and regenerates them with the new materials accounts set in bill types, group cards and material cards.Yes
Regenerate Cost EntriesRegenerates the cost entries of entries generated from bills that have the perpetual inventory option on.Yes
Merge Cash BillsMerges cash bills of one customer, warehouse, salesman or distributor, or bills with the same cash and material accounts or the same cost center, or all cash bills.Yes
Rebuild Receivables AgingRebuilds the aging of receivables and of materials for the opening inventory.Yes

Numbering​

OperationWhat it repairsStarts with the backup page
Renumber BillsRenumbers one bill type in a given sequence and removes the gaps that deleted bills leave.Yes
Renumber EntriesRenumbers the entries by date after entries were added out of date order or after repeated deletions and edits.Yes

Currencies​

OperationWhat it repairsStarts with the backup page
Audit Currency Rates Compared To TableApplies the exchange rates set in the rates table to bills and entries.Yes
Rebuild Currencies Exchange Rates TableChanges the table to match the different rates saved in bills and entries.Yes

Security and the file itself​

OperationWhat it repairsStarts with the backup page
Modify Security LevelChanges the security level according to the conditions you select.Yes
Reindex FilesRebuilds the file indexes. Indexes hold nothing that is not in the files, but they speed up search and access.No
Reconstruct Tables RelationsRebuilds the relations between the database tables.No
Check File's Physical StructureChecks the database tables for errors in the structure of the files only, not errors from operations and reports.Yes
Check File StructureCompares the current file structure with the standard structure, finds missing or extra columns, and checks the foreign keys.No
Update Default Fields StructureUpdates the structure of the default tables (views) when there is a problem in them.No
Shrink DatabaseCompresses the database and removes gaps, so the program files take less space on the disk.No
Empty the tables that contain temporary resultsEmpties tables that hold temporary results to reduce the database size. It can also empty part of the information that is no longer useful, according to the options.No
Upgrade DatabaseUpdates the files in the program database, or restores default files if one was deleted by mistake. It opens the file update page of the sign-in window instead of a maintenance wizard.No
Create new file and transfer dataCreates a new empty file and transfers the data from the current file to it. Used when the current database has a problem.Yes

How the maintenance wizards work​

Every operation except Upgrade Database runs in a wizard: a window with pages you move between. The pages share one layout and most have the same buttons. A few pages differ, and each exception is named where it applies below.

Pages​

  • The page header shows the page title with the operation's icon, and the page text below it. The window title is the operation name.
  • For operations that start with a backup, the first page is Make a Backup. The operation's own pages follow, with its options and conditions. The last page runs the operation.
  • Some operations have a single page that holds their options and the button that runs them.
  • The close button at the top of the window is disabled. The only way out is Cancel.

Buttons​

ButtonWhat it does
CancelAsks whether to exit, then closes the wizard without running the operation. See the cancel question.
NextChecks the current page. If the page is refused, a message appears and you stay. Otherwise the next page opens. Disabled on the last page.
BackReturns to the previous page. Disabled on the first page and on the results page of Check File Structure. From the page after the backup it returns to Make a Backup, whatever you chose there.
StartOn the last page only (and on the hard disk and removable disk backup pages). On the last page it runs the operation. On the backup pages it takes the backup.
HelpAppears on pages that have a help topic, and opens it.
PreviewOn the results page of Check File Structure only, and enabled when there are errors. Saves the results to a CSV file you name (suggested name Amn schema errors.csv), and asks before it replaces an existing file.

The default button is Start if it exists and is enabled, otherwise Next. Press Enter to continue.

The cancel question​

When you click Cancel, the program asks "Are you sure you want to exit and cancel the maintenance operation?" with Yes and No. Yes closes the wizard without running the operation and returns you to the Files Maintenance window. No keeps you on the page. A backup you took on an earlier page is not undone by leaving. The exception is the file location page of Create new file and transfer data, where the program asks "Do you want to cancel Carrying Balances Forward process?" instead.

The run page and the progress bar​

When you click Start on the last page:

  1. The program disables Start and Back, and on most run pages Cancel too. On the run pages of Reindex Files, Merge Cash Bills, Regenerate Entries, Regenerate Cost Entries and Check File Structure, Cancel stays available and shows the cancel question. If you answer Yes, the button is disabled and the wizard stays open, but the operation still runs to the end. So you cannot stop an operation once it has begun.
  2. The progress bar appears, with a line above it naming the current stage.
  3. The program records the run in the file.

Do not close the program or lose the connection to the server while it runs.

The end of the wizard​

When the run ends, the program shows a message that depends on the result:

MessageWhen it appearsWhat happens next
Operation successfully completedThe operation finished.The wizard closes and you return to Files Maintenance.
An error was encountered while performing the operation.The operation failed.The wizard stays open and the buttons are enabled again.
No movement found in the specified periodThe operation found nothing to process in the period or conditions you set.The wizard stays open and the buttons are enabled again.

Some operations show a list of what they found or fixed, or messages of their own, instead of these. Each operation's page describes them.

Getting the file to yourself​

Maintenance operations change data across the whole file, so nobody else should work on it meanwhile. The program does this at two levels.

When you open the maintenance window​

When you open Files Maintenance from the File tab, the program closes the open windows (after asking you) and then reserves the file for you. While the window is open no other user can sign in to the file. They see "The files are in exclusive mode, you can't log on to the files now." When you close the window the program releases the file.

The program cannot reserve a file that someone else has reserved. If another user already has Files Maintenance open on the same file, you see the same message and the window does not open, after the open windows have already been closed. Wait until they close it.

The reservation only blocks new sign-ins. Users who signed in before you stay connected, and the program does not sign them out. Ask them to leave before you start.

Operations you start from the favorites list on the Tools page, from the Quick Launch window and its search results, or from the operation's tile on the desktop do not close windows or reserve the file, and they check no permission of the operation, as described in Run files maintenance. One check remains: the operation's tile appears only for a user who has the permission with the operation's name in the Users permissions window, on the Operations page. Close the windows and make sure nobody else works on the file before you start from these routes.

When you click Start​

These operations also check, when you click Start, the other connections to the database, and refuse to start if they find more than one:

  • Audit Accounts Balances, Audit Materials Balances and Prices and Reprice Bills and Generate their Entries.
  • Generate Entries And Post Bills, Delete Automatic Entries and Cancel Posting Bills, Regenerate Entries and Regenerate Cost Entries.
  • Renumber Bills, Renumber Entries and Merge Cash Bills.
  • Insert Expiry Date in Output Bill, Audit Currency Rates Compared To Table, Modify Security Level and Create new file and transfer data.

If the program finds more than one connection, it shows "Database is Opened By Users :" followed by the SQL Server login names of those connections, one line for each connection, so the same name can repeat, then "Please check that all users logged out then try again.". After you close the message "An error was encountered while performing the operation." appears and you stay on the run page. Ask the users to leave, then click Start again. The program checks sessions connected to the database from another program or another computer, not this copy of the program. If it finds only one connection, the operation starts with no message.

The other operations do not run this check. Make sure users have left before you run them too.

Back up first​

Most operations change data and cannot be undone. So the wizards marked "Yes" in the tables above start with the Make a Backup page, which says "It'e highly recommended to make a backup on the hard disk or the removable disk before performing this operation." You choose between:

  • To Removable Disk: opens the removable disk window.
  • To Hard Disk (selected at first): takes a backup on the server's hard disk, as in the hard disk page.
  • Don't Make a Backup (not recommended): continues without a backup. The program asks for no confirmation.

For a subscription file these choices do not appear. A page asks you to request the backup from the service provider instead.

The steps for taking the backup are in Make a backup. To return to an earlier state, see Restore a backup.

The wizards marked "No" do not show this question, and some of them change data, such as Audit Accounts Balances and Empty the tables that contain temporary results. If you want a backup before them, take it from the backup wizard before you open Files Maintenance.

This page applies to alameen ERP 10, version 10.1.79.764.