Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
You do not receive an error message when you run the DBCC CHECKDB statement against a database in SQL Server, but an access violation occurs when you run a query on a table in the database
| Article ID | : | 954467 |
| Last Review | : | June 25, 2008 |
| Revision | : | 1.0 |
Bug #: 443756 (SQLBUDT)
On This Page
SYMPTOMS
You create a table that contains indexes in Microsoft SQL
Server 2000 or in Microsoft SQL Server 2005. When
you run the DBCC CHECKDB statement against the database that contains this
table,
you do not receive an error message. However,
when
you run a query that references this table, an access violation
occurs.
Back to the top
CAUSE
This problem occurs
for many reasons. One reason is that the statistics
group of a table index is corrupted. However,
the DBCC CHECKDB statement does not detect a corrupted statistics
group. Therefore,
when
the query optimizer loads a
corrupted statistic group to determine the most efficient execution plan, an
access violation occurs. Depending on the cause of the
corrupted statistics group, the actual access violation may vary.
The
following issues are some
common causes of a corrupted statistics group:
| • | The columns on which the database
engine builds the statistics contain impure data. |
| • | Hardware problems exist. |
Back to the top
WORKAROUND
To work around this problem, follow these steps:
| 1. | Determine whether the access violation is caused by a
corrupted statistics group. To do this, run the DBCC
SHOW_STATISTICS statement against all indexes on the tables that are referenced
in
the query. |
| 2. | If an access violation occurs when you run one of these
DBCC SHOW_STATISTICS statements, repair the statistics that cause
the
access violation. To repair the statistics, run the UPDATE STATISTICS statement
against the corrupted statistics group.
If no access violation occurs
when you run these DBCC SHOW_STATISTICS statements, the access violation that
you encountered
when you ran
the query may be unrelated to corrupted statistics. For more information, see
the "More Information" section. |
Back to the top
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed in the "Applies to" section.
Back to the top
MORE INFORMATION
More information about the DBCC SHOW_STATISTICS statement
The DBCC SHOW_STATISTICS statement raises an access violation
only when the statistics group contains physical corruption.
The DBCC
SHOW_STATISTICS statement does not raise an access violation if the statistics
group contains logical corruption. However, if the query optimizer uses a
statistics group
that contains logical corruption, an access violation
still occurs.
Back to the top
REFERENCES
For more information about the DBCC SHOW_STATISTICS
statement, visit the following Microsoft Developer Network (MSDN) Web site:
For
more information about the UPDATE STATISTICS statement, visit the following
MSDN Web site:
Back to the top
APPLIES TO
| • | Microsoft SQL Server 2005 Standard Edition |
| • | Microsoft SQL Server 2005 Workgroup Edition |
| • | Microsoft SQL Server 2005 Developer Edition |
| • | Microsoft SQL Server 2005 Enterprise Edition |
| • | Microsoft SQL Server 2000 Enterprise Edition |
| • | Microsoft SQL Server 2000 Developer Edition |
| • | Microsoft SQL Server 2000 Personal Edition |
| • | Microsoft SQL Server 2000 Standard Edition |
| • | Microsoft SQL Server 2000, Workgroup Edition |
Back to the top
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please