PhilZone
Welcome to the phil zone

Navigation

Home
Green House
River Cottage
About
PhotoLogs
Certification
SongLyrics
SystemAdmin
Network
Security

I Read

Anil
HouleDude
Woof
Scripting
Joel
RobGalbraith
Carlos
Sam
Mary
Steve
xkcd
UserFriendly
Indexed
QuestionableContent
RealLife
Dilbert
Tugster
NYT
Weather
Radar
News

Stuff

WebMail
QuesoKnow

Indexes & Constraints

Index trouble shooting


sp_helpindex freds


select * from sysobjects where xtype='U'

select * from sysindexes

declare @table_id int, 
set @table_id =object_id('freds')
dbcc showcontig (table_id)

dbcc showcontig (501576825, 501576825)

dbcc dbreindex (freds)

Update statistics freds

++++++++++++++++++++++++++++++++++++++++++++++++

Drop Index

USE pubs

IF EXISTS (SELECT name FROM sysindexes

WHERE name = 'au_id_ind')
 DROP INDEX authors.au_id_ind
GO
 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Drop unique or PK

alter table freds drop  constraint unx_Freds_lastname

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

sp_helpindex freds


Last update: Wednesday, 22-Sep-2004 15:44:11 PDT
Copyright 2002-2009 - PhilZone