Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
aelazouzi
Starting Member
7 Posts |
Posted - 2005-09-21 : 05:10:11
|
| Hi All,I'm auditing a SQL 2000 Server database.I Have two questions:The first is:Is there a method to collect information about Indexes on all tables?I'm using the following query:select table_name = sysobjects.name, index_name = sysindexes.name, index_id = indid from sysindexes, sysobjects where sysobjects.name = 'TableName' and sysobjects.id = sysindexes.idBut I dont get which index is a clusterd index or not.The Second is:I see some Indexes begining with _WA_SYS_.....What are this indexes?Tanx |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-09-21 : 05:15:39
|
| See if this helps youSelect CU.table_name, CU.Column_Name,CU.constraint_Name,TC.Constraint_Typefrom INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE CU inner joinINFORMATION_SCHEMA.TABLE_CONSTRAINTS TC on CU.Constraint_Name=TC.Constraint_Nameorder by CU.table_name>>I see some Indexes begining with _WA_SYS_.....I think they show all other columns of that tableAlso run this for more informationsp_help 'TableName'MadhivananFailing to plan is Planning to fail |
 |
|
|
aelazouzi
Starting Member
7 Posts |
Posted - 2005-09-21 : 05:57:25
|
| THank u madhivanan for your reaction.I have some indexes begining with _WA_SYS_.... do u know what kind of indexes are they?Are This indexes created automaticly by the SQL server? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-09-21 : 06:55:27
|
| They are other columns with default indexes. But I am not sureMadhivananFailing to plan is Planning to fail |
 |
|
|
byrmol
Shed Building SQL Farmer
1591 Posts |
Posted - 2005-09-21 : 07:13:50
|
| >>I have some indexes begining with _WA_SYS_.... do u know what kind of indexes are they?They are statistics.. histogram goodness...read all about them in BOL..DavidMA front-end is something that tries to violate a back-end. |
 |
|
|
|
|
|