Export (0) Print
Expand All

Notification Services Troubleshooting

SQL Server 2000

Microsoft has compiled the following list of issues and solutions encountered by users of Notification Services.

Installation Troubleshooting

One or more components are not available on the Custom Setup page.

Solution

The Setup program analyzes the server to determine whether all prerequisites been installed for each component. If the prerequisites for a component are not installed, you cannot install the component.

For more information about software prerequisites, see Hardware and Software Requirements.

The database components are not available, even though the prerequisite software for the database components is installed.

Solution

To install the database components, run Setup on the server where SQL Server 2000 is installed. Setup must run locally to install extended stored procedures to the SQL Server Binn directory and register the extended stored procedures. You must start the SQL Server instance before installing database components to that instance. Notification Services supports only the Developer, Standard, and Enterprise editions of SQL Server 2000.
Deployment and Administration Troubleshooting

Running NSControl Create fails due to timeout error.

Solution

The NSControl Create command has time limits for each of its operations. The database creation operation tends to take more time than the other operations; the time limit for this operation is 10 minutes, which is normally more than adequate. However, if the <FileSpec> elements in your ADF and configuration file specify very large database sizes (that is, several gigabytes), NSControl Create still might time out; if it does, the following error message is displayed:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Caught exception: Fail to run NS_directory\bin\nscontrol.exe create -in config_file arguments

To successfully run NSControl Create, you must reduce the database file sizes in the ADF and configuration file and then run NSControl Create again. You then can increase the sizes of the database files using SQL Server Enterprise Manager or Transact-SQL code.

Running NSControl Update fails.

Solution

The NSControl Update command might fail before completion because of errors in the ADF or the configuration file. Therefore, before running NSControl Update, validate all ADFs and configuration files to reduce the possibility of this error occurring. If an error does occur, fix the file and then run NSControl Update again.

It is also possible for NSControl Update to leave the instance in an inconsistent state after a failure. The best practice is to always back up the instance and application databases before running NSControl Update, and restore the databases if NSControl Update fails.

If you change subscription class metadata in the ADF, NSControl Update renames the existing subscription class table, NSsubscription_classSubscriptions, to NSsubscription_classSubscriptionsOld to save the subscription data. If you later update the same subscription class, when NSControl Update attempts to rename the table, the rename fails if NSsubscription_classSubscriptionsOld still exists. To resolve this problem, rename or delete NSsubscription_classSubscriptionsOld.

For more information, see NSControl Update.

The NS$instance_name service does not start.

Solutions

If the NS$instance_name service does not start, the service password might be incorrect, the instance name you are trying to start might not be an exact match for the Notification Services instance name, or the Windows user account under which the service has been configured to run might not have permissions to log on as a service. Try the following to resolve the problem:
  • Reset the password. When you use the Notification Services commands to configure a service password, and the password contains special characters or was entered incorrectly, the NS$instance_name service will not start.

    To resolve this error, update the password using the Microsoft Windows Services application:

    1. In Control Panel, open Administrative Tools.
    2. Open Services.
    3. Right-click the NS$instance_name service (instance_name represents the name of the Notification Services instance), and then click Properties.
    4. On the Log On tab, type your password in the Password and Confirm Password boxes, and then click OK.
    5. Right-click the service, and then click Start.

    If the password is a valid for a domain or local account, the service should start. If the account does not have permissions to log on as a service, resetting it from the Services application will grant it the appropriate permissions.

  • Start the service from the Services application. When you start the service using the Net Start command, the characters used at the command line must match the Unicode characters used in the configuration file. If the characters do not match, the instance cannot start.

    To resolve this error, start the service using the Windows Services application:

    1. In Control Panel, open Administrative Tools.
    2. Open Services.
    3. Right-click the NS$instance_name service (instance_name represents the name of the Notification Services instance), and then click Start.

No errors appear in the event log.

Solution

If the NS$instance_name service does not start, but there are no errors in the application log to indicate the cause, your application log may be full. To reconfigure the application log, do the following:
  1. In Control Panel, open Administrative Tools.
  2. Open Event Viewer.
  3. Right-click Application, and then click Properties.
  4. Do one or both of the following:
    • Increase the Maximum log size value.
    • Under When maximum log size is reached, select Overwrite events as needed.

Unexpected errors appear in the event log.

Solution

If you receive unexpected errors in Event Viewer, try restarting the service associated with the instance of Notification Services.

For example, if you remove an application from an instance while the service is running, and you then see errors in the event log for the application you removed, restarting the service should stop these errors from appearing.

For more information, see Starting and Stopping a Service.

SSL security errors occur.

Solution

If you receive SSL security errors in the event log when creating an instance or running the NS$instance_name service, Notification Services might not be able to connect to SQL Server.

To resolve this problem, obtain the latest service pack for SQL Server 2000. For more information, search for Knowledge Base article Q302409 at the Microsoft Product Support Services Web site.

Internal query processor errors occur.

Solution

If you receive the following error in the event log, obtain the latest service pack for SQL Server 2000.

Internal Query Processor Error: The query processor could not produce a query plan.

Deadlock errors occur under stress.

Solution

When running under high volumes, you might receive the following messages in the application event log:

Notification Services Message: "The view of the event class could not be materialized."

SQL Server Message: "Transaction {} was deadlocked on {} resources with another process and has been chosen as the deadlock victim. Rerun the transaction."

The fix for this error requires either a service pack update or a hotfix. For more information, search for Knowledge Base article Q322868 at the Microsoft Product Support Services Web site.

Old events are reused, or disabled subscriptions receive notifications.

Solution

If you write subscription rules that access the events and subscriptions tables directly, obsolete events and disabled subscriptions might be used to generate notifications.

Writing queries that directly use the events, notifications, subscriptions tables is not recommended. Instead, write your queries using the class names defined in the application definition file (ADF).

For example, if the name of an event class defined in the ADF is StockEvent, use the table name StockEvent in your subscription rule, not the actual table name in the database (which would be NSStockEventEvents).

Notification Services creates temporary tables with the current set of events, notifications, and subscriptions. The static tables in the database contain obsolete data that will be removed by the vacuuming process.

For more information about writing subscription rules, see Subscription Rules.

Event Collection Troubleshooting

FileSystemWatcher event provider fails.

Solution

The FileSystemWatcher event provider might fail if the performance counters on the server become corrupted. If you receive the following error in the event log, a performance counter is corrupted:

Event ID: 2980

Description: The FileSystemWatcher event provider failed to submit events.

Description: Object reference not set to an instance of an object.

If a performance counter is corrupted, the counter will not return values. To attempt to resolve the corruption, do the following:

  1. If the NS$instance_name service is running, stop the service.
  2. Close any applications that query the Notification Service performance counters, such as System Monitor.
  3. Unregister the instance using NSControl Unregister.
  4. Re-register the instance using NSControl Register.

This re-creates the performance counters for the instance. You might need to run these steps multiple times.

Delivery Troubleshooting

Generic delivery errors occur.

Solution

Some delivery errors can in fact be configuration errors. For example, if you incorrectly configure an SMTP delivery channel, when Notification Services tries to deliver a notification using the delivery channel you might receive a message such as this:

SMTP Delivery Notification Generic Error

If you receive several errors like this, verify that your delivery channels are configured correctly. For more information, see Standard Delivery Protocols.

SMTP delivery fails.

Solution

When using the Internet Information Services (IIS) SMTP protocol, Notification Services must look in an IIS directory to determine where to deliver the notifications. Only administrators have privileges to access this information.

To use the IIS SMTP delivery protocol, which is used by the Flight, Weather, and Realtor sample applications, the account that the NS$instance_name service runs under must be a member of the Administrators group.

Distributor times out.

Solution

If you receive various timeout errors in the event log, the distributor logging level might be too high. This typically occurs only when the database system is processing high volumes of notifications, and cannot handle both the distribution and logging tasks.

To resolve the problem, set the values within the <DistributorLogging> node of the ADF to false. For more information, see Defining the <DistributorLogging> Node.

Notifications are not delivered.

Solution

If notifications are not being sent from your application, check the following:
  • Are the notifications being generated?
    Run the NSDiagnosticNotificationClass stored procedure in the instance database to verify that notifications are being generated. Look in the NotificationsGenerated column for the interval at which you expected them to be generated. If there are no notifications it is possible that there are no events or no subscriptions, or that the subscription class match rules do not insert any notifications into the notification class function. For more information about the Notify function, see Using Notification Functions.
  • Are there any events available?
    Run the NSDiagnosticEventClass stored procedure in the instance database. Look in the EventBatchesCollectedCount column to see if events arrived when you expected.
  • Are scheduled subscriptions properly scheduled?
    Run the NSScheduledSubscriptionList and NSScheduledSubscriptionDetails stored procedures in the application database to view subscription details.
  • Are notifications failing?
    Run the NSDiagnosticFailedNotifications stored procedure to check for failed notifications.
  • Are the notifications going to the correct delivery channel?
    Verify that the ADF defines the correct protocols for the notification class and that the subscriptions added to your application are using the correct delivery channel.
  • Are your delivery channels functional?
    Run the NSDiagnosticDeliveryChannel report to see if the delivery channels are operational.
  • Do the subscriber devices referred to in the notifications exist?
    When calling the Notify function in your match rule, you must pass a subscriber ID and a device name. You must create a subscriber device for this subscriber ID with this device name in your subscription management application using the SubscriberDevice class.

These methods should help you determine why notifications are not being delivered.

Web Application Troubleshooting

Cannot access SQL Server from sample application ASP.NET pages.

Solution

If you receive the following error from a Microsoft ASP.NET Web page, the account used by the Web application has not been granted access to SQL Server:

Error when loading ASP.NET subscription management page: System.Data.SqlClient.SqlException: Login failed for user 'domain\account'

To resolve this problem, do the following:

  1. Grant login access to a domain account to be used by the subscription management application. In SQL Query Analyzer, run EXEC sp_grantlogin 'domain\username'.
  2. Edit the Samples\SetGlobalVars.cmd file and make sure the SubscriptionApplicationAccount value is set to the domain account to which you granted access.
  3. Run Sample\AppDefinition\BuildScripts\GrantPermissions.cmd.

Error when loading ASP.NET subscription management page.

Solution

If you receive the following error from an ASP.NET Web page, the account used by the Web application has not been added to the NSSubscriberAdmin and NSEventProvider roles in the instance and application databases:

System.Data.SqlClient.SqlException: Cannot open database requested in login 'database'. Login fails. Login failed for user 'domain\account'.

To resolve this problem, do the following:

  1. Edit the Samples\SetGlobalVars.cmd file and make sure the SubscriptionApplicationAccount value is set to the domain account to which you granted access.
  2. Run Sample\AppDefinition\BuildScripts\GrantPermissions.cmd.

See Also

Event Messages

Frequently Asked Questions

Show:
© 2014 Microsoft