A
A
Andrew2014-09-02 20:01:42
1C-Bitrix
Andrew, 2014-09-02 20:01:42

How to find out the text of the SQL query that 1C sends to the database?

I have, for example, a query like this:

select Контрагент, max(Период) as Период
from РегистрыНакопления.Продажи
group by Контрагент

How to find out what SQL query goes to the database without using a profiler on the database side?
In version 1c 7 this can be done through ODBCRecordset and the Debug(1) method, but I need to do this for 1C v8.2.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Goncharuk, 2014-09-03
@aoberon

It is possible through the technology magazine. Create a directory on the 1C server %ProgramFiles%\1cv82\conf file logcfg.xml

<?xml version="1.0" encoding="utf-8"?>
<config xmlns="http://v8.1c.ru/v8/tech-log">
  <log location="c:\ProgramData\1cv82\logs" history="1">
    <event>
      <eq property="name" value="dbmssql"/>
    </event>
    <property name="sql"></property>
  </log>
</config>

And then look at the log location for the actual requests.
PS. The user under which the 1C server service is running must have full rights to the log location
PPS directory. More details in the logcfg.xml
UPD documentation . Documentation in English in the public domain: 3.17 logcfg.xml

A
Alexey, 2014-09-02
@gmung

Well, it seems that there is an Activity Monitor in the sequel. There you can see.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question