all groups > sql server notification services > may 2005 >
You're in the

sql server notification services

group:

IDeliveryProtocol Config settings and ADF


IDeliveryProtocol Config settings and ADF andyjax
5/27/2005 7:34:04 AM
sql server notification services:
In looking at notification services there is an example in the SQL 2005 April
CTP BOL that shows how to create a stored procedure custom protocol. The only
thing missing is the code to add to the config and adf.

Re: IDeliveryProtocol Config settings and ADF Colin Meek
5/27/2005 8:30:22 AM
See the article "Defining Custom Delivery Protocols" for more information.

The basic steps:

- Add a reference to the protocol assembly in the instance configuration
file (ICF) or using NS Management Objects (NMO)
- Declare a "delivery channel" in the ICF or through NMO referencing the
protocol
- Your "NotificationClass" definition must also reference the protocol

- Colin Meek [MSFT]

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.

[quoted text, click to view]

Re: IDeliveryProtocol Config settings and ADF andyjax
5/27/2005 8:52:19 AM
I know the general stuff BOL states, but just wanted to know if I can have a
concrete of what to add where. I am just not sure what all is needed in each
part.
Primarily, what does in the adf. I have a stub, but don't think it is correct:
<Protocol>
<Fields>
<Field><FieldName>Server</FieldName></Field>
<Field><FieldName>Database</FieldName></Field>
<Field><FieldName>SProc</FieldName></Field>
<Field><FieldName>AppName</FieldName></Field>
<Field><FieldName>CommandTimeout</FieldName></Field>
</Fields>
</Protocol>

I have the following in the config file:
<Protocol>
<ProtocolName>StoredProcProtocol</ProtocolName
<ClassName>Landstar.Notifications.DeliveryProtocol.StoredProcProtocol</ClassName
<AssemblyName>c:\Projects\CustomProtocol\bin\Debug\StoredProcProtocol.dll</AssemblyName>
</Protocol>


I need to define the delivery channel too, from what I can tell.

I really thought that since there was an example of what I needed, to call a
stored proc, that all the other details would be easy enough for MS to
provide.

Thanks for the quick response. I look forward to hearing more.


[quoted text, click to view]
Re: IDeliveryProtocol Config settings and ADF Colin Meek
5/31/2005 9:20:37 AM
For the BOL stored procedure example, the arguments should be set in the
delivery channel definition in the instance configuration file:

<DeliveryChannel>
<DeliveryChannelName>StoredProcDeliveryChannel</DeliveryChannelName>
<ProtocolName>StoredProcProtocol</ProtocolName>
<Arguments>
<Argument>
<Name>Server</Name>
<Value>MyServer</Value>
...
</Argument>
</Arguments>
</DeliveryChannel>

The <Protocol> element in the notification class definition tells NS how to
set notification header values. In the stored procedure example, the headers
are treated as stored procedure parameters. For instance, if your protocol
includes the following entry:

<Field><FieldName>Foo</FieldName><FieldReference>NotificationField1</FieldReference></Field>

the delivery protocol will pass the notification field "NotificationField1"
to the stored procedure as the parameter @Foo.

- Colin Meek [MSFT]

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.

[quoted text, click to view]

AddThis Social Bookmark Button