BI-Server‎ > ‎

How To Trace SQL Generated by Mondrian

Case


There is a weird analysis look in your Mondrian's Pivot table and you suspect that there may be something wrong in your Schema but where ? 

One and maybe the best way to trace it is to look at SQL query generated by Mondrian. So here's how to do it.

Solutions

  • Find and edit [BI-SERVER FOLDER]/tomcat/webapps/pentaho/WEB-INF/classes/log4j.xml
  • Remove any remark / comment surrounding SQLLOG appender. You can find it near the end of log4.xml file.



  • Done

Trace SQL generated from Pentaho Log File 

  • Restart your BI Server
  • Try to open one of your BI solution that will trigger an MDX execution. For example a pivot view .XAction


  • Open [BI-SERVER]\tomcat\bin\pentaho.log file. You can now see SQL generated by executing a related MDX query.


  • Done