1c enterprise error working with file. Error: The database file is corrupted. Restoring from a backup
Many different errors can occur in information databases on the 1C platform:
violation of the logical/physical integrity of the database, user errors, “crooked” developer code and much more.
There can be many reasons: the power was turned off and there was no source uninterruptible power supply, or Friday evening was a success, and the user can no longer remember on Monday what he did.
First, it’s worth asking a few clarifying questions to the user:
1) Platform/configuration releases.
2) Full text of the error message. Users have the unfortunate tendency to not read such messages in their entirety, and perhaps they contain recommendations for troubleshooting.
3) How long ago it arose and under what circumstances it appears. We are unlikely to be able to fix non-reproducible errors that we have not encountered before.
4) Does this happen if I run 1c from another computer/from another user? This will give us food for thought - whether clearing the cache, setting permissions, or clearing user settings can help.
Now a little about the errors themselves and how to solve them.
General:
Some errors occur when using unlicensed software (Windows, 1C, etc.).
A common example is a broken platform. One of the patches hacks a specific version of the platform, so after installation new version platform and try to log into the database, you can see the “No free license found” window.
If you encountered an error for the first time - perhaps someone has already encountered it -
Search on Google, maybe someone has already encountered this and solved the problem, and you won’t waste an extra couple of hours of your time.
The release of configurations must be up-to-date (primarily for the configurations from which regulated reporting is submitted); it is not without reason that the consultation line almost always suggests updating first, and then looking further.
Current platform release - for each configuration it is written which platform release is recommended for working with this configuration.
The technological log allows you to log all 1C:Enterprise events (or part, using a filter).
You can read about him also.
!!!IMPORTANT
Before any actions with the database, make an archive copy!
If the database does not open in the configurator, copy the folder with the database and perform all operations on the copy!
1) The database does not open at all, either in user mode or in the configurator.
- The fastest thing you can do is clear temporary files (remove the database from the list of databases and connect again)
This action will not delete temporary files (cache), but will create a new folder for temporary files database, you can delete files:
On Windows 7 in C:\Users\Username\AppData\Roaming\1C\1Cv8x
In Windows XP C:\Documents and Settings\User_Name\Application Data\1C\1Cv8х
- You can also try to log into the database from another user.
- If the database is file-based, then it is worth running the utility for testing the physical integrity of the database chdbfl. It is located in the folder:
C:\Program Files (x86)\1cv8\8.x.x.xxx\bin\chdbfl.exe
- If the database is sql, then testing using sql.
- If neither one nor the other helps, then you can update the platform (see which platform the release works under)
- If none of the above works, you can use the Tool_1CD program.
2) If the database is dumped upon startup.
- Disable hardware acceleration video cards:
- Open screen properties. This can be done through the Control Panel, or simply by clicking right click mouse anywhere on the desktop, free from windows and icons, and selecting the “Properties” context menu item.
- In the display settings window that opens, go to the “Settings” tab and click the “Advanced” button.
- In the video card properties window that opens, go to the “Diagnostics” tab.
- Move the "Acceleration" slider to the far left position ("no") and click "Apply" or "OK". Hardware acceleration is disabled. The changes will take effect after the system is rebooted.
- Open Control Panel (Start - Control Panel).
- Find and open the Screen element.
- In the left part of the window that opens, click on the “Configure screen settings” link.
- In the window that opens, click on the “Advanced settings” link.
- Go to the Diagnostics tab and click the Change Settings button.
- In the window that opens, move the slider to the far left position (“no”) and click “Ok.” If UAC is enabled, you will have to confirm that the changes are authorized by the user. Hardware acceleration is disabled. The changes will take effect after the system is rebooted.
In Windows 7, in some cases the "Change Settings" button will be grayed out. In this case, it is impossible to disable hardware acceleration, since the video card and its driver do not support manipulation of hardware acceleration.
- If you have Kaspersky antivirus, you can try disabling self-defense and renaming the kloehk.dll and mzvkbd3.dll files in the Kaspersky folder. (The error occurred on older versions from 2011, but still occurs sometimes)
- Check that the release platform/configuration matches.
- Try logging into the database from another platform.
3) The database opens in the configurator, but does not want to enter user mode.
- Clearing temporary files
- Trying to log in as another user
- chdbfl / testing using sql
- Information security testing and correction:
In the configurator Administration-Testing and Correction - checkboxes depending on the situation. - Try to create another user with full rights and log in as him.
- Try to transfer it to another PC and open it there, maybe something from the PC.
4) When some action occurs, it throws the code into the configurator.
- To check, you should clear the cache.
- If it doesn’t help, then most likely there is an error in the code - this is especially true for non-standard and self-written configurations, but sometimes occurs in standard ones too.
If the configuration is atypical, then either the update was completed incorrectly or the developer who finalized the configuration did not provide for all the possibilities of user errors - foolproof (if possible!).
If it is typical, then there may be a bug in the release.
In any case, it's worth running through the debugger and seeing what's wrong.
5) Under one user it allows you to do something, under another it does not.
- User rights settings.
- User settings.
- Clearing the cache.
6) It logs in from one PC, but not from the other.
- Check in Explorer to see if the database is visible - maybe the folder with the database is not shared.
- Clearing the cache.
- Login as a different user.
7) I didn’t do/did anything but everything broke for me
- If they can tell you what exactly they “didn’t do” and when, then you can use
- log with selections and perhaps find out what the problem is.
- The log book can be found in the configurator:
- Administration - log book.
Or in user mode - the location depends on the configuration.
8) Not enough memory.
I had a case, a client came and said that when closing the month, the error “Insufficient memory” appears. I took on this problem. I thought it was easy, first I added RAM - a mistake. It was 2 gigabytes, now it’s 4, but 1s is still not enough. I changed the size of the paging file - an error, reinstalling the system (installed Windows 7) gave only a temporary result, for about a week. I tried everything. After some time, a solution was found.
Solution
Run on the client computer command line on behalf of the administrator, write the following there:
BCDEdit /set increaseuserva xxxx- instead of xxxx, write the amount of virtual address space in megabytes, i.e. how much memory is needed for running applications. Default is 2 gig. In general, 32-bit operating systems allocate 4 gigabytes: 2 for applications and 2 for the needs of the OS itself. I chose 3000 (ie CDEdit /set increaseuserva 3000 ). However, the system may be buggy. Especially if you have 2 gigs of RAM, like me. This is for the OS family Windows Vista, 7, Windows 2008.
For Windows XP\Windows 2003 we write
/3GB /userva=xxxx (xxxx in MB in the range 2048 - 3072) in the boot.ini file, recommended maximum values userva 2900-3030.
9) Form elements overlap each other and are incorrectly positioned.
- Clearing the cache.
10) DBMS error Internal error dbeng8 components
- The error is due to differences in code between different versions of the platform when users try to use the file option. For the client-server option, at startup, control and work with different versions platform is basically impossible.
Solution: update to the latest release on all workstations.
If it doesn’t help, then do the following:
- Testing and fixing
11) Error in platform 8.3.4.428
- In version 8.3.4.428 of the 1C:Enterprise platform, a critical error was discovered that occurs during data restructuring. This error localized and will be fixed in next version platforms.
12) Lock conflict when executing a transaction:
Microsoft OLE DB Provider for SQL Server: Could not continue scan with NOLOCK due to data movement.
HRESULT=80040E14, SQLSrvr: SQLSTATE=42000, state=3, Severity=C, native=601, line=1
"How to check (restore) a database on MS SQL Server using server tools
Logical integrity check must be performed regular means 1C:Enterprise (Testing and correction of information security). If such a check cannot be performed, you should check the physical integrity of the database using MS SQL. To check integrity using MS SQL, you need to run the following command:
Code:
DBCC CHECKDB ("",REPAIR_REBUILD)
Before executing this command, you need to switch the database to "single user" mode:
Code:
sp_dboption "","single user",true
During the operation of DBCC CHECKDB, errors may be detected and some may be corrected immediately. If errors remain, then apparently they cannot be restored without losing some data. In this case, you need to run DBCC CHECKDB with the REPAIR_ALLOW_DATA_LOSS parameter (it is advisable to make a copy of the database files before running).
Code:
DBCC CHECKDB ("",REPAIR_ALLOW_DATA_LOSS)
After executing DBCC CHECKDB, you must remember to return to normal mode (exit "single user" mode):
Code:
sp_dboption "","single user",false" (Taken from the site)
Of course, the list is far from complete, so I will be glad if it is supplemented in the comments.
The 1C error “Database file is damaged” regularly occurs when working with platform versions 8.2 and 8.3. This error can occur both when starting the infobase and during any operation. Let's look at how you can fix this error.
Rice. 1. Error window
First of all, BE SURE(!!!) to make a copy of the damaged database. It's better to make a copy of the 1Cv8.1CD file. To do this, you need to go to the directory where the database is stored, copy it and save it in any directory convenient for you.
Rice. 2. Copying the database
Rice. 3. Inserting the database into the catalog
After copying the database, internal testing is necessary. To do this, go to our database through the configurator, go to the “Administration” tab and click on “Testing and correction”.
Rice. 4. Launch the Configurator
Rice. 5. Testing and fixing
A window appears before us for testing and correcting the information base. Check the boxes as shown in Figure 6 and start testing.
Rice. 6. Run testing and fixes
After internal testing, external testing must also be carried out. To do this, we close the configurator and open the chdbfl.exe utility. It is located in the platform folder, which is usually located in the C:\Program Files (x86)\1cv8\8.3.10.2252\bin folder.
Fig.7. Path to the utility
Let's launch this file, in the “DB file name” field, enter the path where our database is located and check the “Correct detected errors, then perform testing.”
Rice. 8. Launch external testing
After all operations have been completed, you can log into the database. If none of the above methods helped restore the damaged database, you will have to deal with it manually. Only a qualified programmer can do this.
Pivkin Andrey. Consultation Line Specialist
The 1C error “Database file is damaged” regularly occurs when working with versions 8.2 and 8.3. The most common cause of database corruption is unexpected shutdown due to hardware failure or power outage.
There are 4 options to solve this problem at the user level:
- Recovering from the latest backup copy.
- Creating a backup copy from a damaged database and then restoring it from it.
- Correcting the database using built-in tools.
- Repairing the database using the chdbfl.exe tool.
Of course, the choice of one or another algorithm depends on the specific situation. To understand the capabilities and advantages of each method, let's look at each of them in more detail.
Restoring from a backup
This option is optimal for correcting a 1C database file error if a backup copy is automatically created daily. Be sure to keep in mind that all data entered after creating a backup will be lost. If this is unacceptable, immediately proceed to the second method.
To restore from a working backup copy, you need to launch the configurator, then select the “Download” sub-item in the “Administration” menu information base...».
If you are restoring a database for the first time, be sure to perform backup(how to make a backup copy of the 1C: Enterprise database manually is described in the next paragraph).
It is recommended to restore to a new database. This will provide an additional guarantee that all accumulated errors will be eliminated. If there is no fresh backup copy or the data in it is not up-to-date, you can try to restore the damaged database (this is why a backup is needed).
Working with a backup copy of a defective database
In the configurator, open the “Administration” menu and select the sub-item “Upload infobase...”. As a rule, uploading data proceeds without problems, but if the program is severely disrupted, backup using standard means may fail. You can solve this problem by manually copying the database file, which is called 1Cv8.1CD. Copy this file with any in a convenient way to an empty directory.
Do you have a question or need help from a consultant?
Already at this stage you can try to download the data in a regular way by connecting to a database file placed in a different directory. The cause of the 1C error “Database file is damaged” may be damage not to the database itself, but to the cache, which will be completely reset after these manipulations.
If the database still does not open, you should try to restore it from the damaged copy you just saved using the method described in the previous paragraph. When transferring information, the program can ignore erroneous entries and correct the database itself.
Correction using built-in tools
Elimination of errors in the 1C database file can be done using the utility included in the package. To run it, you need to select the “Testing and fixing...” item in the “Administration” configurator menu.
Experienced users can adjust the configuration as they wish, but in most cases the option shown in the illustration will be optimal. You can experiment with the “Check and Modes” settings block, rearranging the checkboxes and evaluating the effect.
There is no point in selecting the “Testing only” checkbox (provided that you have backed up the damaged database and the utility’s actions will not aggravate the situation).
One of the most common causes of the 1C error “Database file is damaged” are links leading to non-existent objects. When you check the “Create objects” checkbox, the program will create a new object for each erroneous link.
Having selected the required configuration, start the repair process with the “Run” button. After finishing the work, the utility will report the result.
chdbfl.exe utility
If the previous method did not work, or the database is so damaged that it is impossible to enter the configurator, you can try to run the utility directly from the disk. It can be found in the directory with the installed software package. You can find this directory using the shortcut through which the program is launched. To do this we open context menu(right-click on the shortcut) and select “Properties”.
For 1C-Bitrix: Site Management, integration with 1C is not a problem. This is a standard function that has been present for a long time since the version software products"1C:Enterprise 8.1", edition Trade Management (version 10.3.4) and "1C-Bitrix: Site Management" version 6.5, editions Small Business, Business and Big Business.
Online trading is no different from regular retail in terms of accounting. In this regard, the question arises of coordinating sales through an online store and posting them using the 1C accounting system. For “: Site Management” integration with “1C” is not a problem. This is a standard feature that has been present for a long time since the version of the products "1C:Enterprise 8.1", edition Trade management(version 10.3.4) and " " version 6.5, as amended Small business, Business And Big business.
Despite the existing documentation for the product, many website developers have difficulty exchanging data in these two programs. Integration difficulties vary. Let's look at some of the most common ones that arise for many users.
Typical problems can be grouped roughly as follows:
- Server side performance issues
- Errors when working with data files
- Authorization problems
- MySQL Errors
- Logical errors
Let's start in order.
Server side errors
Errors on the server side occur for a number of reasons, but what they have in common is that it is not so much the program settings “” or “ that are to blame. 1C:Enterprise", how much server settings or problems in communication lines. Basically they are “treated” by the appropriate settings server equipment And software. And only if this is not possible - by a one-time reduction in unloading volumes. To solve most of these problems you cannot avoid contacting the service technical support hosting company where your website is hosted.
The most common manifestations of these errors:
- Error working with the Internet, the following message is displayed: sending failed data to the peer (no headers, no data);
- An empty server response was received;
- Errors 502, 500 or error 404 are already in the process of exchange;
- Out of memory error, for example the following message is displayed: Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 102401…)
- Failed to get the current state of the exchange process. Exchange data has been sent but not downloaded.
Common solutions are to change the server settings. First, you can increase the time and memory limit in the PHP settings.
- php.ini.oci, located in the folder / apache.
- Find the parameter group in the file Resource Limits.
- Increase parameter values max_execution_time And memory_limit.
- Reboot the server.
Secondly, increasing the server timeout often helps. It is better to contact the hoster for this, since you most likely will not have access rights for this. But if you have the opportunity to do it yourself, then you need to perform the following sequence of actions:
- Open the file for editing httpd.conf placed in a folder / apache/conf/
- Change the parameter value Timeout.
- Reboot the server.
Another solution to this problem (if the hoster does not agree to increase the timeout) is to make the server timeout and timeout equal. 1C-Bitrix: Site Management» (page Store > Store settings > Integration with 1C, field Interval of one step in seconds). In this case, step-by-step execution will proceed synchronously.
If the specified measures do not help or the specified parameters cannot be changed, then, as a last resort, you can do the following:
Finally, you can reduce the volume of unloading goods at one time. Set up a filter by item on the “1C” side:
- Run the Communication Setup Wizard ( Services > Data exchange with WEB site > Configure data exchange with WEB site)
- At the first step of the wizard, select Change an existing communication setting and press the button Next.
- Select the setting you want to edit and double-click on it.
- Bookmarked Unloading goods(Or Exchange of orders, depending on the situation) change the filter values.
- Save your changes and sync again.
Errors when working with data files
Errors when working with files are mainly caused by incorrect setting file access rights. Typical messages in this case look like this: “Error opening file” and “Error writing file.” Ways to solve the problem, of course, are to set access rights at the level operating system.
Let's pay attention to the phrase “at the operating system level.” Rights at the level " 1C-Bitrix: Site Management", as a rule, are always set correctly. However, it doesn’t hurt to check your import/export rights. This is done on the page Store > Store settings > Integration with 1C.
Most likely reasons:
- The user from whom the data is being exchanged does not have write rights to the folder /upload .
- The file is created with permissions that do not allow the file to be read.
- The file can also be transferred to the server in a zip archive, but for certain reasons the archive could not be unpacked, for example, the function does not work correctly zip_open on the server.
The solutions to these problems are quite simple and understandable from the problems themselves and can be solved by contacting the hoster, who will set the necessary rights.
Setting the correct rights to created files within the " 1C-Bitrix: Site Management"is done as follows:
- Open the file for editing dbconn.php from folder / bitrix/ php_interface.
- In line define("BX_FILE_PERMISSIONS", 0644); set the values recommended by the hoster instead of the default 0644.
In the same way, you need to check the permissions for the created folders. Only this is done already in the line define("BX_DIR_PERMISSIONS", 0755);.
This is what checking for the presence of a ZIP extension in PHP settings looks like:
Note that errors when working with data files can also occur due to the fact that the computer on which the 1C accounting system is installed has a firewall or antivirus that prevents the correct transfer of the file or blocks sending the file to the server.
1C cannot pass the authentication procedure for the site and therefore an error is thrown. This is usually caused by incorrect settings " 1C-Bitrix: Site Management».
1C may receive an incorrect response when trying to log in to the site. This could be a mistake by your website developer. The fact is that when authorizing, the first line of the response from “1C” is waiting for “success”. But during the creation of the site, developers could accidentally leave test strings in the output files during the development process.
For example, in the file /bitrix/php_interface/init.php or /bitrix/php_interface/dbconn.php, etc.
Thus, 1C may receive a response not “success”, but “testsuccess”, although the given authorizations were sent correctly.
Other typical mistake consists of access rights to import the catalog. Authorization may not be performed if the user performing the import does not have sufficient rights. You can check this on the page Store > Store settings > Integration with 1C.
Go to the specified page and do the following:
- In the field Allow downloads to user groups see which users are allowed to import/export data.
- Depending on your specific situation, or change the import permissions for the right groups or include the desired user in the group that is allowed to import from 1C.
But special errors may also occur in authorization. For example, when running PHP in CGI mode. This is typical for sites hosted on Windows servers. You can check this using the file test.php, as we did when checking properties ZIP. In server properties Apache in line Server API in that case it's worth it CGI. You can try to get around this problem, and if that doesn’t work, then it’s advisable to contact hosting technical support.
To “work around” the problem, it is necessary that processing is enabled on the server .htaccess and support mod_rewrite. Follow these steps:
- In the root of the site to a file .htaccess add the lines:
RewriteEngine on
RewriteRule .* - - Comment out following lines in the file .htaccess folders bitrix/admin/, which turn off mod_rewrite:
#
#RewriteEngineOff
#
- To file dbconn.php folders bitrix/php_interface/ add the lines:
$remote_user = $_SERVER["REMOTE_USER" ]
? $_SERVER["REMOTE_USER" ] : $_SERVER["REDIRECT_REMOTE_USER" ];
If ($strTmp)
List($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]) = explode(":", $strTmp) ;
MySQL Errors
Database errors can have many causes, as well as solutions. The most obvious of them are as follows:
- The message is displayed: Lost connection to MySQL server during query. The error is most likely in the timeout.
Possible solution to the problem: $DB->Query("SET wait_timeout=28800");
If this does not help, then you need to contact the hosting company's support service to increase the timeout.
- Encoding conflict. For example, the message is displayed:
The reason is that the database tables are in one encoding, and the database itself is in another. In this case, the base is latin1 and new tables are created in latin1. When unloading from 1C, a temporary table is created b_xml_tree in "incorrect" encoding latin1.
The solution is simple and clear: change the base encoding to the correct one. To solve this problem you need to contact your hoster.
Logical errors
Logical errors occur if the user misunderstands the data exchange process and, accordingly, performs some actions incorrectly.
Most common mistake When unloading a product catalog, it appears along with the message: “Product changes have not been registered. The goods were not unloaded." As a rule, in this case, the product filter is configured incorrectly. You need to check these settings. As a rule, there are selected parameters that do not allow you to correctly filter the parameters for uploading.
But there are situations when such a message is a normal situation. This happens if in the settings Data exchange mode with WEB site installed: Upload only objects that have changed since the last exchange.
Another error when uploading a product catalog is the message: “The item type could not be found.” This error occurs if 1C does not have the “Service” and “Product” types. These types are critical to the process of communicating with the site. The solution to the problem is to create the specified types of nomenclature in 1C.
If during the exchange process an error occurs: “Object field not found,” this means that no matches have been established for the order fields in “ 1C-Bitrix: Site Management" Check the settings specified in the Export to " 1C:Enterprise» pages Settings > Product Settings > Module Settings > Online Store. The “Full Name” and “Title” fields are critical for 1C, that is, without the task of matching these fields, the export will not be performed. Please note that mappings are configured separately for different types payers.
Resume
Export/import of goods and orders in conjunction with " 1C-Bitrix: Site Management" And " 1C:Enterprise» allows you to solve problems of data synchronization on the website and in the accounting system. As in the operation of any other complex system, problems and inaccuracies may arise in this “bundle”. However, they are all solvable. Available from 1Soft partners.
Robert Basyrov
All rights reserved. For questions regarding the use of this article, please contact