Creating an OpsCenter report using SQL query
This section provides the procedure to create a report using SQL query.
Only OpsCenter Analytics users can access the custom SQL query function.
See About custom SQL query in OpsCenter Analytics.
Note:
OpsCenter provides detailed information about the OpsCenter database schema that you may want to know before running any SQL query to generate reports. On the Report Wizard > SQL Query page, click the following link to open the PDF that contains all relevant information: Refer to the OpsCenter Database Schema Document
Note:
OpsCenter Reporter and Restore Operator do not have access to the custom SQL query option.
To create a report using SQL query
- In the OpsCenter console, click Reports.
- On the Report Templates tab, click Create New Report.
- On the Report Wizard, select the Create a report using SQL Query option and click Next.
- On the SQL Query page, enter an SQL query to view the required data.
For example, to view all NetBackup master servers that monitored and managed by OpsCenter, enter the following SQL query: select * from domain_masterserver
- Click Next.
You can view all master server details that are stored in the domain_masterserver database table.
Note:
When you run a stored procedure that has multiple result sets, then output of only the first result set is displayed on the GUI. The output of other result sets is not shown on the GUI.
Note that OpsCenter stores most of the time fields in Gregorian. If you want to see the value for a given Gregorian date field in a timezone that is configured on the OpsCenter host, you should use utcbiginttonomtime(gregorianDatefield) function, where gregorianDatefield is any time value in gregorian. The function utcbiginttonomtime function cannot consider DST time offset. Hence it ignores any DST offset while showing the date and time value.
You must not use utcbiginttoutctime() function as it does not show time in a time zone that is configured on your OpsCenter host.