Partilhar via


Walkthrough: Subscription Management Interface Deployment on the Database Server

For intranet-based notification applications, your subscription management interface can be on the same server as the instance and application databases. Having your application and databases together simplifies deployment because you do not need to create a domain account that the subscription management interface uses to connect to Microsoft SQL Server.

For Internet-based applications, you typically want to secure your databases on a separate server behind a firewall.

This scenario shows how to deploy an ASP.NET-based subscription management interface on the database server. The ASP.NET application uses Microsoft Windows Authentication to access databases.

Prerequisites

Before you deploy an ASP.NET-based subscription management interface, verify that all prerequisites are met:

  • You have installed Windows, added the Internet Information Services (IIS) component, and enabled ASP.NET. See your Windows documentation for instructions.
  • If you are using Microsoft Windows XP or Microsoft Windows 2000, the ASPNET account should exist on the server. The Microsoft .NET Framework Setup program creates this account. If the ASPNET account does not exist, you can create the account by running the following command:
    %windir%\Microsoft.NET\Framework\vn.n.nnnn**\ASPNET_REGIIS.exe –i**
  • You have added the application IIS, but have not yet configured security for the subscription management interface.
  • You have already deployed the instance of Notification Services, which creates the instance and application databases on the database server.

Database Server Tasks

Perform the following steps on the database server.

Step 1: Install Notification Services Client Components

  • Install the Notification Services client components on the database server. If you have already installed Notification Services on this server, you do not need to install the client components.

    For more information about installing components, see Installing SQL Server Notification Services.

Step 2: Register the Instance of Notification Services

  1. On the Start menu, point to All Programs, point to Microsoft SQL Server 2005, point to Notification Services, and then click Notification Services Command Prompt to open a Notification Services Command Prompt window.

  2. Type the following command to register the instance:

    nscontrolregister-nameinstanceName-serverdatabaseServer

Step 3: Grant SQL Server and Database Permissions

  1. In the Command Prompt window, type the following to create a SQL Server login ID:

    sqlcmd -E -S databaseServer -Q "CREATE LOGIN [computer\ASPNET] FROM WINDOWS;"

  2. Type the following to grant the login access to the instance database and add it to the NSSubscriberAdmin database role:

    sqlcmd -E -SdatabaseServer-Q "USEinstanceDatabase;

    **    CREATE USER [computer\ASPNET];**

    **    EXEC sp_addrolemember N'NSSubscriberAdmin', N'computer\ASPNET';"**

  3. Type the following to grant the account access to an application database and add it to the NSSubscriberAdmin database role:

    sqlcmd -E -SdatabaseServer-Q "USEapplicationDatabase;

    **    CREATE USER [computer\ASPNET];**

    **    EXEC sp_addrolemember N'NSSubscriberAdmin', N'computer\ASPNET';"**

You should now be able to use the subscription management application to manage subscribers and subscriptions for the instance of Notification Services.

Troubleshooting

If you cannot manage subscribers and subscriptions, check the status of the instance by running the following command from the Notification Services command prompt:

nscontrol status-name instanceName

Verify that subscriber and subscription management are enabled. For more information, see Viewing the Status of Instances, Applications, and Components.

Also, check the Windows Application log for errors. For more information, see Troubleshooting Notification Services.

See Also

Concepts

Deploying an Instance of Notification Services
Deploying a Non-Hosted Event Provider

Other Resources

Deploying Notification Services

Help and Information

Getting SQL Server 2005 Assistance