Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 steps to reduce the size

Author  Topic 

carumuga
Posting Yak Master

174 Posts

Posted - 2010-03-08 : 05:48:07
Hi,

what are the steps to be followed to reduce the size of the log file.

Backup log dbname with no_log
DBCC SHRINKFILE (FileName, <TargetSize>)

1. Is this statement sufficient to truncate and shrink the log to
recover the space.

2. In SHRINKFILE command, should we use the option NOTRUNCATE or
TRUNCATEONLY. Pls. which one the preferred way of using it.

3. What is the target size to be specified, say for instance, i have 10 GB of log size and 5 GB of free space available after truncating the log. What should be my ideal targetsize to be given in the command or not to specify.

Thanks in advance.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-09 : 01:11:55
What recovery model are you using? If it's not SIMPLE, then how often are you performing transaction log backups?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -