
[dbo].[CreateDataDrivenNotification]
CREATE PROCEDURE [dbo].[CreateDataDrivenNotification]
@SubscriptionID uniqueidentifier,
@ActiveationID uniqueidentifier,
@ReportID uniqueidentifier,
@ExtensionSettings ntext,
@Locale nvarchar(128),
@Parameters ntext,
@LastRunTime datetime,
@DeliveryExtension nvarchar(260),
@OwnerSid varbinary (85) = null,
@OwnerName nvarchar(260),
@OwnerAuthType int,
@Version int
AS
declare @OwnerID as uniqueidentifier
EXEC GetUserID @OwnerSid,@OwnerName, @OwnerAuthType, @OwnerID OUTPUT
insert into [Notifications]
(
[NotificationID],
[SubscriptionID],
[ActivationID],
[ReportID],
[SnapShotDate],
[ExtensionSettings],
[Locale],
[Parameters],
[NotificationEntered],
[SubscriptionLastRunTime],
[DeliveryExtension],
[SubscriptionOwnerID],
[IsDataDriven],
[Version]
)
values
(
NewID(),
@SubscriptionID,
@ActiveationID,
@ReportID,
NULL,
@ExtensionSettings,
@Locale,
@Parameters,
GETUTCDATE(),
@LastRunTime,
@DeliveryExtension,
@OwnerID,
1,
@Version
)
GO
GRANT EXECUTE ON [dbo].[CreateDataDrivenNotification] TO [RSExecRole]
GO