Showing posts with label notifications. Show all posts
Showing posts with label notifications. Show all posts

Wednesday, March 21, 2012

Scheduled Notifications

Hi , I'm having one code for Scheduled Notification services, it's running without errors but there is no output

<SubscriptionClasses>
<SubscriptionClass>
<SubscriptionClassName>ScheduledSubscriptions</SubscriptionClassName>
<Schema>
<Field>
<FieldName>DeviceName</FieldName>
<FieldType>nvarchar(255)</FieldType>
</Field>
<Field>
<FieldName>SubscriberLocale</FieldName>
<FieldType>nvarchar(5)</FieldType>
</Field>
<Field>
<FieldName>Prescriptionid</FieldName>
<FieldType>int</FieldType>
</Field>
<Field>
<FieldName>status</FieldName>
<FieldType>nvarchar(50)</FieldType>
</Field>
</Schema>
<FileGroup>DEFAULT</FileGroup>
<ScheduledRules>
<ScheduledRule>
<RuleName>ScheduledSubscriptionsRule</RuleName>
<Action>

INSERT INTO SchedPrescriptionNotifications
( SubscriberId,DeviceName,SubscriberLocale,Prescriptionid,status )
SELECT S.SubscriberId, S.DeviceName,
S.SubscriberLocale, C.Prescriptionid, C.status
FROM SchedPrescriptionSubscriptions S , ScheduledEventsChron C
WHERE C.Prescriptionid= S.Prescriptionid
AND C.status = S.status


INSERT SchedSubscriptionChron
(SubscriberId, Prescriptionid, status)
SELECT S.SubscriberId, S.Prescriptionid, C.status
FROM SchedPrescriptionSubscriptions S JOIN ScheduledEventsChron C
ON S.Prescriptionid= C.Prescriptionid
</Action>
<ActionTimeout>PT30M</ActionTimeout>
</ScheduledRule>
</ScheduledRules>
</SubscriptionClass>
</SubscriptionClasses>
and

my C#.net coding is

if (nsSubscription.HasTimedRule)

{

nsSubscription.ScheduleRecurrence = "FREQ=DAILY;";

nsSubscription.ScheduleStart="20070326T072720";

}

i need to know whther the format of Schedulestart property is correct...


Hi , I'm having one code for Scheduled Notification services, it's running without errors but i don't get any output

<SubscriptionClasses>
<SubscriptionClass>
<SubscriptionClassName>ScheduledSubscriptions</SubscriptionClassName>
<Schema>
<Field>
<FieldName>DeviceName</FieldName>
<FieldType>nvarchar(255)</FieldType>
</Field>
<Field>
<FieldName>SubscriberLocale</FieldName>
<FieldType>nvarchar(5)</FieldType>
</Field>
<Field>
<FieldName>Prescriptionid</FieldName>
<FieldType>int</FieldType>
</Field>
<Field>
<FieldName>status</FieldName>
<FieldType>nvarchar(50)</FieldType>
</Field>
</Schema>
<FileGroup>DEFAULT</FileGroup>
<ScheduledRules>
<ScheduledRule>
<RuleName>ScheduledSubscriptionsRule</RuleName>
<Action>

INSERT INTO SchedPrescriptionNotifications
( SubscriberId,DeviceName,SubscriberLocale,Prescriptionid,status )
SELECT S.SubscriberId, S.DeviceName,
S.SubscriberLocale, C.Prescriptionid, C.status
FROM SchedPrescriptionSubscriptions S , ScheduledEventsChron C
WHERE C.Prescriptionid= S.Prescriptionid
AND C.status = S.status


INSERT SchedSubscriptionChron
(SubscriberId, Prescriptionid, status)
SELECT S.SubscriberId, S.Prescriptionid, C.status
FROM SchedPrescriptionSubscriptions S JOIN ScheduledEventsChron C
ON S.Prescriptionid= C.Prescriptionid
</Action>
<ActionTimeout>PT30M</ActionTimeout>
</ScheduledRule>
</ScheduledRules>
</SubscriptionClass>
</SubscriptionClasses>
and

my C#.net coding is

if (nsSubscription.HasTimedRule)

{

nsSubscription.ScheduleRecurrence = "FREQ=DAILY;";

nsSubscription.ScheduleStart="20070326T072720";

}

i need to know whther the format of ScheduleStart property is correct...


|||Hi Subathra -

Here's a link that may help. Look at the timezone component.

http://msdn2.microsoft.com/en-us/library/ms171385.aspx

I'm not sure I follow the match rule logic so I cannot comment on that part. You can do more investigation by looking into the underlying tables to see if notifications were actually produced but just not delivered.

HTH...

Joe

Tuesday, March 20, 2012

Scheduled Jobs & Failed Notifications

Periodically on jobs scheduled in the SQL Server Management, a scheduled job will execute successfully, but fail to email the notification to the operator that the job completed successfully.....anyone have any thoughts as to the cause
I welcome any input ! :)Make sure your windows application log is not full, if it is, you will not
get notified.
--
Ray Higdon MCSE, MCDBA, CCNA
--
"David Moe" <dmoe@.coorstek.com> wrote in message
news:BCDD08D7-A9D6-4717-93D0-100DBBF38C98@.microsoft.com...
> Periodically on jobs scheduled in the SQL Server Management, a scheduled
job will execute successfully, but fail to email the notification to the
operator that the job completed successfully.....anyone have any thoughts
as to the cause ?
> I welcome any input ! :)|||if you never get email notification work, that means
maybe you havn't configure the sql mail utility.
>--Original Message--
>Periodically on jobs scheduled in the SQL Server
Management, a scheduled job will execute successfully,
but fail to email the notification to the operator that
the job completed successfully.....anyone have any
thoughts as to the cause ?
>I welcome any input ! :)
>.
>|||This thread is on a server which has other working alerts, typically including the one that failed
All other alerts executed with no problems...just this one fails periodically....haven't been able to coorelate any problems with server or database(s) on said server
It simply states in both the job history and the application event log that the notification failed. (Event log is set to overwrite
This same operator is used in all of the alerts coming from this particular server
-- David Moe wrote: --
Periodically on jobs scheduled in the SQL Server Management, a scheduled job will execute successfully, but fail to email the notification to the operator that the job completed successfully.....anyone have any thoughts as to the cause
I welcome any input ! :)