Yukon Apr '05 CTP
Using Notification Services
Trying to send out notifications by mail
Entry in the instanceconfig file
<DeliveryChannel>
<DeliveryChannelName>MailChannel</DeliveryChannelName>
<ProtocolName>SMTP</ProtocolName>
<Arguments>
<Argument>
<Name>SmtpServer</Name>
<Value>1.1.1.1</Value>
</Argument>
<Argument>
<Name>BodyEncoding</Name>
<Value>utf-16</Value>
</Argument>
</Arguments>
</DeliveryChannel>
AppDefinition File entry
<Distributors>
<Distributor>
<SystemName>%_NSSystem_%</SystemName>
<QuantumDuration>PT15S</QuantumDuration>
</Distributor>
</Distributors>
Same Notification to a text file works, while trying the mail notifications it throws up this error in the Windows Event log.
Description: Notifications reference non-existent subscribers or unknown subscriber device names. Run the NSDiagnosticFailedNotifications stored procedure and check for notifications with undefined delivery channel names. Add new subscribers or subscriber devices so that future notifications are delivered.
EventParameters:
Instance Name: TestNotificationsInstance
Application Name: Events
InstanceName: TestNotificationsInstance
ApplicationName: Events
Component: Generator
Thread: 10
Is there any other dependency to run Notification services ? SMTP service?
Have configured the access to smtp server to send out mails.
Rgds
mat -
"Notifications reference non-existent subscribers or unknown subscriber device names." makes me wonder about the subscriber devices. When you created the devices and the subscriptions, how did you reference them? I suspect the problem may be in the name of the device, possibly the name of the channel, when you created the subscription or device.
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)
As Joe points out, it could be that there are no subscriber devices for your new channel (Joe, we added this new error message to provide feedback about the classic "missing subscriber device problem"). But, your email seemed to imply that you created subscribers and configured them for the mail channel, so I'll assume that's fine.
I didn't see you mention anything about adding the required SMTP protocol configuration to your notification class. Something like this:
<NotificationClass>
...
<Protocols>
<Protocol>
<ProtocolName>SMTP</ProtocolName>
<Fields>
... Subject, To, From etc. field definitions.
</Fields>
That samples included with the June CTP show examples of how to configure the SMTP protocol in your notification class. If you need a code snippet, let me know and I'll dig one up, but there should be several in the samples.
Thanks
-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.|||Sorry for the delay in replying guys.
Got this working. Problems were
- Wrong device name in code while adding subscriptions, not the same as a defined device for the subscriber.
So a validation check for that would help.
- Then had to add the other fields for the SMTP protocol in the AppDefinition file.
From, Subject,To, BodyFormat etc...
Can't we have a GUI that does all these configs for notification? Helps to know what is mandatory/required.
Notification samples with Yukon Apr CTP did not have SMTP samples. ( or was it there somewhere)
Thanks for the help Shyam and Joe.|||
Hi Mat -
I've developed a little C# application that i use to create test notifications for my NS apps. It doesn't do everything you've asked for, but maybe you'll find it of some use. It's available for free on the resources sections of my web site (http://www.webbtechsolutions.com/downloads.aspx).
BTW - It's written using v1.1 of the .net framework, but could serve as a basis for a v2.0 project.
Cheers!
Joe
--
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)
No comments:
Post a Comment