Home > Archive > MS SQL Server > March 2006 > a good way to shrink log file when transactions running?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author a good way to shrink log file when transactions running?
bluesky

2006-03-30, 3:23 am

I am working in a large company where thousands new records will be added
into sql server 2000. Our proudcts are running for 24X7. Transactions could
be doing at anytime. So it is impossible to ask users to log off the system
when to shrink the log file.
Is there a good way to do a shrinking job no matter what transactions are
running?
Andrew J. Kelly

2006-03-30, 3:23 am

Why are you shrinking it in the first place? If it grew that big before it
probably will again. See this:

http://www.karaszi.com/SQLServer/info_dont_shrink.asp

And no shrinking does not require you to log off the users.

--
Andrew J. Kelly SQL MVP


"bluesky" <bluesky@discussions.microsoft.com> wrote in message
news:F4DFA538-19E6-4457-AE82- F4CA856C68B7@microso
ft.com...
>I am working in a large company where thousands new records will be added
> into sql server 2000. Our proudcts are running for 24X7. Transactions
> could
> be doing at anytime. So it is impossible to ask users to log off the
> system
> when to shrink the log file.
> Is there a good way to do a shrinking job no matter what transactions are
> running?



MSLam

2006-03-30, 7:23 am

It is right that it does not require you to log off the users.

>From the BOL for DBCC SHRINKFILE (because you only want to shrink the

log file)

The database being shrunk does not have to be in single-user mode;
other users can be working in the database when the file is shrunk. You
do not have to run SQL Server in single-user mode to shrink the system
databases.

It will only shrink the file as much as it can (despite you may put a
target there) and do not touch those that are currently in use.


Mel

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com