Friday, February 24, 2012

dbreindex

Hi,
I would like to know what methodology other users use in
order to trim down the transaction log after running 'dbcc
dbreindex'. I can think of couple ways like the following
but would like to know any better ways to automate the
whole proces:
- place a 'trunc. trans log' statement before & after the
command to avoid the excessive log
- run shrinkfile after the command is run
Any ideas/suggestions?Why do you want to shrink it in the first place? If it needed to get that
big today, don't you think it will need to be that big again the next time
you run reindex? Growing and shrinking of the files are expensive and
absolutely un-necessary in most cases. It might be good to backup the log
after a reindex but certainly don't shrink it.
--
Andrew J. Kelly
SQL Server MVP
"Pete." <darksage618@.hotmail.com> wrote in message
news:04c101c365d1$f13ddf40$a401280a@.phx.gbl...
> Hi,
> I would like to know what methodology other users use in
> order to trim down the transaction log after running 'dbcc
> dbreindex'. I can think of couple ways like the following
> but would like to know any better ways to automate the
> whole proces:
> - place a 'trunc. trans log' statement before & after the
> command to avoid the excessive log
> - run shrinkfile after the command is run
> Any ideas/suggestions?|||In addition to Andrew's post:
Consider using DBCC INDEXDEFRAG instead. It will most probably cut doesn the amount of changes done
(hence cut down on the log records produced), depending on how much reorg there is to be performed.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Pete." <darksage618@.hotmail.com> wrote in message news:04c101c365d1$f13ddf40$a401280a@.phx.gbl...
> Hi,
> I would like to know what methodology other users use in
> order to trim down the transaction log after running 'dbcc
> dbreindex'. I can think of couple ways like the following
> but would like to know any better ways to automate the
> whole proces:
> - place a 'trunc. trans log' statement before & after the
> command to avoid the excessive log
> - run shrinkfile after the command is run
> Any ideas/suggestions?

No comments:

Post a Comment