Thursday, October 31, 2013

The Database could not be exclusively locked to perform the operation (Microsoft SQL Server, Error: 5030)

Unable to rename .... (Object Explorer)
  Rename failed for Database ... (Microsoft.SqlServer.Smo)
    An exception occurred while executing a Transact-SQL statement batch. (Microsoft.SqlServer.ConnectionInfo)

      The Database could not be exclusively locked to perform the operation (Microsoft SQL Server, Error: 5030)

Most likly reason: open connections
Ursache: offene Verbindungen zur Datenbank

solution: kill all processes to the database (or let the users quit them) by right click on the server in ssms (Sql Server Management Studio), Activity Monitor, Processes: Filter Database and right Klick to kill all Processes

Lösung: beenden aller Verbindungen zur Datenbank - entweder durch die User oder als sysadmin mittels rechts Klick auf den Server im  ssms (Sql Server Management Studio), Activity Monitor auswählen, bei Processen nach der gewünschten Datenbank filtern und alle Processe durch recht click killen.

No comments: