Skip to content

Latest commit

 

History

History
49 lines (42 loc) · 3.71 KB

sys-views-transact-sql.md

File metadata and controls

49 lines (42 loc) · 3.71 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
sys.views (Transact-SQL)
sys.views (Transact-SQL)
rwestMSFT
randolphwest
05/24/2022
sql
system-objects
reference
sys.views_TSQL
sys.views
sys.views catalog view
TSQL
>=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current

sys.views (Transact-SQL)

[!INCLUDE sql-asdb-asdbmi-asa-pdw]

Contains a row for each view object, with sys.objects.type = V.

Column name Data type Description
<inherited columns> For a list of columns that this view inherits, see sys.objects (Transact-SQL)
is_replicated bit 1 = View is replicated.
has_replication_filter bit 1 = View has a replication filter.
has_opaque_metadata bit 1 = VIEW_METADATA option specified for view. For more information, see CREATE VIEW (Transact-SQL).
has_unchecked_assembly_data bit 1 = View contains persisted data that depends on an assembly whose definition changed during the last ALTER ASSEMBLY. Resets to 0 after the next successful DBCC CHECKDB or DBCC CHECKTABLE.
with_check_option bit 1 = WITH CHECK OPTION was specified in the view definition.
is_date_correlation_view bit 1 = View was created automatically by the system to store correlation information between datetime columns. Creation of this view was enabled by setting DATE_CORRELATION_OPTIMIZATION to ON.
ledger_view_type tinyint Applies to: Starting with [!INCLUDE sssql22-md], [!INCLUDE ssazure-sqldb].

The numeric value indicating if a view is a ledger view for an updatable ledger table.

0 = NON_LEDGER_VIEW
1 = LEDGER_VIEW

For more information on database ledger, see Ledger.
ledger_view_type_desc nvarchar(60) Applies to: Starting with [!INCLUDE sssql22-md], [!INCLUDE ssazure-sqldb].

The text description of a value in the ledger_view_type column:

NON_LEDGER_VIEW
LEDGER_VIEW
is_dropped_ledger_view bit Applies to: Starting with [!INCLUDE sssql22-md], [!INCLUDE ssazure-sqldb].

Indicates a ledger view that has been dropped.

Permissions

[!INCLUDEssCatViewPerm] For more information, see Metadata Visibility Configuration.

See Also

Object Catalog Views (Transact-SQL)
Catalog Views (Transact-SQL)
ALTER ASSEMBLY (Transact-SQL)
DBCC CHECKDB (Transact-SQL)
DBCC CHECKTABLE (Transact-SQL)
Querying the SQL Server System Catalog FAQ