This section covers problems you might encounter while compiling a SQL-NS instance for the first time or when updating an instance after it has been created. The guidance given in this section is the same, regardless of whether you use the command-line nscontrol create and nscontrol update commands, or Management Studio's New Notification Services Instance and Update Instance commands, to compile your instance. Problems with ICFs and ADFsThis section covers compilation problems that result from errors in ICFs and ADFs. Note Error messages are shown in this section exactly as they are displayed by the nscontrol create and nscontrol update command-line tools. If, instead of these command line-tools, you are using Management Studio to compile your instance, and you encounter the errors described in this section, the error messages you see may differ slightly in format from the ones shown here. However, the essential content of the error messages will be the same. Malformed XMLSymptom: The compiler reports an error message of the following form: <filename>(<line>,<position>) : error NS9037: An error occurred when parsing the XML file. <error description text> Cause: The ICF passed to the compiler, or one of the ADFs referenced by it, contains malformed XML. The error message usually indicates the name of the file containing the error, the line and position on which the error occurs, and some descriptive text indicating the nature of the problem. Action: Correct the XML errors indicated in the error message and run the create or update command again. Opening the offending file in an XML editor (such as Management Studio) can sometimes be helpful if the nature of the error is not obvious from the message. XML editors typically offer features such as syntax highlighting and well-formedness checking that can help you find XML errors. XML Schema Compliance ErrorsSymptom: The compiler reports an error message of the following form: <filename>(<line>,<position>) : error NS9047: The XML does not match the XSD schema. ProblemDescription: <error description text> Cause: ICFs and ADFs must conform to XSD schemas provided by SQL-NS. This error occurs if one of the XML documents processed by the compiler does not conform to the corresponding XSD schema. The document may contain well-formed XML but may violate restrictions and constraints defined in the schema. For example, the document may contain elements not defined in the schema, or multiple instances of an element defined as a singleton in the schema. Note The XSD schemas for the ICF and ADF can be found in the XML Schemas directory of your SQL-NS installation. If you installed SQL Server in the default location, the full path to this directory is C:\Program Files\Microsoft SQL Server\90\NotificationServices\9.0.242\XML Schemas. In the XML Schemas directory, the ICF schema is defined in the file ConfigurationFileSchema.xsd, and the ADF schema is defined in the file ApplicationDefinitionFileSchema.xsd. Action: Correct the XML errors indicated in the error message and run the create or update command again. XML editors (such as Management Studio) can sometimes help identify schema compliance errors. Missing Parameter ValuesSymptom: The compiler reports an error message of one of the following forms:
or
Cause: You did not supply a value for a parameter used in the ICF or ADF. Action: For every parameter in the ICF, specify a value in one of the following ways:
For every parameter used in the ADF, specify a value in one of the following ways:
For more information on parameters, see the "Parameters" section (p. 104) in Chapter 4, "Working with SQL-NS Instances." SQL Errors During CompilationCompiling an instance for the first time involves creating the instance and application database objects from the information in the ICF and ADFs. Updating an instance involves altering the database objects themselves or the information in them. It's possible that the compiler may experience problems connecting to the SQL Server or creating the required database objects. This section covers SQL-related problems that you might encounter during the compilation of an instance. Unable to Connect or Log In to the SQL ServerSymptom: The compiler reports an error message indicating problems connecting to the SQL Server. The error message has the following form: Notification Services failed to open a connection to SQL Server. Server Name: <sql server instance> Failed to connect to server <sql server instance>. <error description text> Cause: The create or update command failed to connect to the SQL Server instance specified in the <SqlServerSystem> element of the ICF. Action: The first step in diagnosing connectivity problems is to attempt to connect to the SQL Server instance using Management Studio. When doing so, make sure that you attempt the connection with the same credentials that the create or update command uses (either the credentials of the user running the command, if you're using Windows Authentication, or the development account's SQL username and password if you're using SQL Server Authentication). If you are able to connect using Management Studio, you should do the following:
If you are not able to connect to the server from Management Studio, perform the following checks:
If you are able to reach the SQL server from Management Studio but are not able to log in, make sure that the account you're using to connect has been granted login access to the server. For information on granting login access and other permissions, see the "Granting Permissions" section (p. 92) in Chapter 4. Permission Denied Errors During CompilationSymptom: The compiler reports an error message indicating that permission to create a database object was denied. The error message will vary in form, depending on the object being created. Cause: The account that the create or update command is using to connect to the SQL Server does not have sufficient permissions to create the necessary database objects. Action: Make sure the account that the create or update command uses to connect to the database is a member of the sysadmin fixed server role. See the section "The Development Account" (p. 35) in Chapter 2, "Getting Set Up," for information on how to create a development account and grant sysadmin membership. |