Thursday, March 8, 2012

db optimization

I have started reorgainizing(rebuilding) data and index
pages and since the tran log is still growing and there is
no more space I am wondering if I can start shrinking the
log during the process of optimization. Any view is
apreciated.
MirnaYou can back it up to truncate the committed transactions or set it to
simple mode until your done. Do not attempt to shrink it.
--
Andrew J. Kelly
SQL Server MVP
"Mirna" <anonymous@.discussions.microsoft.com> wrote in message
news:04d701c3b1be$c727c200$a401280a@.phx.gbl...
> I have started reorgainizing(rebuilding) data and index
> pages and since the tran log is still growing and there is
> no more space I am wondering if I can start shrinking the
> log during the process of optimization. Any view is
> apreciated.
> Mirna|||Everything that moved (index pages) are logged. DBCC DBREINDEX will log a lot. If that is
undesirable, consider using DBCC INDEXFEDRAG.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
<anonymous@.discussions.microsoft.com> wrote in message
news:08d501c3b29b$9b4a7910$a501280a@.phx.gbl...
> Thanks Andrew...luckily the job finished before it filled
> all the space on the drive.
> Teh log has grown to from 101 MB to 70 GB. After I
> truncated and shrinked the log the database size has
> increased by almost 10 % . Why is that ? What gets written
> to the db after the optimization ?
> Thanks,
> Mirna
> >--Original Message--
> >You can back it up to truncate the committed transactions
> or set it to
> >simple mode until your done. Do not attempt to shrink it.
> >
> >--
> >
> >Andrew J. Kelly
> >SQL Server MVP
> >
> >
> >"Mirna" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:04d701c3b1be$c727c200$a401280a@.phx.gbl...
> >> I have started reorgainizing(rebuilding) data and index
> >> pages and since the tran log is still growing and there
> is
> >> no more space I am wondering if I can start shrinking
> the
> >> log during the process of optimization. Any view is
> >> apreciated.
> >>
> >> Mirna
> >
> >
> >.
> >|||How did you shrink it? If you used DBCC SHRINKDATABASE you should try using
SHRINKFILE instead. That allows you to only affect the file (in this case
the log file) you want.
--
Andrew J. Kelly
SQL Server MVP
<anonymous@.discussions.microsoft.com> wrote in message
news:08d501c3b29b$9b4a7910$a501280a@.phx.gbl...
> Thanks Andrew...luckily the job finished before it filled
> all the space on the drive.
> Teh log has grown to from 101 MB to 70 GB. After I
> truncated and shrinked the log the database size has
> increased by almost 10 % . Why is that ? What gets written
> to the db after the optimization ?
> Thanks,
> Mirna
> >--Original Message--
> >You can back it up to truncate the committed transactions
> or set it to
> >simple mode until your done. Do not attempt to shrink it.
> >
> >--
> >
> >Andrew J. Kelly
> >SQL Server MVP
> >
> >
> >"Mirna" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:04d701c3b1be$c727c200$a401280a@.phx.gbl...
> >> I have started reorgainizing(rebuilding) data and index
> >> pages and since the tran log is still growing and there
> is
> >> no more space I am wondering if I can start shrinking
> the
> >> log during the process of optimization. Any view is
> >> apreciated.
> >>
> >> Mirna
> >
> >
> >.
> >|||Good point, Andrew. Not only that DBCC DBREINDEX produces log records, shrinking a database file
also produces log records (same amount as the amount of data being moved due to the shrink).
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%23OFVMqtsDHA.1224@.TK2MSFTNGP09.phx.gbl...
> How did you shrink it? If you used DBCC SHRINKDATABASE you should try using
> SHRINKFILE instead. That allows you to only affect the file (in this case
> the log file) you want.
> --
> Andrew J. Kelly
> SQL Server MVP
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:08d501c3b29b$9b4a7910$a501280a@.phx.gbl...
> > Thanks Andrew...luckily the job finished before it filled
> > all the space on the drive.
> > Teh log has grown to from 101 MB to 70 GB. After I
> > truncated and shrinked the log the database size has
> > increased by almost 10 % . Why is that ? What gets written
> > to the db after the optimization ?
> >
> > Thanks,
> > Mirna
> >
> > >--Original Message--
> > >You can back it up to truncate the committed transactions
> > or set it to
> > >simple mode until your done. Do not attempt to shrink it.
> > >
> > >--
> > >
> > >Andrew J. Kelly
> > >SQL Server MVP
> > >
> > >
> > >"Mirna" <anonymous@.discussions.microsoft.com> wrote in
> > message
> > >news:04d701c3b1be$c727c200$a401280a@.phx.gbl...
> > >> I have started reorgainizing(rebuilding) data and index
> > >> pages and since the tran log is still growing and there
> > is
> > >> no more space I am wondering if I can start shrinking
> > the
> > >> log during the process of optimization. Any view is
> > >> apreciated.
> > >>
> > >> Mirna
> > >
> > >
> > >.
> > >
>

No comments:

Post a Comment