[Top] [All Lists]

Re: NotificationBatchId

Subject: Re: NotificationBatchId
From: Joe Webb
Date: Tue, 28 Jun 2005 14:53:37 -0500
Newsgroups: microsoft.public.sqlserver.notificationsvcs
Hi SVA - 

I've been playing around with your scenario for a few minutes now;
trying to get to the NotificationBatchId from the custom content
formatter. Here's what I'm thinking.

The formatter has access to all fields in the notification through the
hash table. So I can think of a couple of options:

1) Find a way to get the NotificationBatchId into the hash table
before the content formatter is called. For this scenario I've been
looking into creating a UDF that will get the NotificationBatchId for
the notification.

2) Within the content formatter, open a connection to the SQLNS
application database and look for the NotificationBatchId based on
what you know from the notification fields. Perhaps you'll have to
make a best guess (ie SELECT MAX(NotificationBatchId)) since it's
possible that multiple notifications with the exact same notification
data could exist from different batches. There may be some performance
issue here too. 


Joe Webb
SQL Server MVP

Get up to speed quickly with SQLNS 

I support PASS, the Professional Association for SQL Server.

On 28 Jun 2005 00:32:40 -0700, "SVA" <[email protected]>

>Thank you Shyam and Joe.
>Let me explain:
>Let's assume there is a subscription linked with an event provider.
>The event provider is scheduled to run weekly (or daily).
>It means that the Event Provider runs once a week and collects new
>event data.
>After that, the system sends new alerts to susbscribers.
>That is OK and it works fine.
>In my application, I would like to:
>1. Generate a report with Start/End times when the actual sendout took
>2. Gather some statistics linked to these "sendouts" rather than to the
>subscription itself.
>Examples of such statistics are:
>a. "link tracking" feature for emails.
>b. bounced emails statistics
>For example, the "link tracking" feature could look as follows:
>The links similar to the one shown above is generated in my custom
>Content Formatter component.
>So it means that I need to get access to NotificationBatchId in my
>custom Content Formatter.
>In case of bounced emails, I need to access NotificationBatchId in my
>Custom Delivery Protocol.
>(The statistics mentioned above is stored in my application database.)
>So this is the reason as to why I'm looking into NotificationBatch Id.
>  Vladislav

<Prev in Thread] Current Thread [Next in Thread>