Administration of 1C Enterprise servers. Administration of servers 1C enterprise Utility for administration of servers 1C enterprise

Print (Ctrl+P)

This article contains a description of some elements of 1C:Enterprise system administration that are typical for the client-server version of the system working with Microsoft SQL Server 2012:

Creating a backup copy in the client-server version

Server cluster administration

The console or cluster administration utility 1cv8 servers.msc is an MMC (Microsoft Management Console) plug-in and can be used on computers that have the appropriate software. By default it is installed in the folder C:\Program Files (x86)\1cv8\common

Cluster Administration Utility designed to solve the following problems:

  • creating, modifying and deleting server clusters;
  • modification of existing clusters: creating, changing parameters and deleting working servers, assigning functionality requirements to working servers;
  • setting the cluster fault tolerance level;
  • manual load adjustment on individual working servers;
  • managing lists of administrators of central cluster servers and lists of cluster administrators;
  • monitoring of user connections to information bases and service connections;
  • disconnecting users from the information base;
  • monitoring of 1C:Enterprise 8 object locks and client connection locks;
  • operational analysis of transaction locks of the database management system;
  • managing blocking of user connections to the infobase;
  • management of blocking of routine tasks.

In this article I will only consider registering a new information base

Registration of a new information base

To register a new infobase using the server cluster administration utility, select the required central server, the required cluster registered on this server, the Infobases branch in the central servers tree, and execute the context menu command Create – Infobase or a similar command in the main menu of the utility.

As a result of executing the command, the infobase properties dialog will appear on the screen.

The infobase parameters are equivalent to the parameters of a new infobase created using the 1C:Enterprise launch window.

Type DBMS: Microsoft SQL Server.

Database server: server name. Can be specified by the computer name (if one server instance is installed on the computer) or the name of a specific instance (if several instances are installed). For example, Server/instance. If the 1C:Enterprise server and Microsoft SQL Server are located on the same computer, and the Native Client (native client) is installed for Microsoft SQL Server, then it is possible to use the SHARED MEMORY protocol to communicate between the servers. To do this, you need to specify the lpc: prefix before the Microsoft SQL Server name. In this case, the DBMS server name will look like this: lpc:Server/instance

Database name: The first character of the database name can be a letter of the Latin alphabet, as well as the “_” character. Subsequent characters can be letters of the Latin alphabet, numbers, as well as the symbols “_”, “$”. Name length is limited to 63 characters. Spaces are not allowed in the name. The name cannot be a reserved word in the database server query language. The following characters cannot be used in the database name: "<», «>"", "#", "%", """, "(", ")", "[", "]", "|", "\", "^", "`", as well as characters with codes from 0 to 31 and 127

Database user: the name of the database server user on whose behalf the database will be accessed. It is essential that the specified user be either the database server administrator (sa) or the owner of the database (if it already exists) in order to freely modify the structure of the selected database in the future. In the latter case, this user must have read access to the master database and full access to the tempdb database. In addition to the above, the specified user must be a member of the processadmin or sysadmin fixed server role.

User password: password of the user on whose behalf the database will be accessed.

Date offset– 0 or 2000. This parameter determines the number of years that will be added to dates when they are saved in the database Microsoft data SQL Server and subtracted when retrieving them. Availability this parameter determined by the peculiarities of date storage in Microsoft SQL Server. The DATETIME type used in Microsoft SQL Server allows you to store dates in the range from January 1, 1753 to December 31, 9999. And if, when working with an infobase, there may be a need to store dates preceding the lower limit of this range, then 2000 should be selected as the parameter value. If such dates will not be encountered, then 0 can be selected as the date offset. After creating the infobase, the value this parameter Not subject to change.

ATTENTION! If the application solution uses accumulation registers or accounting registers, then the Date offset field must be set to 2000. If, when creating the database, the value 0 was entered in this field, then the infobase should be uploaded to a file, and the database should be re-created indicating in the field Offset dates to 2000 and load infobase

ATTENTION! Infobase names must be unique within the same cluster. When registering a new infobase, the system checks whether a database with the same name exists on the specified database server. If the database exists, a connection to it will be established. If the existing database already contains data from the 1C:Enterprise infobase, then a connection will be established with the already existing infobase. And if the database does not contain infobase data, then a new 1C:Enterprise infobase will be initialized in it.

Error when performing an operation with the infobase

When connecting to a SQL database, various creation or connection errors may occur. For example, if the following error appears:

In this case, there was an attempt to create an infobase and the enterprise server could not establish a connection to Microsoft SQL Server. Need to check:

  • User authentication parameters (Name, password and rights to create a database);
  • Does the database name follow naming conventions;
  • Is the database server name set correctly?
  • Matches the user's authentication type. Perhaps the user is logged in under the sql server username, and the wrong user authentication type is set in the SQL settings.

Background.

To administer 1C: Enterprise servers from version 8.0, the console “Administering 1C Enterprise Servers” is supplied (snap-in for Microsoft Management Console). The tool is quite functional and convenient, developed along with the versions of the platform and serves the administrator faithfully.

With version 8.1, a server distribution option for Linux-based operating systems (deb and rpm based) appeared. This enabled consumers to reduce stack usage Microsoft technologies and save significantly on licenses and software. But what about the administrator? All the same equipment for MMC. It is difficult to accuse the developer of conservatism, because progress in the development of the platform has looked impressive over the years (which often becomes a reason for reproach - stability is sacrificed to progress). But the fact remains that it was proposed to administer servers of versions 8.1 and 8.2 from Windows.

In version 8.3, new cross-platform server cluster management tools appeared - ras (management server) and rac (management client). Even among people who constantly work with the 1C: Enterprise platform, many simply do not know about them or have barely heard of them. Those. This management method has not gained popularity. And the reason seems to be that rac is a console application. It’s easier for a lazy administrator to launch mmc and click on everything they need. But there is another possibility...

Guys from 1C, are you serious?

Why not use a ras server without rac? Fortunately, the 1C company published the “Administrative Service API” for Java.

As a result, we will need:

1. Installed and configured ras. By default, this application is installed along with the server part (in the same directory as ragent.exe), but does not work by default. Let's correct this shortcoming.

You can configure it to start when the server boots:

Ras cluster --port=

(if you do not specify a port, the default is 1545)

Or install ras as a Windows service (example register-ras.bat file for registration from 1C company):

@echo off rem %1 – full version number of 1C:Enterprise set SrvUserName=<имя пользователя>set SrvUserPwd=<пароль пользователя>set CtrlPort=1540 set AgentName=localhost set RASPort=1545 set SrvcName="1C:Enterprise 8.3 Remote Server" set BinPath="\"C:\Program Files\1cv8\%1\bin\ras.exe\" cluster -- service --port=%RASPort% %AgentName%:%CtrlPort%" set Desctiption="Administration Server 1C:Enterprise 8.3" sc stop %SrvcName% sc delete %SrvcName% sc create %SrvcName% binPath= %BinPath% start= auto obj= %SrvUserName% password= %SrvUserPwd% displayname= %Desctiption%

2. I had to write the client for ras for Android DroidRAC2 myself. In my opinion, everything there is intuitive to set up and connect. The application tries to replicate the style and UI of a familiar MMC console. Free and without SMS, as they say. The ability to view the entire tree of components and edit basic settings that need to be changed during operation is supported.

Development prospects.

Currently available for testing is version 1C: Enterprise 8.4.1, in which the server part has been heavily redesigned. Among other things, a REST API has been announced for server administration and a client for it has been announced. Obviously, the developer himself sees the problem in the poor development of management tools and pleasant surprises await us here. In the meantime, we have to work with what we have.

P.S. Personally, I am pleased to follow the rapid evolution of 1C company software, although I often have to pay for this progress in nerves and time. But that's a completely different story

The automated 1C Enterprise system allows you to carry out management, trade, accounting, and receive the necessary reports. There are two types of program operation:

  • File - 1C is installed on only one computer; no manager can work with databases. This option is suitable for small companies with a small trading turnover.
  • Client version. When working with 1C, a system of users is involved; the databases are located on one computer, to which all the others are connected. The work option has a three-level architecture, consisting of a client application, a 1C Enterprise server and databases in MS SQL Server or PostgreSQL format. In this case, 1C server administration is used to ensure correct configuration.

1C server administration console:main functions

The 1C server does not have a built-in interface for administration, so the console is used. It is included in the standard delivery package of the corresponding version of 1C Enterprise. This standard utility is installed on every local computer, while the databases can be located here or on a remote server.

Using the console for administering the 1C Enterprise server, you can solve the following tasks:

  • Make changes to the functioning of the server, create new ones, delete unnecessary ones. They can host databases and define interactions between different users.
  • Create administrators. These are users who have access rights to make changes to the servers. Each administrator can only manage the assigned server. If you do not add a single administrator, any registered user can administer the 1C server.
  • Creation of 1C cluster workflows. Adding worker processes allows you to influence the performance of a specific user in the system. In properties you can set the maximum performance value (up to 1000). Running sessions are attached to the process with maximum performance. Systematically, the system independently analyzes and redistributes these values ​​for optimization.
  • Creation of databases in 1C Enterprise. You can set the ability for users to connect to it or allow it to work only locally.
  • Forced termination of sessions. Sometimes the server message informs that under specified name the user is already working. The system does not always terminate this process on its own, so administration allows you to forcefully end the session for any user.

How to start working in 1C?

The 1C Enterprise client application is an empty platform. For it to start functioning, you need to perform several sequential steps:

  • The console is installed. It allows for subsequent administration of 1C servers.
  • Creation of a Central Server. Then, on its basis, you can create structures reporting to it. To do this, using the context menu, enter the name, protocol used, and port number used for communication.
  • Creating a cluster. In this case, the context menu will also help. It is necessary to fill in the requested information (cluster name, computer used, connection port, which does not necessarily match the port specified earlier).
  • Creation of an information database. In the corresponding branch, you must also use the context menu. The required parameters are entered there (name, description, connection type, location, DBMS type, user name and password). After confirming the correctness of the entered data, the database is created. Now you can enter the necessary data into it.

At first glance, administering 1C Enterprise is a simple process, but without the correct settings, the system will not work correctly, the user will not be able to use its capabilities to the maximum. Additional technical problems are also possible.

Administrationby professionals: main advantages

The client version of 1C is used by medium-sized and big business, which need to be linked in unified system all computers, including remote structural units. This allows you to take management decisions, receive consolidated reports, maintain general accounting.

Plays an important role correct setting and constant maintenance of the platform, creating users, clusters, administrators, making changes to databases. To do this you need to have a certain staff of specialists. To do this, you can hire new employees, constantly train existing people, or outsource the service. Each company decides for itself which method is appropriate in specific operating conditions.

Administration of the 1C platform, performed by professional specialists, has a number of advantages:

  • Correct configuration of the system, which allows you to guarantee adequate operation of 1C, without technical failures.
  • Constant changes and security monitoring. The company's activities are dynamic, it aims automated system new tasks for making managerial and strategic decisions.
  • Installation of new modules, correct distribution of access rights, creation of subsystems. It is especially important for large companies with branches and remote units.
  • Monitoring system load, distributing the load across different server computers.

1C works with different locations of architectural components; they can be located on one or different computers. To ensure maximum protection, it is recommended that each element be placed on different computers.

While installing the next Accounting update I received the error “I only work on 8.3.4”, well... it's time to install 8.3.4. So:

I won’t describe the process of downloading and installing the new platform, everything is simple.

Server Agent Service 1C
By default it is installed on port 1540, and there I have 8.2 running, so we change it in the registry branch
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\1C:Enterprise 8.3 Server Agent ImagePath Parameter
change the port numbers by adding an offset: "C:\Program Files\1cv8\8.3.4.365\bin\ragent.exe" -srvc -agent -regport 1741 -port 1740 -range 1660:1691 -d "C:\Program Files\ 1cv8\srvinfo"

Launch the Agent and open the Administration console of 1C servers and create a cluster 8.3
Specified the server name and configured it on port 1740 (8.2 runs on 1540)

We create a cluster + optimized it a bit (I only have ONE small server, so I indicate the restart interval for work processes and the amount of memory. Because I have one server - the fault tolerance level is 0)


Now in more detail:
1. Restart interval: 86400 sec (24 hours). The moment of restart is not regulated, apparently from the moment the parameters are set or the application server is started.
2. You can also specify the allowed amount of memory: 3,000,000 KB (3 GB) - For a server with 4 GB of RAM, If it is less, then do not fill in this option!.
3. Memory overrun interval is a continuous period of time when the permissible amount of memory is exceeded, after which the server will restart the process. If 0 seconds is specified, it will wait forever.
4. The number of Work Processes is calculated automatically based on your settings
5. Fault tolerance level You can set the cluster fault tolerance level as the number of working servers that can simultaneously fail, and this will not lead to abnormal termination of users. Backup services are launched automatically in the amount necessary to ensure the specified fault tolerance; In real time, the active service is replicated to the backup ones.
6. Load distribution mode, which can be used either to increase the performance of the system as a whole, or use the new “memory saving” mode, which allows you to work “with limited memory” in cases where the configuration used “likes to eat up memory.”

Working server
My server is simple, 2 Gb of RAM in total and there will be only 2 databases on it, so I’ll configure it like this:

I set the Number of information security per process parameter to 1, i.e. I want each information security to run its own process - this will reduce mutual influence both in terms of reliability and performance. You configure it to the characteristics of your server!

Information base
I add IB:

In the starter peeing the database:

Functionality assignment requirements
I don’t set this up myself, but I think I should say about it:
Cluster management means that the administrator determines the composition of computers (working servers) on which the cluster is located. In addition (if necessary), he can determine the “requirements” for them: which services and connections to infobases should run on each of the working servers. Cluster managers and worker processes are launched automatically based on assigned "requirements". “Requirements” for production servers can be specified interactively, from the cluster administration console, or programmatically, from the built-in language.
So on a laptop with a security key, in order not to launch users on the cluster server, you need to add “requirements” for the requirement object “Client connection to information security” - “Do not assign”, i.e. deny worker processes of this server handle client connections. Even more interesting is the ability to run “background jobs only” on the cluster’s production server without user sessions. This way you can move highly loaded tasks (code) to a separate machine. Moreover, you can run one background task “closing the month” via “Additional parameter value” on one computer, and the background task “Updating the full-text index” on another. Clarification occurs through the indication “Value of the additional parameter”. For example, if you specify BackgroundJob.CommonModule as a value, you can limit the work of the working server in the cluster to only background jobs with any content. The BackgroundJob.CommonModule..- value will indicate the specific code.

Security Profiles
Security profiles serve to prohibit an application solution from performing actions that could be potentially dangerous to the functioning of a server cluster.
The cluster administrator can assign any information base one of the security profiles existing in the cluster. And then the potentially dangerous functionality of the application solution will be limited within the limits described in this profile.

By default, once created, a security profile prohibits all potentially dangerous actions:
-appeal to file system servers;
-launching COM objects;
-use of external 1C:Enterprise components;
-launch external treatments and reports;
-launching applications installed on the server;
- access to Internet resources.
Thus, protecting yourself from unwanted actions of an unfamiliar application solution is very simple: you need to create an empty security profile and assign it to the information base. Further, if necessary, you can expand this profile by describing in it the actions that the application solution is allowed to perform.

Location of cluster manager service files in 1C Enterprise 8.3
If when installing the system! "1C:Enterprise" has chosen the option of launching the "1C:Enterprise" server as a service, then the first launch of the server agent will be performed during the system installation process. In this case, the service will be launched on behalf of the user selected in the system installation dialog, but the server cluster service files will be located in the directory<каталог установки системы 1С:Предприятие>\srvinfo (the launch key -d will be explicitly specified in the service parameters).

If, when installing the 1C:Enterprise system, you selected the option to launch the server as an application, then the server is not launched during the system installation process; The server agent must be started independently after the system installation is completed. Moreover, if the start switch -d is not specified, the server cluster service files will be located in the default directory: %USERPROFILE%\LocalSettings\ApplicationData\lC\lCv8 (%LOCALAPPDATA%\lC\lCv8 for Windows Vista and older).

ATTENTION! If a cluster has already been created on this central server, then when changing the option for launching the server agent (service, application) or when changing the user on whose behalf the server agent runs, you should always take care to correctly specify the path to the directory of service files of the server cluster. If the server agent does not find a list of clusters during startup, it will create a new cluster on this server.
IN operating system Linux server cluster service files will be located in the /home/usrlcv8/.lcv8/lC/lcv8 folder (or the shortened version is ~/.1cv8/1C/1cv8).