USE [ADMINDB]
GO

/****** Object:  Table [dbo].[ActiveSessionHistory]    Script Date: 6/10/2015 4:20:47 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[ActiveSessionHistory](
	[Record_Time] [datetime] NULL,
	[request_id] [int] NOT NULL,
	[ReqStatus] [nvarchar](30) NOT NULL,
	[SessStatus] [nvarchar](30) NOT NULL,
	[Sess_Session_Id] [smallint] NOT NULL,
	[wait_type] [nvarchar](60) NULL,
	[wait_time] [int] NOT NULL,
	[wait_resource] [nvarchar](256) NOT NULL,
	[command] [nvarchar](16) NOT NULL,
	[cpu_time] [int] NOT NULL,
	[total_elapsed_time] [int] NOT NULL,
	[reads] [bigint] NOT NULL,
	[writes] [bigint] NOT NULL,
	[logical_reads] [bigint] NOT NULL,
	[granted_query_memory] [int] NOT NULL,
	[memory_usage] [int] NOT NULL,
	[last_read] [datetime] NULL,
	[last_write] [datetime] NULL,
	[connect_time] [datetime] NOT NULL,
	[Login_Name] [nvarchar](128) NOT NULL,
	[query_plan] [xml] NULL,
	[Req_Session_Id] [smallint] NOT NULL,
	[blocking_session_id] [smallint] NULL,
	[percent_complete] [real] NOT NULL,
	[estimated_finish_time] [datetime] NULL,
	[DatabaseName] [nvarchar](128) NULL,
	[ProgramName] [nvarchar](128) NULL,
	[SQLText] [nvarchar](max) NULL,
	[SQLStatement] [nvarchar](max) NULL,
	[host_name] [nvarchar](128) NULL,
	[size_in_bytes] [int] NULL,
	[nt_user_name] [nvarchar](128) NULL,
	[nt_domain] [nvarchar](128) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO


