CREATE TABLE [dbo].[usm_sm_event]
(
[ts_sec] [int] NOT NULL,
[sla_engine_id] [int] NULL,
[app_user] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CS_AS NULL,
[interval] [int] NULL,
[value] [float] NULL,
[time_stamp] [datetime] NULL,
[data1] [int] NULL,
[data2] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[sla_instance_id] [int] NULL,
[contract_id] [int] NULL,
[host_id] [int] NULL,
[slo_instance_id] [int] NULL,
[metric_category_id] [int] NULL,
[recurring_event_oid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CS_AS NULL,
[onetime_event_oid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CS_AS NULL,
[calendar_category_oid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CS_AS NULL,
[insert_time] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[usm_sm_event] ADD CONSTRAINT [$usm_s_r00002be900000000] FOREIGN KEY ([calendar_category_oid]) REFERENCES [dbo].[usm_calendar_category] ([calendar_category_oid])
GO
ALTER TABLE [dbo].[usm_sm_event] ADD CONSTRAINT [$usm_s_r00002bf300000000] FOREIGN KEY ([onetime_event_oid]) REFERENCES [dbo].[usm_onetime_event] ([onetime_event_oid])
GO
ALTER TABLE [dbo].[usm_sm_event] ADD CONSTRAINT [$usm_s_r00002bfd00000000] FOREIGN KEY ([recurring_event_oid]) REFERENCES [dbo].[usm_recurring_event] ([recurring_event_oid])
GO
ALTER TABLE [dbo].[usm_sm_event] ADD CONSTRAINT [$usm_s_r00002e2d00000000] FOREIGN KEY ([calendar_category_oid]) REFERENCES [dbo].[usm_calendar_category] ([calendar_category_oid])
GO
ALTER TABLE [dbo].[usm_sm_event] ADD CONSTRAINT [$usm_s_r00002e3700000000] FOREIGN KEY ([onetime_event_oid]) REFERENCES [dbo].[usm_onetime_event] ([onetime_event_oid])
GO
ALTER TABLE [dbo].[usm_sm_event] ADD CONSTRAINT [$usm_s_r00002e4100000000] FOREIGN KEY ([recurring_event_oid]) REFERENCES [dbo].[usm_recurring_event] ([recurring_event_oid])
GO
GRANT SELECT ON [dbo].[usm_sm_event] TO [usmgroup]
GRANT INSERT ON [dbo].[usm_sm_event] TO [usmgroup]
GRANT DELETE ON [dbo].[usm_sm_event] TO [usmgroup]
GRANT UPDATE ON [dbo].[usm_sm_event] TO [usmgroup]
GO