How to obtain the SQL query for an OpsCenter canned report

Problem

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>'.


Terms of use for this information are found in Legal Notices.

Search

Survey

Did this article answer your question or resolve your issue?

No
Yes

Did this article save you the trouble of contacting technical support?

No
Yes

How can we make this article more helpful?

Email Address (Optional)