Check File's Physical Structure
The Check File's Physical Structure wizard checks the database tables of the open file for damage in the way they are stored, and it can repair that damage. Its description in the Files Maintenance list reads: "This window enables you to check the program environment through checking database tables in order to find out errors in the files structure only Not the errors occurred from operations and reports." Errors in the data itself, such as an unbalanced entry, are found by Audit Files. For the working steps see Check the physical structure of the file.
During the check the program removes the other users from the file at once and cancels their unfinished transactions. The options Fix and Rebuild and Fix and Allow Data Loss change the database, and the last one can delete data. Take a backup before any repair.
Opening the wizard
- On the File tab click Tools, then Files Maintenance. Select Check File's Physical Structure and click Execute. Selecting it shows the warning frame "This operation is dangerous …" (the frame shows for every operation whose severity is above low), and this operation has the highest severity. 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 when your edition includes accounting and the file does not work in multiple files mode (Available maintenance operations).
- You need the Files Maintenance permission (conditions). Users Management > Operations also lists a permission named Check File's Physical Structure; 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 rules for reserving the file for one user are in A file reserved for one user.
Wizard pages
| Page | What it holds |
|---|---|
| Make a Backup | Shown first, and described in Make a backup. The hard disk or removable disk page follows, depending on your choice. |
| Check options | You choose whether the program only lists the errors or repairs them. |
| Starting the check | You click Start. |
The Next and Back buttons, the cancel question and the progress bar are as described in How the maintenance wizards work.
Check options
The page title is "Check File's Physical Structure". It has four options, and you select one.
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Without Repair (view report of existing errors) | Checks the database and lists the errors without changing anything in it. | One of four | Selected when the page opens. |
| Fast Repair | Runs the check in the fast repair mode of SQL Server. | One of four | |
| Fix and Rebuild | Runs the check in a repair mode that includes rebuilding damaged structures such as indexes. It can take longer. | One of four | |
| Fix and Allow Data Loss | Runs the check in a repair mode that does not hesitate to delete damaged data. | One of four | Use it as a last resort, after a backup. |
The option you chose stays selected if you return to this page with Back.
| Button | What it does |
|---|---|
| Next | Goes to Starting the check. |
| Back | Returns to the backup page. |
| Cancel | Asks whether to leave the wizard. |
Starting the check
The page says: "Click "Start" to begin Checking file's physical structure." It has a status line and a progress bar that stays hidden until you click Start.
| Button | What it does |
|---|---|
| Start | Starts the check with no confirmation question. |
| Back | Returns to Check options. |
| Next | Disabled: this is the last page. |
| Cancel | Before Start it asks whether to leave. During the check it is disabled, so the check cannot be stopped. |
What happens on Start
- Single-user mode: The program disconnects the other users from the database of the file, cancels their unfinished transactions, and puts the database in single-user mode.
- The check: The program checks the whole database and asks for all error messages without the informational ones. The check mode depends on the option you chose.
- Recording: The program shows every error in the error window, and records the maintenance and its errors in the maintenance log of the file.
- Users return: The program puts the database back in multi-user mode.
The bar advances in three steps: after single-user mode, after the check, and after the return to multi-user mode. The time depends on the size of the file and can be long.
At the end the message "Operation successfully completed" appears even if errors were listed, and then the wizard closes. If the check finds no errors, this message is all you see.
Error window
Every error the check finds is a row in an error window that opens by itself. The text of the row is the SQL Server message as it arrived, which can be in the language of the server and not of the program, followed by the native SQL Server error number and then the state code. The window itself (header lines, rows, the right-click menu, double-click, closing and clearing, and the way it stays open for the whole session) is described in the error window on the Audit Files page. Rows from this check are added to the same window, under the rows of earlier runs.
Messages
| Message | Why it appears | What to do |
|---|---|---|
| Are you sure you want to exit and cancel the maintenance operation? | You clicked Cancel before Start. | Click Yes to leave with no change, or No to stay. |
| Unable to set single user mode on database: the database name, with the error lines under it | The database could not be put in single-user mode. The first line is always in English. | Read the error lines. The check did not start. "An error was encountered while performing the operation." follows. |
| Unable to reset single user mode on database: the database name, with the error lines under it | The check ended and the database could not be put back in multi-user mode. | Read the error lines, and ask the SQL Server administrator to return the database to multi-user mode before anyone signs in. "An error was encountered while performing the operation." follows. |
| An error was encountered while performing the operation. | One of the two cases above failed. | Review the message before it. |
| Operation successfully completed | The check ended, whether errors were found or not. | Review the error window if it appeared. |
Related
This page applies to alameen ERP 10, version 10.1.79.764.