Estou executando o SQL Server 2016 SP1 (13.0.4001) no Windows Server 2012 R2. Tenho a tabela abaixo.
CREATE TABLE [SubEx].[Ingredients](
[IngredientId] [int] IDENTITY(1,2) NOT NULL,
[IngredientName] [nvarchar](328) NOT NULL,
[IngredientShortDescription] [nvarchar](328) NOT NULL,
[PortionUOMTypeId] [smallint] NULL,
[WISRTypeId] [smallint] NOT NULL,
[WISRSubTypeId] [smallint] NULL,
[FlavorTypeId] [smallint] NULL,
[StatusTypeId] [smallint] NOT NULL,
[IsMandatory] [bit] NOT NULL,
[IsDownloaded] [bit] NOT NULL,
[CreatedDT] [datetime] NOT NULL,
[CreatedBy] [int] NOT NULL,
[LastUpdateDT] [datetime] NULL,
[LastUpdateBy] [int] NULL,
[Deleted] [bit] NOT NULL,
[DeletedDT] [datetime] NULL,
[DeletedBy] [int] NULL,
[CreatedUserName] [nvarchar](136) NOT NULL,
[UpdatedUserName] [nvarchar](136) NULL,
[DeletedUserName] [nvarchar](136) NULL,
[ValidFrom] [datetime2](2) GENERATED ALWAYS AS ROW START NOT NULL,
[ValidTo] [datetime2](2) GENERATED ALWAYS AS ROW END NOT NULL,
CONSTRAINT [PK_Ingredients_IngredientId] PRIMARY KEY CLUSTERED
(
[IngredientId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY],
PERIOD FOR SYSTEM_TIME ([ValidFrom], [ValidTo])
) ON [PRIMARY]
GO
ALTER TABLE [SubEx].[Ingredients] ADD CONSTRAINT [DF_Ingredients_IsMandatory] DEFAULT ((0)) FOR [IsMandatory]
GO
ALTER TABLE [SubEx].[Ingredients] ADD CONSTRAINT [DF_Ingredients_IsDownloaded] DEFAULT ((0)) FOR [IsDownloaded]
GO
ALTER TABLE [SubEx].[Ingredients] ADD CONSTRAINT [DF_Ingredients_Deleted] DEFAULT ((0)) FOR [Deleted]
GO
ALTER TABLE [SubEx].[Ingredients] ADD CONSTRAINT [DF_ValidFrom] DEFAULT (dateadd(second,(-1),sysutcdatetime())) FOR [ValidFrom]
GO
ALTER TABLE [SubEx].[Ingredients] ADD CONSTRAINT [DF_ValidTo] DEFAULT ('9999.12.31 23:59:59.99') FOR [ValidTo]
GO
ALTER TABLE [SubEx].[Ingredients] WITH CHECK ADD CONSTRAINT [FK_Ingredients_TlkpFlavorTypes_FlavorTypeId] FOREIGN KEY([FlavorTypeId])
REFERENCES [SubEx].[TlkpFlavorTypes] ([FlavorTypeId])
GO
ALTER TABLE [SubEx].[Ingredients] CHECK CONSTRAINT [FK_Ingredients_TlkpFlavorTypes_FlavorTypeId]
GO
ALTER TABLE [SubEx].[Ingredients] WITH CHECK ADD CONSTRAINT [FK_Ingredients_TlkpStatusTypes_StatusTypeId] FOREIGN KEY([StatusTypeId])
REFERENCES [SubEx].[TlkpStatusTypes] ([StatusTypeId])
GO
ALTER TABLE [SubEx].[Ingredients] CHECK CONSTRAINT [FK_Ingredients_TlkpStatusTypes_StatusTypeId]
GO
ALTER TABLE [SubEx].[Ingredients] WITH CHECK ADD CONSTRAINT [FK_Ingredients_TlkpWISRCategoryTypes_WISRTypeId] FOREIGN KEY([WISRTypeId])
REFERENCES [SubEx].[TlkpWISRCategoryTypes] ([WISRTypeId])
GO
ALTER TABLE [SubEx].[Ingredients] CHECK CONSTRAINT [FK_Ingredients_TlkpWISRCategoryTypes_WISRTypeId]
GO
ALTER TABLE [SubEx].[Ingredients] WITH CHECK ADD CONSTRAINT [FK_Ingredients_TlkpWISRSubCategoryTypes_WISRSubTypeId] FOREIGN KEY([WISRSubTypeId])
REFERENCES [SubEx].[TlkpWISRSubCategoryTypes] ([WISRSubTypeId])
GO
ALTER TABLE [SubEx].[Ingredients] CHECK CONSTRAINT [FK_Ingredients_TlkpWISRSubCategoryTypes_WISRSubTypeId]
GO
Quando executo o script abaixo para habilitar SYSTEM_VERSIONING para minha tabela temporal, recebo a mensagem de erro abaixo e um despejo de pilha.
ALTER TABLE SubEx.Ingredients
SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = SubEx.IngredientsHistory));
Msg 596, Level 21, State 1, Line 8 Não é possível continuar a execução porque a sessão está no estado de interrupção.
Msg 0, Level 20, State 0, Line 8 Ocorreu um erro grave no comando atual. Os resultados, se existirem, deveriam ser descartados.
Estou fazendo algo errado ou preciso enviar um bug para a Microsoft?
Este pode ser o seu problema:
Um arquivo de despejo é gerado quando você habilita o controle de versão do sistema em uma tabela no SQL Server 2016
Tente instalar o CU1 do Sql 2016 SP1