title: How to delete database, error 5030 database can't be locked
body: <p>I am trying to delete an existing database in SQL Server 2005.  My first attempt produced the following error:</p>
  
  <blockquote>
    <p>5030: The database could not be exclusively
    locked to perform the operation.</p>
  </blockquote>
  
  <p>I have since killed all processes that are accessing the database.  I have also removed the replication subscription that it had previously been involved in.</p>
  
  <p>Any thoughts on what else that could be holding the lock on it besides SQL Server processes and replication?</p>
  
  <p><strong>Update</strong>: I restarted the server, and that fixed it.  I was trying to avoid that, since this is a production server, but hey what can you do?</p>