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 (http://blog.SQLAuthority.com)










Just a few questions please:
1) What causes this issue?
1.a) Is the problem with the client or the server?
1.b) Does this only exist in “Create Database” commands?
2) What Version of SQL Server does this affect?
2.a) Specifically, what build we you using when you got the error
2.b) Does this exist in SQL 2005 and Up?
2.c) Is it isolated to 32 or 64 bit?
3) Is there a CU or SP Fix to this yet?
Thank you.
thanks !!
did not fix the problem with sql server 2008 express
Thanks…works like charm!!!!
did not fix the problem with sql server 2000 here either!
does not fix the problem in SQL 2008 on a subscription of create database. MODEL is set to SHARE also.
works for 2008 R2