Import bacpac fails with "does not contain QueryStoreStaleQueryThreshold" Import bacpac fails with "does not contain QueryStoreStaleQueryThreshold" azure azure

Import bacpac fails with "does not contain QueryStoreStaleQueryThreshold"


Let me try and help here. We've seen other users report this when they have also enabled the new Index Advisor feature. There is a workaround along with a detailed description of the issue here. https://social.msdn.microsoft.com/Forums/azure/en-US/ac9deff4-e0fe-4de0-98ec-9059e917e0bc/database-export-bacpacs-can-no-longer-be-imported-sqldatabaseoptions-querystoredesiredstate?forum=ssdsgetstarted


This did the trick for me..

ALTER DATABASE [Database-Name] SET QUERY_STORE = on;GOALTER DATABASE [Database-Name]SET QUERY_STORE (    OPERATION_MODE = READ_WRITE,    CLEANUP_POLICY =     (STALE_QUERY_THRESHOLD_DAYS = 367));GOALTER DATABASE [Database-Name] SET QUERY_STORE = off;GO

I made a new bacpac and imported that one and it worked..


I experienced the same problem with Management Studio 2016 CTP 2.3 (August preview). I have updated to Management Studio 2016 CTP 3.0 (October preview) and the .bacpac import works as a charm.