Re: Shrinking a logfile -

Tech-Archive recommends: Speed Up your PC by fixing your registry



Thank you, both Hugo and bass_player, for your explanations. I these address
the questions that I was struggling with in the reading material. The
warning about using shrinkfile is especially helpful, since the reading
material that I've been looking at does not highlight this enough.

Thanks,
--
pbrill1


"Hugo Kornelis" wrote:

On Mon, 8 Dec 2008 15:13:01 -0800, pbrill1 wrote:

Question from a new DBA-in-training, trying to develop a
best procedure' to shrink logfiles when they grow too large.

Hi pbrill1,

Andrew already mentioned it in his reply to your other thread, but I
think it's worth highlighting a bit more - shrinking database files
should never be part of your regular practice.

Sure, if for whatever reason a file has grown to way more than its
normal working size and you need to reclaim the space, then you can
consider shrinking. But in all other cases, just don't do it. If no
specific reason for extra growth is identified, or if you know the
reason and aso know it will probably happen again, then SQL Server
obviously needs the file to be that big. Shrinking it now will only
force SQL Server to grow the file again at a later time. This is a
relatively slow operation, so it will hurt performance. And if you
repeat it a few times, you'll end up with severely fragmented files,
which are also detrimental to overall performance.

See http://www.karaszi.com/SQLServer/info_dont_shrink.asp for more
information.

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis

.



Relevant Pages

  • Re: Shrinking a logfile -
    ... think it's worth highlighting a bit more - shrinking database files ... if for whatever reason a file has grown to way more than its ... reason and aso know it will probably happen again, then SQL Server ... so it will hurt performance. ...
    (microsoft.public.sqlserver.setup)
  • Re: TRIGGER NEEDED SHOWING CREDIT CARD AUTH
    ... Hugo - Don't rightly know if a view would work for us because each table is ... separate database and instance of SQL Server. ... What this trigger would do is write "Y" to the credit card authorized field ...
    (microsoft.public.sqlserver.programming)
  • Re: Select Expression Operators
    ... Thanks Hugo. ... >>Sorry for what must seem like a dumb question, but I was wondering why I keep ... > SQL Server doesn't offer the same set of functions as Access and it ... > ISNULL will return the second expression if the first is NULL. ...
    (microsoft.public.sqlserver.mseq)
  • Re: Shrink transaction log after truncate table?
    ... here are my opinions on shrinking: ... What about the "Auto Shrink" option for a sql server database, would that be good, or just a waste ... > I'm looking for a good way to shrink/compress this transaction log after I ...
    (microsoft.public.sqlserver.programming)
  • Re: Keeping User From Deleting Table Records
    ... Hugo - Thanks and will take a look at that but may be a day or two - I'm ... - I have created a new Windows user login in Security/Logins that is ... - I login to the network as domain/user and create an odbc system dsn entry ... SQL Server to obtain default settings for the additional configuration ...
    (microsoft.public.sqlserver.security)