Tables [dbo].[Subscriptions]
Properties
PropertyValue
CollationLatin1_General_CI_AS_KS_WS
Row Count0
Created12:33:31 PM Tuesday, March 06, 2007
Last Modified12:33:31 PM Tuesday, March 06, 2007
Columns
NameData TypeMax Length (Bytes)Allow Nulls
Cluster Primary Key PK_Subscriptions: SubscriptionIDSubscriptionIDuniqueidentifier16
No
Foreign Keys FK_Subscriptions_Owner: [dbo].[Users].OwnerIDOwnerIDuniqueidentifier16
No
Foreign Keys FK_Subscriptions_Catalog: [dbo].[Catalog].Report_OIDReport_OIDuniqueidentifier16
No
Localenvarchar(128)256
No
InactiveFlagsint4
No
ExtensionSettingsntextmax
Yes
Foreign Keys FK_Subscriptions_ModifiedBy: [dbo].[Users].ModifiedByIDModifiedByIDuniqueidentifier16
No
ModifiedDatedatetime8
No
Descriptionnvarchar(512)1024
Yes
LastStatusnvarchar(260)520
Yes
EventTypenvarchar(260)520
No
MatchDatantextmax
Yes
LastRunTimedatetime8
Yes
Parametersntextmax
Yes
DataSettingsntextmax
Yes
DeliveryExtensionnvarchar(260)520
Yes
Versionint4
No
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_Subscriptions: SubscriptionIDPK_SubscriptionsSubscriptionID
Yes
Triggers Triggers
NameANSI Nulls OnQuoted Identifier OnOn
Subscription_delete_DataSource
Yes
Yes
After Delete
Subscription_delete_Schedule
Yes
Yes
After Delete
Foreign Keys Foreign Keys
NameNo CheckReplicationDeleteColumns
FK_Subscriptions_Catalog
Yes
No
CascadeReport_OID->[dbo].[Catalog].[ItemID]
FK_Subscriptions_ModifiedBy
Yes
ModifiedByID->[dbo].[Users].[UserID]
FK_Subscriptions_Owner
Yes
OwnerID->[dbo].[Users].[UserID]
Permissions
TypeActionOwning Principal
GrantDeleteRSExecRole
GrantInsertRSExecRole
GrantReferencesRSExecRole
GrantSelectRSExecRole
GrantUpdateRSExecRole
SQL Script
CREATE TABLE [dbo].[Subscriptions]
(
[SubscriptionID] [uniqueidentifier] NOT NULL,
[OwnerID] [uniqueidentifier] NOT NULL,
[Report_OID] [uniqueidentifier] NOT NULL,
[Locale] [nvarchar] (128) COLLATE Latin1_General_CI_AS_KS_WS NOT NULL,
[InactiveFlags] [int] NOT NULL,
[ExtensionSettings] [ntext] COLLATE Latin1_General_CI_AS_KS_WS NULL,
[ModifiedByID] [uniqueidentifier] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
[Description] [nvarchar] (512) COLLATE Latin1_General_CI_AS_KS_WS NULL,
[LastStatus] [nvarchar] (260) COLLATE Latin1_General_CI_AS_KS_WS NULL,
[EventType] [nvarchar] (260) COLLATE Latin1_General_CI_AS_KS_WS NOT NULL,
[MatchData] [ntext] COLLATE Latin1_General_CI_AS_KS_WS NULL,
[LastRunTime] [datetime] NULL,
[Parameters] [ntext] COLLATE Latin1_General_CI_AS_KS_WS NULL,
[DataSettings] [ntext] COLLATE Latin1_General_CI_AS_KS_WS NULL,
[DeliveryExtension] [nvarchar] (260) COLLATE Latin1_General_CI_AS_KS_WS NULL,
[Version] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TRIGGER [dbo].[Subscription_delete_DataSource] ON [dbo].[Subscriptions]
AFTER DELETE
AS
delete DataSource from DataSource DS inner join deleted D on DS.SubscriptionID = D.SubscriptionID

GO
CREATE TRIGGER [dbo].[Subscription_delete_Schedule] ON [dbo].[Subscriptions]
AFTER DELETE
AS
delete ReportSchedule from ReportSchedule RS inner join deleted D on RS.SubscriptionID = D.SubscriptionID

GO
ALTER TABLE [dbo].[Subscriptions] ADD CONSTRAINT [PK_Subscriptions] PRIMARY KEY CLUSTERED ([SubscriptionID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Subscriptions] WITH NOCHECK ADD CONSTRAINT [FK_Subscriptions_Catalog] FOREIGN KEY ([Report_OID]) REFERENCES [dbo].[Catalog] ([ItemID]) ON DELETE CASCADE NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[Subscriptions] WITH NOCHECK ADD CONSTRAINT [FK_Subscriptions_ModifiedBy] FOREIGN KEY ([ModifiedByID]) REFERENCES [dbo].[Users] ([UserID])
GO
ALTER TABLE [dbo].[Subscriptions] WITH NOCHECK ADD CONSTRAINT [FK_Subscriptions_Owner] FOREIGN KEY ([OwnerID]) REFERENCES [dbo].[Users] ([UserID])
GO
GRANT REFERENCES ON  [dbo].[Subscriptions] TO [RSExecRole]
GRANT SELECT ON  [dbo].[Subscriptions] TO [RSExecRole]
GRANT INSERT ON  [dbo].[Subscriptions] TO [RSExecRole]
GRANT DELETE ON  [dbo].[Subscriptions] TO [RSExecRole]
GRANT UPDATE ON  [dbo].[Subscriptions] TO [RSExecRole]
GO
Uses
Used By