August 2, 2006 at 8:47 am
In the system tables or views, what do I use to identify a CLUSTERED and/or UNIQUE index? There's got to be something that I can query (i.e. sysindexes) that'll return whether or not the index is clustered and/or unique. I need to do this with T-SQL not with the scripting mechanism in EM.
Thanks,
Frustrated, because I'm SO close...
August 2, 2006 at 9:18 am
The clustered index has an IndID of 1 in sysindexes. Here is a script that should give you everything you need:
http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1590
August 2, 2006 at 9:24 am
Thank YOU!! My blood pressure just went back to normal.
August 3, 2006 at 10:23 am
Here's a handy link no DBA shopuld be without:
http://www.microsoft.com/sql/prodinfo/previousversions/systables.mspx
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply