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.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Query to list all indexes in db

Author  Topic 

Dinky
Starting Member

37 Posts

Posted - 2007-10-17 : 10:10:08
Can someone help me with Query to list all indexes (name, table, field etc.) on a particular user/dbo database in sqlserver.

Thanks



Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-10-17 : 10:24:33
[code]
USE <databasename>
exec sp_MSforeachtable @command1="sp_helpindex '?'"
[/code]


Future guru in the making.
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-10-17 : 10:24:55
You need to query sysindexes table for this information.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2007-10-18 : 15:40:34
...sys.indexes in SQL2K5!

------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page
   

- Advertisement -