Internet Windows Android

How to do testing and fixing. Testing and fixing the infobase

Created on 10.03.2016 13:43 Published on 10.03.2016 13:43 Author: Administrator Views: 6202

Many users may encounter the fact that the 1C program crashed, errors began to appear, the program suddenly "hangs" or closes. In this case, you just need to test and fix the infobase, since this built-in mechanism almost always helps to solve such problems.

But before starting this procedure, as well as before carrying out any important operations, it is necessary to make a copy of the database. Details on how to create a copy of the database were discussed in the article Creating a copy of the database - what is it for and how to do it.

Once you have a backup copy that will save you from problems with data loss, you can proceed to the testing procedure itself. To do this, you need to run the program in the configurator mode.

When the "Configurator" is launched, click "Administration" in the menu and select the appropriate item from the drop-down list.

In the window that opens, we have the right to set up the verification option ourselves, it is proposed to tick off the necessary items.


We mark the first item, since this setting will rebuild table indexes, which will increase system performance. Setting the checkbox in the second paragraph will allow you to check the integrity of the database tables and eliminate errors in them. Next, we select the infobase referential integrity check to check all references to objects, because some of them may no longer exist or be destroyed. With this choice, the field located below becomes active, in which you can specify what to do with such objects: create new ones, clear them, or do nothing. Selecting the next item will recalculate the totals in the accumulation registers. Thanks to the "tick" next to the compression of the infobase tables, when testing and correcting, the data that we once marked for deletion and even deleted later will be finally deleted, but they still remained in the database, they simply were not visible to us. Thus, the volume of our database will decrease. And the last thing on this list is restructuring, it is needed in order for new tables with the desired structure to form, you should not be afraid of this, because all the old data will be transferred to the new ones. Thus, as we can see, in order to eliminate problems on all fronts, it is recommended to mark all items.

After we have decided on the checks and modes, we check that below it is marked to perform "Testing and fixing".

At the very end, in the case when the database is too large, it is possible to limit the check execution time.

When the testing setup is completed, you can start the process by clicking the "Run" button.

During the checks, a window for service messages will open at the bottom, that is, we will be able to observe the stages of testing and see when it is completed. Do not forget that this procedure is carried out in exclusive mode, so it is necessary that all working users close the program. It is also recommended to perform the check in question every time before updating, and how to update the program was described in the article How to update 1C.

Unfortunately, there are situations when, due to a failure in the program, we cannot even start the "Configurator". Then you will have to act in a different way, namely, to test the chdbfl.exe component. This process is similar to testing and fixing discussed above. First of all, we also need to make a copy of the database, but since in this case the work proceeds without the configurator, we make a copy by simply copying the infobase directory.

If we forgot where exactly the base is located, we can always look at the path in the launch window by selecting the desired base.


Now, knowing the exact path to the database, we find the directory and copy it.

Next, you need to find and run the chdbfl.exe utility, it is installed along with the 1C platform and can be found in the "Bin" folder of the installation directory, most often the address looks like this C:\Program Files (x86)\1cv8\8.3.7.1845\bin , where 8.3.7.1845 is the platform release number. But if you still have difficulties with the search, you can clarify the address by right-clicking on the "1C Enterprise" label.

So, we find the utility we need in the "bin" folder and launch it by double-clicking the left mouse button.

After starting the utility, a window for checking the physical integrity of the database file will open, we will need to specify the file name, the path to the database is already known after copying, open the directory with the database and select the "1Cv8" file. Check the box to correct the detected errors and click Run.


When the operation is completed, we will see the result in the utility window. After that, close the window and try to enter the program.


If there were problems with your 1C base, various errors got in, or even it stopped starting, then you should test and fix the 1C base. The first and most important thing to do before fixing any configuration is. It is not in vain that we have given 2 ways to create a backup copy of the 1C database. Even if the configuration has stopped running in the configurator mode, you can always make a copy of it using method 1 (copying the configuration file).

Now that the backup is done, start the database in configurator mode:

If your configuration is damaged so much that it does not start even in the Configurator mode, then you can restore it, which is included in the 1C Enterprise 8 delivery set.

Select ‘Administration’-‘Testing and fixing…’ :

You will see a window with the settings for the 1C base check and fix mode, which you need to select and click the 'Run' button.

This check, depending on the size of your database, can take a very long time. Therefore, it is recommended to select one verification mode at a time in the order in which they appear (at first, only the "Reindexing infobase tables" mode, then only the "Checking the logical integrity of the infobase" mode, etc.) and after each correction, check whether or not there are errors in the 1C database .

Consider all modes of verification and correction in order:

Reindexing infobase tables.

To speed up the search for certain details of objects in our configuration, the 1c system generates indexes. In this repair mode, the system will rebuild all indexes.

Checking the logical integrity of the infobase.

As the name implies, in this mode the system checks and corrects logical errors in the database table structures.

Checking the referential integrity of the infobase.

In this mode, the system checks the existence of all references to objects. If there are links to objects that do not exist, then the system can either delete such bad links or try to fix them. Therefore, for this check, you must additionally specify what to do with such objects: create new ones, clear them, or do nothing.

Recalculation of results.

Totals are a kind of indexes for registers. For example, the totals for the register of goods balances allow us to quickly get the balance of goods on the desired date, etc. In this mode, the system recalculates all totals for all periods. As a rule, this is a very long time check.

Compressing infobase tables.

This mode is more related to improving the performance of the configuration than to eliminating errors, but nonetheless. Databases grow in size over time. This happens because a lot of data accumulates in the database that we marked for deletion, then deleted, but in fact they still remained in the database (we just don’t see them anymore). Compressing infobase tables actually deletes them and the database is reduced in size.

Restructuring of infobase tables.

The most effective mode in the fight against errors. The principle of restructuring is as follows. For each database table, a new table with a similar structure is created, and all data from the old table is transferred to the new one.

After selecting the desired item, start the check by clicking on the ‘Run’ button.

The operation of the program may be disrupted due to an emergency stop, for example, during a power outage. Then the database fails to enter.

Sometimes a running program may show incorrect results. Documents "disappear" from the list, when you try to open a document, the program freezes, strange results appear in the reports. All these "glitches" stop after testing and fixing 1C.

Errors may not be so rude, but any oddities and inaccuracies are the reason for "repair work".

Causes leading to problems:

  • Emergency termination of work (sudden power off);
  • Physical deterioration of the hard drive;
  • Computer malfunctions.

Make a backup before fixing the database

Before testing the database, be sure to make a backup of it.

This can be done by directly copying the directory where the infobase is located. If you cannot enter the Configurator, then you can make a copy only in this way.

If you managed to enter the Configurator, then you need to select the option Administration → Unload infobase from the menu, as in Fig.1. In the window that opens, you need to specify the directory for saving the backup and the name of the file in which the archive will be saved.

Before testing and fixing, a copy is required because fixing makes irreversible changes to the data. Sometimes (very rarely) they may not improve, but worsen the state of the database.

During normal operation, backups should be made regularly, preferably daily. In order for this work to be performed automatically, install a free program Back-up-1C Accounting backups.

It is better to store backups not on the same media where the database itself is located. A flash drive, storage on the Internet, another hard drive will do. After all, sometimes data loss is associated with the physical deterioration of the hard drive.

Backups are insurance against data loss. However, you cannot guarantee that everything is perfect in backups, so the Testing and Fixing option does not decrease in relevance.

Rice. 1. Uploading data.

Summarize:

  • Backups should be done regularly;
  • Backups must be stored on other media;
  • There is a program for automation Back-up-1C Accounting backups;
  • Before testing and fixing, be sure to make a copy of the database.

Correction of the infobase by internal means of the program

After the backup copy is made, open the database in the Configurator mode. Select the menu option Administration → Testing and repairing the infobase.

In the window that opens, check the boxes (Fig. 2).

But it is better not to do this: not all the operations listed in the menu are necessary for repairs after an accident.

Fig.2. Testing and correction window 1s 8 with checkmarks in all items. Do NOT do this:

If you check all the items, a long process will start. The results of testing and fixes are displayed at the bottom of the window. After completing the steps, click on the button close.

Doing everything is not the best option! Powerful users perform actions step by step and selectively.

Correction steps

Consider all menu items Testing and fixing.

  • Reindexing infobase tables;
  • Logical integrity check;
  • Referential integrity check;
  • Recalculation of totals;
  • Table compression;
  • Table restructuring.

The first stage, Reindexing infobase tables, helps to solve 90% of problems. What happens during the reindexing process?

Entering data into directories, creating new documents is accompanied by their automatic ordering. Titles are listed alphabetically, documents are sorted by date, and so on. In this case, the physical order of the records does not change. Records are displayed in a certain order because they are assigned numbers (indexes), and the correspondence of the index to the physical record number is contained in the index tables.

Indexes are very important:

  • Searches in indexed tables are many times faster than in non-indexed ones;
  • The index number is a unique "code" of the record; the indexes are used to link between records from different tables;
  • Index tables are the framework of an infobase; without them, the 1s program does not work.

Violation of index tables leads to chaos in the presentation of documents. For example, a document may be highlighted in which there are no names of goods, but there is a quantity of them.

Each new entry is accompanied by changes in the index tables: for example, after making an entry in the directory that begins with the letter A, it will be assigned one of the first indexes, and all other index numbers will be changed. A short pause that occurs after a new entry is made is due to the recalculation of indices; the larger the base, the more noticeable the pause.

The creation of a document and records in it sets in motion several index tables (sometimes several dozen). In fact, tables are reindexed in 1s constantly while working with data. But in production mode, one or more tables are indexed each time, while Testing and Fixing performs a full indexing of all tables, and this process, for large databases, takes a long time.

So, when reindexing, the following processes occur:

  • Records are re-ranked and ordered;
  • The connection between tables and other objects is restored;
  • In many cases, the operation of the program is restored.

After reindexing, you can check whether the database has recovered.

The next step is to check the logical integrity. The conformity of the real structure of the infobase with its description in the Configuration (the presence of objects, the presence of links between objects) is checked. This check often reports errors even in a running database, you should not panic with such messages. However, this is a reason to seek the advice of a specialist.

Checking referential integrity "rings" the links between objects. Sometimes a table uses a reference to a missing object, such as a deleted document. It is customary to restore referential integrity manually, according to the list obtained as a result of the check. Sometimes referential integrity is broken in "abandoned areas" - in old irrelevant documents. Then they just ignore them.

Recalculation of totals is a lengthy and risky procedure. In 1s, the results are recalculated in the normal mode, but it is not conducted “from the beginning of time”, but from the beginning of the month. The total values ​​are tracked in registers, which speeds up the work. If you turn on the recalculation of totals in the testing and correction mode, then the recalculation will be performed from the moment the database was created, and the correct current register values ​​\u200b\u200bmay “float” due to documents deleted long ago or corrected “backdating”. As a result, a long work on the recalculation will not be useful.

If there is no need, then it is better to refrain from recalculating the results.

Table compression is the procedure for physically deleting records that have been marked for deletion and are no longer displayed. There can be a lot of such records, they uselessly inflate the volume of the database.

Table compression is a useful feature, although it is not required.

Table restructuring is an operation that is relevant when switching to a new version of the program. During the restructuring, empty tables are created with the format specified in the configuration, and information from the old tables is transferred to them, record by record. Fields can be expanded in new tables, new fields can be added. Restructuring is an operation that should prepare the infobase to work in a new way, and it is absolutely necessary for updates.

If no versions have changed, then restructuring is not needed, this lengthy procedure will not add or change anything.

So, when fixing a “fallen” program, the following options are necessary and useful:

  • Reindexing infobase tables
  • Checking logical integrity
  • Referential Integrity Check

What should I do if I can't run Test and Fix?

If the database is badly damaged and you can't even enter the Configurator, there is one more recovery option left: use the chdbfl.exe utility. The file can be found in the Bin folder of the installation directory (Figure 3).

Rice. 3. Selecting the chdbfl.exe utility

From the entry in the command line shown in Fig. 3, it can be seen that the path to the file lies through the 1cv8.2 directory, or 1cv8.3, in short, through the program directory. It may be located in the Program Files folder or in another folder. You need to find the location of the directory and open it. Inside the directory, open the Bin folder,

After running the executable file, select the base to be corrected and allow the detected errors to be corrected (Fig. 4)

Fig.4. chdbfl.exe program window

Let's summarize. If the program does not start after a crash, do the following:

  • Make a backup;
  • Try to log in through the Configurator and use the Test and fix option;
  • If you cannot enter the Configurator, find the exe program and try to save the data using this program;
  • If all attempts fail, you need to seek help from specialists;
  • In case of irrecoverable data loss, install the latest workable backup;
  • If backup was not performed, restore data from primary documents and paper printouts.

Successful data recovery does not always happen. Insurance against data loss is daily backup: if the infobase is damaged, you can go back a day and quickly restore lost records.

vk.com/buhcenter vkontakte group.
1-bc.ru website of the company, where you can get acquainted with the services.
 Reindexing infobase tables.
To quickly search for information, auxiliary tables are added to the main tables with the main data, in which the data is sorted according to the specified fields of the main table - the index table. Through the use of indexing tables, the performance of 1s increases significantly, since there is no need to go through the entire main data table for sampling, you can use the index file and select the necessary records from there.
When data is written to the main data tables, the index tables are also populated. But for various technical reasons, indexes can go astray, which can eventually lead to errors. To correct this class of errors, when testing and fixing the 1s 8.3 base, you must check the box for this menu item.
 Checking the logical integrity of the infobase
At the time of creating new objects in the 1s configuration, new tables are created in the database, in which links with other tables of the database are indicated. For various reasons, links may become incorrect (for example, due to an incorrect update or an unexpected power outage at the time of recording). To fix this kind of error, select this menu item.
 Checking the referential integrity of the infobase
You probably have seen "broken links" in 1s configurations. If not, then you are lucky!
To identify and correct these errors, select this menu item, and the options for processing such errors are activated below (see the figure above). We can choose how to fix errors when there are references to non-existent objects: create objects, clear links, do not change; and in case of partial data loss: create objects, delete an object, do not change.
 Recalculation of totals
To perform quick data samples in the 1c database, there are tables with already calculated data at monthly intervals. When we access this data, it is not collected from the main tables (this would take a lot of time), but is issued immediately from the data of the tables of totals. Accordingly, for this mechanism to work, it is necessary to have correct results for past periods. Therefore, if 1c "deceives" in the reports, then such an error is corrected by this menu item.
 Compressing infobase tables
Deleting objects in the database is a rather painstaking and long operation, therefore, in 1s configurations, the deletion process is divided into 2 stages. When you delete objects in the configuration, the data in the 1c database is reset to zero and, because of this, does not participate in further operations, although they physically remain in place. To clean the tables from these records, testing and fixing the 1s 8.3 database with the menu item "Compress infobase tables" is done.
 Restructuring infobase tables
When changing the details of any metadata object 1s, the database needs to supplement all tables of the changed object with new records. This is done through the restructuring of the database tables. During the restructuring process, copies of the database tables with the current configuration structure are created, after which the data is transferred to the created tables. If an attribute is added in the 1s metadata, an empty column will be created for it in the new table; if an attribute is deleted, a column for this attribute will not be created in the new table, and, accordingly, it will not be transferred.
During the restructuring process, all database tables will be recreated, so this operation is the longest.

After the crash of the 1C program, it is recommended to test and reindex the infobase (IB).

Procedure:

1. Make a copy of the infobase in any of the following ways:

2. Run the program 1C 7.7

3. In the "Start 1C" dialog box, in the "In mode" drop-down list, select "Configurator". Select the required database in the list of infobases. And click OK.

4. The Configurator will launch.

5. Select the menu "Administration" - "Testing and fixing information security ..."

6. In the "Testing and repairing the infobase" dialog box that opens, check that the following items are checked:

  • Physical Integrity Check
  • Reindexing
  • Checking logical integrity
  • Service data recalculation
  • Recalculation of totals

By default, all testing stages should be set, except for packing IS tables

7. Select the "Test and fix" radio button (if you want to test, select "Test only").

8. Click the "Settings" button.

In the "Infobase repair settings" dialog box that opens, select the two radio buttons "Create objects" - OK - Run.

9. The dialog box of the Configurator will appear with the message: “Before performing the operation, it is recommended to make a backup copy of the database, because fixing the database is an irreversible operation. Continue?". Click OK.

10. After testing is completed, in the Configurator window that appears with the message "Infobase testing completed", click OK - Exit.

Close the Configurator.

Note:

If the infobase cannot be repaired, restore it from the latest backup copy (For more information about restoring data from a copy, see )

An information copy is restored from a backup copy to the directory with the current infobase, and all its contents will be replaced with the information from the backup copy.

Therefore, before restoring, check which infobase is selected as the current one.

Attention:

If you do not feel like a sufficiently trained user of the program, entrust the work with the information base to specialists!