Hardware and software setup

Correct setting of "1C: Enterprise. Correct installation of 1C: Enterprise Adding a user to MS SQL Server

There are two types of multiuser work with 1C databases. This - "Client - server version of 1C" and "File version 1C". Client server option we will not consider the work here, we will consider it in another article, here.

So, in order to organize multiuser work in 1C file bases, you need computers connected to a single network. If there is no network yet, and there is no equipment either, do not be stingy to purchase " gigabit switch"(Almost all modern computers support a connection up to 1 GB / s in their network cards) and not the cheapest, in the future you will only save money (imagine a day of downtime for your organization, or due to the increased load, managers have gloomy brakes).

Another very important point !!! if you have WI-FI network, that is, computers are connected wirelessly, then this option will not work for you, no matter how sophisticated WI-FI router, did not stand !!! Everything will be gloomy to slow down, hang, and as a result, you can spoil the base altogether, since the channels created with the help of WI-FI connections are very unreliable, and any interruption when writing to the database (for example, holding a document) can kill your base 1C Once and for all!!! Setting up a terminal connection is another matter (there are inexpensive analogs that allow you to raise an alternative to terminal connections), but I will describe this in another article.

Further, in our network, choose the fastest computer (preferably with "SSD disks"), under file server... You can also purchase a separate file storage(with SSD drives tied to RAID 1 for reliability), but we will not consider setting it up here.

If everything has already been purchased, connected and working, we proceed to setting up access on the computer of our choice under "1C file server".

Initially, we check the settings of the computer itself, whether it is allowed to show files and folders on your local network. Click on the network connection icon in the "tray" (lower right corner, where the clock is) and select "Network and Sharing Center"

A control window opens, where we select the following Change advanced sharing options:

The settings window opens, where the following checkboxes should be checked:

Check and save.

Next, go to my computer and create on a separate one, " NOT system disk "(if there is only one disk in my computer, for example "Drive C", then there is nowhere to go, select it), and create a separate folder with the name "Base 1C".


In this folder we will store our base 1C. Next, we set up shared access to this folder so that it would be possible to access it from other computers. Right click on this folder and select properties.

As a result, a window opens where we select the tab "Access" and press the button "General access":

The next window opens, where we select the tab "Everything", and press the button "Add":

Click on the new value that appears in the list "Everything", and choose "Reading and Writing" then press the button "General access".

Such a window should appear, which means that everything went well and the general access to the folder is open, press the button "Ready" :

As a result, when we open Network Neighborhood from another computer, we should see a computer with an open folder for accessing the databases.

On client computers install the 1C platform how to install see. "IMPORTANT PLATFORM 1C MUST BE EVERYWHERE ONE VERSION !!!". Further over the network we prescribe the paths to Base 1C

In most cases, to install 1C: Enterprise 8.x in the "client-server" option, it is enough to run the 1C: Enterprise 8.x setup program. In this case, the 1C: Enterprise server receives the standard values ​​of the parameters necessary for its normal functioning.

Let's consider the installation of the 1C: Enterprise server in more detail. During the installation of the 1C: Enterprise 8.x server, the 1C: Enterprise 8.x installation program performs the following actions:

* Copies the load modules of the 1C: Enterprise server to the directory specified by the 1C: Enterprise installation program as the destination folder.
* If "Create user USR1CV81" is selected during the installation process, it creates user USR1CV81. On behalf of this user, the 1C: Enterprise 8.1 server works if it is launched as a service. It has access only to those resources that are needed by the 1C: Enterprise server. It is important that the 1C: Enterprise server needs two directories for operation: a common directory with server data (usually "C: \ Program Files \ 1cv81 \ server") and a temporary files directory (usually "C: \ Documents and Settings \ usr1cv81 \ Local Settings \ Temp "or" C: \ WINNT \ Temp "). User USR1CV81 gets rights to the shared directory with server data. The temporary files directory is usually available to all users.
* If during the installation process "Install 1C: Enterprise 8.1 server as a Windows service" is enabled, then it registers the 1C: Enterprise server agent service in Windows and starts it. At the first start, a 1C: Enterprise server cluster is created with default settings. It has one worker server and one worker process. The working server address is the same as the name of the computer on which the installation was performed.

USR1CV81 or USR1CV82 user and his rights

Server 1C: Enterprise is a server application whose operation should not depend on which user entered the server computer interactively, if anyone entered at all. Therefore, when installing a 1C: Enterprise server, it is advisable to create a special user USR1CV81, endowed with the minimum rights required for the 1C: Enterprise server, and not intended for interactive login. The 1C: Enterprise server is presented to the Windows system by the USR1CV81 user.

Let's take a closer look at the rights assigned to the USR1CV81 user. Server 1C: Enterprise uses the following directories:

* The directory of loading modules is located in the directory specified by the 1C: Enterprise installation program as the destination folder. It contains the load modules of the 1C: Enterprise server. User USR1CV81 needs rights to read data and run programs from this directory and its subdirectories. He gets these rights implicitly, thanks to being included in the Users group.
* The server data directory is usually named "C: \ Program Files \ 1cv81 \ server". USR1CV81 needs full rights to this directory. The 1C: Enterprise installation program, when creating a user USR1CV81, gives him the rights to this directory.
* The temporary directory is usually named "C: \ Documents and Settings \ usr1cv81 \ Local Settings \ Temp" or "C: \ WINNT \ Temp", which is determined by the value of the user's TEMP variable or the system environment TEMP variable. You can view the value of this variable in the System Properties dialog (Start -> Settings -> Control Panel -> System -> Advanced -> Environment Variables). The 1C: Enterprise installation program gives the USR1CV81 user full rights to this directory. Typically, when installing Windows, the temp directory is available to all users by including the CREATOR OWNER group on its ACL. However, this access is not complete. In particular, the operation of searching for files in this directory is not available to all users. Setting the USR1CV81 user full rights to the temporary files directory allows the 1C: Enterprise server to perform all the operations it needs. You can view the access list in the directory properties dialog on the Security tab. The presence of the CREATOR OWNER group allows any user who creates any files in this directory or owns any files in this directory to access the directory. In this case, the user who created the file will be recorded in the access list of the created file instead of the CREATOR OWNER group. Among the users who are allowed access to this directory, there must also be user USR1CV81, who has full rights to this directory.
It is important to keep in mind that the directory of temporary files for a specific user (including the user USR1CV81) is determined by a combination of that user's environment variables and system environment variables. To find out this directory, the 1C: Enterprise installation program asks for the user context USR1CV81. To do this, in Windows 2000, the user on whose behalf the 1C: Enterprise setup program is launched may need the following privileges: Act as part of the operating system and Bypass traverse checking. You can check user privileges using the Local Sequrity Settings utility in the Local Policies -> User Rights Assignment branch. During the installation of new software, the installer usually gains these privileges automatically.

Registration of 1C: Enterprise server as a Windows service


Server 1C: Enterprise is a simple Windows console application and can be launched interactively. However, for permanent use, this is inconvenient, since it makes the 1C: Enterprise server start from the input of an inactive user into the server computer. To eliminate this dependence, the 1C: Enterprise server can run as a Windows service. To do this, it must be registered in the Windows Service Manager.

To view the list of Windows services and their parameters, use the Component Services utility (Start -> Settings -> Control Panel -> Administrative Tools -> Services). The 1C: Enterprise server is represented in the list of services by the "1C: Enterprise 8.1 Server Agent" service. The service parameters determine the launch of the 1C: Enterprise Server Agent (ragent) process, the user on whose behalf it is launched, and the method of restarting in emergency situations.

In the properties dialog of the "1C: Enterprise 8.1 Server Agent" service, on the General tab, the line for starting the ragent process, which is the Agent of the 1C: Enterprise server, is shown. Usually this line looks like:


It states that:

* the Server Agent process is the load module "C: \ Program Files \ 1cv81 \ bin \ ragent.exe";
* the ragent process starts as a Windows service and must be managed by a service manager (-srvc);
* used as the Agent of the 1C: Enterprise server (-agent);
* when the service is started for the first time, a cluster must be created with default parameters and the main IP port number 1541 (-regport 1541). Client applications must use this port to connect to infobases registered in the cluster;
* Server agent IP port must be 1540 (-port 1540). On this port, the Cluster Console must connect to the central server to perform administrative functions;
* when starting cluster processes on this server, they will be dynamically assigned IP ports from the range 1560-1591 (-range 1560: 1591).
* general cluster data will be located in the "C: \ Program Files \ 1cv81 \ server" directory (-d "C: \ Program Files \ 1cv81 \ server").

The 1C: Enterprise 8.1 Server Agent service can be added or removed not only when installing or uninstalling 1C: Enterprise using the 1C: Enterprise 8.1 setup program, but also manually. To do this, you can run the ragent utility from the command line by specifying the appropriate parameters.

To create a service, you need to specify the -instsrvc parameter and the following parameters: -usr is the username on whose behalf the service should be launched, -pwd is the password for this user. In this case, the rest of the parameters will become the parameters of the line for launching the Agent of the 1C: Enterprise server as a service. For example, for standard registration of the 1C: Enterprise Server Agent service in debug mode, the set of parameters should be as follows:

"C: \ Program Files \ 1cv81 \ bin \ ragent.exe" -instsrvc -usr. \ USR1CV81 -pwd Password -regport 1541 -port 1540 -range 1560: 1591 -d "C: \ Program Files \ 1cv81 \ server" - debug

To remove a service, you need to specify the -rmsrvc parameter. For instance:
"C: \ Program Files \ 1cv81 \ bin \ ragent.exe" -rmsrvc

Sometimes it is too easy to change the Server Agent launch line or other parameters of the Agent service, for example, enable debug mode, or create several services of different versions. The service properties dialog does not allow editing the service application launch line and some other parameters, for example, the service identifier. To edit, you need the regedit utility, designed to view and edit the Windows registry.

Attention!
Editing the Windows registry requires extreme caution, as erroneous changes to it can render the operating system unusable.

Run the regedit utility (open Start -> Run and type regedit) and select the branch:


Among its parameters there is the ImagePath parameter, the value of which is the line for launching the Agent of the 1C: Enterprise server. Here you can add new parameters to the launch line or change the values ​​of existing ones. A complete list of possible parameters is given in the book "1C: Enterprise 8.1 Client-Server" documentation.

If you need to register several independent services of the Agent of the 1C: Enterprise server, you need to specify them different load modules, different ports and different data directories of the cluster. You also need to register them with different service identifiers. You can do it like this:

* Create first service:
"C: \ Program Files \ 1cv81 \ bin \ ragent.exe" -srvc -agent -regport 1541 -port 1540 -range 1560: 1591 -d "C: \ Program Files \ 1cv81 \ server"

* Change the registered service identifier using the regedit utility. To do this: select a branch
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ 1C: Enterprise 8.1 Server Agent

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ 1C: Enterprise 8.1 Server Agent First
* Create a second service:
"C: \ Program Files \ 1cv81_10 \ bin \ ragent.exe" -srvc -agent -regport 1641 -port 1640 -range 1660: 1691 -d "C: \ Program Files \ 1cv81_10 \ server"

* Maybe change its ID too. To do this: select a branch
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ 1C: Enterprise 8.1 Server Agent
and change its name, for example to:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ 1C: Enterprise 8.1 Server Agent Second

What cannot the 1C: Enterprise installation program do?

As already mentioned, the 1C: Enterprise installation program copies the 1C: Enterprise load modules and performs the necessary registration in COM and in the Windows service manager. The above is the information you need to understand the internal mechanisms of this registration. If not only the server, but also the 1C: Enterprise client part is installed on the server computer, then it is ready to work immediately after installation (and connection of protection keys).

In order for the 1C: Enterprise server to be accessible from other computers in the local network, it is necessary to check the network settings on the server and client computers, as well as for the network as a whole. TCP / IP is used to transfer data between client applications and the 1C: Enterprise server, as well as between server cluster processes. The operation of 1C: Enterprise in the client-server version depends on the correctness of its configuration.

Processes of a 1C: Enterprise server cluster are connected to each other at the addresses specified as the values ​​of the "Computer" property of the properties dialog of working servers. The cluster requires that the value of the "Computer" property is either an IP address in dot notation, or a symbolic address that can be used to determine the IP address using the gethostbyname function defined in the TCP API. The IP address is determined either from the local symbolic address table (C: \ WINNT \ system32 \ drivers \ etc \ hosts), or from the address tables in available DNS servers. If the symbolic address of the working server does not determine its IP address or is determined incorrectly (for example, the IP address does not match the actual IP address of this computer), then the cluster will not work. It is important that the computer names and their addresses defined in Windows on each of the production servers in the cluster do not conflict with their names in DNS.

On each working server, cluster processes use the following ports: IP port of the working server (usually 1540); IP ports from the workflow IP port ranges (usually 1560-1591). In addition, the cluster's central server uses the cluster port (usually 1541). If the system uses firewalls, then the data transfer on these ports must be allowed. Instead of allowing ports from the above list, you can allow data transfer to cluster processes (ragent, rmngr, rphost).

The connection of the 1C: Enterprise client application to the server is performed in 2 stages. It first establishes a connection to the cluster manager. This uses the address of the central server (symbolic or numeric) and the cluster port (usually 1541). Next, the client application establishes a connection with one of the worker processes. The value of the "Computer" property of the corresponding working server and the port of the working process, which is selected from the range of IP ports of the working server, are used as its address. Data transfer to these ports must be allowed in all firewalls on the route from the client application computer to the computers of the 1C: Enterprise server cluster. The IP address of the server processes is determined using the gethostbyname function on the client computer. It is important that the names of the central and production servers and their addresses defined in Windows on each of the cluster servers do not conflict with their names in the DNS available to the client computer.

And the last thing. Obviously, for successful access to the 1C: Enterprise server from other computers, it must be on the network and the necessary settings must be made for this. Network connection and setup methods are specific to Microsoft Windows-based network administration and are described in the related instructions.

Specifics of SQL Server Tuning

1C: Enterprise in the "client-server" version uses SQL-server for data storage. At the same time, only 1C: Enterprise Server addresses the SQL server. Clients of 1C: Enterprise do not have direct access to the SQL server. Installing and configuring SQL Server is described in detail in the Microsoft SQL Server documentation. For the successful operation of 1C: Enterprise Server with an SQL server, you need to pay special attention to the following settings.

* Required SQL Server components. To access the SQL server from the 1C: Enterprise Server side, the Microsoft Data Access 2.6 or later components must be installed on the 1C: Enterprise Server computer.
* User authentication by SQL server. The access rights to the SQL server databases are determined by the user on whose behalf the database is accessed. From the computer on which the SQL server is installed, launch the SQL Server Enterprise Manager utility, find the Local node (Console Root -> Microsoft SQL Servers -> SQL Server Group -> (Local)) and open its properties. On the Sequrity tab, you can see that SQL Server supports two ways to authenticate users: SQL Server and Windows and Windows only. Windows authentication will allow the 1C: Enterprise Server to access the SQL server only on behalf of the USR1CV81 user, which does not allow differentiating access rights to various infobases served by one 1C: Enterprise server. It is recommended to select SQL Server and Windows mode. In this case, access to a specific infobase will be performed on behalf of the user who was specified as the SQL server user when creating this infobase. It is important that this user must have not only full rights to the infobase database, but also the rights to create databases in the SQL server and to read the Master database tables.
* Network protocols for accessing SQL server. If the 1C: Enterprise Server and the SQL server are located on different computers, then it is necessary to configure the network protocols for accessing the SQL server. This can be done using the SQL Server Client Network Utility. On the General tab, you can select a list of network protocols used to access the SQL server. The fastest and most versatile is the use of the TCP / IP protocol. When using other protocols, keep in mind that some of them, for example Named Pipes, perform additional Windows authentication when communicating with the SQL server. In this case, in order to successfully work with the SQL server, the user USR1CV81 with the appropriate rights must be registered on the computer with the SQL server. The access protocol to this SQL server can be changed on the Alias ​​tab.

In addition to article

There is no doubt that the bundle MS SQL Server + server "1C: Enterprise 8" is the most demanded and frequently used bundle in its niche. An understanding of both products is desirable for its quality support. At the same time, in practice, a support specialist usually either specializes in administering MS SQL Server and does not know the specifics of the 1C: Enterprise 8 server, or, conversely, specializes in administering the 1C: Enterprise 8 server and does not know the specifics MS SQL Server.

This article is written to help both those and other specialists, is designed to save you time and draw your attention to the most important details when using these software products together.

To facilitate the perception of information, practical cases, notes and tips are provided (in italics).

Three-link scheme

As the reader may already know, the database in this case has a three-tier architecture:

Link 1: MS SQL Server DBMS. It "stores" and maintains the database, and ultimately performs all kinds of operations with the database. Thus, the performance of the database, the speed and parallelism of data read-write are largely determined by the performance of MS SQL Server.

Link 2: Server "1C: Enterprise 8". Serves as an intermediary in interaction between clients (users) and MS SQL Server. All client requests are sent to the server, which "translates" them into the MS SQL Server query language, receives the results of these queries, and sends the results to the client.

There is only a small part of the operations that are performed at the 1C: Enterprise 8 server level, without accessing MS SQL - in particular, tracking the so-called "managed locks", reading-writing "session parameters". In such cases, calls to the DBMS are not required, since these operations are performed not with the database data, but with the auxiliary information of the server.

Link 3: Client part "1C: Enterprise 8". It contacts the 1C: Enterprise 8 server, receives results from it (that is, for example, data samples), and is responsible for the user interface.

"I wanted the best."

After reinstalling the 1C: Enterprise 8 server, users complain about a sharp drop in performance. The 1C: Enterprise software implementation specialist who has been reinstalling is just surprised - they say he wanted the best, the system had to start working faster ... The analysis of the situation showed that too many resources were allocated to the 1C: Enterprise 8 server: processes (see point 3) rphost took 15.5 GB of 16 GB of server RAM, as a result there is practically no available RAM for compliant MS SQL Server.

As a result - constant "swap", unnecessary load on the disk subsystem, and extremely slow execution of database operations due to the fact that MS SQL Server does not have time to process requests from the "overclocked" server "1C: Enterprise 8".

Product compatibility

For up-to-date data on the versions of MS SQL Server recommended for use in conjunction with "1C: Enterprise 8", follow the link http://v8.1c.ru/requirements/.

At the time of writing this article, the developers of the 1C company recommend the following options:

      1. SQL Server 2008 R2.
      2. SQL Server 2008, Service Pack 1 (SP1) is required.
    3. SQL Server 2005, Service Pack 3 (SP3) is required.



It is technically possible but not recommended to use MS SQL Server 2000, it requires the installation of Service Pack 2 (SP2), and it is desirable to install Service Pack 4 (SP4).

Please note that this version is currently discontinued, and also does not have a 64-bit version for the x86-64 architecture.

Note:

It is necessary to pay attention to the settings of the operating system: for example, for the M SQL Server 2008 to work efficiently under the Server 2008R2 OS, you need to turn off the balanced power supply mode and switch to the maximum performance mode.

Installing the client-server version of "1C: Enterprise 8"

"1C installed"

One of the customers installed "1C: Enterprise 8" by a system administrator who has no experience in working with "1C: Enterprise 8". And although, according to him, he "installed 1C" - there was no client side on the user computers, and the server side on the server. Analysis of the situation clarified the picture - in the "1C: Enterprise 8" set there were 2 disks - installation of the platform and installation of database templates. The administrator did not delve into the installation procedure - and installed the database templates, and not the executable files, platform components.

Of course, this is an atypical example of an extremely inattentive attitude to work.

When installing "1C: Enterprise 8", it should be borne in mind that the following are installed separately:

      Platform "1C: Enterprise 8" is an executable application, an integrated environment for the development and operation of databases. When it starts, one of two modes of operation is selected - "Enterprise" (user-defined database shell) or "Configurator" (integrated development environment). A more complete description can be found at the link
      Configuration templates "1C: Enterprise" is a file of the platform's internal format, with the help of which the platform can create a clean or demo database of the structure that is included in the template. Also, using the update template, you can update the structure of an existing database already filled with data.
      When installing the platform, you should pay attention to the choice of components:





The 1C: Enterprise component may not be installed on the server (s).

In this case, the server will provide client computers with access to the 1C: Enterprise databases, but it will not be possible to work with the database in user mode directly from the server.

Note:

The 64-bit version of the platform does not contain the client part. Therefore, during installation, 64-bit server components are installed on the server separately, and 32-bit components of the client application are separately installed.

The 1C: Enterprise Server component is needed to connect to MS SQL Server - this is an application server that connects the platform on client workstations and MS SQL Server.

It is possible to install the component in the mode of a simple application or system service, and, of course, the second option is recommended.

When installed "as a service", this component will be launched and executed on behalf of the selected user:




After the component is loaded, it spawns several processes, such as: "server agent", "server cluster manager", "server worker processes".

Database queries are executed by worker processes, and the server cluster manager distributes the load between them.

Server working processes can be managed (add, delete, limit the use of RAM, declare primary or backup) if the "1C: Enterprise Server Administration" component is installed.



Note:

For the 32-bit version of the server, it is recommended to install working processes in such a quantity so as not to leave the RAM unused - each of them has a noticeable limitation on the use of RAM, from 2 to 4 GB, depending on the system configuration.

For a 64-bit version of the server, theoretically, two worker processes are sufficient - one worker and one backup. However, in practice, in order to ensure the reliability and stability of connections on a significant (several hundred) number of users, a larger number is required, it depends on many factors - on the number of users, the filling of the database and the volume of queries performed, therefore the authors believe that the number of processes in this case should be selected experimentally.

"Ouroboros"

After unsuccessful optimization of the 1C: Enterprise 8 server settings, users signaled that the system was extremely slow, and the system administrator noted a constant 100% CPU load on the server.

An analysis of the situation showed the source of the problem - when setting up, a too small limit on the use of RAM by worker processes was set.

And the fact is that this restriction works as follows:

When a server cluster manager sees that a worker process has exceeded the RAM limit, the work of this process is terminated, it is disconnected, a new worker process is created, and connections and user requests are redistributed between worker processes.

The set limit was so small (300MB) that the worker process could not fully service even one intensively working user - as a result, the server cluster manager was constantly restarting worker processes and reconnecting users. As soon as a new process was created and users connected to it, the RAM limit was almost instantly reached and caused the next restart. This took 100% of the processor load.

The 1C: Enterprise Server component is not needed on client workstations, and it will not be able to start there, since it requires a physical security key.

If the number of connected users is small (less than 50), the application server is usually installed on the same computer where MS SQL Server is running.

For systems with a large number of users and / or a large volume of information flows, a separate installation is recommended, as well as the use of a server cluster.

The 1C: Enterprise Server Administration component can also be useful on clients - for example, with its help you can see a list of infobases connected to a given 1C: Enterprise server.

It is highly recommended to install it on the server itself.

Access

Note:

To check that access is provided, it is not enough to use the 1C: Enterprise server administration utility, and even more so the presence of the server in the "Network Neighborhood" is not enough!

It is necessary on each client to log into the database installed on the server - only this will give 100% confidence that access is provided.

1. Depending on the security policies, for MS SQL Server, either Windows account authentication or MS SQL Server account authentication is used.




In the latter case, when creating the 1C: Enterprise database, the system will ask for the login and password of the MS SQL Server account (for example, sa); in the first case, the login and password should be left blank:



and that user of the system, on whose behalf the 1C: Enterprise server is launched, must be given rights in MS SQL Server, namely:

      full rights to the database in which the infobase is located
      access to the master database (public role)
      recommended - the rights to create a database, otherwise each new database will need to first be created using MS SQL Sever, and only then connected to the 1C: Enterprise server
      recommended - the right to delete your database



For example, you can assign the user in question to the predefined role processadmin or sysadmin.

Advice.

If all users have lost access to the working database at the same time, you need to double-check the user's rights and roles in MS SQL Server, including those set for a specific database, that is, User mapping:




2. The 1C: Enterprise server accesses MS SQL Server through the Microsoft Data Access mechanism, so its components must be installed, and the 1C: Enterprise server user (see the previous paragraph) must have rights to launch them.

3. Communication between clients and server is supported by TCP protocol, therefore it is necessary that this protocol is supported by both sides. There may be problems with matching the server name and its IP address, for example, if a peer-to-peer network is used. In this case, you should record the correspondence in the file [C: \ WINDOWS \] system32 \ drivers \ etc \ hosts.

Advice.

If the network is peer-to-peer - to ensure a permanent connection to the server, create a network drive that accesses any of the folders on this server.

4. If the Named Pipes protocol is used, and if MS SQL Server and the 1C: Enterprise server are installed on different computers, the user on whose behalf the 1C: Enterprise server is running must be registered in the list of users of the computer on which MS SQL Server is running.

5. In some cases, additional configuration of Windows Firewall may be required, that is, adding exceptions.

6. Some antiviruses can block "unwanted" network traffic, so you may need to add their exclusion lists.

7. The release of the 1C: Enterprise 8 platform must be exactly the same on the client and on the server.

"Twins"

"One of the customers used two database servers, each of which had one working database. Users worked - each one simultaneously with both databases. Support services updated the 1C: Enterprise 8 platform on servers and clients .... And then complaints started pouring in. The analysis of the situation showed that the update on clients and servers was done by several people, and the installers did not double-check that they were installing the same release. Therefore, one server had one platform release, on the second - the other, half of the clients - the first of these releases, on the other half - the other.It turns out that each user has access to only one of the databases.

To quickly solve the problem, I had to install both platform releases for each user and create separate shortcuts to enter each database.

Initial settings of MS SQL Server and database

"And so it works"

MS SQL Server is distinguished by its simplicity of initial installation, so not all administrators are puzzled by its additional configuration - after the installation, by default, the database is working, users are logged into it - the job is done. This approach almost always entails the emergence of problems after about a month or two - and, of course, suddenly and at the most inconvenient moment.

For example, if the base is intended for accounting, before submitting tax returns, it is often necessary to urgently recalculate certain data, and recalculate in large quantities, say, "all receipts of fixed assets from the beginning of the year." Moreover - during the working day, without stopping the work of other users of the database.

And, of course, it is at this moment that it will be discovered that the base "freezes" or "crashes" with such recalculation, or does not allow other users to work.

This kind of "Murphy's Law" applies to each of the points below.

Before starting to use MS SQL Server as a DBMS for 1C: Enterprise, it is recommended:

1. Set the value of the max degree of parallelism parameter to 1.

That is:

      after connecting to the server, enter the server properties via the context menu, the Properties item
      then select the Advanced page and edit the max degree of parallelism parameter






Otherwise, some queries generated by the 1C: Enterprise server may cause the error "Intra-query parallelism caused your server command (process ID #XX) to deadlock. Rerun the query without intra-query parallelism by using the query hint option (maxdop 1 ) ". After this error, the client side often crashes.

The error will not manifest itself stably, since the query plan is formed differently depending on the accumulated statistics - it will manifest itself on large and complex queries, that is, at the most unfortunate moment.

2. Create a Maintance Plan that shrinks the tempdb temporary table database. The database of temporary tables is not always cleared automatically by the 1C: Enterprise server, and sometimes, as a result of an unsuccessfully written query, a temporary table of, for example, 50 GB in size may be generated and not cleared. As a result, disk space may run out, as a result of which, both the client and server parts may crash, and there is also a small risk of data integrity violation.

That is, you need:

      go to MS SQL Management Studio
      after connecting to the server open the "Maintance plans" section
      create a new (or supplement the existing) Service Plan,
      add the item "Execute T-SQL Statement task" to it (since the tempdb database cannot be selected in the "Shrink database" task) with the code




1.USE
2.
3.GO
4.
5.DBCC SHRINKFILE (N "tempdev", 0, TRUNCATEONLY)
6.
7.GO
8.
9.DBCC SHRINKFILE (N "templog", 0, TRUNCATEONLY)
10.
11.GO

Note that the file name of the temporary table database may not be "tempdev". To check this name, you can use the script

1.USE tempdb
2.
3.GO
4.
5.EXEC sp_helpfile
6.
7.GO




"Pot, don't boil"

The most common way in practice to overflow tempdb and thus crash the server is to forget to specify a condition when joining tables.

Namely, let's say we have two tables in the database, each with a size of 20 thousand records. Let's say that a one-to-one correspondence can be established between their records, and we write a query that creates a temporary table that contains 20 thousand records with the fields of both original tables. But if we forget to specify the join condition, every record in the first table will join with every record in the second! That is, the resulting table will be 20'000 * 20'000 = 400 million records. Etc.

3. For the sake of reducing the load on the disk subsystem, it is recommended, if possible, to spread the working database and tempdb, logs, and the system paging file across different physical disks.

It is better to set the necessary path for storing the files of the working base when creating it by editing the Path column:




To change the physical location of the temporary table database files, use the ALTER DATABASE command, that is, in MS SQL Management Studio, you need to execute the following script ("New query" command)

1.USE master
2.
3.GO
4.
5.ALTER DATABASE tempdb
6.
7.MODIFY FILE (NAME = tempdev, FILENAME = "New_Drive: \ New_Directory \ tempdb.mdf")
8.
9.GO
10.
11.ALTER DATABASE tempdb

12.
13.MODIFY FILE (NAME = templog, FILENAME = "New_Drive: \ New_Directory \ templog.ldf")
14.
15.GO

4. The "growth" of the working database and its log should not be impeded - there should be no size limit, the "Autogrowth" property should be set as a percentage, the recommended value is 10%. Otherwise, adding data to the database, restoring from an archive, and other operations may take an unreasonably long time.

To set this property, you need to go to the database properties through the context menu, select the Files section, open the file properties editing:



5. It is recommended to enable support for the TCP / IP network protocol in MS SQL Server and disable all others, otherwise the joint work of MS SQL Server and 1C: Enterprise server will be less stable.




6. In the same place - clear the Alias ​​section, since its installation leads to errors in the interaction between MS SQL Server and the 1C: Enterprise server.

Before starting to operate the database, it is recommended:

1. When creating a database from "1C: Enterprise" set the "date offset" 2000, otherwise an attempt to record the date earlier than 01.01.1753 (which is possible due to the human factor) will cause the database to malfunction.

Attention! The date offset cannot be changed for an existing database!



2. Set the Recovery model to Simple, or create a Maintance Plan that will back up the database on a daily basis and truncate the transaction log (log file). Otherwise, during some operations, the transaction log (log file) will grow very quickly: for example, when the database is restructured, the growth of the log file size can exceed the size of the database itself by several times.




3. Create a Maintance Plan that performs the following scheduled tasks at least once a week:

      Creating a backup copy of the database.
      Updating database statistics and clearing the procedural cache (note that the autoupdate statistics property does not purge the procedural cache).
      Clearing the procedural cache - not included in the standard operations of the Maintenance Plans, this step must be defined as the execution of a script (Execute T-SQL Statement) with the following content:
      DBCC FREEPROCCACHE
      Re-indexing database tables.






Of course, it makes sense to set up automatic sending of emails about successful / unsuccessful completion of tasks.




Conclusion

The issues that most often cause difficulties for system administrators and implementers of "1C: Enterprise 8", in connection with the joint use of MS SQL Server and the client-server version of "1C: Enterprise 8".

The author hopes that he has highlighted "both sides of the coin" fairly consistently and easily.

P.S. Make backups more often!

In addition to the file version, the 1C: Enterprise system can work with infobases in the client-server version. In the latter case, an architecture is understood that consists of several software layers, schematically shown in the figure below.

  • Client applications, thin clients, and web clients- this is "1C: Enterprise" in various launch modes, with which the end user works. For client applications and thin clients, users' computers (or) are required; for a web client, a web browser is sufficient.
  • Server cluster "1C: Enterprise" is a collection of work processes running on one or more computers and a list of infobases that are located in this cluster. In the server cluster, all the work of application objects is performed, preparation for displaying forms (reading infobase objects, filling in form data, arrangement of elements, etc.) and the command interface is carried out, reports are generated, background tasks are executed. The clients only display information prepared in the server cluster. In addition, the server of the 1C: Enterprise cluster stores service files, as well as an infobase log.
  • Database server- on the database server, there is direct storage and work with data, provided by one of the following database management systems (DBMS) supported by the 1C: Enterprise system:
    • Microsoft SQL Server starting from Microsoft SQL Server 2000 and higher;
    • PostgrageSQL since version 8.1;
    • IBM DB2 since version 9.1;
    • Oracle Database 10g Release 2 or higher.
  • Web server required only for web clients and one of the thin client options. Provides interaction of these types of connection with the 1C: Enterprise server cluster.

It is also worth noting that each software layer does not have to be located on a separate physical computer. A server cluster can be located on the same computer with a database server, web server, etc. For example, the following structure of work is often found in small organizations:

In this article I will describe the installation of the 1C: Enterprise server version 8.3.4.389 (for other versions of the 1C: Enterprise platform 8.1, 8.2 and 8.3, the steps are the same) on one computer running Windows Server 2008 (R2) or Windows Server 2012 (R2). Microsoft SQL Server 2008 (R2) or Microsoft SQL Server 2012 will be considered as a DBMS. For this we need:

  1. A computer that meets the system requirements for installing the 1C: Enterprise server and with the OS installed on this computer or.
  2. A computer for a database server, also running an OS or (can be a computer from item 1).
  3. Local administrator rights on both computers.
  4. Distribution kit for 1C: Enterprise server installation 8.
  5. Software license or HASP4 Net protection key for 1C: Enterprise server.
  6. Distribution kit for installing Microsoft SQL Server 2008 (R2) or Microsoft SQL Server 2012.

2. Installing MS SQL Server DBMS

Install MS SQL Server DBMS on a computer that serves as a database server. For the 1C: Enterprise system to work, it is enough to install the following components:

  • Database Engine Services
  • Management Tools - Basic
    • Management Tools - Complete.

Sorting parameters select " Cyrillic_General_CI_AS". Details about the installation of systems

3. Configuring Windows Firewall for DBMS operation

If the database server and the 1C: Enterprise cluster server are located on different physical computers, you must configure the Windows Firewall on the database server so that the 1C: Enterprise server can work with the DBMS, namely, open incoming connections by port 1433 (for the default instance of SQL Server).

  • I wrote in detail about configuring Windows Firewall for Microsoft SQL Server 2008 (R2) / 2012.

4. Adding a user to MS SQL Server

Next, add a separate user to MS SQL Server, under which the 1C: Enterprise server databases will be connected. This user will also be the owner of these databases. The added user must be authorized on the server using a password and have a set of roles: dbcreator, processadmin, public... Details about adding a user to

  • Microsoft SQL Server 2008 (R2) I wrote.
  • I wrote Microsoft SQL Server 2012.

5. Installing the 1C: Enterprise server

Now let's move on to installing the 1C: Enterprise server files and launching the corresponding service. Installation requires a distribution kit of the 1C: Enterprise technological platform. From the list of supplied distributions, the following are suitable:

  • Technological platform 1C: Enterprise for Windows - allows you to install a 32-bit server "1C: Enterprise"
  • Server 1C: Enterprise (64-bit) for Windows - allows installation of both 32-bit and 64-bit 1C: Enterprise servers

(There is also an extended version of the CORP server 1C: Enterprise 8.3, details can be found on the 1C website)

Open the directory with the 1C: Enterprise server installation files and run the file setup.exe.

The installation assistant for the 1C: Enterprise system is launched. On the first page, click " Further».

On the next page, you need to select those components that will be installed, we need components:

  • Server 1C: Enterprise- server components "1C: Enterprise"
  • Server administration 1C: Enterprise 8- additional components for administering a 1C: Enterprise server cluster

The rest of the components (the list of components may depend on a specific distribution), depending on the need, can also be installed on this computer. Having made a choice, press " Further».

Select the interface language that will be used by default and click " Further».

If the 1C: Enterprise server is installed as a Windows service (and in most cases it should be installed), I recommend immediately creating a separate user from under which the created service will run. For this

  • Leave the flag " Install 1C: Enterprise server as a Windows service (recommended)»;
  • We translate the corresponding switch to " Create user USR1CV8».
  • Enter the password for the user being created 2 times. By default, the password must meet the Windows password policy. You can read more about this:
    • For Microsoft Windows Server 2008 (R2) -;
    • For Microsoft Windows Server 2012 -.

You can also select an existing user to start the 1C: Enterprise server. In this case, the selected user must have the following rights:

  • Log on as a service
  • Log on as a batch job
  • Performance Log Users.

Also, the user should be sure to give the necessary rights to the directory of the server's service files (by default C: \ Program Files \ 1cv8 \ srvinfo for 64-bit and C: \ Program Files (x86) \ 1cv8 \ srvinfo for a 32-bit server).

Automatically created user USR1CV8 will have all of the above rights.

Having filled in the appropriate parameters, click " Further».

Finally, we press " Install"To start the installation. This will copy the files of the selected components, create configuration files, register program components, create shortcuts, and launch the 1C: Enterprise server service.

Upon completion of the installation, the assistant will offer to install the protection driver - HASP Device Driver. If a software license for the 1C: Enterprise server is used, there is no need to install the driver. We keep or remove the flag " Install protection driver"And click" Further».

Setting up accounting parameters in 1C 8.3 is one of the first steps that you must take before starting full-fledged work in the program. It is on them that the correct operation of your program, the availability of various functionality and accounting rules depend.

Starting with the version of 1C: Accounting 3.0.43.162, the interface for setting accounting parameters has changed. Also, some parameters were adjusted separately.

Go to the Administration menu and select Accounting Options.

Our team provides services for consulting, setting up and implementing 1C.
You can contact us by phone +7 499 350 29 00 .
Services and prices can be seen on the link.
We will be glad to help you!


This section of settings consists of six items. Next, we'll take a look at each of them. All of them allow you to influence the composition of the subconto for certain accounts and subaccounts.

Initially, we already have flags set at two points, which cannot be edited. You can also additionally enable maintenance by accounting methods.

This setting was also filled. It is impossible not to use the item "By nomenclature", but the rest of the settings, if necessary, must be edited. The list of accounts and subkontos affected by these settings is shown in the figure below.

This is where the subkonto accounts 41.12 and 42.02 are managed. By default, only warehouse accounting was set. It is predefined and we cannot edit it. In addition, this type of accounting can be maintained according to the nomenclature and VAT rates.

Cash flow accounting

This type of accounting will necessarily be carried out by bank account. It is also recommended to additionally take into account in 1C 8.3 the movements of the DS according to their articles for additional analytics on management accounting.

It is possible to keep records of this type of calculations both for employees as a whole, and for each separately. These settings have a direct impact on subconto 70, 76.04 and 97.01 accounts.

Cost accounting will necessarily be carried out by item groups. If you have a need to prepare audited financial statements in IFRS, it is advisable to also keep records of items and cost items.

Salary settings

To go to this package of settings, you need to follow the hyperlink of the same name in the form of accounting parameters. Many of the settings here should be left at their defaults, but you still have a lot of room for action.

General settings

For completeness of the example, we note that salary and personnel records will be kept in this program. Of course, there are limitations here, but if there are not many employees on the staff of your organization, then the functionality of 1C: Accounting will be quite enough.

You will see a list of settings for each organization, which is kept in the program. Let's open the setting for OOO "Konfetprom".

Here you can specify how the salary will be reflected in the BU, the timing of its payment, vacation reserves and any special territorial conditions.

Let's go back and follow another hyperlink.

Among other things, you can also change the way of organizing the list of employees in documents and make settings for printable forms.

Allows you to customize the lists of types of charges and deductions. Initially, they are already filled with some data.

Also, in this section of 1C, you can include the availability of the functionality of sick leave, vacations and executive documents. The setting is available only if there are no organizations in the database with more than 60 employees.

The last setting is very useful, since when editing all its amounts will be recalculated automatically.

This section is necessary in order to indicate the ways of posting labor costs and mandatory insurance premiums from payroll to accounting accounts. Initially, these settings are already filled in, but, of course, you can adjust them.

Personnel accounting and Classifiers

It makes no sense to describe these last two sections in detail, since everything is intuitively clear here. The classifiers are already filled in and often leave these settings untouched.

Other settings

Let's go back to the accounting parameters form and briefly consider the remaining settings items.

  • Payment terms for suppliers and buyers determine how many days the buyer’s debt to us will be considered overdue.
  • Attriculum Seal- setting up their presentation in printed forms.
  • Filling in prices sales allows you to establish where the price will be substituted in the corresponding documents.
  • Planned price type affects the substitution of prices in documents related to production.

Some of these 1C 8.3 settings were previously made in the accounting parameters. Now they have been moved to a separate interface. You can also find it in the "Main" menu.

The configuration form is shown in the figure below. Here, navigating through the sections, you can set up income tax, VAT and other data.

Setting up the program 1C "Accounting" ed. 3.0, created on the 1C Enterprise 8 technological platform, includes setting up program mechanisms, accounting options, as well as entering the primary information necessary to start working.

Setting up 1C Enterprise within the framework of the standard will allow you to set specific functionality to the 1C program, select options for accounting, enter a number of specific values ​​and parameters. The program settings block commands are located in the "Main" section of the menu.

Setting up the program's functionality

The program "1C: Accounting" has a wide functionality, but for the organization of accounting, as a rule, all functionality is not required. Therefore, it is advisable to limit the functionality of the 1C program to the necessary sections, which will allow you to get rid of the overload of interface fields with unnecessary commands. To do this, you need to configure 1C.

As in other programs based on "1C Enterprise" for "1C: Accounting" there are three options for setting the functionality:

  • The main the functionality of the "1C: Accounting" program is designed for most small businesses with a fairly simple accounting system. It includes features that are sufficient for standard work.
  • Organizations that require advanced functionality can use the additional capabilities of 1C selectively in the form of setting up functionality on the tabs in the corresponding sections.
  • Full the functionality allows you to use the capabilities and algorithms of the 1C program as fully as possible, building the most complex accounting schemes.

Setting up 1C includes the mandatory filling of the details of your company. When you start a new infobase for the first time, the start page will display the task of filling in the organization's details.

In the directory of the Organization, it is necessary to enter all information about legal entities or individual entrepreneurs, which will be used by the 1C program to fill out documents and prepare reports, for electronic document flow and exchange information with regulatory authorities.

The program has two options for filling out information about the organization:

  • Manual;
  • Automatic by specifying TIN.

Manual filling


On the main form of the directory for the organization, the following details are filled in:

  • Abbreviated name is the official abbreviated name. Which your company has, according to the constituent documents. It is used to display printed forms of 1C documents and reports;
  • Full name - displayed by default in printed forms of documents and 1C reports, in which the full name that your company has must be affixed in accordance with the law, for example, in regulated reports;
  • Name in the program - the name used for reflection in screen forms in the 1C program;
  • Prefix - a prefix (two alphabetic characters) that will be placed at the beginning of each number of documents of this organization;
  • TIN - taxpayer identification number;
  • KPP - the code of the reason for staging the taxpayer (at the location of the organization);
  • OGRN - main state registration number;
  • Registration date - the date of state registration;
  • For an individual entrepreneur, the fields Surname, Name, Patronymic are filled in, as well as the fields OGRNIP, Series and number of the certificate, Date of issue;
  • The checkbox "The labor of hired workers is used" is set by an individual entrepreneur in the presence of hired workers.

The rest of the information about the organization is divided into the following groups:

Address and telephone

  • In this group, the legal, actual and postal addresses, telephone, fax, and other contact information are filled in;
  • For an individual entrepreneur, fill in the address of the place of residence and contact phone number.

Signatures

  • In this group, the surname, name, patronymic and position of the main responsible persons are indicated: head, chief accountant and cashier;
  • The link "Responsible for the preparation of reports" provides for filling in the surname, name, patronymic and position of persons responsible for the preparation of accounting and tax registers, as well as the reporting of the enterprise;
  • For an individual entrepreneur, the last name, first name, patronymic and position of the cashier are filled in.

Free of charge
consultation
expert

Natalia Sivorina

1C Consultant Analyst

Thank you for your request!

A 1C specialist will contact you within 15 minutes.

Logo and printing

  • In this group, the name (full or abbreviated) is selected, which is used when printing documents, as well as the logo, facsimile signature of the head and chief accountant, the seal of the organization (if any) are uploaded;
  • Also, in this group, you select additional conditions for substitution into the account;
  • A sample invoice form with a logo, facsimile signature, stamp and additional terms is displayed in a printable preview of the Invoice to Buyer printable.

Main bank account

  • This group contains the details of the main bank account of the organization. To fill in the information about the bank, it is enough to fill in the BIK field.

Statistics codes

  • Here the assigned statistical codes of the organization (OKOPF, OKFS, OKVED, OKPO) and the code of the territorial body of Rosstat are filled in.

Automatic by specifying TIN

When you first enter the program, it is proposed to immediately connect to the 1C: ITS portal:


Here you must specify the registration data from the 1C: ITS portal (there must be a valid ITS subscription). Next, the program will ask you to enter the TIN:


Enter the TIN of the organization and click the "Continue" button:


A new organization will appear in the directory, based on the entered TIN. All basic details of the organization will be filled in automatically:

Setting up the accounting policy of the organization in the 1C program deserves a separate consideration

The current legislation provides an opportunity to choose one of several methods of accounting and tax accounting of an enterprise in a number of areas. The methods chosen represent the accounting policy of the organization.

In order to bring the two types of accounting closer together, 1C: Accounting provides for the possibility of applying uniform accounting policy parameters for accounting and tax accounting. The accounting policy of the organization in the 1C program is set for a certain period, as a rule, for a year.

1C: Accounting supports the following taxation systems:

  • General taxation system for organizations;
  • General taxation system for individual entrepreneurs;
  • Simplified taxation system (for organizations and individual entrepreneurs).

In addition to any of these systems, a taxation system in the form of a single imputed income tax (UTII) can be applied for certain types of activities. And an individual entrepreneur can apply the patent taxation system.


The tax system and parameters of taxation are set in 1C individually for each organization.

Depending on the chosen organizational and legal form (individual entrepreneur, LLC) and the taxation system, in the 1C program, certain parameters of the accounting policy for accounting and tax accounting become available for further customization.

  • If this is an LLC, then in 1C it is necessary to fill in the information for accounting and tax accounting. If an individual entrepreneur - then only for the tax;
  • If the LLC is on the general taxation system, then in 1C, the tax accounting parameters associated with this taxation system are adjusted;
  • Setting up for a simplified taxation system in 1C also involves the selection of some specific parameters for accounting.

The 1C chart of accounts is part of the accounting and tax accounting policies. The chart of accounts is the same for all organizations of the information base.


You can add new accounts and sub-accounts to the 1C chart of accounts. When adding a new account, you need to set its properties:

  • Setting up analytical accounting *;
  • Tax accounting (for income tax);
  • Accounting by divisions;
  • Currency and quantitative accounting;
  • Signs of active, passive and active-passive accounts;
  • Signs of off-balance sheet accounts.

* Setting up analytical accounting for the 1C chart of accounts - these are types of sub-accounts that are set as properties of accounts. For each account, analytical accounting can be conducted in parallel using up to three types of subconto. The ability to add new subconto yourself is provided.

In the form "Personal settings" you can specify values ​​for automatic substitution of 1C in the details of documents.

Setting up "1C: Accounting" from scratch also includes advanced settings in the administration section. Our company has been producing since 2003, so if you have any questions about working with the "Administration" section, write or call us. We will be happy to help you!


In this section, you can find all the additional 1C options for optimal settings for functional and technical work with the program. For example, here you can enter users and configure their rights, load a bank classifier, an address classifier, etc.

For the most efficient work with the program, it is recommended to configure the following accounting parameters:


If necessary, you can make individual settings for printed forms, reports and 1C processing:


Having finished setting up 1C Accounting, created on the 1C Enterprise technological platform, you can start keeping records, filling out directories, entering documents, generating reports, etc.

Of course, in the process of working with the program, you can correct and supplement the 1C settings, but in order not to constantly return to this issue, not to be distracted from current tasks, you should devote time and attention to this process. With insufficient experience with the program and knowledge of accounting and tax accounting, for the correct setting of 1C, it is advisable to contact qualified specialists for. Full setup of 1C 8 is an important stage for the correct and complete accounting of your company.


Did you like the article? Share with your friends!
Was this helpful?
Yes
Not
Thanks for your feedback!
Something went wrong and your vote was not counted.
Thank you. Your message has been sent
Found a mistake in the text?
Highlight it, click Ctrl + Enter and we will fix everything!