You are here: Re: System objects problem « MsSQL Server « IT news, forums, messages
Re: System objects problem

Posted by Erland Sommarskog on 05/04/07 21:28

Laurence Breeze (i.l.breeze@blahblah.ac.uk) writes:
> However, examining the sysindexes system
> catalog I find that there are indeed 249 entries, but that many
> (possibly all) of them have names of the following type:
>
> '_WA_Sys_XYZ_356BF102'
>
> where 'XYZ' is a column on the table in question.
>
> Looking at the same database across our DEV/TEST/PROD environments I
> notice that these system like index entries are not consistant. The
> names and number of entries differ. I've tried creating a new table
> from a script generated in EM and no such indexes/system objects are
> created.
>
> I'm confused. What are these things. I can't drop them, sp_helpindex
> doesn't refer to them. Examining the sysindexes/sysindexkeys catalogs
> appears to suggect that the indexes have columns but no rows/entries.

They are auto-generated statistics, and an sp_helpstats will list them.

> I've got around the immediate problem by deleting one of these entries
> from sysindexes and I've been able to create the index I wanted. All
> seems well, but is this likely to cause a problem ?

Delete? Does that mean that you turned on Allow updates and operated
on sysindexes directly? That's always a risk, as you may cause some
inconsistency in the system catalog by not deleting all. For instance,
I would expect that you need to delete the entries in sysindexkeys as
well.

Next time you should use DROP STATISTICS.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация