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  | 
                             
                            
                                    | 
                                         kh_wpl 
                                        Starting Member 
                                         
                                        
                                        7 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2012-01-09 : 02:57:31
                                            
  | 
                                             
                                            
                                            | HelloI have sql database with 65 table.one of the table name is tbl_part with 12000 records data.all of table works correctly. but when work with tbl_part  (select, update ...) sql server raise time out error . for repair this problem i have restart sql server service from control panel then tbl_part works well.but after many hour tbl_part again corrupted and sql server raise time out error for them (however other tables works without any problem)is there any way to make it correct. | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     NeilG 
                                    Aged Yak Warrior 
                                     
                                    
                                    530 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-01-09 : 04:08:38
                                          
  | 
                                         
                                        
                                          | It doesn't sound like you have a corrupt table with a time out error, could you post the error message what your receiving from SQL Server  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     GilaMonster 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    4507 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-01-09 : 04:50:56
                                          
  | 
                                         
                                        
                                          | That's not corruption. That's a poor performing query.--Gail ShawSQL Server MVP  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     kh_wpl 
                                    Starting Member 
                                     
                                    
                                    7 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-01-11 : 03:26:49
                                          
  | 
                                         
                                        
                                          | Select * from Partit does take 20 minutes but doesn't complete  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     Kristen 
                                    Test 
                                     
                                    
                                    22859 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-01-11 : 04:08:48
                                          
  | 
                                         
                                        
                                          Its being BLOCKed, or possible there is a corruption in the database.If you Stop/Start SQL Service and the query works then it was being blocked.  You could also use sp_Who or SSMS to check for blocking if you are familiar with that?To check for corruption:USE MyDatbaseGODBCC CHECKDB WITH NO_INFOMSGS	-- , ALL_ERRORMSGS  or useDBCC CHECKDB WITH NO_INFOMSGS, EXTENDED_LOGICAL_CHECKS, DATA_PURITY	-- , ALL_ERRORMSGS  if you have SQL 2008You ought to check for corruption periodically (say, once a week) in any case, just so if it happens you know relatively soon after it happens, and not months-later when it will be much harder to correct / re-key corrupted / missing data.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     GilaMonster 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    4507 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-01-11 : 06:04:14
                                          
  | 
                                         
                                        
                                          | Kristen, this is almost certainly not database corruption (corruption causes high severity errors, not timeouts)99% chance this is blocking, maybe forwarding records, possibly fragmentation (but neither of those would go away after a restart). Corruption is just about the last thing I would think of when dealing with just timeouts and no other errors.--Gail ShawSQL Server MVP  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     Kristen 
                                    Test 
                                     
                                    
                                    22859 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-01-11 : 06:08:12
                                          
  | 
                                         
                                        
                                          quote: Originally posted by GilaMonster Kristen, this is almost certainly not database corruption (corruption causes high severity errors, not timeouts)
  Yeah, I agree, but its a bit more than a timeout, the task is never completing.  Sounds very similar to a failure I had a while back with a memory fault that caused SQL to just "stall" rather than report an errorBut easy enough to check for blocking of course - if the O/P is not familiar with sp_Who / SSMS then just restarting SQL Service will do the trick   and then the query can be retried immediately after the restart  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     X002548 
                                    Not Just a Number 
                                     
                                    
                                    15586 Posts  | 
                                    
                                      
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |   
     
     
            
              
	     |  
		
			
     
          
		 |