Saturday, February 11, 2012

a good way to shrink log file when transactions running?

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?
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@.microsoft.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?
|||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

No comments:

Post a Comment