Export (0) Print
Expand All

Lesson 2: Performing an Initial Build of the Tutorial Instance

SQL Server 2005

Updated: 17 July 2006

In this lesson you will review the instance configuration file (ICF), update the ICF as needed, review the application definition file (ADF), and then create the Tutorial instance of Notification Services.

First, review the instance configuration in TutorialICF.xml. The instance configuration defines an instance of Notification Services, called Tutorial, that hosts the Weather application.

During this tutorial, you will not be modifying TutorialICF.xml, but you should know what the file contains.

  1. In Solution Explorer, expand Tutorial, and then expand Miscellaneous.

  2. Double-click TutorialICF.xml.

    The ICF contains the following elements:

    • A ParameterDefaults element that contains default values for ICF and ADF parameters.
    • An InstanceName element that specifies the Notification Services instance name, which is Tutorial.
    • A SqlServerSystem element that specifies the instance of SQL Server that will host the Notification Services databases. The element contains a parameter, %_DBEngineInstance_%. The value for this parameter is provided by the parameter defaults, and can be overridden when you create or update the instance.
    • An Applications element that contains basic information about the Weather application. This includes the application name, folder, ADF location, and the names and values of any replaceable parameters in the ADF. The Weather application uses two parameters: %_InstancePath_% and %_ServerName_%. Values for these parameters are provided by the parameter defaults, and can be overridden when you create or update the instance.
    • A DeliveryChannels element that defines a delivery channel for the built-in File delivery protocol. The Weather application will use the File delivery protocol to deliver notifications to the delivery channel named FileChannel. These notifications will be written to a file named FileNotifications.htm.

To make updating the tutorial easier, verify that the following values in the ParameterDefaults section of the ICF are correct:

  • The value for the _DBEngineInstance_ parameter must be the name of the Database Engine instance you are connected to in Object Explorer. The default value for this parameter is %COMPUTERNAME%, which is an environment variable that gets the name of the local computer. If you are connected to a named instance, replace %COMPUTERNAME% with the SQL Server instance name. For the default instance, the value should be the same as the computer name.
  • The value for the _ServerName_ parameter should be the name of the local computer. This value is passed to the ADF, and specifies where the Notification Services engine components will run. Unless you are scaling-out the instance, which is not recommended for this tutorial, you should leave the value as %COMPUTERNAME%.
  • The value for _InstancePath_ is the path to the TutorialICF.xml file. If you did not install the samples to the default location, update this value with the correct path of the tutorial files. %ProgramFiles% is an environment variable that gets the path of the Program Files folder on the local computer, which is typically C:\Program Files.

If you have changed any values in the ParameterDefaults section, save and close TutorialICF.xml.

Next, review the initial application definition in WeatherADF.xml. You will be modifying this file during the tutorial.

  1. In Solution Explorer, expand Weather and then expand Miscellaneous.

  2. Double-click WeatherADF.xml.

    The initial ADF is almost empty. It contains only those elements required for the application to build successfully. This includes an empty SubscriptionClasses element, an empty NotificationClasses element, and the SystemName elements for the application's generator and distributor. These elements contain a parameter, %_NSServer_%.The value for this parameter is provided when you create the instance of Notification Services and is passed from the ICF to the ADF.

When you create an instance of Notification Services, you provide Notification Services with the name of the ICF and values for any parameters needed by the ICF. Notification Services uses the ICF to create an instance database and uses the Weather application's ADF that is referenced in the ICF to create an application database.

You will use SQL Server Management Studio to create the instance of Notification Services.

  1. In Object Explorer, right-click Notification Services and select New Notification Services Instance.

  2. Click Browse, locate the TutorialICF.xml file, and then click Open.

    The default location for this file is C:\Program Files\Microsoft SQL Server\90\Samples\Notification Services\tutorial\TutorialICF.xml.

  3. In the Parameters grid, review the values for the parameters. These should be the values you provided if you edited the ICF.

    If you are using the %COMPUTERNAME% and %ProgramFiles% environment variables, Notification Services shows the values for these variables, too.

  4. Click OK.

    A dialog shows the status of the create actions. All actions should complete successfully. If the actions do not complete successfully, verify that the parameter values you provided are correct, and then try to create the instance of Notification Services again.

  5. When the create actions complete, click Close.

After you create the Tutorial instance, you should see two new databases and an instance of Notification Services in Object Explorer.

  1. In Object Explorer, expand Databases.

    You should see two databases: TutorialNSMain, which is the instance database, and TutorialWeather, which is the application database. If you do not see these databases, right-click Databases and select Refresh.

  2. Expand Notification Services.

    You should see an instance of Notification Services named Tutorial. If you do not see the Tutorial instance, right-click Notification Services and select Refresh.

Community Additions

ADD
Show:
© 2014 Microsoft