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.

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.

Reference: Pinal Dave (https://blog.sqlauthority.com)

SQL Error Messages, SQL Scripts
Previous Post
SQLAuthority News – 1200th Post – An Important Milestone
Next Post
SQL SERVER – Find Location of Data File Using T-SQL

Related Posts

24 Comments. Leave new

Leave a Reply