Showing posts with label dbreindex. Show all posts
Showing posts with label dbreindex. Show all posts

Tuesday, March 6, 2012

"Order by" error running DBCC DBREINDEX

I'm running a simple DBCC DBREINDEX ('myTable') and I receive the
following error:

"Server: Msg 169, Level 15, State 2, Line 2
A column has been specified more than once in the order by list.
Columns in the order by list must be unique. DBCC execution
completed. If DBCC printed error messages, contact your system
administrator."

I can successfully reindex other tables in this database. I thought
that perhaps I had objects in the database that ended up with the same
name, but I've pretty much ruled that out.

Any suggestions?

Thanks
John D. Morris
mailto://jmorris_42@.hotmail.comjmorris_42@.hotmail.com (John Morris) wrote in message news:<5b4367be.0308050426.10612a9f@.posting.google.com>...
> I'm running a simple DBCC DBREINDEX ('myTable') and I receive the
> following error:
> "Server: Msg 169, Level 15, State 2, Line 2
> A column has been specified more than once in the order by list.
> Columns in the order by list must be unique. DBCC execution
> completed. If DBCC printed error messages, contact your system
> administrator."
> I can successfully reindex other tables in this database. I thought
> that perhaps I had objects in the database that ended up with the same
> name, but I've pretty much ruled that out.
> Any suggestions?
> Thanks
> John D. Morris
> mailto://jmorris_42@.hotmail.com

Followup:

As it turns out, I had a hidden "Hypothetical" index that the index
tuning wizard decided not to clean up when it was done. The only way
to see the index was in sp_helpindex. It did not appear in the object
browser. MS claims this was fixed in SP1...I guess not. Anyway,
dropped the hypothetical index and all is well.

-jdm|||John,

Can you consistently repro the bug?
--
Arun Marathe
Microsoft Corporation

Disclaimers:
(1) This posting is provided "AS IS" with no warranties, and confers no
rights.
(2) Use of included script samples are subject to the terms specified at:
http://www.microsoft.com/info/cpyright.htm

"John D. Morris" <jmorris@.sni.org> wrote in message
news:d034511a.0308051015.60cc849a@.posting.google.c om...
> jmorris_42@.hotmail.com (John Morris) wrote in message
news:<5b4367be.0308050426.10612a9f@.posting.google.com>...
> > I'm running a simple DBCC DBREINDEX ('myTable') and I receive the
> > following error:
> > "Server: Msg 169, Level 15, State 2, Line 2
> > A column has been specified more than once in the order by list.
> > Columns in the order by list must be unique. DBCC execution
> > completed. If DBCC printed error messages, contact your system
> > administrator."
> > I can successfully reindex other tables in this database. I thought
> > that perhaps I had objects in the database that ended up with the same
> > name, but I've pretty much ruled that out.
> > Any suggestions?
> > Thanks
> > John D. Morris
> > mailto://jmorris_42@.hotmail.com
> Followup:
> As it turns out, I had a hidden "Hypothetical" index that the index
> tuning wizard decided not to clean up when it was done. The only way
> to see the index was in sp_helpindex. It did not appear in the object
> browser. MS claims this was fixed in SP1...I guess not. Anyway,
> dropped the hypothetical index and all is well.
> -jdm

Saturday, February 11, 2012

"DBCC DBReindex" VS "Update Statistics"

Hi all,
Is it neccessay to run the "Update Statistics" after run "DBCC DBReindex"? Does "Update Statistics" automatically update the stats?
Thanks in advance
Kim,As you can see DBCC DBREINDEX updates statistics by itself - it is no need to update statistics after DBCC DBREINDEX.

drop table test
create table test(id int identity,code varchar(10))
create index test_i on test(id)
go
insert test(code) values('a')
insert test(code) values('b')
insert test(code) values('c')
insert test(code) values('d')
insert test(code) values('e')
go
UPDATE STATISTICS test
go
SELECT STATS_DATE(i.id, i.indid)
FROM sysobjects o, sysindexes i
WHERE o.name = 'test' AND o.id = i.id and i.name='test_i'
go
DBCC DBREINDEX ('test')
SELECT STATS_DATE(i.id, i.indid)
FROM sysobjects o, sysindexes i
WHERE o.name = 'test' AND o.id = i.id and i.name='test_i'
go

"dbcc dbreindex" vs "dbcc reindex"

are these synonyms?
many thanks & seasons greetingsThere is no command called DBCC REINDEX. Probably just a typo you read somew
here.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"xamman" <xamman19@.yahoo.com> wrote in message
news:1165603416.284067.60790@.73g2000cwn.googlegroups.com...
> are these synonyms?
> many thanks & seasons greetings
>|||xamman,
FWIW, I believe that DBCC REINDEX is an editorial error and that only DBCC
DBREINDEX actually exists.
RLF
"xamman" <xamman19@.yahoo.com> wrote in message
news:1165603416.284067.60790@.73g2000cwn.googlegroups.com...
> are these synonyms?
> many thanks & seasons greetings
>|||Hello,
There is no command DBCC REINDEX in SQL Server. But there is DBCC
INDEXDEFRAG and DBCC DBREINDEX.
Thanks
Hari
"xamman" <xamman19@.yahoo.com> wrote in message
news:1165603416.284067.60790@.73g2000cwn.googlegroups.com...
> are these synonyms?
> many thanks & seasons greetings
>

"dbcc dbreindex" vs "dbcc reindex"

are these synonyms?
many thanks & seasons greetingsThere is no command called DBCC REINDEX. Probably just a typo you read somewhere.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"xamman" <xamman19@.yahoo.com> wrote in message
news:1165603416.284067.60790@.73g2000cwn.googlegroups.com...
> are these synonyms?
> many thanks & seasons greetings
>|||xamman,
FWIW, I believe that DBCC REINDEX is an editorial error and that only DBCC
DBREINDEX actually exists.
RLF
"xamman" <xamman19@.yahoo.com> wrote in message
news:1165603416.284067.60790@.73g2000cwn.googlegroups.com...
> are these synonyms?
> many thanks & seasons greetings
>|||Hello,
There is no command DBCC REINDEX in SQL Server. But there is DBCC
INDEXDEFRAG and DBCC DBREINDEX.
Thanks
Hari
"xamman" <xamman19@.yahoo.com> wrote in message
news:1165603416.284067.60790@.73g2000cwn.googlegroups.com...
> are these synonyms?
> many thanks & seasons greetings
>

"dbcc dbreindex" vs "dbcc reindex"

are these synonyms?
many thanks & seasons greetings
xamman,
FWIW, I believe that DBCC REINDEX is an editorial error and that only DBCC
DBREINDEX actually exists.
RLF
"xamman" <xamman19@.yahoo.com> wrote in message
news:1165603416.284067.60790@.73g2000cwn.googlegrou ps.com...
> are these synonyms?
> many thanks & seasons greetings
>
|||Hello,
There is no command DBCC REINDEX in SQL Server. But there is DBCC
INDEXDEFRAG and DBCC DBREINDEX.
Thanks
Hari
"xamman" <xamman19@.yahoo.com> wrote in message
news:1165603416.284067.60790@.73g2000cwn.googlegrou ps.com...
> are these synonyms?
> many thanks & seasons greetings
>