title: Database is not accessible after 'taking it offline' process failed
body: <p>I was trying to detach the DB when it gave me an error that it is currently in use. Hence, I tried to take my DB offline but it failed saying </p>
  
  <pre><code>'an exception occured while executing a transact SQL statement or batch 
  
  -&gt; ALTER DATABASE failed because a lock could not be placed on database 'myDB'. Try again later.
      ALTER DATABASE statement failed. (Microsoft SQL Server, Error: 5061)'
  </code></pre>
  
  <p>Now if I try and access the DB it says it is not accessible. What can I do to make my DB accessible again?</p>
  
  <p>My aim was to detach the DB, relocate its secondary database file to a new drive and reattach it (simply because of space issues).</p>