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 2008 Forums
 SQL Server Administration (2008)
 Truncating Transcation log file

Author  Topic 

ppatel112
Starting Member

35 Posts

Posted - 2012-07-05 : 22:12:41
Hi there,

i need some advise on truncating a big transaction log file.

it is a production database.
CRMEx_log Initial Size is set to 365,972MB, which is 365GB.
autogrowth is set to 10 percent

CRMEx_log is 374GB, we need to shrink it, not sure why it is so huge??

the hard disk in running out of space
please advise on what procedure to be followed to fix it.

regards,
parth

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-05 : 22:45:40
see what has caused log to grow in size . is it some uncommited transaction? check trancount

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-07-05 : 23:28:19
The two most important questions are:

1. What is your recovery model set to?
2. If it's not SIMPLE recovery model, then how often are you backing up your transaction log?

Also, how big is the MDF file? And, how big is the largest index? The largest index question only matters if you are doing index rebuilds.

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

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-07-05 : 23:29:56
Also, you should not be using a percentage for autogrowth. As that's a dynamic number, and as the file gets larger, that autogrow becomes more and more painful. You can't zero initialize it, so that process takes a bit. We use 512MB typically for the increment, but it depends on the database size. You want to avoid too many VLFs too.

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

Subscribe to my blog
Go to Top of Page
   

- Advertisement -