A critical error occurred 1c. Infobase conversion error. C, restoring the infobase configuration using MS SQL

When working in 1C:Enterprise, the following message may pop up: “To work with the new version of 1C:Enterprise, the infobase must be converted.” Why does this window appear and how can I resolve the error?

In most cases, the reason for the appearance of the window is a recent transition of the program from an outdated version of the platform to a newer one. On different platforms information base 1C is formed in its own way and takes on a different composition. All that needs to be done is to convert the database (the structure of which corresponds to the outdated platform) into the newest format.

Database conversion

This procedure is simple, however, it is recommended to first create a backup copy of the database in case an error occurs during conversion (for example, the computer turns off, resulting in information base 1C, like the program itself, may be damaged). Then apply the following algorithm of actions:

  • Open the database in configurator mode;
  • You will see a message asking you to convert the infobase. Click confirmation;

  • Close the configurator.

Open the database - it should start without problems. If the error window continues to appear after conversion, you can try the procedure again. If this does not help, you need to contact a 1C programmer. Sometimes the program may freeze while performing an operation. There is no need to take any action at this moment.

Important! Information base 1C converted by the latest version of the program cannot be opened on previous versions.

Background

We needed to create a new information register “MessageTrackingLog”. Added to the configuration, loaded the data. Then came the optimization work. I had to change the register structure. But it was not there!

Everything is clear here. The records have become non-unique, you need to delete them!

The easiest way is:

NewRecord = InformationRegisters.MessageTrackingLog.CreateRecordSet(); NewRecord.Write();

Using this method, we will clear the register in 1C very quickly (but this will also be our mistake).

Error

It would seem that the register is empty, and you can update 1C. I don’t want to surprise you, but there will be an error again:


What does the error represent:

A critical error occurred during the infobase update process
because of:
Trying to insert a non-unique value into a unique index:
Microsoft SQL Server Native Client 11.0: The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name "dbo._InfoRgChngR34546NG" and the index name "_InfoR34546_ByNodeMsg_RNTSRRRRRRNG". The duplicate key value is (0x00000011,d7, , Sep 27 4015 10:22PM, 768404,00,00,00,00,00,00).
HRESULT=80040E2F, SQLSrvr: SQLSTATE=23000, state=1, Severity=10, native=1505, line=1

Explanation

Let's understand the structure of SQL. We have a register "MessageTrackingLog", in SQL it is located in the table " _InfoR34546". You can check this using special processing or the “poke” method (we don’t have to do this because the name of the table is already indicated in the error text).

Now I’ll explain what happened. When we loaded the data into the register, in SQL it ended up in the table" _InfoR34546". When we cleared the table with code in 1C, this data was deleted from the table" _InfoR34546", but they were copied to the table" _InfoRgChngR34546". This became the problem.

Solution

To solve this problem, we need to clear the SQL table "_InfoRgChngR34546".

I'll tell you using the example of "Microsoft SQL Server Management Studio". Let's go to " Management Studio". Find our database, open the tables tab, click on any and click the "New query" button: Now we type the query

Truncate table "_InfoRgChngR34546 "

You may have another table! Do not forget!

And press execute or press "F5". This is what the result should be:

That's it, now you can safely update 1C, and there will be no errors!

We moved to a new server. It runs SQL and 1C. Compared to the old ones it was much cooler. And Gilev’s test also confirmed this: against 10-15 on the old servers, it gave 39. Therefore, immediately after the purchase, we transferred the database and started working.

But at some point something went wrong - users began to complain about slow work. We made certain settings for the server and services (which ones are the topic of a separate post) and decided to reboot the server, fortunately the reboot speed was 2 minutes (on other servers it was up to 10). After this, when logging into 1C we receive the following message:

"Attention!!! An error occurred while updating data after the last restructuring. Should I repeat the update? "Not really"

After clicking "Yes" the following appears:

“An incomplete configuration save operation was detected. You must complete the operation to continue."

The first thing I decided to do was CHECKDB in Managment Studio - after 2 hours of waiting (500 GB database) - everything was OK.

I found information on the Internet that the same error occurs during dynamic updating.

The solutions proposed online did not help immediately, but together with other actions they gave results. So what I did:

Solution:

  1. What was missing for solutions from the network:

sp_configure 'allow updates', 1
reconfigure with override
go

2. Put the database into recovery mode

alter database set EMERGENCY, SINGLE_USER

3. We perform database testing:

dbcc checkdb('db_name', REPAIR_ALLOW_DATA_LOSS)

4. Exit the database from recovery mode:

alter database set ONLINE, MULTI_USER

5. In principle, if you are sure that everything is ok with the base itself, then you don’t have to do points 2-4. Next, we run two queries in the SQL profiler:

delete from config where FileName = 'commit'
delete from config where FileName = ‘dbStruFinal’

These records are responsible for dynamic updating - you don’t have to be afraid to delete them.

In working versions of the databases queries:

select * from Config WHERE FileName = 'commit'

select * from Config WHERE FileName = 'dbStruFinal'

will be empty.

6. return the settings:

sp_configure 'allow updates', 0
go

7. After this, we managed to launch the configurator and the database started working.

Also, the base can start working after removing the first flag.

Sandbox

authority September 18, 2013 at 03:24 pm

1C, infobase configuration restoration using MS SQL

At one time I encountered a problem: when updating the configuration from the repository, a failure occurred and 1C closed.

As it turned out later, the configuration storage was destroyed and when updating the configuration, the database configuration was also deleted from the storage. A similar error occurred before during dynamic updates of information security.

Because This problem has arisen more than once and I decided to share a treatment option.

The next time you started the configurator, an error appeared: “Attention!!! An error occurred while updating data after the last restructuring. Should I repeat the update? If the answer is yes, we receive the message: “An incomplete configuration save operation was detected. To continue working, you must complete the operation” after which the application closes.

When analyzing this problem, several solutions to the problem were found, each solution works in different cases.

Option 1 (if you have a SQL backup with a copy with an identical configuration):

A copy of the information security is deployed, and the following request is executed:
USE GO DELETE FROM .. GO INSERT INTO .. ​​SELECT * FROM .. GO
In this case, the table in which the information security configuration is stored is refilled. It is advisable to test and correct the information security after this operation.

Option 2 (if there is no backup):

This option was turned to as the last straw. Because the configuration was under development and they forgot about backup a little, relying on storage.
In the database, two records are deleted from the “Config” table by the value in the “FileName” column - dbStruFinal and commit

The following query is executed:
USE GO DELETE FROM . WHERE FileName = "dbStruFinal" GO DELETE FROM . WHERE FileName = "commit" GO
Oddly enough, the base comes to life.

Tags: 1C Enterprise 8.2, SQL, configuration restoration

This article is not subject to comment because its author is not yet full-fledged community member. You will be able to contact the author only after he receives