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  | 
                             
                            
                                    | 
                                         vna_mhars 
                                        Starting Member 
                                         
                                        
                                        37 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2013-01-09 : 22:48:11
                                            
  | 
                                             
                                            
                                            | Hi,  I have a database size 125GB of .mdf, I transferred some records  base from the retention period of records. so from year 2002 - 2007 was transferred to a new database and then deleted to original database. After the deletion my database size still the same. .mdf still 125GB. My question is, how to reduce the size of .mdf data since I deleted lots of records. I'm using SQL2008Thanks, vnavamodente | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     visakh16 
                                    Very Important crosS Applying yaK Herder 
                                     
                                    
                                    52326 Posts  | 
                                    
                                      
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     vna_mhars 
                                    Starting Member 
                                     
                                    
                                    37 Posts  | 
                                    
                                      
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     sodeep 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    7174 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2013-01-11 : 14:20:31
                                          
  | 
                                         
                                        
                                          | Yes it will cause huge fragmentation for indexes and pages.Check this out from Paul Randal for alternative:http://www.sqlskills.com/blogs/paul/why-you-should-not-shrink-your-data-files/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     srimami 
                                    Posting Yak  Master 
                                     
                                    
                                    160 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2013-01-15 : 08:50:00
                                          
  | 
                                         
                                        
                                          | The other solution would be Alter Table with rebuild option, I haven't tried it for un-allocated space though but definitely works for unused space.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |