create a multiple subscriptions, one for each device the user wants the
events to go to
create a multiple unique device entries for each subscription
So far as I've been able to tell there is no transaction support when using
the notification services API, so having to update multiple records for a
single subscription can lead to further maintenance issues if the updating
were to fail part way through.
Is there a simpler way to have events for a single subscription to go out to
multiple devices?
--
Thanks
Wayne Sepega
Jacksonville, Fl
Enterprise Library Configuration Console Module Generator
http://workspaces.gotdotnet.com/elccmg
"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein
hope that helps
Kate MBCS
Alert Technologies
http://www.alert-technologies.co.uk
Get your notification services implementation going in minutes not
weeks ......
As Kate mentioned in another post, a custom delivery protocol may
address your delivery issues.
As for transactional support for the NS API, you're right it's not
built in. But you can always roll your own if need be.
HTH...
--
Joe Webb
SQL Server MVP
~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811
I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)
"Joe Webb" <jo...@webbtechsolutions.com> wrote in message
news:758cg19c8sg5k44k7...@4ax.com...
If you're using 2005, there are some new views that allow you to
create subscribers, devices, and subscription data without going
through the API. So you could create a connection to SQL Server and
issue something like:
INSERT INTO NSInstance.NSSubscriberView (SubscriberId, Enabled)
VALUES (N'jo...@webbtechsolutions.com', 1)
You could create a transaction object to handle that aspect of it.
If you're using SQL Server NS 2000, then your options are more
limited. You could use the API to create the the subscriber, device,
and subscriptions and at the conclusion check to make sure everything
was created appropriately. If not back out.
This scenario doesn't handle a crashed SQL Server, so you'd probably
want to implement some kind of periodic checking of the subscriptions
- a scheduled task to kick off periodically to make sure each
subscriber has a subscription for each device. Not perfect, but
probably as close as you can get without either 2005 or going through
the sprocs.
HTH....
--
Joe Webb
SQL Server MVP
~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811
I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)
Keep a table that stores a mapping of subscriptions to devices. For example:
CREATE TABLE SubscriptionDeviceMappings
(
SubscriptionId bigint,
SubscriberId nvarchar(255),
DeviceName nvarchar(255)
)
In your match rule, you simply join like this:
SELECT ....
FROM Events e, Subscriptions s
JOIN SubscriptionDeviceMappings m where m.SubscriptionId =
s.SubscriptionId
WHERE ...
If the SubscriptionDeviceMappings table has multiple rows for each
SubscriptionId, you'll end up with multiple notification rows.
You'll have to maintain the SubscriptionDeviceMappings table in your
subscription management code, but that's really not different to keeping the
device name in the subscription itself, which is a very common practice.
Hope this helps.
-shyam
--
Learn more about SQL-NS:
http://www.amazon.com/exec/obidos/tg/detail/-/0672326647/
---------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
---------------------------------------------
"Wayne" <MeNo...@community.nospam> wrote in message
news:eEkTon%23oFH...@TK2MSFTNGP15.phx.gbl...
--
Joe Webb
SQL Server MVP
~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811
I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)
Any chance in the gold release of 2005 the connection can be exposed from
within the API so that it can be used to create transactions?
--
Thanks
Wayne Sepega
Jacksonville, Fl
Enterprise Library Configuration Console Module Generator
http://workspaces.gotdotnet.com/elccmg
"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein
"Joe Webb" <jo...@webbtechsolutions.com> wrote in message
news:j2rmg1lanprspdllj...@4ax.com...
Agreed, transactional support via the API is something that would be
very useful and I know that MS has it on their wishlist for a future
release - post 2005.
In the meantime...If you're willing to wait for 2005 *and* you're
talking about a simple event driven subscription, you use the new
views to create your subscribers, devices, and subscriptions?
Something like:
INSERT NSInstance.dbo.NSSubscriberView(SubscriberId, Enabled)
VALUES ('jo...@webbtechsolutions.com', 1)
INSERT NSInstance.dbo.NSSubscriberDeviceView (SubscriberId, Enabled,
DeviceName, DeviceTypeName, DeviceAddress, DeliveryChannelName)
VALUES('jo...@webbtechsolutions.com', 1, 'EmailDevice', 'Email',
'jo...@webbtechsolutions.com', 'EmailChannel')
INSERT NSApplication.dbo.NS<SubscriptionClassName>View (SubscriberId,
Enabled, SubscriberDeviceName, SubscriberLocale, PrType)
VALUES ('jo...@webbtechsolutions.com', 1, 'EmailDevice', 'en-us', 1)
You can wrap this up in a transaction or better yet, put them in a
stored procedure with transactional support that your Sub Mgt App can
call.
Note however that you cannot insert scheduled subscriptions or
subscriptions that use condition actions using the
NS<SubscriptionClassName>View view.
HTH....
--
Joe Webb
SQL Server MVP
~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811
I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)