Guest mode. You can read posts without signing up. Comments, ratings, job contacts and your own posts open after you sign up and accept the rules. What is Kommit →

📚 GuideСервер 1С на Windows и LinuxWindows Server · часть 5 из 14
Guide contents
Редакция КоммитРедакция портала
commit dda786f · 19 days ago

1C Server on Windows, Step 3: DBMS — PostgreSQL for 1C or MS SQL Server

🌐 Machine-translated from Russian. Show original

In this part:

What to choose#

  • MS SQL Server is a classic for 1C on Windows. Licenses are required (except for Express, which has a database size limit — usually not enough for working 1C databases).
  • PostgreSQL — free. A special build with improvements for 1C is needed for 1C: it is distributed by 1C (section "PostgreSQL distributions" on releases.1c.ru) and Postgres Professional (Postgres Pro for 1C). Regular PostgreSQL from the postgresql.org site is not suitable for 1C.

Check the compatibility of platform versions and DBMS in the documentation for your platform version.

Option A. PostgreSQL for 1C#

  1. Download the PostgreSQL build for 1C on Windows x64 and run the installer as an administrator.
  2. Specify the data directory on the fast drive (not on the system drive, if you have a choice).
  3. Set the postgres superuser password and save it.
  4. Cluster encoding — UTF8, locale — Russian . Incorrect locale leads to sorting and database creation errors.
  5. After installation, check the PostgreSQL service and connection:
& "C:\Program Files\PostgreSQL\<версия>\bin\psql.exe" -U postgres -c "SHOW server_version;"

Important postgresql.conf settings#

Guidelines for a server where the DBMS works together with 1C (adjust for your memory):

shared_buffers = 4GB              # ~25% RAM
effective_cache_size = 12GB       # ~50–75% RAM
work_mem = 64MB
maintenance_work_mem = 1GB
temp_buffers = 256MB
max_locks_per_transaction = 256
standard_conforming_strings = off # рекомендация для 1С
escape_string_warning = off

After editing, restart the PostgreSQL service. Builds for 1C usually already include some settings — see comments in the file.

Option B. Microsoft SQL Server#

  1. Install SQL Server (Standard or Enterprise for workbases) with the Database Engine Services component.
  2. Collation parameters: Cyrillic_General_CI_AS. Selected during installation — hard to change later.
  3. Authentication mode: mixed (SQL Server and Windows) — 1C often connects with an SQL login.
  4. Create a login for 1C with the right to create databases:
CREATE LOGIN usr1c WITH PASSWORD = 'сложный-пароль', CHECK_POLICY = ON;
ALTER SERVER ROLE dbcreator ADD MEMBER usr1c;

SQL Server settings for 1C#

  • Maximum server memory — limit by leaving memory to the system and the 1C server, otherwise SQL Server will consume almost all the RAM.
  • Database recovery model : Simple — if you make full backups once a day and losing a day is allowed; Full — if you need a point-in-time rollback (then transaction log backups are mandatory).
  • Data, log, and tempdb files — preferably on different fast disks.
  • Enable regular maintenance: index rebuild and statistics updates (maintenance plan or SQL Agent jobs).

User for 1C#

Do not use sa and postgres for everyday work if this can be avoided. Create a separate user for 1C and restrict access to the DBMS only from the 1C server. If the DBMS is installed on the same machine, do not open the DBMS port to the outside at all.

Verification#

  • Connection to the DBMS operates under the 1C user.
  • The password is written — it will be needed when creating the database in step 4.
Comments 00 участников · 0 гостей🔒 Rate and discuss after signing up

Comments · 0

No comments yet.Sign in to comment, rate and see all comments.