Question : Unable able to rename database in sql server

hello experts,

i'm unable to rename a database.  i get the following: "Unable to rename {database}"  "The database could not be exclusively locked to perform this operation"

how do I make sure nobody is accessing it? .. and kill their process?

the activity monitory does not show any jobs running, and there are no blocks or locks on any of the tables.

thanks

Answer : Unable able to rename database in sql server

First of all, change the current connection.  You yourself must be out of the db, e.g. use tempdb.

To see who is on:   exec sp_who2

Look through the list of users using the db and if you need to kill any connection, kill <spid>, where spid is listed in the result of sp_who2

kill 102
kill 89
etc
Random Solutions  
 
programming4us programming4us