Ask a questionAsk a question
 

Answer.dbmdl could not be created

  • Wednesday, June 24, 2009 1:32 PMhemilv Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I am unable to create a new 2008 Database Project. I installed GDR2 since SQL Server 2008 is our standard. But each time I try to create a new project I get this message

    .dbmdl could not be created...

    I'm using Visual Studio Team Suite.

     

Answers

  • Thursday, June 25, 2009 1:50 PMhemilv Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    This is the log output

    [Pid=5232;Tid=1;Time=09:47:18]: Verbose: 1: TraceToDebugOutput=False
    [Pid=5232;Tid=1;Time=09:47:18]: Verbose: 1: TraceToLogFile=True
    [Pid=5232;Tid=1;Time=09:47:18]: Verbose: 1: LogDir=C:\Logs
    [Pid=5232;Tid=1;Time=09:47:18]: Verbose: 1: TraceSwitch=Verbose
    [Pid=5232;Tid=1;Time=09:47:18]: Verbose: 1: UniqueLogFile=True
    [Pid=5232;Tid=1;Time=09:47:18]: Verbose: 1: DisplayCallStack=False
    [Pid=5232;Tid=1;Time=09:47:18]: Information: 64: RegistryManager.DatabaseLockTimeout: 30 seconds.
    [Pid=5232;Tid=1;Time=09:47:18]: Information: 64: RegistryManager.DatabaseQueryTimeout: 60 seconds.
    [Pid=5232;Tid=1;Time=09:47:19]: Information: 64: RegistryManager.DatabaseLongRunningQueryTimeout: 0 seconds.
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 64: Entering ExtensionTypeLoader.LoadTypes().
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 4: Entering Initialize() of: Microsoft.VisualStudio.Data.Schema.Project.Common.UI.DataPackage
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 4: Entering DataPackage.OleComponentManager (getter).
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 8: Entering SchemaCompareEditorFactory.SchemaCompareEditorFactory().
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 4: Entering DataPackage.OleComponentManager (getter).
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 16384: DatabaseProjectNodeFactory.UpgradeArtifactRefsToRemoveAbsPath(): Checking for absolute artifact references
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 16384: DatabaseProjectNodeFactory.UpgradeArtifactRefsToRemoveAbsPath(): returning...
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 16384: DatabaseProjectNode.ProcessAfterBuildProjectEstablished(): Getting the DSP
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 16384: DatabaseProjectNode.ProcessAfterBuildProjectEstablished(): Creating the extension manager
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 16384: DatabaseProjectNode.ProcessAfterBuildProjectEstablished(): Creating the error manager
    [Pid=5232;Tid=1;Time=09:47:20]: Information: 16384: In DatabaseProjectNode.TryAttach()
    [Pid=5232;Tid=1;Time=09:47:20]: Information: 16384: DatabaseProjectNode.TryAttach(): didn't deserialize...cleaning up
    [Pid=5232;Tid=1;Time=09:47:20]: Verbose: 16384: Reload(): Create the initial schema manager
    [Pid=5232;Tid=1;Time=09:47:20]: Verbose: 16384: In DatabaseProjectNode.RecreateModel()
    [Pid=5232;Tid=1;Time=09:47:20]: Verbose: 16384: DatabaseProjectNode.RecreateModel(): Creating the task host
    [Pid=5232;Tid=1;Time=09:47:20]: Verbose: 16384: SqlTaskHost.EnsurePropertyFileIsInSync() loading catalog C:\Develop\dotNET R&D\Database7\Database7\Properties\Database.sqlsettings
    [Pid=5232;Tid=1;Time=09:47:20]: Error: 16384: Exception in DatabaseProjectNode.RecreateModel: DataSchemaModel is null indicating a file lock problem
    [Pid=5232;Tid=1;Time=09:47:20]: Warning: 64: TeamSystemDataException.TraceException(Exception): System.InvalidOperationException: The file ‘C:\Develop\dotNET R&D\Database7\Database7\Database7.dbmdl’ could not be created. If that file exists, it might be locked by another application.
    [Pid=5232;Tid=1;Time=09:47:20]: Verbose: 16384: Entering DatabaseProjectNode.Close(Exception,bool).

All Replies

  • Wednesday, June 24, 2009 3:05 PMGert DrapersMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Make sure that the .dbmdl file inside your project directory is not read only and the ACLs on the file permit access, if you are sharing the project directory with an other user, the dbmdl file might have been created with the ownership ACL from an other user, which is why you should not share project directories. If that is the case try deleting it, it will get recreated on project open. dbmdl files are the model cache.


    GertD @ www.DBProj.com
  • Wednesday, June 24, 2009 5:49 PMhemilv Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I'm creating a new project so the file does not exist yet and I'm not sharing the project directory
  • Wednesday, June 24, 2009 5:50 PMGert DrapersMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Then the only reason I know why this would fail is because your TEMP location does not have enough free space.

    GertD @ www.DBProj.com
  • Wednesday, June 24, 2009 6:04 PMhemilv Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Plenty of room on my hard drive only trying to use it with SQL Server 2008 and the Microsoft® Visual Studio Team System 2008 Database Edition GDR R2 added to my Visual Studio 2008 Team System Team Suite Edition.

    I do not have sql server 2005 installed in any shape or form on my workstation just SQL Server 2008 Dev.

    I have tried reinstalling several times with the same results.
  • Wednesday, June 24, 2009 7:09 PMGert DrapersMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    You can have plenty of space on the disk, does not mean your temp location has or is accesible, what happens when you do:

    DIR %TMP%

    and

    DIR %TEMP%

    Only other suggestion is to turn on tracing using http://cid-526eb9977609d51e.skydrive.live.com/self.aspx/DBProj.com/Tools/Tracing/Tracing.zip 
    It will tell why it failed.


    GertD @ www.DBProj.com
  • Thursday, June 25, 2009 1:50 PMhemilv Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    This is the log output

    [Pid=5232;Tid=1;Time=09:47:18]: Verbose: 1: TraceToDebugOutput=False
    [Pid=5232;Tid=1;Time=09:47:18]: Verbose: 1: TraceToLogFile=True
    [Pid=5232;Tid=1;Time=09:47:18]: Verbose: 1: LogDir=C:\Logs
    [Pid=5232;Tid=1;Time=09:47:18]: Verbose: 1: TraceSwitch=Verbose
    [Pid=5232;Tid=1;Time=09:47:18]: Verbose: 1: UniqueLogFile=True
    [Pid=5232;Tid=1;Time=09:47:18]: Verbose: 1: DisplayCallStack=False
    [Pid=5232;Tid=1;Time=09:47:18]: Information: 64: RegistryManager.DatabaseLockTimeout: 30 seconds.
    [Pid=5232;Tid=1;Time=09:47:18]: Information: 64: RegistryManager.DatabaseQueryTimeout: 60 seconds.
    [Pid=5232;Tid=1;Time=09:47:19]: Information: 64: RegistryManager.DatabaseLongRunningQueryTimeout: 0 seconds.
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 64: Entering ExtensionTypeLoader.LoadTypes().
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 4: Entering Initialize() of: Microsoft.VisualStudio.Data.Schema.Project.Common.UI.DataPackage
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 4: Entering DataPackage.OleComponentManager (getter).
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 8: Entering SchemaCompareEditorFactory.SchemaCompareEditorFactory().
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 4: Entering DataPackage.OleComponentManager (getter).
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 16384: DatabaseProjectNodeFactory.UpgradeArtifactRefsToRemoveAbsPath(): Checking for absolute artifact references
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 16384: DatabaseProjectNodeFactory.UpgradeArtifactRefsToRemoveAbsPath(): returning...
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 16384: DatabaseProjectNode.ProcessAfterBuildProjectEstablished(): Getting the DSP
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 16384: DatabaseProjectNode.ProcessAfterBuildProjectEstablished(): Creating the extension manager
    [Pid=5232;Tid=1;Time=09:47:19]: Verbose: 16384: DatabaseProjectNode.ProcessAfterBuildProjectEstablished(): Creating the error manager
    [Pid=5232;Tid=1;Time=09:47:20]: Information: 16384: In DatabaseProjectNode.TryAttach()
    [Pid=5232;Tid=1;Time=09:47:20]: Information: 16384: DatabaseProjectNode.TryAttach(): didn't deserialize...cleaning up
    [Pid=5232;Tid=1;Time=09:47:20]: Verbose: 16384: Reload(): Create the initial schema manager
    [Pid=5232;Tid=1;Time=09:47:20]: Verbose: 16384: In DatabaseProjectNode.RecreateModel()
    [Pid=5232;Tid=1;Time=09:47:20]: Verbose: 16384: DatabaseProjectNode.RecreateModel(): Creating the task host
    [Pid=5232;Tid=1;Time=09:47:20]: Verbose: 16384: SqlTaskHost.EnsurePropertyFileIsInSync() loading catalog C:\Develop\dotNET R&D\Database7\Database7\Properties\Database.sqlsettings
    [Pid=5232;Tid=1;Time=09:47:20]: Error: 16384: Exception in DatabaseProjectNode.RecreateModel: DataSchemaModel is null indicating a file lock problem
    [Pid=5232;Tid=1;Time=09:47:20]: Warning: 64: TeamSystemDataException.TraceException(Exception): System.InvalidOperationException: The file ‘C:\Develop\dotNET R&D\Database7\Database7\Database7.dbmdl’ could not be created. If that file exists, it might be locked by another application.
    [Pid=5232;Tid=1;Time=09:47:20]: Verbose: 16384: Entering DatabaseProjectNode.Close(Exception,bool).
  • Thursday, June 25, 2009 3:23 PMGert DrapersMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Ah, this seans to indicate there is an other instance of Visual Studio that has the same project open, which is not allowed from the same location.
    You can only have a project open once from the same location, since the cache file is exclusively opened.

    GertD @ www.DBProj.com
  • Thursday, June 25, 2009 3:50 PMhemilv Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer

    The error occurs when I open NEW database project and I have no other instance os VS running.

    Actually the problem was with the SQL Server Compact database. I uninstalled SQL Server 2008 Dev and SQL Server Compact and reinstalled them from scratch and now it works perfectly.

    This log entry sent me in the right direction

    [Pid=5232;Tid=1;Time=09:47:20]: Information: 16384: DatabaseProjectNode.TryAttach(): didn't deserialize...cleaning up

    Thanks for the Log Tool it was a tremendous help.

    Thanks for all your time and assistance.
    nevilleb

    • Proposed As Answer byJill McClenahanMSFTThursday, June 25, 2009 7:29 PM
    • Unmarked As Answer byhemilv Thursday, June 25, 2009 4:28 PM
    • Marked As Answer byhemilv Thursday, June 25, 2009 4:18 PM
    •  
  • Friday, June 26, 2009 2:11 AMEstebanFG Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I had the same issue, and it turned out that my other team member had checked in the .dbmdl file into source control and when i got latest it was there.  This file seems to be unique per user.  As soon as I deleted it (from my hard drive and source control) then I was able to open the database project.
  • Wednesday, November 04, 2009 12:14 AMDavid Keaveny Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I had the same issue, and it turned out that my other team member had checked in the .dbmdl file into source control and when i got latest it was there.  This file seems to be unique per user.  As soon as I deleted it (from my hard drive and source control) then I was able to open the database project.

    This is the problem that I had. For good measure, they also checked in the Obj folder and the project's .user file, which should have been a big clue!