|
Posted by Erland Sommarskog on 10/02/03 11:48
DataPro (datapro01@yahoo.com) writes:
> Here is my situation. An application upgrade occurred over the weekend
> which made several database changes. Now the active log is at 12 Gigs.
> Taking a full database backup and a log backup is not truncating the
> log. Issuing a backup log truncate only has no effect.
It has, but that will not shrink the log file. (Unless autoshrink is in
effect, but you don't want that.) Only give you a lot of free space in
the file.
Note that TRUNCATE_ONLY invalidates the transaction log, so you need to
take a full backup after this operation.
> Any thoughts on how I can reduce the size of this log? From what I've
> read about shrinkfile it doesn't appear to be relevant here.
DBCC SHRINKFILE is indeed your guy. Be sure to set a target size when
you run it, so you don't make the log too small. In that case, it will
have to grow again, and that will only take performance from the system.
And the file may become fragmented on disk.
For things like an application upgrade, the best strategy may be to set
the recovery mode to simple, and set back to full recovery when it the
upgrade is done. Again, you need to take a full backup in this situation.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|