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
 General SQL Server Forums
 New to SQL Server Programming
 INDEXDEFRAG

Author  Topic 

peace
Constraint Violating Yak Guru

420 Posts

Posted - 2012-02-17 : 21:42:41
Hi, I would like to do indexdefrag on this table but having error on it. How can be solve?

For example:

DBCC INDEXDEFRAG (AdventureWorks2008R2, "Production.Product", PK_Product_ProductID)
GO

But when I check my sp_helpindex for my tablename, it has the <> sign.

<PK_Product_ProductID>

DBCC INDEXDEFRAG (AdventureWorks2008R2, "Production.Product",
<PK_Product_ProductID>)
GO

It gives error of this <>. If without the <> sign, it says not found.
How can I solved this problem?

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2012-02-18 : 05:02:00
ALTER INDEX [<PK_Product_ProductID>] ON Production.Product REORGANISE

Stop using Index Defrag, it's been deprecated for 7 or so years.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

peace
Constraint Violating Yak Guru

420 Posts

Posted - 2012-02-18 : 09:43:50
Thanks.
Is working perfect!
Go to Top of Page
   

- Advertisement -