Update wizard not responding
Setting the compatibility level of the database to 110 has worked for me.
To check the compatibility level, run this script:
select compatibility_level from sys.databases where name = '<YOUR_DB_NAME>'
To set the compatibility level, use this script:
alter database <YOUR_DB_NAME> set compatibility_level = 110
Today, my coworkers and I left the wizard alone and let it update for ~10 minutes. While it took quite a while, it did complete. This is the best solution for us (for now), since we are unable to set the compatibility level of our DB without the proper permissions.
Changing SQL Server compatibility level or trace-flag 9481 is no option for me.
I gave EntityFramework Reverse POCO Generator a try.
https://visualstudiogallery.msdn.microsoft.com/ee4fcff9-0c4c-4179-afd9-7a2fb90f5838
It's a configurable generic T4 Template and works very well till now.
It even has an Option for the mentioned trace-flag
IncludeQueryTraceOn9481Flag = false; // If SqlServer 2014 appears frozen / take a long time when this file is saved, try setting this to true (you will also need elevated privileges).
Ironically it works fast even if the flag is off :) Seems like they are using different queries for metadata compared to the VS EF Designer.
Running the following on the DB worked for me:
ALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION=ON
Then, after the update, setting it back using:
ALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION=OFF
This is per this thread over at the EF6 repo on Github.
It should be noted that the following is also reported in that thread to work though I have not tested it because the former worked so well for me:
UPDATE STATISTICS sys.syscolpars
UPDATE STATISTICS sys.sysschobjs
UPDATE STATISTICS sys.syssingleobjrefs
UPDATE STATISTICS sys.sysiscols
They also punted this back to the SQL Server team and opened up this issue over at Microsoft Connect.