Sdílet prostřednictvím


nscontrol upgrade Command

Upgrades instances of Microsoft SQL Server Notification Services from an earlier version or lower edition to the current version and edition.

You cannot downgrade an instance of Notification Services to an earlier version or lower edition.

Syntax

nscontrol upgrade
    [-nologo]
    [-help]
        –name instanceName
    [-server databaseServer]
    [-sqlusername sqlUserName -sqlpassword sqlPassword]
    [-timeout seconds]

Arguments

  • -nologo
    Suppresses the product and version statement that appears when you run an nscontrol command.
  • -help
    Displays the command syntax.
  • -nameinstanceName
    Is the name of the instance to upgrade.
  • -serverdatabaseServer
    Specifies the name of the server that hosts the instance and application databases. If you use a named instance of Microsoft SQL Server to host the databases, you must specify the server name and the instance name using the format <servername>\<instancename>.

    When you run nscontrol upgrade on a system where the instance has previously been registered using the nscontrol register command, use the -name argument but not the -server argument. The nscontrol utility determines the SQL Server instance name by reading the registry information of the instance.

    When you run nscontrol upgrade on a system where the instance is not registered, you must use both the -name and -server arguments because the nscontrol utility needs both the Notification Services instance name and the SQL Server instance name in order to locate the instance database.

    When you specify the -server argument, the nscontrol utility ignores any registry values for the instance.

  • -sqlusernamesqlUserName
    Is the SQL Server login used by nscontrol to connect to SQL Server.

    Important

    Windows Authentication is more secure than SQL Server Authentication. Use Windows Authentication whenever possible.

    If you must use SQL Server Authentication to connect to SQL Server, specify a login using this argument. Also specify a password using the -sqlpassword argument.

    If you are using Windows Authentication to connect to SQL Server, do not use the -sqlusername and -sqlpassword arguments.

  • -sqlpasswordsqlPassword
    Is the password associated with the -sqlusername logon ID. You should only use this argument iwhen connecting using SQL Server Authentication.
  • -timeout seconds
    Is the time-out, in seconds, for completing each upgrade action. The default time-out is 30 seconds. If you receive time-out errors when attempting to upgrade an instance of Notification Services, set a longer time-out value.

Remarks

Important

It is recommended that you back up the instance and application databases before you upgrade.

Important

After you run nscontrol upgrade, run nscontrol register to update registry information for the instance.

When you run nscontrol upgrade, the version or edition of nscontrol determines the version or edition for the upgrade. For example, if an instance was created using version 2.0.3008.0 of Notification Services, and you want to upgrade the instance to 9.0.242, run nscontrol upgrade from the 9.0.242\bin folder to perform the upgrade.

The nscontrol upgrade command checks the instance database to determine the metadata version and edition. If the metadata specifies a previous version or earlier edition, nscontrol upgrade then verifies that the instance is disabled; if the instance is disabled, nscontrol performs the upgrade.

Note

nscontrol upgrade sets the database compatibility mode to 90.

The nscontrol upgrade command is intended to upgrade an instance of Notification Services in place. If you move the instance during the upgrade, you must change the SystemName values in the application definition file (ADF) and then use nscontrol update to update the values in the databases. If the SystemName values in the databases do not match the actual system names, the components do not run and Notification Services cannot process notifications. For more information about moving instances, see Moving Instances of Notification Services.

Permissions

The account used to run nscontrol upgrade, or the SQL Server login specified by the -sqlusername argument, must be a member of the db_owner fixed database role or the sysadmin fixed server role.

The account also must also have permission to execute the Notification Services binary files; this permission is granted to members of the Administrators and SQLServerNotificationServicesUser Windows groups.

Examples

The following examples illustrate how to upgrade an instance in two different circumstances.

A. Upgrading an instance using Windows Authentication

This example shows how to upgrade an instance of Notification Services named StockInstance using Windows Authentication to connect to SQL Server.

nscontrol upgrade -name StockInstance -server nsuetest

B. Upgrading an instance using SQL Server Authentication

Important

When possible, use Windows Authentication.

This example shows how to upgrade an instance of Notification Services named StockInstance using SQL Server Authentication to connect to SQL Server.

nscontrol upgrade -name StockInstance -server nsuetest
    -sqlusername SqlUser -sqlpassword sQl-P@sWd

See Also

Reference

nscontrol Utility

Other Resources

Migrating Notification Services Instances

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

5 December 2005

New content:
  • Added information about the SQLServerNotificationServicesUser Windows group.