Returns information about the specified materialized view.
[, owner_name ] ]
view_name Use this optional CHAR(128) parameter to specify the name of the materialized view for which to return information.
owner_name Use this optional CHAR(128) parameter to specify the owner of the materialized view.
If neither view_name nor owner_name are provided, information about all materialized views in the database is returned.
If owner_name is not provided, then only one of materialized views matching the specified view name is described. The procedure requires DBA authority or execute permissions on DBO owned procedures.
The sa_materialized_view_info system procedure returns the following information:
|Column name||Data type||Description|
|OwnerName||CHAR(128)||The creator of the view.|
|ViewName||CHAR(128)||The name of the view.|
Status information about the view:
|ViewLastRefreshed||TIMESTAMP||The time when the view was last refreshed. This value is NULL if the view has no data (uninitialized).|
|DataLastModified||TIMESTAMP||For a stale view, the last time that underlying data was modified.|
Information about the availability of the view for use by the optimizer:
This procedure can be useful for determining the list of materialized views that will never be considered by the optimizer because of a problem with the definition of the view. The AvailForOptimization value is I for these materialized views. To learn more about the restrictions for materialized view definition, see Restrictions when managing materialized views.
DBA authority required
All metadata for the specified materialized views, and all dependencies, are loaded into the server cache.