Enable additional logging for Analyze reports
Enabling additional logging for Analyze reports can be useful to gather the queries that Analyze runs against the BDNA_PUBLISH database. These queries can then be run against the BDNA_PUBLISH database directly.
The steps below allow the additional logging to be enabled:
- On the User Console install machine open File Explorer and go to "C:\Program Files\BDNA\User Console\Tools\Tomcat\webapps\bdna\WEB-INF\classes" or the equivalent location if your installation is not on the C drive.
- Open the 'Log4j.xml 'in Notepad ++ or any other editor
- Scroll to the bottom of the page and uncomment out the following section by removing the <!-- & -->
<appender name="SQLLOG" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="C:/Program Files/BDNA/User Console/Logs/mondrian_sql.log" />
<param name="Append" value="false" />
<param name="MaxFileSize" value="500KB" />
<param name="MaxBackupIndex" value="1" />
<param name="ConversionPattern" value="%d %-5p [%c] %m%n" />
<priority value="DEBUG" />
<appender-ref ref="SQLLOG" />
- Now restart the Data Platform User Console service for the changes to take affect.
- Once restarted reopen the User Console and create a simple report and wait for the results to populate.
- Now in File Explorer go to 'C:\Program Files\BDNA\User Console\log' you should see a new log called 'mondrian_sql'
- Scroll to the bottom of the log file to find the latest sql query that was run. You can then take this query to run on database directly.
If you do not see the 'mondrian_sql' log in the logs folder try restarting your machine and try again. After you have gathered the necessary sql queries you may want to comment out the above code in step 3 to disable the additional logging. The log file may grow quiet large over time so you may want to disable the option again or manually clear the 'mondrian_sql' log out now and again.