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  | 
                             
                            
                                    | 
                                         AskSQLTeam 
                                        Ask SQLTeam Question 
                                         
                                        
                                        0 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2004-03-16 : 08:18:58
                                            
  | 
                                             
                                            
                                            | miriarteen writes "Hello,I'm using MSDE and I want to execute a SQL Script in the commandline. Now I do it using osql.exe, but it's very slow. If I execute it in the query analizer it's very fast (1-2 minutes), but with the osql utility is very slow (30 minutes).I do it using this command line:"osql.exe -U sa /P -S Server -i Script.Sql  -o Result.txt -n -w 700"Thanks in advance." | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     derrickleggett 
                                    Pointy Haired Yak DBA 
                                     
                                    
                                    4184 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2004-03-16 : 09:15:47
                                          
  | 
                                         
                                        
                                          | Are you running osql from a client machine?  Remember that osql is a command-line utility and if it's ran on a client machine it can be slower due to slow network connectivity or a box running at 100%.  Try to run the osql command on the SQL Server and see if it runs faster.  My guess is that it will be quite a bit faster.Also, if you have a blank sa password you need to set it.  Hopefully, you are not doing this on a production machine with no sa password.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |