How to obtain the SQL query for an OpsCenter canned report

Article:TECH156223  |  Created: 2011-03-22  |  Updated: 2013-03-09  |  Article URL http://www.symantec.com/docs/TECH156223
Article Type
Technical Solution


Environment

Issue



How to obtain the underlying SQL query that runs when a built in report that ships with OpsCenter is executed in the OpsCenter Web GUI.
 


Solution



OpsCenter version 7.1.x:
1.)  Run the OpsCenter canned report of interest manually via the OpsCenter Web GUI.

2.)  Look for the last modified OpsCenter server log file (which starts with 58330-148) on the Opscenter server in the following location :
<INSTALL_PATH>\Symantec\OpsCenter\server\logs

3.)  Open the file via an text editor, and look at the bottom of the file for the following phrase 'CannedReportExecutor'.

4.)  The next line should include the following phrase: 'GlobalQueryManager fetchQueryString Query'
In this line you will see the SQL query that was just executed for the canned report you ran.
 
Note:  In some cases the report is run by calling a stored procedure instead of a direct SQL query.  When this occurs, you will not see the SQL query that is being executed but the log file will note that it ran successfully.


 

OpsCenter version 7.5.x:
1.)  Run the OpsCenter canned report of interest manually via the OpsCenter Web GUI.

2.)  Look for the last modified OpsCenter application log file (which starts with 58330-423) on the Opscenter server in the following location :
<INSTALL_PATH>\Symantec\OpsCenter\server\logs

3.)  Open the file via an text editor, and look at the bottom of the file for the following phrase 'building query for report <report_name>'.

4.)  The next line should include the following phrase: 'Query generated is'
In this line you will see the SQL query that was just executed for the canned report you ran.
 
Note:  In some cases the report is run by calling a stored procedure instead of a direct SQL query.  When this occurs, you will see the phrase 'executing stored procedure <stored_procedure_name>'.




Article URL http://www.symantec.com/docs/TECH156223


Terms of use for this information are found in Legal Notices