Data structure in 1C:Enterprise 8





This article describes the database files and tables supported by 1C:Enterprise 8, as well as the data types stored in these files and tables. The article covers both the file and client/server infobase modes.

This information should be used solely to analyze the location and composition of data used in 1C:Enterprise and is intended for the developers of applied solutions and 1C:Enterprise 8 infobase administrators. This information must not be used for processing this data using any methods that are not supported by the inherent features of 1C:Enterprise 8.

Infobases, configuration repositories, auxiliary data, and temporary data

This article only describes the data that 1C:Enterprise uses on a constant basis regardless of the actions performed by specific configurations or actions related to the user's choice of certain files. It does not describe configuration files, data dumps, external data processors, or other files that are external in relation to 1C:Enterprise 8.

The data that 1C:Enterprise uses on a constant basis may be divided into 5 groups according to their purpose and importance:

  • Infobases. Infobases are used to store the most important data, including configuration data, all enterprise business data, and administrative data. All the data related to a single infobase is stored in a single database. Loss or corruption of any infobase data may render a 1C:Enterprise-based system inoperable.
  • The configuration repository contains the current configuration and the history of its development (provided that group development tools are used in Designer). This data is deemed vitally important in configuration development.
  • Event Log contains a list of operations performed with this infobase. This data is not mandatory for 1C:Enterprise-based system operation, but it can be important from an organizational point of view.
  • Auxiliary data. This data is provided for user's convenience only; it does not influence the logic of the 1C:Enterprise-based system.
    • Profiles contain pane positions, dialog box positions and states, and other settings that enhance user experience. Many configurations can store additional data (i.e., data that may be useful but is not necessary) in the profiles.
    • Other auxiliary data. These are lists of infobases registered on the client or server, and some other data.
  • Temporary data. This data is used by the 1C:Enterprise 8 application for service purposes. It is of immediate interest, i.e., temporary data is used in a single session only and is deleted when the session is over.

Different methods are used for storing data belonging to different groups. The ability to manage both file and client/server infobases adds variety to the ways data is stored.

Infobase structure

The data that defines the logic of 1C:Enterprise-based applications is stored in the infobase. The infobase is stored in a database as a set of tables. 1C:Enterprise 8 can use one of the five DBMS for this:

  • Integrated into 1C:Enterprise 8 (file mode of an infobase). In this case, all infobase data is stored in a file named 1cv8.1cd. It is a binary file which is in fact a database for a DBMS that is integrated into 1C:Enterprise 8.
  • Microsoft SQL Server (client/server mode of an infobase). All infobase data is stored in a Microsoft SQL Server database.
  • PostgreSQL (client/server mode of an infobase). All infobase data is stored in a PostgreSQL database.
  • IBM DB2 (client/server mode of an infobase). All infobase data is stored in an IBM DB2 database.
  • Oracle Database (client/server mode of an infobase). All infobase data is stored in an Oracle Database.

Both infobase modes (file and client/server) have similar formats (which do differ in small ways) at the level of database objects (tables, fields, indexes, and so on). Some information about this format is provided below.

The entire infobase is presented in a database as a set of tables. There are several tables among them that must be included in the presentation of each infobase.

  • Config — main configuration of an infobase. This configuration reflects the actual data structure and is used in the Enterprise mode of 1C:Enterprise 8.
  • ConfigSave — a configuration being edited in Designer. When you perform a database configuration update, the configuration from ConfigSave is written to Config. When you perform the Configuration — Database Configuration — Return to Database Configuration operation in Designer, the configuration from Config is written to ConfigSave.
  • Files service information, e. g. on working with a configuration repository.
  • Params infobase parameters. Among them are the following:
    • Regional infobase settings.
    • A table of correspondence between metadata objects and database objects (tables, fields, indexes, and so on).
    • Some other details.
  • _YearOffset the date offset in the database. This table is only created if Microsoft SQL Server is used.
  • DBSchema stores 1C:Enterprise database structure and defines other database objects used by the infobase.
  • v8users — the list of users.
  • _UsersWorkHistory — the history of users actions.
  • _SystemSettings — system settings storage.
  • _RepSettings — report settings storage.
  • _RepVarSettings — report option settings storage.
  • _CommonSettings — common settings storage.
  • _FrmDtSettings — form data settings storage.

During startup, 1C:Enterprise checks whether the abovementioned tables are available in the infobase, and should any of them be missing, the following warning is displayed: "Infobase corrupted". If all the abovementioned tables are missing, that means that the infobase is empty. If this is the case, the tables are created.

A list and the structure of other database tables is defined by a specific configuration, i.e., by the metadata objects defined in this configuration. The name of each table consists of a letter prefix followed by a number. The prefix defines the purpose of the table, while the number helps distinguish between tables of a similar purpose that relate to different metadata objects. If IBM DB2 is used as a DBMS, table aliases instead of table names have this structure.

If a configuration defines at least one exchange plan with the "Distributed infobase" check box selected, the following tables are created:

  • _ConfigChangeRec — a table for registering changes in configuration objects.
  • _ConfigChangeRec_ExtProps — a table for storing file names of modified external properties of configuration objects.

Below are the various metadata objects that can correspond to various tables.

  • Constants
    • _Consts — current values of all the constants defined in the configuration.
    • _ConstsChngR — a table for registering changes in constants. It is created if at least one constant participates in at least one exchange plan.
  • Exchange plans
    • _Node<n> — an exchange plan table.
    • _Node<n>_VT<k> — a tabular section of an exchange plan. A table is created for each tabular section.
  • Catalogs
    • _Reference<n> — a catalog table.
    • _Reference<n>_VT<k> — a tabular section of a catalog. A table is created for each tabular section.
    • _ReferenceChngR<n> — a table for registering changes in a catalog. It is created if the catalog participates in at least one exchange plan.
  • Documents
    • _Document<n> — a table of documents. A table is created for each metadata object of "document" type.
    • _Document<n>_VT<k> — a tabular section of a document. A table is created for each tabular section of each document.
    • _DocumentChngR<n> — a table for registering changes in a metadata object of "document" type. It is created for each metadata object of "document" type if it participates in at least one exchange plan.
  • Document sequences
    • _Seq<n> — a document registration table. A table is created for each sequence.
    • _SeqB<n> — a table of sequence boundaries. A table is created for each sequence.
    • _SeqChngR<n> — a table for registering sequence changes. It is created for each sequence that participates in at least one exchange plan.
  • Document journals
    • _DocumentJournal<n> — a document journal table. It is created for each document journal.
  • Enumerations
    • _Enum<n> — an enumeration table. It is created for each enumeration.
  • Charts of characteristic types
    • _Chrc<n> — the main table of a chart of characteristic types.
    • _Chrc<n>_VT<k> — a tabular section of a chart of characteristic types. A table is created for each tabular section.
    • _ChrcChngR<n> — a table for registering changes in a chart of characteristic types. It is created if a chart of characteristic types participates in at least one exchange plan.
  • Charts of accounts
    • _Acc<n> — the main table of a chart of accounts.
    • _Acc<n>_ExtDim<k> — a table containing extra dimension types of a chart of accounts. It is created for a chart of accounts if the maximum number of extra dimensions is greater than zero.
    • _Acc<n>_VT<k> — a tabular part of a chart of accounts that is created for each tabular section of a chart of accounts.
    • _AccChngR<n> — a table for registering changes in a chart of accounts. It is created if a chart of accounts participates in at least one exchange plan.
  • Charts of calculation types
    • _CKind<n> — the main table of a chart of calculation types.
    • _CKind<n>_BaseCK — a table of base calculation types. It is created for a chart of calculation types if its "Dependence on Base" property has a value other than "Does not depend".
    • _CKind<n>_DisplacedCK — a table of displacing calculation types. It is created for a chart of calculation types if the "Uses action period" check box is selected.
    • _CKind<n>_LeadingCK — a table of leading calculation types. A table is created for each chart of calculation types.
    • _CKindDN<n> — an auxiliary table for a displacement order. It is created if the "Uses action period" check box is selected for the chart of calculation types.
    • _CKind<n>_VT<k> — a tabular section of a chart of calculation types. A table is created for each tabular section.
    • _CKindChngR<n> — a table for registering changes in a chart of calculation types. It is created if a chart of calculation types participates in at least one exchange plan.
  • Information registers
    • _InfoRg<n> — a table of information register records.
    • _InfoRChngRg<n> — a table for registering information register changes. It is created if an information register participates in at least one exchange plan.
  • Accumulation registers
    • _AccumRg<n> — a table of accumulation register records.
    • _AccumRgT<n> — a table of accumulation register totals. It is created if the register supports balances.
    • _AccumRgTn<n> — a table of accumulation register turnovers. It is created if the register supports turnovers.
    • _AccumRgChngR<n> — a table for registering changes in an accumulation register. It is created if an accumulation register participates in at least one exchange plan.
    • _AccumRgOpt — a table containing storage settings of accumulation register totals. A single table is used for all accumulation registers.
    • _AccumRgAgg<n> — a table of accumulation register aggregates.
    • _AccumRgAggOpt — a table of aggregate network options.
    • _AccumRgSt<n> — a table of the accumulation register statistics.
    • _AccumRgBf<n> — a buffer table of new turnovers of the accumulation register.
    • _AccumRgDl<n> — a table of new turnovers of the accumulation register.
    • _AccumRgAggDims — a table of dimension codes of an accumulation register.
    • _AccumRgAggGrid — a table of a network of aggregates.
  • Accounting registers
    • _AccRg<n> — a table of accounting register records.
    • _AccRgED<n> — a table that contains extra dimension values for an accounting register; it is created if it references a chart of accounts with the maximum number of extra dimensions greater than zero.
    • _AccRgAT0<n> — a table of totals by an account.
    • _AccRgAT<i><n>, where i is from 1 to the maximum number of extra dimensions. It is a table of totals by account with a number of extra dimension types equal to i.
    • _AccRgCT<n> — totals of turnovers between accounts. It is created only for accounting registers that support correspondence.
    • _AccRgChngR<n> — a table for registering changes in the accounting register. It is created if an accounting register participates in at least one exchange plan.
    • _AccRgOpt — a table that contains storage settings for totals. A single table is used for all accounting registers.
  • Calculation registers
    • _CRg<n> — a table of calculation register records.
    • _CRgActP<n> — a table of actual action periods for a calculation register. It is created if the calculation register has the "Uses action period" check box selected.
    • _CRgChnR<n> — a table for registering changes in the calculation register. It is created for each calculation register that participates in at least one exchange plan.
    • _CRgRecalc<n> — a table that stores the recalculation for a calculation register. It is created for each recalculation.
    • _CRgRecalcChngR<n> — a table for registering recalculation changes. It is created if a recalculation participates in at least one exchange plan.
  • Business processes
    • _BPRPoints<n> — a table of business process route points. A table is created for each business process.
    • _BPr<n> — the main table of a business process.
    • _BPr<n>_VT<k> — a tabular section of a business process. A table is created for each tabular section.
    • _BPrChngR<n> — a table for registering business process changes. It is created for each business process that participates in at least one exchange plan.
  • Tasks
    • _Task<n> — the main table of a task.
    • _Task<n>_VT<k> — a tabular section of a task. A table is created for each tabular section.
    • _TaskChngR<n> — a table for registering changes in the tasks. It is created for each task metadata object if it participates in at least one exchange plan.

If IBM DB2 is used, table alias prefixes start with letters instead of underscore character.

The number of these tables depends on the configuration functionality and may be rather large. Naturally, 1C:Enterprise does not check the availability, integrity, or consistency of their data. It is therefore important that any database where 1C:Enterprise 8 infobase is stored is protected from unauthorized access and is only modified with 1C:Enterprise tools. Use the Administration — Verify and Repair function integrated in Designer to check the database.

It is also important that any backup or restore operations with a database that stores an infobase are performed with the entire database only. Therefore, we recommend that you use database backup tools integrated into the DBMS. You can copy the file 1cv8.1cd to back up an infobase in the file mode.

You can use the Administration — Dump Infobase command in Designer to upload all data that relates to an infobase (and only this data) into the specified file (dump file). You can use the reverse command Restore Infobase to download all the data from a dump file and replace the existing data in the current infobase with it. You can use these commands for backing up infobase data both in file and client/server modes.

Configuration repository

The configuration repository is used in the group development of configurations for storing the history of configuration versions, including the last (current) version. The entire repository is stored in a single file, 1Cv8ddb.1cd, which is located in a directory specified as a configuration storage directory.

The data stored in this file is vitally important for developing configurations usinbg group development tools. This data should therefore be backed up.

Event Log

The Event Log relates to an infobase and stores information on events that occur during user interaction with this infobase. This information is not mandatory for the operation of 1C:Enterprise-based applied solutions, but it may be important from an organizational point of view.

Event Logs are stored in 1Cv8Log directories, one for each infobase. Each directory contains the 1Cv8.lgf file and several files named yyyyMMddhhmmss.lgp, where yyyy is the year, MM the month, dd the number of the day in the month, hh the hour, mm the minute, and ss the second. For example, "20070525200000.lgp". The 1Cv8.lgf file contains the general event log data. Each of the yyyyMMddhhmmss.lgp files contains a fragment of the Event Log for the corresponding period. A file name matches the moment the period begins. The length of the period is defined by the Divide the Event Log saves by periods setting of the Event Log.

In the file mode of an infobase, the Event Log is stored in an infobase directory (the same one that stores the file of the infobase itself). For instance, if an infobase is stored in file C:\EnterpriseInfoBase\1cv8.1cd, the Event Log will be stored in the C:\EnterpriseInfoBase\1Cv8log directory.

In the client/server mode of an infobase, the Event Log is stored in a subdirectory of a cluster working directory. The subdirectory name is defined by an infobase identifier. For instance, C:\Program Files\1cv82\server\reg_1541\fb9d9cc4-ccd0-4be7-87e8-c5182945291e/1Cv8Log.

Profiles

Profiles contain data that does not impact the operation logic of a 1C:Enterprise 8-based system. This data is not necessary, but storing it can enhance user experience with the system. Profiles can be used to store the format and positions of windows and dialog boxes, font, color, filter settings, and so on. Loss of this information cannot negatively impact the system operation.

Profiles differ according to the types of information they store. The types of profiles used by 1C:Enterprise 8 are provided in a table below:

Data type

Examples of data stored

Location

Client computer

- Whether the immediate window is open.
- Text editor settings.

<User application data>\1C\1cv82\1Cv8.pfl. Example:
C:\Documents and Settings\User\Application Data\1C\1cv82\1Cv8.pfl

Client computer

- Client settings files, backup cluster data and other service data

Example:C:\Documents and Settings\All Users\Application Data\1C\1Cv82\1cv8conn.pfl

Infobase

- Authentication mode at 1C:Enterprise startup from the Debugger.
- The directory that contains the last configuration repository save file.

The Files table of the database that stores the infobase.

Infobase and user

- Dynamic list settings.
- Event Log filter settings.

The Files table of the database that stores the infobase.

Computer and infobase

- Comparison settings of configuration files.
- Settings for the global search in all of the configuration texts.

<User application data>\1C\1cv82\<Infobase ID>\1Cv8.pfl. Example:
C:\Documents and Settings\User\Application Data\1C\1cv82\4129dbdb-b495-41cb-99ea-ef315060a03e\1Cv8.pfl

Computer, infobase and user

- Position of the Syntax Assistant pane.
- A list of variables for quick lookup in Debugger.

<User application data>\1C\1cv82\<Infobase ID>\<User ID>\1Cv8.pfl. Example:
C:\Documents and Settings\User\Application Data\1C\1cv82\4129dbdb-b495-41cb-99ea-ef315060a03e\E8D87DA4-A087-4145-95E7-D613E0F7CB64/1Cv8.pfl

1C:Enterprise 8 in Designer mode

- Designer pane positions.
- Colors of the module editor in Designer.

<User application data>\1C\1cv82\1Cv8cmn.pfl. Example:
C:\Documents and Settings\User\Application Data\1C\1cv82\1Cv8cmn.pfl

1C:Enterprise 8 in Enterprise mode

- Calculator dialog properties.
- Table document properties.

<User application data>\1C\1cv82\<Infobase ID>\<User ID>\1Cv8cmn.pfl. Example:
C:\Documents and Settings\User\Application Data\1C\1cv82\4129dbdb-b495-41cb-99ea-ef315060a03e\E8D87DA4-A087-4145-95E7-D613E0F7CB64/1Cv8cmn.pfl

1C:Enterprise 8 Startup dialog

- Size and location of the startup dialog box.
- Settings of infobase parameter setting dialog boxes.

<User application data>\1C\1cv82\1Cv8strt.pfl. Example:
C:\Documents and Settings\User\Application Data\1C\1cv82\1Cv8strt.pfl

Profile data is read when 1C:Enterprise 8 is started and is written when 1C:Enterprise 8 is closed normally. This is why some user settings might be lost in the event of abnormal termination.

Other auxiliary data

In addition to profiles, the application data directory may contain other files with data that can enhance the 1C:Enterprise 8 user experience. Among them are the following:

  • def.usr is stored in the <User application data>\1C\1Cv8\<Infobase ID> directory (for example, C:\Documents and Settings\User\Application Data\1C\1cv82\4129dbdb-b495-41cb-99ea-ef315060a03e/def.usr) and contains the name of the user who was the last to open this infobase.
  • ibases.v8i is stored in the <User application data>\1C\1CEStart directory (for example, C:\Documents and Settings\User\Application Data\1C\1CEStart\ibases.v8i) and contains the list of infobases registered on this client computer. This list is displayed in the 1C:Enterprise startup dialog box.
  • GenTempl_ru.st, GenTempl_en.st are standard text template files that are stored in the 1C:Enterprise loading modules directory (for example, C:\Program Files\1cv82\bin) in Russian and in English, respectively.
  • appsrvrs.lst is stored in the <User application data>\1C\1cv82 directory (for example, C:\Documents and Settings\User\Local Settings\Application Data\1C\1cv82\appsrvrs.lst) and contains the list of 1C:Enterprise servers registered in the infobase administration utility in client/server mode.
  • srvribrg.lst is stored in the central cluster server, <central server working directory> directory (for example, C:\Program Files\1cv82\server\srvribrg.lst) and contains the list of clusters registered on the 1C:Enterprise server computer. The data stored in it is necessary for normal operation of applications that use the 1C:Enterprise server.
  • 1CV8Reg.lst is a cluster settings file (for example, C:\Program Files\1cv82\srvinfo\reg_1541\1CV8Reg.lst)
  • DBNameCache, ConfigSave, Config, and SICache directories store many files that cache various configuration components. This data is derived from the configuration of an infobase that is stored in the database and serves to accelerate client application startup and increase its performance. Configuration cache is stored in the current user application data directory, for example, C:\Documents and Settings\User\Local Settings\Application Data\1C\1cv82\7b0a6294-d6a3-41c5-a23e-dc9e5301ad22/DBNameCache.
  • 1Cv8FTxt directory stores data that is used by the full-text search service. It is stored on 1C:Enterprise central server, in the <cluster working directory>\<infobase ID> directory. Example: C:\Program Files\1cv82\server\reg_1541\7eac7609-c0cb-4701-83cf-9ff5f8961de8/1Cv8FTxt.
  • The CACHE/ddb<n>.snp file group is stored in the configuration repository directory and serves to cache the configuration versions requested from this repository. These files are optional, but they do accelerate the retrieval of configuration versions.
  • *.1ccr is a configuration file of a web service for working with a remote repository. It may have any name (the .1ccr extension is mandatory), an XML format, and contains a single node with an arbitrary name and connectString attribute. This attribute specifies the repository server address in the TCP schema.
  • *.mft is a manifest file (a file that describes configuration template). The file can have any name. It is stored in a directory of the installed configuration template.
  • *.v8i describes the format of the registered infobase descriptions file. All clients use this list. The file is located in the %APPDATA%\1C\1CEStart\ directory of the local computer and is named ibases.v8i by default.
  • 1CESCmn.cfg contains common settings of startup programs (1CEStart.exe and 1Cv8s.exe).
  • 1CEStart.cfg contains the settings used by the startup programs (1CEStart.exe and 1Cv8s.exe) and client applications (1Cv8.exe and 1Cv8c.exe). The file is located in the %APPDATA%\1C\1CEStart directory.
  • adminstall.cfg specifies that the 1C:Enterprise software system was installed with the help of OS administration tools. The file is stored in the 1C:Enterprise configuration files directory and is a UTF-8 text document.
  • comcntrcfg.xml informs the external connection that the software must be started in the debug mode. The file is stored in the 1C:Enterprise configuration files directory and is optional.
  • conf.cfg defines the location of the directory that stores common configuration files. The file is stored in the bin\conf directory of the 1C:Enterprise version directory and is a UTF-8 text document.
  • debugcfg.xml is used to set the additional port range used in configuration debugging. The file is stored in the 1C:Enterprise configuration files directory and is optional.
  • def.usr is stored in the %APPDATA%\1C\1Cv82\<Unique infobase ID> directory and contains the name of the user who was the last to open the infobase.
  • default.vrd is used to set up the web client and the web services support; it is stored in the virtual application directory.
  • inetcfg.xml is used to set default proxy settings and has priority over default Windows proxy settings. The file is stored in the 1C:Enterprise configuration files directory and is optional.
  • logcfg.xml is used to set up the technological log. The file is stored in the 1C:Enterprise configuration files directory and is optional.
  • logui.txt is stored in the %APPDATA%\1C\1Cv82\<Unique infobase ID> directory and contains a list of interactive user actions performed during logging.
  • nethasp.ini is used to set 1C:Enterprise and HASP License Manager interaction parameters. The file is stored in the 1C:Enterprise configuration files directory and is optional.
  • nhsrv.ini can be used to set some HASP License Manager settings. At startup, the HASP License manager searches for the nhsrv.ini configuration file in several directories in the following order:
    • the directory where the HASP License Manager executable file is located;
    • current Microsoft Windows directory;
    • a system Microsoft Windows directory (%SystemRoot%\system32 for 32-bit versions and %SystemRoot%\system for 64-bit versions);
    • Microsoft Windows directory;
    • the directories listed in the PATH environment variable (only if HASP License Manager is installed as a Microsoft Windows application).

We recommend that you place the nhsrv.ini file in the directory where the HASP License Manager executable file is stored. You can use Activity Log/Server Activity Log to check whether the HASP License Manager found and read the configuration file.

  • srv1cv82 (/etc/sysconfig/srv1cv82) can be used to set 1C:Enterprise server agent startup options with the help of the /etc/init.d/srv1cv82 script. This configuration file must be used if the 1C:Enterprise server is started on Linux OS.
  • swpuser.ini can be placed in an application data directory of the server agent user, to start a working process as a user different from that of a server agent.
  • *.lic files store basic configuration licenses (C:\Documents and Settings\All Users\Application Data\1C\licenses).

    Software license files are located in the 1C:Enterprise configuration files directory.

Temporary data

Temporary data is only needed during one or more simultameous 1C:Enterprise sessions.

Several simultaneous sessions jointly use data that is related to the entire file infobase and is necessary for infobase data locking, as well as for some other tasks. This sort of data is stored in the same directory as the infobase file.

  • 1Cv8cl file stores object locks of the database stored in the file.
  • 1Cv8Tmp.1cd file stores service session data, in particular a list of active users.
  • 1Cv8Tmp.1cl file stores locks for the data from the file 1Cv8Tmp.1cd.

1C:Enterprise 8 running in Designer mode creates temporary files of a similar purpose for the configuration repository and stores them in the configuration repository directory.

  • 1Cv8ddb.1cl file stores data locks for the data from the configuration repository.
  • 1Cv8dtmp.1cd file stores service session data, in particular a list of active users of the configuration repository.
  • 1Cv8dtmp.1cl file stores locks for the data from the file 1Cv8ddb.1cd.

The data that is only used during a single 1C:Enterprise session is stored in temporary files created in the directory defined by Microsoft Windows as the temporary files directory. In this case, the client application uses the temporary files directory of the current Windows user, for example, C:\Documents and Settings\User\Local Settings\Temp. Either the system temporary files directory or the application data directory of the user on whose behalf the working processes of 1C:Enterprise server are started is used for the 1C:Enterprise server (for example, C:\WINNT\Temp).


Comments
0
Add comment