Home Microsoft SQL Server DigiMailing iRN Contact


  No additional text.

CREATE VIEW sys.xml_indexes AS
	SELECT i.id AS object_id,
		i.name AS name,
		i.indid AS index_id,
		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
		ui.indepsubid AS using_xml_index_id,
		char(nullif(i.tinyprop, 0)) AS secondary_type,
		s.name AS secondary_type_desc,
		sysconv(bit, 0) AS has_filter,
		convert(nvarchar(max), NULL) AS filter_definition
	FROM sys.sysidxstats i
	LEFT JOIN sys.syssingleobjrefs ui ON ui.depid = i.id AND ui.class = 100 AND ui.depsubid = i.indid	-- SRC_XMLUSINGINDEX
	LEFT JOIN sys.syspalvalues n ON n.class = 'IDXT' and n.value = i.type
	LEFT JOIN sys.syspalvalues s ON s.class = 'XITY' AND s.value = i.tinyprop
	WHERE i.indid >= 256000 and i.indid < 257000
		AND has_access('CO', i.id) = 1

Last revision 2008RTM
See also

  sp_addmergearticle (Procedure)
sp_changemergearticle (Procedure)
sp_estimate_data_compression_savings (Procedure)
sp_indexoption (Procedure)
sp_rename (Procedure)
sp_spaceused (Procedure)
sp_statistics_100 (Procedure)


  Query a named instance
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
Zoekmachine optimalisatie
SQL Servers hidden objects
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
sIFR; de combinatie tussen HTML en Flash