SQL SERVER – FIX: Error: 1807 Could not obtain exclusive lock on database ‘model’. Retry the operation later.

While working on query optimization project, I encountered following error. Error 1807 looked scary, but the fix turned out to be quick and easy. The message says it could not obtain exclusive lock on database ‘model’.

SQL SERVER - FIX: Error: 1807 Could not obtain exclusive lock on database 'model'. Retry the operation later.

Msg 1807, Level 16, State 3, Line 1
Could not obtain exclusive lock on database ‘model’. Retry the operation later.
Msg 1802, Level 16, State 4, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

The resolution of above problem is quick and easy.

Fix/Workaround/Solution:

Disconnect and Reconnect your SQL Server Management Studio’s session. Your error will go away.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.

SQL Error Messages, SQL Scripts
Previous Post
SQL SERVER – Fix Error 1949, Level 16: Cannot create index on view. The function yields nondeterministic results
Next Post
SQL SERVER – Find Location of Data File Using T-SQL

Related Posts

24 Comments. Leave new

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.