title: SQL Server backup restore issues?
body: <p>Ok, so I'm having a bit of an issue - I executed some code on my SQL Server and didn't realize that I didn't have the WHERE bit selected. Of course, when I saw the <code>"608 rows affected"</code> rather than <code>"1 row affected"</code>, I freaked a bit. </p>
  
  <p>Luckily, I have a backup saved, but for some reason, I'm getting a couple issues. Now, I took the server down, so I know that it's not being used by anyone, but it's giving me the following error</p>
  
  <blockquote>
    <p>"Restore failed for Server 'myserver'.</p>
    
    <p>System.Data.sqlclient.sqlerror: Exclusive access could not be obtained
    because the database is in use. (Microsoft.SqlServer.Smo)"</p>
  </blockquote>
  
  <p>I saw something that stated I should be using </p>
  
  <pre><code>Alter Database Databases
  SET SINGLE_USER WITH ROLLBACK IMMEDIATE
  
  RESTORE DATABASE PRODUCT
  FROM DISK = ''
  </code></pre>
  
  <p>but I'm having three reservations about this code. First, I'm completely unsure of how to turn multi_user back on. Second, I don't know where the program stores its backups. Third, this SQL is a bit above my head - I'm relatively new to the language, honestly, so I'm not sure how this will affect things.</p>
  
  <p>Anyone have any answers to my troubles?</p>