📜 ⬆️ ⬇️

Management of databases 1C 8.2

One of the rules of time management - If there is a person to whom you can delegate the task - delegate.

Prehistory


As I reached the point that - I, the system administrator! - began to ask questions of work 1C?
The tirade in my original article, which hardly anyone read, concerned which 1C developers were lazy, and 1C manufacturers themselves, that some had a lot of functions, but others didn’t describe well enough, others were too lazy to figure out, and piled the whole routine on the system administrators, who there is nothing to do, except for sweeping the IT elite. I think no one here will praise me for such reasoning. Although praise is not particularly looking for. The only goal is for it to be useful to someone who is a correct bummer-admin, and does not like to do the same thing many times. And now how it was.
I was faced with such a state of affairs that our 1C developers add handles to all the employees, are present at the employee’s workplace, or ask us to do this remotely by connecting to the user's desktop and repeating everything with a mouse.
It looks like this:
- Misha, add Vasya Pupkin base: 1C-server: 1551 "buh_prod"
- What to call her?
- Accounting

And do not think that next time this 1C developer will tell me that this database can be called just as well. As a result, we have the same base for different employees called differently. Beauty isn't it ?!
Another aspect of this problem is that the Employee must be in place, the computer is turned on, and he must have time (5 minutes) so that I can do all this. If an employee is not there, then you can imagine how much labor is required from me to catch this employee, coordinate with him the time and do it. And if this employee is at a remote office, on a laptop, and rarely happens on the network, plus the difference in Vladivostok-Moscow belts, this adds to the thrill of sensations. Of course, you can still throw a label into the mail, but developers very rarely use this 1C - either they don’t know or don’t want to, or they worry for us that we’re left without work, for which they have a special thanks and diarrhea.
Baz we have about fifteen. Each group has a separate set of bases. And there are those who have a strictly individual list.
You will like the next picture even more.
There is an order from the head of 1S'nikov that the three departments need to change the base, since she moved to another server. Then I will not spend letters, because All that I described above multiply by thirty people, twenty of whom are in another office or even another city. Cool problem.
I do not remember how many times, I, such turmoil made, but there were more than ten. After that, I wondered what ways to optimize this process is by unix-way.
And I began to read ... I read it for a long time ... I read it persistently ... I absolutely did not like the documentation of 1C - it was written as if I had already done it, so they leave most of the idea between the lines. Rays of diarrhea in the 1C online help writers. As it usually happens, I found a more or less understandable instruction on my personal blog, I don’t remember already whom.

Theory of device configuration files


In 1C, everything is organized that concerns the database lists in plain text, readable files with the .cfg and .v8i extensions, in the utf-8 encoding. So, as you probably guess, you can do everything the same without interrupting the user by opening the file over the network with a normal text editor and editing it directly.

Location of files on the user side

The user on the computer 1C 8.2 stores the files of the lists of databases in directories:
')
For Windows XP:
All users profile: : \ Documents and Settings \ All Users \ Application Data \ 1C \ 1CEstart \
User Profile: : \ Documents and Settings \% username% \ Application Data \ 1C \ 1CEstart \

For Windows 7:
All users profile: C: \ ProgramData \ 1C \ 1CEStart \
User profile: C: \ Users \% username% \ AppData \ Roaming \ 1C \ 1CEStart \

User profile content - two files: 1CEStart.cfg, ibases.v8i.
The content of the profile directory of all users is only one, 1CEStart.cfg.

When running, 1C takes the list of databases to a representation in the user file C: \ Users \% username% \ AppData \ Roaming \ 1C \ 1CEStart \ ibases.v8i, but first reads the settings first from the profile of all users C: \ ProgramData \ 1C \ 1CEStart \ 1CEStart.cfg, and then from the user profile C: \ Users \% username% \ AppData \ Roaming \ 1C \ 1CEStart \ 1CEStart.cfg, and if they contain links to configuration databases on the network, then add them to this file.

File Description 1CEStart.cfg

In the profile of all users, the configuration file C: \ ProgramData \ 1C \ 1CEStart \ 1CEStart.cfg has the following content:
InstalledLocation=C:\Program Files (x86)\1cv82 InstallComponents=DESIGNERALLCLIENTS=1 THINCLIENTFILE=1 THINCLIENT=0 WEBSERVEREXT=0 SERVER=0 CONFREPOSSERVER=0 CONVERTER77=0 SERVERCLIENT=0 LANGUAGES=RU 

Where:
InstalledLocation - contains an indication of the directory where 1C: Enterprise was installed. The default value is C: \ Program Files (x86) \ 1Cv82.
CommonCfgLocation - specifies the path and name of the common configuration file. Multiple lines with this parameter are allowed.
CommonInfoBases - indicates the path and file name (.v8i) with a list of common information databases.
DistributiveLocation - contains an indication of the directory in which a new version will be searched for automatic installation.
InstallComponents - In the local configuration file (1CEStart.cfg) contains a list of installed components with a sign, you need to install the component - 1, or not - 0.

The following components of the InstallComponents parameter are possible:
DESIGNERALLCLIENTS - all clients and configurator.
THINCLIENT is a thin client for a client-server version of work.
THINCLIENTFILE - thin client with the ability to work with file information databases.
SERVER - 1C: Enterprise server. If the installation program is launched from the startup program, the server will be installed as an application.
WEBSERVEREXT - extension components for the web server.
CONFREPOSSERVER - 1C: Enterprise configuration storage server.
SERVERCLIENT - components for administering a cluster of 1C: Enterprise servers.
CONVERTER77 - information database converter from 1C: Enterprise version 7.7.
LANGUAGES - list of interface languages ​​for installation. If several languages ​​are indicated, they are listed through ”,”. Example: LANGUAGES=RU,UK,BG

In the user profile, the configuration file C: \ Users \% username% \ AppData \ Roaming \ 1C \ 1CEStart \ 1CEStart.cfg is initially empty. But, if any settings need to be made individually for a specific user, then it will write to him, and here his settings keys will have a higher priority, but not all. This is a separate question. I’m not going to litter my head right now.

File Description ibases.v8i

The second important database file that is in the user’s profile is C: \ Users \% username% \ AppData \ Roaming \ 1C \ 1CEStart \ ibases.v8i. In it the final list of bases also gathers. An example of its content:
 [PhoneBook] Connect=Srvr="1C-server:1551";Ref="phonebook"; ID=34891493-907f-4783-8a37-3cbc092a989a OrderInList=16640 Folder=/ OrderInTree=16640 External=1 ClientConnectionSpeed=Normal App=ThinClient WA=1 Version=8.2 [ITIL] Connect=File="\\Dvc-server\it\Equipment\Rarus\ITIL"; ID=2829c91a-137f-457c-93fe-9e74c8ec5ee4 OrderInList=16384 Folder=/ OrderInTree=256 External=1 ClientConnectionSpeed=Normal App=Auto WA=1 Version=8.2.14.540 

Where:
[phonebook] - the name of the base 1C. It can be both Russian letters and English. This is what the user sees.
 Connect=Srvr="1C-server:1551";Ref="phonebook"; -   . | | | | | | | |-     1. | | |-------------  ,    . | |---------------------  . |-----------------------------    : Srvr, File, ws - -. 

ID=34891493-907f-4783-8a37-3cbc092a989a - automatically generated unique code base. If two entries have the same ID, then this is one base.
OrderInList=16640 - order in the list of databases, when the bases are represented by one common list without subdirectories; This parameter from the network list is synchronized only to the clean ibases.v8i, if the user’s ibases.v8i is already filled with this base and this parameter will not be overwritten when it changes on the network.
Folder=/ - sets a place in the directory tree, if the view of the list of databases is set by the tree; This parameter has the priority of the user, and does not change when changing in the network config.
OrderInTree=16640 - order in the tree, when the list of databases is represented as a hierarchy of subdirectories; This parameter also has user priority, and is synchronized only when the database is added for the first time, and then only the local user can change it.
External=1 - external connected configuration entry or not. When 0 then the base is present only in this file. In this situation, this entry is imported from the .v8i database list file from the network. This is an identifier, if it is a list of databases located on the network (shared), then this parameter can be completely removed from the configuration file.
ClientConnectionSpeed=Normal - client connection speed. Options can be “Nofmal” and “Low”. The logic is clear without my search. This parameter is interactive and synchronized with network location every time 1C is started.
App=Auto - type of client connection. There are three types:
- Auto - determined by the server;
- ThinClient - thin client;
- ThickClient is a fat client.
This parameter is interactive and is synchronized each time you run 1C.
WA=1 - this parameter indicates that the system should use windows authentication. This parameter is interactive and is synchronized each time you run 1C.
Version=8.2 - the version used for this database. If you specify fully specifying which platform to use, then it will use the platform that you specify, as, for example, in the second record - Version = 8.2.14.540. This parameter is interactive and synchronizes with the network config each time you run 1C.
There is also such a parameter as DefaultApp - the default client connection type, if the configuration for the database is not specified, and DefaultVersion - the DefaultVersion version to use, if not specified in the configuration for the database. This parameter is custom, and is synchronized to a clean database file when it is first run. Further this parameter is controlled by the local user.

Links to network configuration files

The beauty of this whole scheme of work is that 1C manufacturers have provided the opportunity to look into the configuration files located on the network. This is implemented by editing:

And you can add parameters:

It should be noted that on the network we must place files with the extension .cfg and .v8i, and the corresponding content.

Idea of ​​using opportunities


The idea is to make edits with the least amount of repetition. If the settings of the database or its location on the server have changed, then by correcting the record once in one place, we will receive up-to-date information on all computers.
To do this, you need to make the ball on the network: \\server\1C\ . In this ball make at least two directories:
.. \ bases \
Directory listing:
 \\server\1C\bases\.. .. base1.v8i base2.v8i base3.v8i base4.v8i 

Files with the extension .v8i will be stored in this directory. These files will have within themselves the settings of only one base for each file. And you should specify only those parameters, settings that are critical for this particular database, everything else will automatically be substituted by default. Sample file:
 [ ] Connect= ClientConnectionSpeed=Normal App=Auto WA=1 Version=8.2 

You should avoid using the ID parameter, since 1C developers use to create a new database of copy-paste from the existing database. A database with a single ID will conflict.
.. \ groups \
Directory listing:
 \\server\1C\bases\.. .. buh.cfg fin.cfg managers.cfg 

Files with the extension .cfg will be stored in this directory. These files will have links to the bases in the .. \ bases \ directory. Sample file:
 CommonInfoBases=\\server\1C\bases\base1.v8i CommonInfoBases=\\server\1C\bases\base2.v8i 

In this directory we create individual for a group of users or for a specific user lists of databases. We refer to the files from this group in the configuration files of the user's operating system.
With this scheme, we bring the management of lists of 1C user databases to the network for non-administrators. Give the developers 1C access to the network directory with configuration files and let them play as they wish.
And if you need to change the settings of a base, then we correct it only once in the file \\ server \ 1C \ bases \ base.v8i, and this will affect all users, because All users view information about the database in this file.

Result


The result of this build configuration files:


PS
If you think that this was the most difficult part of the work, then you are deeply mistaken.
  1. Instructions on the corporate wiki, how it works.
  2. All possible assistance in locating the configuration file, or database, as well as adding the necessary links to users.
  3. Six months for a smooth introduction to the new scheme of work.

These factors did not help me transplant our 1S'nikov to a convenient work scheme for them.
But, I spend on it much less time.

Source: https://habr.com/ru/post/179405/


All Articles