Custom Report Edit Page: Data Source Tab: Data Snapshots Tab
Data Source
Tab: Data Snapshots
TabThis information is relevant to report queries only. The
Data Snapshots
tab does not appear in filter queries.You can specify the scoping fields in an SQL query to ensure that the report snapshots that you capture can be scoped correctly when other users access them. Scoping fields are the GUID fields that are used for scoping the data that is extracted from a report snapshot. When a user accesses a report snapshot, the data is loaded from the snapshot according to the security permissions of the user. If a field is not scoped, all of the relevant items are loaded. If a field is scoped, only the items that the user who views the data has permission to read are loaded.
The scoping fields that you configure on the
Data Snapshots
tab apply only to extracting data from report snapshots. They do not affect the SQL query that extracts data from the CMDB to save as the report snapshot. To scope an SQL query, you need to include the appropriate SQL code to extract results according to the security permissions of the user who runs the queryIf an SQL query is scoped, any report snapshots are saved with the scope of the user who ran the query. If a snapshot is intended to be shared, ensure that it contains all of the data that may be relevant to other users. You can make sure that you have all of the data by running the report query as a user who has access to all resources; for example, a member of the Symantec Administrator role. You can also use a scheduled Run Report Task to create the appropriate snapshot: by default the task runs in the Administrator context, so captures the snapshot with a global scope.
By default a new SQL report has
[_ItemGuid]
configured as a scoping GUID field. This field is used to scope the results with a join onto a scoping function as follows:INNER JOIN [fnGetTrusteeScopedResources](@v1_TrusteeScope) AS [fnGTSR]
ON ([vri2_Resource].[Guid] = [fnGTSR_3].[ResourceGuid])
Where
[vri2_Resource].[Guid]
is the full name of the field with the alias of [_ItemGuid]
. Option | Description |
|---|---|
Scoping Fields | Lets you view all of the GUID fields that are included in the SQL query. You need to specify the GUID fields that are used for scoping. If you create a complex SQL query that has multiple joins onto resources, and multiple applications of the scoping function, you should add all of the appropriate scoping GUIDs to the Scoping Guid Fields list. |
Data Snapshots Query | Lets you view the SQL code that is generated when the snapshot needs to be saved or loaded. Before you save the report query, you can verify that the SQL code to load snapshot data applies scoping correctly to the saved results. The query in the text box is automatically refreshed each time you modify the scoping fields or change the selection in the Data Snapshot Query Mode drop-down list. If it does not refresh automatically, click Refresh to update the displayed SQL code. |
Data Snapshot Query Mode | Lets you select the query mode:
|