Analyzing database schema takes hours

前端 未结 10 1726
星月不相逢
星月不相逢 2021-02-01 15:21

Using a new SQL2005 database project in VS2010. I did import objects and settings, and built the project. It seems to be stuck at \'Analyzing database schema. Your database pro

相关标签:
10条回答
  • 2021-02-01 15:25

    This question is a bit old but this comes up first when you search for a solution, so I will add my 2 cents.

    If you still have this problem after installing the fix, try this, this worked for me:

    Open the database project folder in Windows Explorer. Delete the following files/folders:

    • in the rootdirectory, the .dbmdl file
    • the content of the "sql" directory
    • the obj directory.

    Close and re-open Visual Studio. Click Build.

    The project built fine for me.

    0 讨论(0)
  • 2021-02-01 15:27
    1. Go to Project Settings
    2. click on the Database Settings button
    3. Under the Operational tab

      3.1 uncheck Auto create statictics and

      3.2 Uncheck Auto update statistics checkbox.

    This will reduce your numbers of operations by about 90% and the analysis should finish instantly.

    0 讨论(0)
  • 2021-02-01 15:29

    Old question, but looks like still not solved.

    My dacpac has over 10000 objects and the build got stuck for over 40 mins on the Validating stage. Tried the options suggested in other comments and answers but no joy.

    Apparently, the Validation of the model also does a "case search". I unchecked the option and build time dropped to under a minute.

    Validate Casing on identifies in SQL Server project in VS2017

    0 讨论(0)
  • 2021-02-01 15:31

    Analyzing database objects (in VS 2015 Update 3) was taking more time than usual, and was occurring after repeated attempts at restarting VS. I suspect things had hung when the number of objects hadn't changed for 15 minutes. For me, the following got me going again;

    1. Close VS
    2. Make a backup copy of the solution file (*.sln)
    3. Edit the solution file, removing the database projects Restart VS. I found that I was able to now open the solution and build
    4. Close the solution and replace your edited solution file with the original backup
    5. Restart VS. I found that the solution opened this time, and I was able to build successfully

    Hopefully this helps someone in the same spot that I was in.

    0 讨论(0)
  • 2021-02-01 15:31

    I even had this issue with Visual Studio 2019 enterprise version 16.3.2 I solved it by just deleting my local database project and fetched the latest version of the project recursively from my DevOps code repository

    0 讨论(0)
  • 2021-02-01 15:32

    Here is a possible fix. (I have had to recreate the schema on SQL databases before, due to speed issues) but this article might be worth looking at. - sounds closer to your issue. Can't open my dbml file in Visual Studio 2010 anymore

    0 讨论(0)
提交回复
热议问题