Link to home
Start Free TrialLog in
Avatar of saratcm
saratcmFlag for India

asked on

REORG AN INDEX IN SQL 2000

Hi All,
I am trying to reorg and Index using this below script

alter index index-name on databasename.tablename
reorganize ;

Is this syntax right, As it says incorrect syntax near index?
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Enclose special characters with [] or "" like this:

alter index [index-name] on databasename.dbo.tablename reorganize ;
Avatar of saratcm

ASKER

already tried that, other than that do u find any syntax error there?
In SQL Server 2000, use this

DBCC DBREINDEX ("dbo.tablename", [index-name],80);
ASKER CERTIFIED SOLUTION
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of saratcm

ASKER

Thanks!
Welcome..