Tables [dbo].[wsm_events]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CS_AS
Row Count0
Created11:08:12 AM Wednesday, March 07, 2007
Last Modified11:10:02 AM Wednesday, March 07, 2007
Columns
NameData TypeMax Length (Bytes)Allow Nulls
rec_event_datetimedatetime8
Yes
event_datetimedatetime8
Yes
macaddressvarchar(18)18
Yes
ipaddressnvarchar(255)510
Yes
hostnamenvarchar(255)510
Yes
Cluster Primary Key XPKwsm_events: ididint4
No
Foreign Keys r_1528: [dbo].[wsm_event_definitions].eventdefinition_idIndexes xif1wsm_events: eventdefinition_ideventdefinition_idint4
Yes
Foreign Keys r_1529: [dbo].[wsm_device].associated_device_idIndexes xif2wsm_events: associated_device_idassociated_device_idbinary(16)16
Yes
Foreign Keys r_1530: [dbo].[wsm_device].source_device_idIndexes xif3wsm_events: source_device_idsource_device_idbinary(16)16
No
Foreign Keys r_1579: [dbo].[wsm_status_definition].status_idIndexes xif4wsm_events: status_idstatus_idint4
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key XPKwsm_events: idXPKwsm_eventsid
Yes
xif1wsm_eventseventdefinition_id
xif2wsm_eventsassociated_device_id
xif3wsm_eventssource_device_id
xif4wsm_eventsstatus_id
Foreign Keys Foreign Keys
NameColumns
r_1528eventdefinition_id->[dbo].[wsm_event_definitions].[eventdefinition_id]
r_1529associated_device_id->[dbo].[wsm_device].[device_id]
r_1530source_device_id->[dbo].[wsm_device].[device_id]
r_1579status_id->[dbo].[wsm_status_definition].[status_id]
Permissions
TypeActionOwning Principal
GrantDeletewsm_admin_group
GrantInsertwsm_admin_group
GrantSelectwsm_admin_group
GrantUpdatewsm_admin_group
GrantSelectwsm_ro_group
SQL Script
CREATE TABLE [dbo].[wsm_events]
(
[rec_event_datetime] [datetime] NULL,
[event_datetime] [datetime] NULL,
[macaddress] [varchar] (18) COLLATE SQL_Latin1_General_CP1_CS_AS NULL,
[ipaddress] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CS_AS NULL,
[hostname] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CS_AS NULL,
[id] [int] NOT NULL,
[eventdefinition_id] [int] NULL,
[associated_device_id] [binary] (16) NULL,
[source_device_id] [binary] (16) NOT NULL,
[status_id] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[wsm_events] ADD CONSTRAINT [XPKwsm_events] PRIMARY KEY CLUSTERED ([id]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [xif2wsm_events] ON [dbo].[wsm_events] ([associated_device_id]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [xif1wsm_events] ON [dbo].[wsm_events] ([eventdefinition_id]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [xif3wsm_events] ON [dbo].[wsm_events] ([source_device_id]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [xif4wsm_events] ON [dbo].[wsm_events] ([status_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[wsm_events] ADD CONSTRAINT [r_1528] FOREIGN KEY ([eventdefinition_id]) REFERENCES [dbo].[wsm_event_definitions] ([eventdefinition_id])
GO
ALTER TABLE [dbo].[wsm_events] ADD CONSTRAINT [r_1529] FOREIGN KEY ([associated_device_id]) REFERENCES [dbo].[wsm_device] ([device_id])
GO
ALTER TABLE [dbo].[wsm_events] ADD CONSTRAINT [r_1530] FOREIGN KEY ([source_device_id]) REFERENCES [dbo].[wsm_device] ([device_id])
GO
ALTER TABLE [dbo].[wsm_events] ADD CONSTRAINT [r_1579] FOREIGN KEY ([status_id]) REFERENCES [dbo].[wsm_status_definition] ([status_id])
GO
GRANT SELECT ON  [dbo].[wsm_events] TO [wsm_admin_group]
GRANT INSERT ON  [dbo].[wsm_events] TO [wsm_admin_group]
GRANT DELETE ON  [dbo].[wsm_events] TO [wsm_admin_group]
GRANT UPDATE ON  [dbo].[wsm_events] TO [wsm_admin_group]
GRANT SELECT ON  [dbo].[wsm_events] TO [wsm_ro_group]
GO
Uses