Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Why NULL values in sys.indexes Expand / Collapse
Author
Message
Posted Wednesday, January 16, 2013 1:20 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 9:07 PM
Points: 162, Visits: 336
Hi,

I queried the sys.indexes on a old DB. In the name column of this table i found NULL value.I am not able to understand how did the NULL value crept into this table or it is a normal behavior.
Post #1407662
Posted Wednesday, January 16, 2013 1:46 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075, Visits: 4,831
Null in the name means its a heap, as a heap doesnt have an index name, it shows as NULL

Do you get anything from the below query
SELECT * FROM sys.indexes WHERE name IS NULL and type <> 0





Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1407675
Posted Wednesday, January 16, 2013 2:07 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 9:07 PM
Points: 162, Visits: 336
anthony.green (1/16/2013)
Null in the name means its a heap, as a heap doesnt have an index name, it shows as NULL

Do you get anything from the below query
SELECT * FROM sys.indexes WHERE name IS NULL and type <> 0



No i did not get any data .
Post #1407682
Posted Wednesday, January 16, 2013 2:13 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075, Visits: 4,831
That would indicate that all your indexes have a name. The NULL values are for tables which do not have a clustered index and are heaps.



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1407685
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse