CREATE TABLE [data].[Cluster_SqlServer_SqlProcess_UnstableSamples](
[Id] [bigint] NOT NULL,
[CollectionDate] [bigint] NOT NULL,
[_Blocked] [bigint] NULL,
[_BlockingLoginTime] [bigint] NULL,
[_Command] [nvarchar](max) NULL,
[_CumulativeProcessorTime] [bigint] NULL,
[_DatabaseName] [nvarchar](max) NULL,
[_FullBlockingCommand] [nvarchar](max) NULL,
[_FullCommand] [nvarchar](max) NULL,
[_LastBatch] [bigint] NULL,
[_LastWaitType] [nvarchar](max) NULL,
[_MemoryUsage] [bigint] NULL,
[_OpenTransactions] [bigint] NULL,
[_PhysicalIo] [bigint] NULL,
[_Status] [nvarchar](max) NULL,
[_WaitResource] [nvarchar](max) NULL,
[_WaitTime] [bigint] NULL,
[_WaitType] [nvarchar](max) NULL,
CONSTRAINT [Cluster_SqlServer_SqlProcess_UnstableSamples_Id_CollectionDate] PRIMARY KEY CLUSTERED
(
[Id] ASC,
[CollectionDate] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [data].[Cluster_SqlServer_SqlProcess_UnstableSamples] WITH CHECK ADD CONSTRAINT [Cluster_SqlServer_SqlProcess_UnstableSamples_Cluster_SqlServer_SqlProcess_Keys] FOREIGN KEY([Id])
REFERENCES [data].[Cluster_SqlServer_SqlProcess_Keys] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [data].[Cluster_SqlServer_SqlProcess_UnstableSamples] CHECK CONSTRAINT [Cluster_SqlServer_SqlProcess_UnstableSamples_Cluster_SqlServer_SqlProcess_Keys]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Contains the session ID of blocking process.' , @level0type=N'SCHEMA',@level0name=N'data', @level1type=N'TABLE',@level1name=N'Cluster_SqlServer_SqlProcess_UnstableSamples', @level2type=N'COLUMN',@level2name=N'_Blocked'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Login time of the blocking process' , @level0type=N'SCHEMA',@level0name=N'data', @level1type=N'TABLE',@level1name=N'Cluster_SqlServer_SqlProcess_UnstableSamples', @level2type=N'COLUMN',@level2name=N'_BlockingLoginTime'
GO