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. 
    
        
            
                
                    
                        
                            
                                | Author | 
                                
                                 Topic  | 
                             
                            
                                    | 
                                         gangadhara.ms 
                                        Aged Yak Warrior 
                                         
                                        
                                        549 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2012-04-11 : 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 MSSQL Developer and DBA | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     robvolk 
                                    Most Valuable Yak 
                                     
                                    
                                    15732 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-04-11 : 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 
                                    Aged Yak Warrior 
                                     
                                    
                                    549 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-04-12 : 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 MSSQL Developer and DBA  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     robvolk 
                                    Most Valuable Yak 
                                     
                                    
                                    15732 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-04-12 : 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 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    2886 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-04-12 : 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 - 2012-04-16 : 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.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |   
     
     
            
              
	     |  
		
			
     
          
		 |