How to rebuild all indexes on database 
Author Message
 How to rebuild all indexes on database
I have performance problems with database, that was upgraded , changed
, moved to different locations. How can I rebuild all indexes in this
db.
Thank you very much.


Mon, 25 Oct 2004 23:58:08 GMT
 How to rebuild all indexes on database

I know DBCC DBREINDEX ('objects, '') will rebuilt all indexes on 1 object.
So you could write a script to get all user objects and run dbcc dbreindex
on them.

Luc


Quote:
> I have performance problems with database, that was upgraded , changed
> , moved to different locations. How can I rebuild all indexes in this
> db.
> Thank you very much.



Tue, 26 Oct 2004 00:05:08 GMT
 How to rebuild all indexes on database

Quote:

> I know DBCC DBREINDEX ('objects, '') will rebuilt all indexes on 1 object.
> So you could write a script to get all user objects and run dbcc dbreindex
> on them.

> Luc



> > I have performance problems with database, that was upgraded , changed
> > , moved to different locations. How can I rebuild all indexes in this
> > db.
> > Thank you very much.

I tried that .But It is not what I need, I have more then 300 tables
and for each I have at least 3 indexes. I need something to at least
do not mention index name. If it is possible , please let me know.
Thank you.


Tue, 26 Oct 2004 22:14:38 GMT
 How to rebuild all indexes on database
There's no index name mentioned. You just say '' to indicate all indexes.
You can check if this works:


declare c cursor static for select name from dbo.sysobjects where type = 'u'
open c


BEGIN



END
close c
deallocate c



Quote:
> > I know DBCC DBREINDEX ('objects, '') will rebuilt all indexes on 1
object.
> > So you could write a script to get all user objects and run dbcc
dbreindex
> > on them.

> > Luc



> > > I have performance problems with database, that was upgraded , changed
> > > , moved to different locations. How can I rebuild all indexes in this
> > > db.
> > > Thank you very much.

> I tried that .But It is not what I need, I have more then 300 tables
> and for each I have at least 3 indexes. I need something to at least
> do not mention index name. If it is possible , please let me know.
> Thank you.



Tue, 26 Oct 2004 23:43:45 GMT
 How to rebuild all indexes on database
Thank you very much. It works like a song.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Wed, 27 Oct 2004 00:30:32 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. rebuild or not rebuild index file, when ?, how?

2. Difference in ranking results from a full index rebuild verses an incremental rebuild

3. Rebuild all indexes in a database

4. Rebuilding index's on a database

5. Rebuilding index's on a database

6. Rebuilding all the indexes in a database

7. script to rebuild all indexes in a database?

8. rebuilding an index(s) to defragment the index

9. Index rebuilding, possible?

10. Index Rebuilds / Repairs URGENT !!

11. dbcc, index rebuild


 
Powered by phpBB® Forum Software