<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Compatibility Views on SQL Server Scripts</title><link>https://www.sqlserver70.com/tags/compatibility-views/</link><description>Recent content in Compatibility Views on SQL Server Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>SQLServer70.com</copyright><lastBuildDate>Mon, 15 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.sqlserver70.com/tags/compatibility-views/index.xml" rel="self" type="application/rss+xml"/><item><title>sysindexes vs sys.indexes: Legacy and Modern Catalog Views</title><link>https://www.sqlserver70.com/post/sql-server-sysindexes-vs-sys-indexes-catalog-views/</link><pubDate>Mon, 15 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/sql-server-sysindexes-vs-sys-indexes-catalog-views/</guid><description>
&lt;p&gt;Plenty of SQL Server scripts still in circulation read &lt;code&gt;rowcnt&lt;/code&gt; and &lt;code&gt;dpages&lt;/code&gt; straight out of &lt;code&gt;sysindexes&lt;/code&gt; — a habit inherited from SQL Server 2000, where that table was the canonical place to find row counts and page totals. The object survives only as the &lt;code&gt;sys.sysindexes&lt;/code&gt; compatibility view, is flagged for removal, and returns inaccurate numbers for partitioned tables. This post shows the modern replacement and how to migrate.&lt;/p&gt;
&lt;script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1012089347386563"
crossorigin="anonymous"&gt;&lt;/script&gt;
&lt;ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-1012089347386563"
data-ad-slot="8593449130"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;h2 id="purpose-and-overview"&gt;Purpose and Overview&lt;/h2&gt;
&lt;p&gt;In SQL Server 2000, &lt;code&gt;sysindexes&lt;/code&gt; was a real system table with one row per index and heap, and DBAs leaned on its &lt;code&gt;rowcnt&lt;/code&gt;, &lt;code&gt;dpages&lt;/code&gt;, &lt;code&gt;reserved&lt;/code&gt;, and &lt;code&gt;used&lt;/code&gt; columns for quick size and row-count reports. SQL Server 2005 rebuilt the metadata layer, and &lt;code&gt;sysindexes&lt;/code&gt; was retained only as &lt;code&gt;sys.sysindexes&lt;/code&gt;, a backward-compatibility view. Microsoft's documentation is explicit: this feature is included for backward compatibility, will be removed in a future version, and should not be used in new development.&lt;/p&gt;</description></item></channel></rss>