Analyzing Database Schema Takes Hours
Solution 1:
- Go to Project Settings
- click on the Database Settings button
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.
Solution 2:
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.
Solution 3:
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
Solution 4:
According to the release notes of the March 2013 update of SQL Server Data-Tier Application Framework, this bug should be fixed now.
Database Project in Visual Studio hangs on “Analyzing Database Schema…” This release addresses an issue that can occur when loading or building large Database Projects. In some cases, the operation would never finish. This is a functional fix, not a performance enhancement - even with the fix, the time to complete this operation depends on the size and complexity of your project
http://www.microsoft.com/en-us/download/details.aspx?id=36842
Solution 5:
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;
- Close VS
- Make a backup copy of the solution file (*.sln)
- Edit the solution file, removing the database projects Restart VS. I found that I was able to now open the solution and build
- Close the solution and replace your edited solution file with the original backup
- 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.
Post a Comment for "Analyzing Database Schema Takes Hours"