Notification Services nscontrol unregister Problem

Notification Services nscontrol unregister Problem

Post by Mark Wei » Sat, 11 Jan 2003 01:06:23

I have built a test NS application locally.  When I attempted to start
the service it failed.  Here is the error from Event Viewer:
                Notification Services encountered an error while starting the
        <ProblemDescription>The instance database could not be found.

Leaving aside the annoyance that the service is automatically renamed
NS$InstanceName but the service's reference to the database must use
NS$ explicitly or it cannot find the databas, I believe I need to
complete delete and unregister the service to rebuild it with the
correct database name because the update command has no argument for
the name of the database.  So, I decided to tyr and delete and
unregister the application ...

Running nscontrol unregister didn't delete all the registry keys for
an NS application that were created by nscontrol register.  I
originally ran the command with the Service Control Manager window
open and the command line returned with a message that the service
could not be deleted but had been marked for deletion.

"The Notification Services Windows service is being deleted.
The Service Control Manager could not delete the Notification Services
The Service Control Manager could not delete the Notification Services
Win32ErrorCode: 1072
Win32 error text: The specified service has been marked for deletion."

Then I closed the SCM and ran the command line again and this time it
returned a message that the NS Service could not be found, presumably
because it had already been marked for deletion.  When I reopened the
SCM, the service was no longer visible.  However, all the supporting
registry entries are still in the registry and are not removed by
repeated attempts to run nscontrol unregister  These are:

HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Delivery
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Distributors\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Event
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Events\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Generator\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Notifications\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Subscribers\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Subscriptions\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Vacuumer\

I believe I need to delete all of these keys and recreate and
reregister the service because it was originally created with an
incorrect name of the associated database.  Do I need to delete all of
these keys, or can I simple recreate and reregister the service with
the correct information?  Also, why aren't these keys removed by
unregister?  Is it because I originally ran the unregister with the
SCM open and the utility could only mark the service for deletion
rather than delete it?  I am about to run a separate VBS to manually
delete these keys, but I thought I'd ask about this before I went
ahead and ran that.

Any help from MS or otherwise appreciated ...


1. Problems creating multiple event classes -- SQL Server Notification Services

In my appADF file I created to event classes.  While
trying to use the event collector, it fails saying that
the object isnt set to an instance of an object. I'm
thinking that the appADF file failed to create the event
Here is an example of my code
myapplicationEventNotify = New NSApplication(instance,

            myEventNotify = New
(myapplicationEventNotify, "CollabEventNotify")

            myEventNotifyCollector = New EventCollector
(myapplicationEventNotify, "CollabENP")

            myEventNotify("TaskID") = CType(Request.Form
("TaskID"), Int32)
            myEventNotify("ListID") = CType(Request.Form
("TaskID"), Int32)

            myEventNotify("CommunityID") = CType
(strcommID, Int32)

= "Me" 'Request.Form("AssignedTo")
            myEventNotify("Description") = Request.Form
            myEventNotify("Notes") = "none"  'Request.Form
            myEventNotify("Subject1") = "Testing from
EMPERADM-CPQ" 'Request.Form("Subject")
            myEventNotify("Status") = "1"  'CType
(Request.Form("Status"), Int32)

= "02/18/03" 'Request.Form("DueTime")
            'Get the Notification Services application.

            Dim eventsSubmitted As Integer =

            myEventNotify = Nothing

It fails at the myEventNotifyCollector.Write line.  Anyone
know why this is happening?

2. sp_attach_db HELP!

3. Notification Services samples

4. PDOX5/WIN98 - GPF on exit

5. Failover notification Microsoft Cluster Service

6. techn. information on indexes

7. Notification Services

8. Report Printing...

9. Where are the Notification Services?

10. SQL SVR Notification Services

11. Using SQL Notification Services (SQLNS) to transfer data

12. looking for trivial Notification Services sample