CREATE TABLE [dbo].[AgentConnect]
(
[AgentConnectID] [int] NOT NULL IDENTITY(1, 1),
[VendorConnectFID] [int] NOT NULL,
[MoversConnectConnectorFID] [int] NOT NULL,
[AgentConnectorName] [nvarchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Inactive] [bit] NOT NULL CONSTRAINT [DF_AgentConnect_Inactive] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AgentConnect] ADD CONSTRAINT [PK_AgentConnect] PRIMARY KEY CLUSTERED ([AgentConnectID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AgentConnect] ADD CONSTRAINT [IX_AgentConnect_AgentConnectorName] UNIQUE NONCLUSTERED ([AgentConnectorName], [AgentConnectID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AgentConnect] ADD CONSTRAINT [IX_AgentConnect_MoversConnectConnectorFID] UNIQUE NONCLUSTERED ([MoversConnectConnectorFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AgentConnect_VendorConnect] ON [dbo].[AgentConnect] ([VendorConnectFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AgentConnect] ADD CONSTRAINT [FK_AgentConnect_VendorConnect] FOREIGN KEY ([VendorConnectFID]) REFERENCES [dbo].[VendorConnect] ([VendorConnectID])
GO
GRANT SELECT ON [dbo].[AgentConnect] TO [MssExec]
GRANT INSERT ON [dbo].[AgentConnect] TO [MssExec]
GRANT DELETE ON [dbo].[AgentConnect] TO [MssExec]
GRANT UPDATE ON [dbo].[AgentConnect] TO [MssExec]
GO