Friday, February 24, 2012

index database

In vfp database, i can use the command ' reindex' to index the database
again.
for SQL server, can i do that ?
thanks a lot
Can you explain what such a "reindex" is supposed to achieve? It is possible that you are looking
for the DBCC DBREINDEX or DBCC INDEXDEFRAG (2000) or for 2005 ALTER INDEX with either the REBUILD or
the REORGANIZE options.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Agnes" <agnes@.dynamictech.com.hk> wrote in message news:e$dcsir9GHA.2268@.TK2MSFTNGP05.phx.gbl...
> In vfp database, i can use the command ' reindex' to index the database again.
> for SQL server, can i do that ?
> thanks a lot
>
|||Hi Agnes
You don't give the version of SQL Server you are using check out DBCC
DBREINDEX and INDEXDEFRAG in Books Online if you are using SQL 2000 also DBCC
SHOWCONTIG which has an example script to only reindex indexes that are
fragmented by a certain amount. If using SQL 2005 check out the ALTER INDEX
statement and the sys.db_index_physical_stats view.
John
"Agnes" wrote:

> In vfp database, i can use the command ' reindex' to index the database
> again.
> for SQL server, can i do that ?
> thanks a lot
>
>
|||sp_MSforeachtable 'dbcc dbreindex(''?'')'
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Agnes" <agnes@.dynamictech.com.hk> wrote in message
news:e$dcsir9GHA.2268@.TK2MSFTNGP05.phx.gbl...
> In vfp database, i can use the command ' reindex' to index the database
> again.
> for SQL server, can i do that ?
> thanks a lot
>

No comments:

Post a Comment