[Top] [All Lists]

Re: API for Notification Rules and content Formatter ???

Subject: Re: API for Notification Rules and content Formatter ???
From: Joe Webb
Date: Thu, 07 Apr 2005 14:42:26 -0500
Newsgroups: microsoft.public.sqlserver.notificationsvcs
I should have been a bit more clear.

NSControl disable
NSControl update
NSControl enable

You don't need to worry with deleting and re-creating the application. In fact if you do, you'll lose data.
As discussed in BOL, some modification will cause tables to be renamed
and you'll be responsible for migrating the data into the newly created

Joe Webb
SQL Server MVP

Get up to speed quickly with SQLNS

Joe Webb wrote:
No. Not needed. Run NSControl update.

Here's an excerpt from BOL that steps you through the process.

Updating an Application
After you deploy a Notification Services instance, you can update individual applications hosted by the instance. You update an application by updating the application definition file (ADF), modifying any of the operational files (such as by adding or deleting XSLT files or custom components), and then using the NSControl Update command to apply the changes.
To update a single application, you do not need to stop or disable the
entire instance. You can leave other applications hosted by the instance
running while you update a single application. However, if you also
change values in the configuration file, you must disable the entire
instance before applying the update.
When you update an application, consider the following:

If you change a subscription class in the ADF, NSControl Update usually must create a new subscriptions table. NSControl Update backs up the existing table. For more information, see NSControl Update. Updating an application typically deletes event and notification data. Plan to resubmit any batches of events that have not been processed before the update, or any batches of events that would have been processed while the application is being updated.
Important You can rename the application in the configuration file.
However, this is considered a change to the instance properties, so it
requires you to disable the instance. When you apply the name change,
Notification Services creates a new application database, but does not
delete the old database.
To update one application with no configuration changes

Update the elements in the ADF and any operational files, such as XSLT files and DLLs for custom components. Back up the instance and application databases. For more information, see Backing Up Databases and Other Files. On the Start menu, point to Programs\Microsoft SQL Server Notification Services, and then click Notification Services Command Prompt to open a command prompt window.
Type the following command to disable the application:
nscontrol disable -name instance_name -application application_name

Type the following command to apply the changes made in the ADF:
nscontrol update -in configuration_filename

If the instance or application uses command-line parameters, your NSControl Update command will contain additional arguments. For more information, see NSControl Update.
To update performance counters, stop the NS$instance_name service and
re-register the instance using NSControl Register.
This updates performance counters, user names, and passwords. If you do
not use the performance counters or do not need to update them, do not
perform this step.
 From a command prompt, type the following command to enable the
nscontrol enable -name instance_name -application application_name

Joe Webb
SQL Server MVP

Get up to speed quickly with SQLNS

[email protected] wrote:

Should I :
- stop the service (net stop ...)
- unregister the service (nscontrol unregister ...)
- delete the app (nscontrol delete ...)
- create the app (nscontrol create ...)
- register the service (nscontrol register ...)
- start the service (net start ...)

After each modification???

-----Original Message-----
As I mentioned in another response, the XML files are

essentially the

source code for the SQLNS instance and applications. To

effect a change,

you need to alter the XML documents and then run

NSControl to update the

instance and application.

Resist the temptation to alter the SQL Server object

directly. You'll

regret it.

Joe Webb
SQL Server MVP

Get up to speed quickly with SQLNS

Tarpan wrote:


In my application I want besides the normal


functionality, provide administrative tools to edit the Notification Rules and Content Formats. So,


has to be able (through the Web interface) create/modfy/delete the rules for Notification


and create/modfy/delete XLST schemas for outgoing messages.
I do not see any API for that. NS API covers the Subsription Management only.
Am I missing something?
How to do that?
Does anybody done this before?

The modifying XLST schemas looks simple because it is


separate file that can be replaced. But editing Notification Rules and creating/deleting XLST schemas means modifing the ADF file. Should the application be rebuild if the ADF file was changed?
That do you think, guys?


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