1 Replies - 3397 Views - Last Post: 11 September 2010 - 02:02 AM Rate Topic: -----

#1 Elekes Istvan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 37
  • Joined: 07-March 09

COULD NOT OBTAIN EXCLUSIVE LOCK ON DATABASE ’MODEL’

Posted 11 September 2010 - 01:20 AM

Hi,
I am really stuck with a problem
I try to create one database programmatically using C# in Visual Studio 2008 and local SQL SERVER 2008. The following error obtains:

Could not obtain exclusive lock on database ’model’, try later…

No other users in and no other application run.
Many thanks in advance.
Is This A Good Question/Topic? 0
  • +

Replies To: COULD NOT OBTAIN EXCLUSIVE LOCK ON DATABASE ’MODEL’

#2 Ionut  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 385
  • View blog
  • Posts: 1,057
  • Joined: 17-July 10

Re: COULD NOT OBTAIN EXCLUSIVE LOCK ON DATABASE ’MODEL’

Posted 11 September 2010 - 02:02 AM

Without any scripts or code, I will paste here the solutions I found out by googling.
http://decipherinfos...database-model/
http://www.sqlteam.c...?TOPIC_ID=74197

And be sure that your script/query uses master database
USE master
GO
CREATE DATABASE TestDB
GO




Ionut

This post has been edited by Ionut: 11 September 2010 - 02:03 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1