<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>KB-1104 How to capture SQL statements using Hibernate trace logs</title><link>https://community.appian.com/support/w/kb/327/kb-1104-how-to-capture-sql-statements-using-hibernate-trace-logs</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-1104 How to capture SQL statements using Hibernate trace logs</title><link>https://community.appian.com/support/w/kb/327/kb-1104-how-to-capture-sql-statements-using-hibernate-trace-logs</link><pubDate>Tue, 07 Nov 2023 20:32:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c8355f3c-146f-4eba-a9a3-74ac90156754</guid><dc:creator>Devon Lee</dc:creator><comments>https://community.appian.com/support/w/kb/327/kb-1104-how-to-capture-sql-statements-using-hibernate-trace-logs#comments</comments><description>Current Revision posted to Appian Knowledge Base by Devon Lee on 11/7/2023 8:32:50 PM&lt;br /&gt;
&lt;p&gt;In certain troubleshooting scenarios, it may be necessary to retrieve the details of database queries that are being performed by Appian. This article details how to enable Hibernate Tracing, which results in the queries made by Appian being logged to the application server logs.&lt;/p&gt;
&lt;p&gt;To enable Hibernate Tracing:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the &lt;strong&gt;appian_log4j.properties&lt;/strong&gt; file. For Appian 18.3 and later, this file can be found in &lt;code&gt;&lt;span&gt;&amp;lt;APPIAN_HOME&amp;gt;/deployment/web.war/WEB-INF/resources&lt;/span&gt;&lt;/code&gt;. For Appian 18.2 and earlier, this file can be found in&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/ear/suite.ear/resources&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Find and uncomment the &amp;quot;Output SQL Statements&amp;quot; and &amp;quot;Output param values within SQL statements&amp;quot; sections:
&lt;pre&gt;# Output SQL statements
log4j.logger.org.hibernate.SQL=DEBUG
# Output param values within SQL statements
log4j.logger.org.hibernate.type=TRACE
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Set &amp;quot;Output SQL statements&amp;quot; to &lt;code&gt;DEBUG&lt;/code&gt; if it is not already set.&lt;/li&gt;
&lt;li&gt;Set &amp;quot;Output param values within SQL statements&amp;quot; to &lt;code&gt;TRACE&lt;/code&gt; if it is not already set.&lt;/li&gt;
&lt;li&gt;Once Hibernate Trace logging is no longer required, return to the &lt;strong&gt;appian_log4j.properties&lt;/strong&gt; file, and update the above lines to the following:
&lt;pre&gt;# Output SQL statements
log4j.logger.org.hibernate.SQL=ERROR
# Output param values within SQL statements
log4j.logger.org.hibernate.type=ERROR
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Save the file and check the application&amp;nbsp;server log to verify that the &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; log entries are no longer being recorded.&lt;/li&gt;
&lt;li&gt;After verifying that &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; entries are no longer being logged via the above step, it is safe to comment those lines out if desired.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Some things to note after following these steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No application server restart is necessary as these changes are hot-deployed.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; entries should show up in the&amp;nbsp;application server logs.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;DEBUG&lt;/code&gt; setting mentioned above will log the queries, whereas the &lt;code&gt;TRACE&lt;/code&gt; setting mentioned above will log the values for the queries.&lt;/li&gt;
&lt;li&gt;It is &lt;strong&gt;NOT&lt;/strong&gt; recommended to enable Hibernate Trace logging unless requested by Appian Support to troubleshoot a specific issue because these settings may negatively affect performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all versions&amp;nbsp;of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: June 2019&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: logging, administration, database, application server, how-to&lt;/div&gt;
</description></item><item><title>KB-1104 How to capture SQL statements using Hibernate trace logs</title><link>https://community.appian.com/support/w/kb/327/kb-1104-how-to-capture-sql-statements-using-hibernate-trace-logs/revision/4</link><pubDate>Tue, 07 Nov 2023 20:32:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c8355f3c-146f-4eba-a9a3-74ac90156754</guid><dc:creator>Devon Lee</dc:creator><comments>https://community.appian.com/support/w/kb/327/kb-1104-how-to-capture-sql-statements-using-hibernate-trace-logs#comments</comments><description>Revision 4 posted to Appian Knowledge Base by Devon Lee on 11/7/2023 8:32:47 PM&lt;br /&gt;
&lt;p&gt;In certain troubleshooting scenarios, it may be necessary to retrieve the details of database queries that are being performed by Appian. This article details how to enable Hibernate Tracing, which results in the queries made by Appian being logged to the application server logs.&lt;/p&gt;
&lt;p&gt;To enable Hibernate Tracing:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the &lt;strong&gt;appian_log4j.properties&lt;/strong&gt; file. For Appian 18.3 and later, this file can be found in &lt;code&gt;&lt;span&gt;&amp;lt;APPIAN_HOME&amp;gt;/deployment/web.war/WEB-INF/resources&lt;/span&gt;&lt;/code&gt;. For Appian 18.2 and earlier, this file can be found in&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/ear/suite.ear/resources&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Find and uncomment the &amp;quot;Output SQL Statements&amp;quot; and &amp;quot;Output param values within SQL statements&amp;quot; sections:
&lt;pre&gt;# Output SQL statements
log4j.logger.org.hibernate.SQL=DEBUG
# Output param values within SQL statements
log4j.logger.org.hibernate.type=TRACE
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Set &amp;quot;Output SQL statements&amp;quot; to &lt;code&gt;DEBUG&lt;/code&gt; if it is not already set.&lt;/li&gt;
&lt;li&gt;Set &amp;quot;Output param values within SQL statements&amp;quot; to &lt;code&gt;TRACE&lt;/code&gt; if it is not already set.&lt;/li&gt;
&lt;li&gt;Once Hibernate Trace logging is no longer required, return to the &lt;strong&gt;appian_log4j.properties&lt;/strong&gt; file, and update the above lines to the following:
&lt;pre&gt;# Output SQL statements
log4j.logger.org.hibernate.SQL=ERROR
# Output param values within SQL statements
log4j.logger.org.hibernate.type=ERROR
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Save the file and check the application&amp;nbsp;server log to verify that the &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; log entries are no longer being recorded.&lt;/li&gt;
&lt;li&gt;After verifying that &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; entries are no longer being logged via the above step, it is safe to comment those lines out if desired.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Some things to note after following these steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No application server restart is necessary as these changes are hot-deployed.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; entries should show up in the&amp;nbsp;application server logs.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;DEBUG&lt;/code&gt; setting mentioned above will log the queries, whereas the &lt;code&gt;TRACE&lt;/code&gt; setting mentioned above will log the values for the queries.&lt;/li&gt;
&lt;li&gt;It is &lt;strong&gt;NOT&lt;/strong&gt; recommended to enable Hibernate Trace logging unless requested by Appian Support to troubleshoot a specific issue because these settings may negatively affect performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all versions&amp;nbsp;of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: June 2019&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: logging, administration, database, application server, how-to&lt;/div&gt;
</description></item><item><title>KB-1104 How to capture SQL statements using Hibernate trace logs</title><link>https://community.appian.com/support/w/kb/327/kb-1104-how-to-capture-sql-statements-using-hibernate-trace-logs/revision/3</link><pubDate>Wed, 26 Jun 2019 06:19:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c8355f3c-146f-4eba-a9a3-74ac90156754</guid><dc:creator>Parmida Borhani</dc:creator><comments>https://community.appian.com/support/w/kb/327/kb-1104-how-to-capture-sql-statements-using-hibernate-trace-logs#comments</comments><description>Revision 3 posted to Appian Knowledge Base by Parmida Borhani on 6/26/2019 6:19:21 AM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;p&gt;In certain troubleshooting scenarios, it may be necessary to retrieve the details of database queries that are being performed by Appian. This article details how to enable Hibernate Tracing, which results in the queries made by Appian being logged to the application server logs.&lt;/p&gt;
&lt;p&gt;To enable Hibernate Tracing:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the &lt;strong&gt;appian_log4j.properties&lt;/strong&gt; file. For Appian 18.3 and later, this file can be found in &lt;code&gt;&lt;span&gt;&amp;lt;APPIAN_HOME&amp;gt;/deployment/web.war/WEB-INF/resources&lt;/span&gt;&lt;/code&gt;. For Appian 18.2 and earlier, this file can be found in&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/ear/suite.ear/resources&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Find and uncomment the &amp;quot;Output SQL Statements&amp;quot; and &amp;quot;Output param values within SQL statements&amp;quot; sections:
&lt;pre&gt;# Output SQL statements
log4j.logger.org.hibernate.SQL=DEBUG
# Output param values within SQL statements
log4j.logger.org.hibernate.type=TRACE
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Set &amp;quot;Output SQL statements&amp;quot; to &lt;code&gt;DEBUG&lt;/code&gt; if it is not already set.&lt;/li&gt;
&lt;li&gt;Set &amp;quot;Output param values within SQL statements&amp;quot; to &lt;code&gt;TRACE&lt;/code&gt; if it is not already set.&lt;/li&gt;
&lt;li&gt;Once Hibernate Trace logging is no longer required, return to the &lt;strong&gt;appian_log4j.properties&lt;/strong&gt; file, and update the above lines to the following:
&lt;pre&gt;# Output SQL statements
log4j.logger.org.hibernate.SQL=ERROR
# Output param values within SQL statements
log4j.logger.org.hibernate.type=ERROR
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Save the file and check the application&amp;nbsp;server log to verify that the &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; log entries are no longer being recorded.&lt;/li&gt;
&lt;li&gt;After verifying that &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; entries are no longer being logged via the above step, it is safe to comment those lines out if desired.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Some things to note after following these steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No application server restart is necessary as these changes are hot-deployed.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; entries should show up in the&amp;nbsp;application server logs.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;DEBUG&lt;/code&gt; setting mentioned above will log the queries, whereas the &lt;code&gt;TRACE&lt;/code&gt; setting mentioned above will log the values for the queries.&lt;/li&gt;
&lt;li&gt;It is &lt;strong&gt;NOT&lt;/strong&gt; recommended to enable Hibernate Trace logging unless requested by Appian Support to troubleshoot a specific issue because these settings may negatively affect performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all versions&amp;nbsp;of Appian.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Last Reviewed: June 2019&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: logging, administration, database, application server, how-to&lt;/div&gt;
</description></item><item><title>KB-1104 How to capture SQL statements using Hibernate trace logs</title><link>https://community.appian.com/support/w/kb/327/kb-1104-how-to-capture-sql-statements-using-hibernate-trace-logs/revision/1</link><pubDate>Wed, 22 Feb 2017 22:43:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c8355f3c-146f-4eba-a9a3-74ac90156754</guid><dc:creator>Nick Vigilante</dc:creator><comments>https://community.appian.com/support/w/kb/327/kb-1104-how-to-capture-sql-statements-using-hibernate-trace-logs#comments</comments><description>Revision 1 posted to Appian Knowledge Base by Nick Vigilante on 2/22/2017 10:43:19 PM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;p&gt;In certain troubleshooting scenarios, it may be necessary to retrieve the details of database queries that are being performed by Appian. This article details how to enable Hibernate Tracing, which results in the queries made by Appian being logged to the JBoss or WebLogic server logs.&lt;/p&gt;
&lt;p&gt;To enable Hibernate Tracing:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/ear/suite.ear/resources&lt;/code&gt; and open the &lt;strong&gt;appian_log4j.properties&lt;/strong&gt; file.&lt;/li&gt;
&lt;li&gt;Find and uncomment the &amp;quot;Output SQL Statements&amp;quot; and &amp;quot;Output param values within SQL statements&amp;quot; sections:
&lt;pre&gt;# Output SQL statements
log4j.logger.org.hibernate.SQL=DEBUG
# Output param values within SQL statements
log4j.logger.org.hibernate.type=TRACE
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Set &amp;quot;Output SQL statements&amp;quot; to &lt;code&gt;DEBUG&lt;/code&gt; if it is not already set.&lt;/li&gt;
&lt;li&gt;Set &amp;quot;Output param values within SQL statements&amp;quot; to &lt;code&gt;TRACE&lt;/code&gt; if it is not already set.&lt;/li&gt;
&lt;li&gt;Once Hibernate Trace logging is no longer required, return to the &lt;strong&gt;appian_log4j.properties&lt;/strong&gt; file, and update the above lines to the following:
&lt;pre&gt;# Output SQL statements
log4j.logger.org.hibernate.SQL=ERROR
# Output param values within SQL statements
log4j.logger.org.hibernate.type=ERROR
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Save the file and check the JBoss or WebLogic server log to verify that the &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; log entries are no longer being recorded.&lt;/li&gt;
&lt;li&gt;After verifying that &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; entries are no longer being logged via the above step, it is safe to comment those lines out if desired.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Some things to note after following these steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No application server restart is necessary as these changes are hot-deployed.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; entries should show up in the JBoss or WebLogic server logs.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;DEBUG&lt;/code&gt; setting mentioned above will log the queries, whereas the &lt;code&gt;TRACE&lt;/code&gt; setting mentioned above will log the values for the queries.&lt;/li&gt;
&lt;li&gt;It is &lt;strong&gt;NOT&lt;/strong&gt; recommended to enable Hibernate Trace logging unless requested by Appian Support to troubleshoot a specific issue because these settings may negatively affect performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all &lt;strong&gt;on-premise&lt;/strong&gt; installations of Appian.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Last Reviewed: May 2016&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: logging, database, application server, how-to&lt;/div&gt;
</description></item><item><title>KB-1104 How to capture SQL statements using Hibernate trace logs</title><link>https://community.appian.com/support/w/kb/327/kb-1104-how-to-capture-sql-statements-using-hibernate-trace-logs/revision/2</link><pubDate>Wed, 22 Feb 2017 17:45:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c8355f3c-146f-4eba-a9a3-74ac90156754</guid><dc:creator>Nick Vigilante</dc:creator><comments>https://community.appian.com/support/w/kb/327/kb-1104-how-to-capture-sql-statements-using-hibernate-trace-logs#comments</comments><description>Revision 2 posted to Appian Knowledge Base by Nick Vigilante on 2/22/2017 5:45:10 PM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;p&gt;In certain troubleshooting scenarios, it may be necessary to retrieve the details of database queries that are being performed by Appian. This article details how to enable Hibernate Tracing, which results in the queries made by Appian being logged to the JBoss or WebLogic server logs.&lt;/p&gt;
&lt;p&gt;To enable Hibernate Tracing:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/ear/suite.ear/resources&lt;/code&gt; and open the &lt;strong&gt;appian_log4j.properties&lt;/strong&gt; file.&lt;/li&gt;
&lt;li&gt;Find and uncomment the &amp;quot;Output SQL Statements&amp;quot; and &amp;quot;Output param values within SQL statements&amp;quot; sections:
&lt;pre&gt;# Output SQL statements
log4j.logger.org.hibernate.SQL=DEBUG
# Output param values within SQL statements
log4j.logger.org.hibernate.type=TRACE
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Set &amp;quot;Output SQL statements&amp;quot; to &lt;code&gt;DEBUG&lt;/code&gt; if it is not already set.&lt;/li&gt;
&lt;li&gt;Set &amp;quot;Output param values within SQL statements&amp;quot; to &lt;code&gt;TRACE&lt;/code&gt; if it is not already set.&lt;/li&gt;
&lt;li&gt;Once Hibernate Trace logging is no longer required, return to the &lt;strong&gt;appian_log4j.properties&lt;/strong&gt; file, and update the above lines to the following:
&lt;pre&gt;# Output SQL statements
log4j.logger.org.hibernate.SQL=ERROR
# Output param values within SQL statements
log4j.logger.org.hibernate.type=ERROR
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Save the file and check the JBoss or WebLogic server log to verify that the &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; log entries are no longer being recorded.&lt;/li&gt;
&lt;li&gt;After verifying that &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; entries are no longer being logged via the above step, it is safe to comment those lines out if desired.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Some things to note after following these steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No application server restart is necessary as these changes are hot-deployed.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;TRACE&lt;/code&gt; entries should show up in the JBoss or WebLogic server logs.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;DEBUG&lt;/code&gt; setting mentioned above will log the queries, whereas the &lt;code&gt;TRACE&lt;/code&gt; setting mentioned above will log the values for the queries.&lt;/li&gt;
&lt;li&gt;It is &lt;strong&gt;NOT&lt;/strong&gt; recommended to enable Hibernate Trace logging unless requested by Appian Support to troubleshoot a specific issue because these settings may negatively affect performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all versions&amp;nbsp;of Appian.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Last Reviewed: February 2017&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: logging, database, application server, how-to&lt;/div&gt;
</description></item></channel></rss>