| Author |
Topic  |
|
|
gangadhara.ms
Constraint Violating Yak Guru
India
497 Posts |
Posted - 04/11/2012 : 21:53:00
|
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
|
| 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? |
 |
|
|
gangadhara.ms
Constraint Violating Yak Guru
India
497 Posts |
Posted - 04/12/2012 : 00:38:13
|
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 |
 |
|
|
robvolk
Most Valuable Yak
USA
15559 Posts |
Posted - 04/12/2012 : 06:46:59
|
| 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. |
 |
|
|
jezemine
Flowing Fount of Yak Knowledge
USA
2871 Posts |
Posted - 04/12/2012 : 12:14:28
|
right. use -b switch in bcp.exe, or use BATCHSIZE if importing using BULK INSERT command.
elsasoft.org |
 |
|
|
Dj463
Starting Member
11 Posts |
Posted - 04/16/2012 : 17:26:54
|
| 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. |
 |
|
| |
Topic  |
|