Deon.
Norris <jch...@cooper.com.hk> wrote in message
news:7v3m8a$1n7c$2...@adenine.netfront.net...
Hope this helps.
If you do not want hardcoding while re-creating indexes then use reverse
engineering with sybperl to generate 'drop / create index' statements. You
can get the stored procedures at http://www.tiac.net/users/sqltech/
Arun
Deon wrote:
> check out dbcc dbreindex
>
> Deon.
>
Deon.
Arun Kamat <ann...@tkg.att.ne.jp> wrote in message
news:38159BA3...@tkg.att.ne.jp...
Deon
Norris <jch...@cooper.com.hk> wrote in message
news:7v4g8o$2djh$1...@adenine.netfront.net...
About the question of how to recreate indices,
I would like to contribute with my opinion.
I think that, although reverse engineering
is a good starting point if the original create
statement is lost, it's better to keep the
create statements stored in text files. They
may include things that reverse engineering
cannot guess, as fillfactor (I'm talking about
Sybase). Another reason is that, if the drop
and create process fails, you may loose both
the index and its definition.
Regards,
Mariano Corral
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
I know about Sybase SQL Server 11.0.3.3, but little about
11.5.x and 11.9.2.x. Nothing about MS SQL Server. Based on
this experience:
- The fillfactor clause of the create index statement is not
stored in system tables. Then, it cannot be retrieved by
any reverse engineering tool. What SQL Server does is just
leave that percent full while it builds the index.
- The clause sorted_data exists in Sybase, but it works
differently depending on the version. Always assuming
the index being created is clustered: For 11.0.3.3 and
previous, it does relocate data and applies any fillfactor
given to the create index statement. So, sorted_data is
(was) a good way to reorganize table data while saving
a lot of time. However, it does save little (if any) working
space; it's still required to have free space on the
database for an amount equivalent to 120% the size of
the data part of the table.
- For 11.5.x it does rebuild only the index tree, but
leaves data pages intact. So, it doesn't serve the
purpose of data reorganization. sorted_data must be
omited for this purpose.
- For 11.9.2 there's a new command, but only for DOL
tables: reorg.
Regards,
Mariano Corral
Sent via Deja.com http://www.deja.com/
Before you buy.