Troubleshooting the Samples

When building and running the samples, a few errors are likely to occur if required software is not installed or if the sample is not correctly configured.

Common Errors

The following table lists common errors that occur in the samples included with Notification Services, and presents recommended resolutions.

Error Message Action

Notification Services failed to retrieve the SQL Server edition.

The Microsoft SQL Server instance name specified in the instance configuration file (ICF) parameters does not match a known instance name or the instance of SQL Server you are connected to. Attempt to create the instance again and make sure the parameter names are valid.

The registry entries for the specified instance of Notification Services could not be found.

The instance specified in the application (such as the AddSubscribers, AddSubscriptions, and AddNonHostedEvent samples) is not registered on the local computer. Make sure you registered the instance according to the instructions in the sample and that the instance name is correct in the application.

The event collector failed to start a new event batch.

Make sure the instance of Notification Services is enabled, which can be done when creating the instance (as specified in the sample instructions), or by right-clicking the instance and selecting Enable.

Adding, updating, or removing subscribers is disabled for this instance.

Make sure the instance of Notification Services is enabled, which can be done when creating the instance (as specified in the sample instructions), or by right-clicking the instance and selecting Enable.

The subscription could not be added because the subscriber was not found in the NSSubscribers table.

Run the AddSubscribers project before running the AddSubscriptions project. If the subscribers exist in the instance database, you should not receive this error.

An attempt to log in to SQL Server failed.

The account you are using to build or run the project does not have the necessary permissions. For more information, see Securing Notification Services.

An attempt to open the requested database failed.

The account you are using to run a program that adds events, subscribers, or subscriptions does not have a user account in the instance and application databases. If you created the databases, your account is in the db_owner role and you should not encounter this error. Otherwise, add your account to the instance and application database users and grant permissions by joining the db_owner database role or the NSSubscriberAdmin and NSEventProvider database roles.

Notification Services failed to get column locale information.

The account used to run a program that adds events, subscribers, or subscriptions does not have the necessary permissions to add this data to the instance and application databases. Make sure the account is a member of the db_owner database role, or is a member of both the NSSubscriberAdmin and NSEventProvider database roles.

See Also

Other Resources

SQL Server Notification Services Samples
Troubleshooting Notification Services

Help and Information

Getting SQL Server 2005 Assistance