SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 LDF is growing heavily
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gangadhara.ms
Constraint Violating Yak Guru

India
497 Posts

Posted - 04/11/2012 :  21:53:00  Show Profile  Visit gangadhara.ms's Homepage  Reply with Quote
Hi All,

We have a database with 30 GB of MDF and 33 GB LDF,and the recovery model is SIMPLE,every day we have differential backup and sunday full backup.

Even after truncating and shrinking the log file,the ldf file is keep on growing,

How to restrict the size of the LDF file.



Thanks,
Gangadhara MS
SQL Developer and DBA

robvolk
Most Valuable Yak

USA
15559 Posts

Posted - 04/11/2012 :  22:14:47  Show Profile  Visit robvolk's Homepage  Reply with Quote
First, stop shrinking it. If it grows to 33 GB that means there are single transactions that generate that much log. Are you doing large data imports? Are you doing updates on entire tables?
Go to Top of Page

gangadhara.ms
Constraint Violating Yak Guru

India
497 Posts

Posted - 04/12/2012 :  00:38:13  Show Profile  Visit gangadhara.ms's Homepage  Reply with Quote
yes as its datastage DB we are doing lot of data imports to this DB ..!!! in that case how do we do restrict log file growth.

Thanks,
Gangadhara MS
SQL Developer and DBA
Go to Top of Page

robvolk
Most Valuable Yak

USA
15559 Posts

Posted - 04/12/2012 :  06:46:59  Show Profile  Visit robvolk's Homepage  Reply with Quote
You've already got it in Simple recovery so that will help. Best thing to do is leave it at its current size, perhaps even size it up an extra 5 GB or so. The only way to prevent it from growing is to do your imports in batches. For example, if you have 100 million rows to import, break it up into 10 million rows at a time.
Go to Top of Page

jezemine
Flowing Fount of Yak Knowledge

USA
2871 Posts

Posted - 04/12/2012 :  12:14:28  Show Profile  Visit jezemine's Homepage  Reply with Quote
right. use -b switch in bcp.exe, or use BATCHSIZE if importing using BULK INSERT command.


elsasoft.org
Go to Top of Page

Dj463
Starting Member

11 Posts

Posted - 04/16/2012 :  17:26:54  Show Profile  Reply with Quote
Are you talking about 'xmetadb' for datastage. The datastage has default setting of logging all the changes to this database, change this setting to log the changes to flat file.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000