How to View the SQL Statement for Configuration Manager Reports
Updated: January 1, 2014
Applies To: System Center 2012 Configuration Manager, System Center 2012 Configuration Manager SP1, System Center 2012 R2 Configuration Manager
Reports in Configuration Manager can be based on simple SQL statements or very complex ones that prompt the user for information, join several Microsoft SQL Server views, and use filters to limit the results. Use the following procedure to find out what SQL statement is used in a Configuration Manager report.
To view the SQL statement for a report
-
In the Configuration Manager console, click Monitoring.
-
In the Monitoring workspace, expand Reporting, and then click Reports.
-
Select the report for which you want to view the SQL statement and then, in the Home tab, in the Report Group group, click Edit.
-
The Report Builder window opens. In the Report Data pane, expand Datasets to view the data sets for the report.
-
Double-click a dataset to open the Dataset Properties dialog box.
The first dataset is typically (but not always), the main SQL statement for the report. Other datasets might contain the SQL statements that can be used to present a list of items for a user to choose from, such as a list of computers.
-
You can view and modify the SQL statement for the dataset in the Query field.
-
Close the Dataset Properties dialog box.
-
Close Report Builder.