Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.indexes

  No additional text.


Syntax
CREATE VIEW sys.indexes AS
	SELECT i.id AS object_id,
		i.name AS name,
		i.indid AS index_id,
		i.type,
		n.name AS type_desc,
		sysconv(bit, i.status & 0x8) AS is_unique,			-- IS_IND_UNIQUE
		i.dataspace AS data_space_id,
		sysconv(bit, i.status & 0x4) AS ignore_dup_key,		-- IS_IND_DPKEYS
		sysconv(bit, i.status & 0x20) AS is_primary_key,	-- IS_IND_PRIMARY
		sysconv(bit, i.status & 0x40) AS is_unique_constraint,	-- IS_IND_UNIQUE_CO
		i.fillfact AS fill_factor,
		sysconv(bit, i.status & 0x10) AS is_padded,		-- IS_IND_PADINDEX
		sysconv(bit, i.status & 0x80) AS is_disabled,		-- IS_IND_OFFLINE
		sysconv(bit, i.status & 0x100) AS is_hypothetical,	-- IS_IND_ITWINDEX
		sysconv(bit, 1 - (i.status & 512)/512) AS allow_row_locks,		-- IS_IND_NO_ROWLOCK
		sysconv(bit, 1 - (i.status & 1024)/1024) AS allow_page_locks,		-- IS_IND_NO_PAGELOCK
		sysconv(bit, i.status & 0x20000) AS has_filter,	-- IS_HAS_FILTER
		case when (i.status & 0x20000) != 0 then object_definition(i.id, i.indid, 7) else NULL end AS filter_definition -- x_euncIndex
	FROM sys.sysidxstats i
	LEFT JOIN sys.syspalvalues n ON n.class = 'IDXT' and n.value = i.type
	WHERE (i.status & 1) <> 0
		AND has_access('CO', i.id) = 1	-- IS_INDEX

 
Last revision 2008RTM
See also

  dm_db_partition_stats (View)
fulltext_indexes (View)
indexes$ (View)
index_counts (View)
REFERENTIAL_CONSTRAINTS (View)
spatial_indexes (View)
spatial_index_tessellations (View)
spt_indexcolumns_view_managed (View)
spt_indexes_view (View)
spt_indexes_view_100 (View)
spt_indexes_view_managed (View)
spt_primary_keys_view (View)
spt_tables_info_view (View)
spt_table_type_primary_keys_view (View)
sp_addmergearticle (Procedure)
sp_autostats (Procedure)
sp_cdc_create_objects (Procedure)
sp_cdc_enable_table_internal (Procedure)
sp_cdc_verify_index_name (Procedure)
sp_cdc_vupgrade (Procedure)
sp_changemergearticle (Procedure)
sp_checkinvalidivarticle (Procedure)
sp_createstats (Procedure)
sp_dbcmptlevel (Procedure)
sp_estimate_data_compression_savings (Procedure)
sp_extended_logging (Procedure)
sp_fkeys (Procedure)
sp_foreign_keys_rowset (Procedure)
sp_foreign_keys_rowset2 (Procedure)
sp_foreign_keys_rowset3 (Procedure)
sp_fulltext_catalog (Procedure)
sp_getarticlepkcolbitmap (Procedure)
sp_getqueuedrows (Procedure)
sp_help (Procedure)
sp_helpconstraint (Procedure)
sp_helpindex (Procedure)
sp_helpstats (Procedure)
sp_help_fulltext_catalogs (Procedure)
sp_help_fulltext_catalogs_cursor (Procedure)
sp_help_fulltext_tables (Procedure)
sp_help_fulltext_tables_cursor (Procedure)
sp_help_spatial_geography_index (Procedure)
sp_help_spatial_geography_index_helper (Procedure)
sp_help_spatial_geography_index_xml (Procedure)
sp_help_spatial_geometry_index (Procedure)
sp_help_spatial_geometry_index_helper (Procedure)
sp_help_spatial_geometry_index_xml (Procedure)
sp_IHdroppublisher (Procedure)
sp_IHflushmetadata (Procedure)
sp_IHScriptIdxFile (Procedure)
sp_IHscriptindexes (Procedure)
sp_IHScriptSchFile (Procedure)
sp_IHsyncmetadata (Procedure)
sp_IHVerifyIndex (Procedure)
sp_indexes (Procedure)
sp_indexes_100_rowset (Procedure)
sp_indexes_100_rowset2 (Procedure)
sp_indexes_90_rowset (Procedure)
sp_indexes_90_rowset2 (Procedure)
sp_indexes_90_rowset_rmt (Procedure)
sp_indexes_managed (Procedure)
sp_indexes_rowset (Procedure)
sp_indexes_rowset2 (Procedure)
sp_indexes_rowset_rmt (Procedure)
sp_indexoption (Procedure)
sp_ivindexhasnullcols (Procedure)
sp_mergearticlecolumn (Procedure)
sp_MSaddguidindex (Procedure)
sp_MSAdjustConflictTable (Procedure)
sp_MSarticle_validation (Procedure)
sp_MSbuild_single_post (Procedure)
sp_MScreatedupkeyupdatequery (Procedure)
sp_MScreate_common_dist_tables (Procedure)
sp_MScreate_dist_tables (Procedure)
sp_MScreate_logical_record_views (Procedure)
sp_MScreate_sub_tables_internal (Procedure)
sp_MSdropguidcolumn (Procedure)
sp_MSdrop_repltran (Procedure)
sp_MSestimatemergesnapshotworkload (Procedure)
sp_MSestimatesnapshotworkload (Procedure)
sp_MSgetconflictinsertproc (Procedure)
sp_MSget_load_hint (Procedure)
sp_MShelpcolumns (Procedure)
sp_MShelpfulltextindex (Procedure)
sp_MShelpfulltextscript (Procedure)
sp_MShelpindex (Procedure)
sp_MSindexspace (Procedure)
sp_MSisallreplcolpk (Procedure)
sp_MSiscolpk (Procedure)
sp_MSisnonpkukupdateinconflict (Procedure)
sp_MSispkupdateinconflict (Procedure)
sp_MSmakeconflicttable (Procedure)
sp_MSmatchkey (Procedure)
sp_MSmerge_create_sub_table (Procedure)
sp_MSmerge_dropindex (Procedure)
sp_MSmerge_metadataupgrade (Procedure)
sp_MSmerge_subscriptions_upgrade (Procedure)
sp_MSmerge_upgrade_from_90rtm (Procedure)
sp_MSNonSQLDDL (Procedure)
sp_MSpublication_validation (Procedure)
sp_MSreplsup_table_has_pk (Procedure)
sp_MSrepl_addarticle (Procedure)
sp_MSrepl_articlecolumn (Procedure)
sp_MSrepl_changearticle (Procedure)
sp_MSrepl_changepublication (Procedure)
sp_MSrepl_get_Oracle_publisher_metadata (Procedure)
sp_MSrestoresavedforeignkeys (Procedure)
sp_MSscript_article_view (Procedure)
sp_MSsetconflicttable (Procedure)
sp_MSsetup_partition_groups (Procedure)
sp_MStablekeys (Procedure)
sp_MStablerefs (Procedure)
sp_MStablespace (Procedure)
sp_MStable_has_unique_index (Procedure)
sp_MStable_validation (Procedure)
sp_MSUpgradeConflictTable (Procedure)
sp_objectfilegroup (Procedure)
sp_ORACheckSourceTable (Procedure)
sp_ORAenumpublishertables (Procedure)
sp_ORAgetcolumndata (Procedure)
sp_ORAvalidatecache (Procedure)
sp_pkeys (Procedure)
sp_rename (Procedure)
sp_repldropcolumn (Procedure)
sp_replscriptuniquekeywhereclause (Procedure)
sp_repltablehasnonpkuniquekey (Procedure)
sp_scriptinsproccore (Procedure)
sp_scriptupdproccore (Procedure)
sp_spaceused (Procedure)
sp_special_columns (Procedure)
sp_special_columns_100 (Procedure)
sp_special_columns_90 (Procedure)
sp_statistics (Procedure)
sp_statistics_100 (Procedure)
sp_statistics_rowset (Procedure)
sp_statistics_rowset2 (Procedure)
sp_table_validation (Procedure)
sp_updatestats (Procedure)
sp_upgrade_log_shipping (Procedure)
sp_vupgrade_distdb (Procedure)
sp_vupgrade_heterogeneous_publishers (Procedure)
sp_vupgrade_mergetables (Procedure)
sp_vupgrade_MSsubscription_properties (Procedure)
sp_vupgrade_publisherdb (Procedure)
sp_vupgrade_replmsdb (Procedure)
sp_vupgrade_subscription_tables (Procedure)
sysindexes (View)
xml_indexes (View)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash