Distributed information base. Step-by-step instructions and pitfalls. Building a RDB from scratch 1C 8 RIB and added objects

A situation often arises when an organization has several branches or retail outlets geographically remote from each other. However, there remains a need to maintain consistent records throughout the organization. One of the options for solving this problem is to create a unified network, which will include automated workstations of all branches, and host the 1C information base on a public server. This method can be technically complex and expensive. In addition, a number of issues related to information security arise.

The second option is to create a distributed information base (RIB). Distributed information base represents hierarchical structure, consisting of separate information databases on the 1C:Enterprise platform, between which data exchange is organized for the purpose of synchronizing configuration and data. These individual information bases are called RIB nodes.

A distributed information base can be created based on various configurations of the 1C:Enterprise system. Let's consider its creation using the example of 1C: Trade Management 10.3.

Let’s say an additional retail outlet is opened in a trading organization, where it is necessary to have access to the organization’s general trading system. To create a RIB you must complete the following steps:


This completes the creation of a distributed information base. To exchange information, you need to start data exchange in the Central database (changes that have occurred in it will be downloaded), then in the store (changes from the central database will be downloaded and changes that have occurred in the store will be downloaded), and again in the central database (changes will be downloaded into it , occurred in the store).

Distributed information bases have their own collision resolution mechanism. So, if during an exchange it turns out that any object (document, directory, etc.) has been changed in both the main and subordinate databases, then the change made in the main database will have priority.

If it is necessary to change the configuration of a distributed infobase, this must be done in the root node (see the first figure of the article), the configurations of the remaining nodes are locked. After making the necessary changes, they can be transferred to slave nodes using the standard procedure for exchanging data between RIB nodes. After the exchange is carried out in the configurator of the slave node, it is necessary to update the infobase configuration.

If you have problems setting up a distributed information base, our specialists will help you set up data exchange and explain in detail how to use it.

In this article we will talk about setting up a distributed database 1C Enterprise 7.7; the Trade Management 9.2 configuration will be used as an example.

To configure the RIB in 1C 7.7, you need to go to the configurator and go to Administration-Distributed IS-Management.

Then you need to convert your database to RIB, if it has not yet been converted to RIB, to do this you need to click the “Central Information Bank” button.

Set the Code and Description as in the screenshot above and click "OK". A warning should appear as in the screenshot below, ignore it and click “Yes”.
After this, your base will be ready to create peripheral nodes.

Click on the "New Peripheral IB" button and set the field values ​​as in the following screenshot, however, you can use your own designations.

Click OK and move on to the next step - setting up auto-exchange.

In this article I will tell you how to set up auto exchange using local network, if you need automatic exchange by mail, then leave your request in the comments or contact me at and I will tell you how to do it.

We display everything as on the slide, you can have your own paths to the directories, the checkboxes should be as in the screenshot above. Click OK.

Now we upload the initial image of the peripheral database to disk; to do this, click the “Upload data” button. After downloading the initial image, the RIB management window will look like this:

Let's assume that the computer on which our rib will work is located not far from the main computer with a central base and both computers are connected to a local network.

Now we need to configure the RIB on the client computer; to do this, take our zip file downloaded in the previous steps and create an information base based on it. The screenshots below show the complete sequence of actions.

Click the "Add" button and point to an empty folder and click OK.

We select a new information security system and go to the configurator mode.

We create an empty information bank in an empty folder, so 1C asks us to indicate what format our database will be in, select *.dbf. Click OK.

Now let's load the zip file uploaded in the previous steps into our database; to do this, go to administration - download data.

Specify the path to the file and click OK.
Once the download is complete, click OK and go to administration-distributed ib-auto-exchange.



At this step, it is necessary to take into account the rule: CB unloading directory = PB loading directory and vice versa, i.e. if in the central database we uploaded to the out folder and loaded from the in folder, then in the peripheral database we will load from the out folder and upload to the in folder. Click OK and move on to the next step. We perform automatic exchange. To do this, in the central database, go to administration-distributed ib-autoexchange.


Click the "Run" button, and then do the same on the client base. Perform the autoexchange operation on each computer several times.

Now let's automate the process. To do this, you need to create 4 files on each computer. 2 *.prm files and 2 *. bat file for each loading and unloading operation.

*.bat file should contain the following line:

"<путь к файлу 1cv77.exe>"config/D"<путь к информационной базе>"/N<логин>/P<пароль>/@"<путь к prm-файлу>"

My loading and unloading files look like this:

"C:\Program Files\1Cv77\BIN\1cv7s.exe" config /D"C:\base\rib\" /Nadmin /P1 /@"c:\download.prm"

"C:\Program Files\1Cv77\BIN\1cv7s.exe" config /D"C:\base\rib\" /Nadmin /P1 /@"c:\upload.prm"

You write your values. Now let's deal with prm files!

Structure of the .prm file:

Section “General” – is intended to describe the main operating parameters burst mode. Possible parameters:

Output – path to the log file;
- Quit – whether the configurator needs to be terminated after completing all tasks;
- AutoExchange – whether autoexchange should be performed;
- SaveData – whether it is necessary to save the database;
- UnloadData – whether unloading should be performed;
- CheckAndRepair – whether the database needs to be tested and corrected.

Possible values ​​for these parameters can be 1(Y) or 0(N).

The “AutoExchange” section is intended for defining auto exchange parameters. Options:

SharedMode – indicates the mode of operation from the database. If the parameter is not specified, then exclusive mode will be used;
- ReadFrom - indicates from which databases data should be received. Database identifiers must be specified separated by commas. If all are needed, then put * ;
- WriteTo - indicates for which databases data should be uploaded. If it is necessary for everyone, then put *.

The “SaveData” section is intended for defining the parameters for saving the database. Possible parameters:

SaveToFile – indicates the path where saving will be done;
- FileList – indicates the list of files to be saved. File names are listed separated by spaces or commas;

Section “UnloadData” – is intended for defining parameters for data unloading. Options:

UnloadToFile – specifies the saving path, including the file name;
- IncludeUserDef – indicates whether the list of users should be included in the transfer file;
- Password – specifies the password that will be set to the transfer file.

The “CheckAndRepair” section is intended for defining database recovery parameters. Possible parameters:

Repair – indicates whether it is necessary to restore the database;
- PhysicalIntegrity – indicates whether it is necessary to check the physical integrity of infobase tables;
- Reindex – indicates the need to reindex the database;
- LogicalIntegrity – indicates whether it is necessary to check the logical integrity of tables;
- RecalcTotals – indicates whether it is necessary to recalculate the results of accounting and operational accounting;
- Pack – indicates whether it is necessary to free up space occupied by deleted records;
- SkipUnresolved – specifies whether to skip unresolved links or fix them;
- CreateForUnresolved – specifies how unresolved links are resolved. If 1, then an object of the appropriate type will be created for the unresolved link. If 0, then the link will be cleared.

Based on this, my files will contain the following:

to download from the central bank to the peripheral:


Output = log.txt
Output = 1


ReadFrom = CB

for unloading from the Central Bank to the peripheral:


Output = log.txt
Output = 1


WriteTo = CB

to download from the peripheral to the Central Bank:


Output = log.txt
Output = 1


ReadFrom = PB1

for unloading from the peripheral to the Central Bank:


Output = log.txt
Output = 1


WriteTo = PB1

Now it is enough to place the bat and prm files in one folder and run them one by one to perform downloading and uploading.

If you have any questions, feel free to comment!

In 1C 8.3 or in 1C 8.2? Setting up a distributed infobase. Step-by-step instruction.

Information base distribution is used when it is necessary to maintain joint records in databases that cannot, for various reasons, have a physical connection. An example would be accounting in one company that has a division in a large city or small village without the ability to connect to the Internet. Or in some special cases of periodic need to simultaneously work with one database in the office and outside the office, for example at home. In such and to them similar cases the use of a distributed information base (RIB) is justified and necessary.


In this article we will look at organizing the distribution of one information database in the 1C Accounting for Russia version 8.3 configuration through a local or network directory. In version 8.2 1C this instruction will also be useful, because describes essentially one process with significantly small differences.

==== Setting up for the main base ====

Having opened 1C 8.3 in the “Enterprise” mode, let’s go to the “Administration” section. In version 1C 8.2, to get started, you need to go to the main menu “Service” - “Distributed Information Base (DIB)” - “Configure RIB nodes”.

Next, we will consider the process in the context of information security version 8.3. So, going to the “Administration” section, select “Program settings”. In the settings, go to the “Data Synchronization” section. Here we check the box “Use data synchronization” and specify the database prefix. Let us indicate “CB”, implying a central base.

After this, the “Data Synchronization” item appears in the right menu. Let's choose him. In the child window that opens, click the “Set up data synchronization” button. In the drop-down menu, you can select settings for different synchronization use cases. We select “Distributed information base...”.

For general development, familiarize yourself with the contents of the next window and click “Next”.

In the next window, fill in the directory through which the . We will specify data compression to reduce the size of the upload, and you can immediately specify a password for the archive with the data. It is important not to forget him. Confirm the filling with the “Next” button.

The next two windows are intended for specifying settings parameters for cases of exchange via FTP server and via email. As stated earlier, we are considering the exchange method through a directory, so we are skipping the settings for FTP and email.

The next window is intended for specifying exchange parameters in the peripheral database part. Let's indicate its name and prefix. Next is the “Next” button.

Let’s check the exchange parameters we have created and confirm their correctness with the traditional “Next” button.

Will be created automatically necessary set settings for sharing. It will take some time.

Important! Creating the initial image for the slave node takes a significant amount of time. The size of this significance depends on the computer resources and the volume of accounting in the main database.

Let's assume that we decide to create an image. After clicking on the “Finish” button in the previous window, we will enter the settings to create an image of the slave information security. We will consider the simplest case for local operations. To do this, indicate the necessary details in the window that opens. Let us pay special attention to the parameter “ Full name file database". It must be specified in full UNC format, which requires the formation of a local path in a “network” format. For example - “\\Server1C\Databases\RIB”. TO specified path Let's add the name of the database file - 1Cv8.1CD.

After clicking on the “Create initial image” button, the process of generating an image for the slave database starts.

After the process is completed, a database file will be created in the specified directory. This newly created base before full use needs to be configured.

==== Setting up for a peripheral base ====

To do this, you need to connect it to 1C. You will find how to do this in the instructions in our article - After connecting, you need to launch the new database in configurator mode and create users. Next, the information security needs to be launched in 1C “Enterprise” mode.

If, for some reason, the creation of users needs to be postponed to a later time, after connecting, you can simply launch the database in 1C “Enterprise” mode. You will be prompted to create an “Administrator” user, agree to it, and the initial filling will be done.

Then you need to continue setting up pairing with the main base. This setting is similar to that discussed above for the main database.

A setup for communication with the main base will be created.

============================================

So, now we have created the main and peripheral bases. Synchronization settings have also been created in each of these databases. Now you can move on to editing these settings and bringing them into a suitable form. You can create automatic exchange rules or perform the exchange manually.

Let's do this in the main database. The peripheral base is configured in the same way.

Editing can be applied to data synchronization rules and schedules.

By clicking the “Configure” button in the “Data synchronization schedule” section, you need to edit the scripts to automatically schedule the work of uploading/loading data for the selected database. You don’t have to edit it, just agree with the default options.

To edit the parameters, just click on the link with the automatic schedule data. And then we edit the temporary parameters for launching tasks. By going through the bookmarks you can change both the time and the dates and days of the week of the launch.

By clicking the “Run task” button in the main script window, you can manually run the task.

By clicking the “Configure” button in the “Data synchronization rules” section, you can perform operations to change task launch scripts, as well as view the log of uploads/downloads. The latter is quite important for administering access and monitoring the regularity of exchanges.

Having finished creating and editing scripts for automatically starting distributed database exchange, you can proceed to uploading and then loading data.

At this point, the configuration of the distributed bathhouse database for the central and peripheral nodes is basically completed.

Download illustrated instructions

Distributed information base. Step-by-step instruction
Distributed Information Base (RIB) 1C:Enterprise
Creating a distributed infobase and setting it up
how to set up rib in 1s 8.2
How to set up a distributed information base in 1C
How to set up in 1C
How to set up in 1C
Setting up a distributed information base (RIB) in 1C
Example of setting up RIB for 1C:Accounting 8
Creation of a distributed infobase and configuration

The technology of distributed information bases (RIB) allows you to create a geographically distributed system based on 1C Enterprise configurations. This allows you to have something in common information space even with those departments that do not have a reliable communication channel, combining high autonomy of nodes with the ability to quickly exchange information. In our articles we will look at the features and practical implementation of this mechanism on the 8.2 platform

First of all, let’s ask ourselves: why autoexchange? Modern technologies, combined with inexpensive and fast internet, allow you to organize remote work without any difficulty. The choice of methods is as wide as ever: RDP, thin and web clients, connecting networks using VPN - there is a lot to think about. However, all these methods have one significant drawback - a strong dependence on the quality of the communication channel.

Even with ideal operation of the local provider, it is impossible to guarantee 100% availability of the communication channel. Problems with the backbone provider, lack of power supply, physical damage to the communication line and many other factors make this task insurmountable. At the same time, the inaccessibility of the information base at a remote warehouse or retail store leads to quite significant losses. And finally, let’s not forget that there are places (for example, industrial zones on the outskirts of cities) where providing a high-quality communication channel is expensive and/or problematic.

The RIB mechanism allows you to get rid of these shortcomings; each department has its own copy of the information base with which you can work autonomously even in the complete absence of communication with the outside world. A small volume transmitted information allows you to use any communication channel for exchange, including mobile Internet.

RIB on platform 8.2 is not something fundamentally new, representing a further development of RIB platform 7.7, only now this technology has become more accessible and simpler. Unlike the RIB component, which had to be purchased separately, the RIB is an integral part of many typical configurations and works completely in user mode, allowing you to do without the Configurator even at the configuration stage.

At this point it would be time to move on to the practical part, but we will have to make one more digression. The fact is that the transition to the 8.2 platform, which seems to have already happened, in fact led to the emergence of two types of configurations: based on a managed application, “native” for the 8.2 platform, and adapted from 8.1, continuing to use outdated technologies and mechanisms. Since a significant part of the configurations (Enterprise Accounting, Payroll and HR Management) are adapted or transitional, they cannot be discounted, so the first part of our article will be devoted to these configurations (essentially the 8.1 platform), while in the second we will examine setting up auto-exchange for configurations based on a managed application (platform 8.2).

Let's consider a practical task: setting up automatic exchange via FTP for the Enterprise Accounting 2.0 configuration. Despite the fact that RIB allows you to exchange using email or file shares, we recommend using FTP as the simplest and reliable way communications. You can read how to set up your own FTP server, or you can use the FTP service of any hosting provider.

First of all, we need to configure exchange nodes. To do this, launch the configuration with administrator rights and select Transactions - Exchange Plans.

In the list that appears, select Full plan or By organization, if records are kept for several companies in one database and the exchange needs to be made only for one of them. In the window that opens, there is already one node - the central one, we need to edit it by indicating the code and name.

Then we will create another node for the branch, filling it in the same way (to add, click the green circle with a plus). The next step is to create an initial image for this node, which is a ready-made information base in file mode. To do this, right-click on the desired node and select from the drop-down list Create a starting image.

Now let's move on Service - Distributed Information Base (DIB) - Configure RIB nodes.

In the window that opens, click the button Add and configure a new exchange by specifying the remote host, exchange type (via FTP) and server connection parameters.

Bookmark Automatic exchange allows you to set up an exchange schedule, exchange by events (start and end of work, etc.), these settings are made for the user on whose behalf the exchange will be performed, so make sure he has rights to exchange data.

Don't forget to specify the node prefix for document numbering (otherwise you will receive different documents with the same numbers) in Tools - Program Settings; here you can also configure some other exchange parameters. On the same tab, you should select a user to perform exchange tasks; if you do not do this, the schedule will not work. Please remember that exchanges will only be made if this user logged into the program.

This completes the configuration of the central node; now you need to make similar settings for the peripheral node, connecting the initial image as an existing information security system. After which you can start exchanging data. To control you should use Communication monitor, it allows you not only to monitor the success of the upload/download, but also shows any collisions that have arisen or delayed movements (if the user who made the exchange does not have enough rights to perform any actions in the database). Availability of this instrument allows you to quickly and effectively solve various types of problems that arise during auto exchange.

At this point, the exchange setup can be considered complete and you can begin working in distributed mode. It is worthwhile to dwell specifically on updating or making changes to the configuration. These actions are only available on the central node; all changes made will be automatically propagated to the peripheral nodes during the next exchange. To make changes automatically, the peripheral database must be in exclusive mode, otherwise you will need to run Configurator and execute Updating the Database Configuration manually.

Creating and configuring a distributed database (RDB) in 1C 8.3 Accounting (and other configurations) is necessary in cases where it is not possible for several users to work while simultaneously connecting to one database. Currently, this is quite a rare occurrence, since the standard remote desktop works fine and there are other programs that provide remote connection to the central computer where the database is located.

But nevertheless, there are situations when there is simply no Internet. And the data should ultimately end up in one information base. This is why a distributed database is created.

Usually main base called central, and the rest - peripheral. The point is that either manually or automatic mode(depending on the setting) databases are combined into one. To ensure that numbers of newly entered documents and reference codes are not duplicated, a prefix is ​​assigned to each database.

In this instruction, we will use an example to create a central and peripheral database and check the exchange between them. This manual is suitable for both 1C 8.3 Accounting and 1C Trade Management (UT) and other configurations.

Setting up the main (central) distributed RIB database

Let’s go to the 1C “Administration” menu, then click on the “Data synchronization settings” link. In the window that opens, you need to check the “Data synchronization” checkbox. The “Data Synchronization” link will become active. Right here we will set a prefix for the main information base - for example, “CB”:

Click on the “Data synchronization” link and a window will open with a “Set up data synchronization” button. When you click on this button, a drop-down list will open where you need to select the “Full” mode. If synchronization is required for only one organization, you need to select “By organization...”.

In the next window, the program will prompt us to make a backup copy. I strongly recommend doing this, as the following setup steps may be irreversible.

After creation backup copy click the “Next” button. At the next step, we need to decide how synchronization will occur:

  • through a local directory or a directory on the local network;
  • over the Internet via FTP.

For simplicity and clarity of the example, we will select a local directory. I specified the following path: “D:\1C Databases\Synchronization”. It would be a good idea to check entries in this directory; there is a special button for this:

Get 267 video lessons on 1C for free:

Next steps with setting up FTP synchronization and e-mail we skip. Let's look at the settings for the names of the main and peripheral databases. Here we will set the prefix for the peripheral database:

Don't forget that the prefixes for each database must be unique. Otherwise, you will receive the error “The prefix value of the first infobase is not unique.”

Click “Next”, check the entered information and click “Next” again, then “Finish”. In the “Full name of the file base” field, indicate the file 1Cv8.1CD in the directory that was created for synchronization. We create the initial image of the distributed 1C database:

After creating the initial image of the RIB in 1C, you can set a synchronization schedule or synchronize manually:

After synchronization, you can connect to the new database and make sure that information from the central database has been uploaded there:

Just immediately create at least one user with Administrator rights in the new peripheral database.

Setting up synchronization in the peripheral database

In the 1C peripheral database, configuration is much simpler. Just check the “Data synchronization” checkbox and follow the link of the same name. And we almost immediately find ourselves in a window with the “Synchronize” button. Let's try to create a test item in the peripheral database and upload it to the main one using RIB: