| Author | 
                                
                                 Topic  | 
                            
                            
                                    | 
                                         Dhudson29 
                                        Starting Member 
                                         
                                        
                                        23 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2014-12-04 : 13:13:09
                                            
  | 
                                             
                                            
                                            | I have tried everything to put the server in Single User Mode so I can restore the master database.  1.  Tried the -m Option in Configuration Manager and restarted service.2.  Tried command line using sqlsevr.exe3.  Tried sqlcmd -s <servername>. - It connects4.  Used Net Start MSSQL$<Servername> - It starts service.Each time I issue the RESTORE DATABASE master command, it tells me the server is not in Single-User Mode.  Please help?? | 
                                             
                                         
                                     | 
                            
       
                            
                       
                          
                            
                                    | 
                                     tkizer 
                                    Almighty SQL Goddess 
                                     
                                    
                                    38200 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2014-12-04 : 13:40:52
                                          
  | 
                                         
                                        
                                          | Are you issuing the command through sqlcmd? Or via SSMS? SSMS opens multiple sessions if you have the left pane and a query window open.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     Dhudson29 
                                    Starting Member 
                                     
                                    
                                    23 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2014-12-04 : 14:05:07
                                          
  | 
                                         
                                        
                                          | I am issuing the command through sqlcmd.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     tkizer 
                                    Almighty SQL Goddess 
                                     
                                    
                                    38200 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2014-12-04 : 14:09:22
                                          
  | 
                                         
                                        
                                          | Is the SQL Agent service stopped? It'll use up the single connection.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     tkizer 
                                    Almighty SQL Goddess 
                                     
                                    
                                    38200 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2014-12-04 : 14:11:45
                                          
  | 
                                         
                                        
                                          | Not sure if this is needed, but you might want to try the -f option and then connect via the DAC (-A option in sqlcmd).My recollection is that I used -m and -c last time I needed to start in single-user mode. I don't remember what the -c option is though (I'm in a meeting otherwise I'd google it).Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     Dhudson29 
                                    Starting Member 
                                     
                                    
                                    23 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2014-12-04 : 14:23:07
                                          
  | 
                                         
                                        
                                          | Yes the SQL Server Agent is Stopped.  When I try sqlservr.exe -m -s <servername> I get the following message:Error: 17050, Severity: 16, State: 1.  initerrlog:  Could not open error log file, because it is being used by another process.  That's crazy because this is a new instance, and the SQL Agent service is stopped.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     tkizer 
                                    Almighty SQL Goddess 
                                     
                                    
                                    38200 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2014-12-04 : 14:26:04
                                          
  | 
                                         
                                        
                                          | You can use Process Explorer to see what is using it. I suspect your anti-virus software or similar is the culprit.Make sure the SQL Server service is stopped when running sqlservr.exe.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     Dhudson29 
                                    Starting Member 
                                     
                                    
                                    23 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2014-12-04 : 14:26:16
                                          
  | 
                                         
                                        
                                          | By the way, there are 2 Instances on this server, but I have pathed to the named instance I want to put in single user mode.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     tkizer 
                                    Almighty SQL Goddess 
                                     
                                    
                                    38200 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2014-12-04 : 14:34:28
                                          
  | 
                                         
                                        
                                          | Please see my last reply as we were posting at the same time.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     Dhudson29 
                                    Starting Member 
                                     
                                    
                                    23 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2014-12-04 : 15:53:14
                                          
  | 
                                         
                                        
                                          | OK.  I did not stop the SQL Server Service, only the SQL Agent Service.  Stopping the SQL Server Service resolved the problem.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                  
                            
                       
                          
                            
                                    | 
                                     tkizer 
                                    Almighty SQL Goddess 
                                     
                                    
                                    38200 Posts  | 
                                    
                                      
                                     | 
                                  
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 |