共用方式為


如何:從 Notification Services 執行個體移除應用程式 (命令提示字元)

若要從現有的執行個體移除 Notification Services 應用程式,您必須修改執行個體組態,然後更新執行個體。下列程序顯示所要修改的項目,以及如何在修改後利用命令列公用程式執行更新。

ms171400.note(zh-tw,SQL.90).gif附註:
下列程序假設您要使用執行個體組態檔 (ICF) 和應用程式定義檔案 (ADF) 來設定 Notification Services 的執行個體。如果您在使用 Notification Services Management Objects (NMO),請利用 Microsoft.SqlServer.Management.Nmo.Instance 類別的方法來更新 Notification Services 執行個體。

若要移除應用程式

  1. 在 ICF 中,執行下列動作:

    • 移除代表應用程式的 Application 節點。
    • Protocols 節點移除應用程式特定的任何自訂通訊協定。
    • DeliveryChannels 節點移除應用程式特定的任何傳遞通道。
    • ParameterDefaults 節點移除應用程式特定的預設參數值。
  2. 備份執行個體和應用程式資料庫。如需詳細資訊,請參閱<備份及復原 Notification Services>。

  3. [開始] 功能表中,依序指向 [程式集][Microsoft SQL Server 2005][組態工具],再按一下 [Notification Services 命令提示字元] 來開啟 [命令提示字元] 視窗。

  4. 輸入下列命令來停用執行個體:

    nscontrol disable -nameinstanceName

  5. 輸入下列命令,套用組態檔中所作的變更:

    nscontrol update -inconfigurationFile

    如果執行個體或應用程式使用 SQL Server 驗證,或者,如果您需要使用命令列參數,您需要提供其他參數。如需詳細資訊,請參閱<nscontrol update 命令>。

  6. 若要更新效能計數器,請只使用 -name-server 引數來重新註冊 Notification Services 的執行個體。如果您不使用效能計數器,請勿執行這項步驟。請輸入下列命令來重新註冊執行個體。

    1. **net stop ns$**instanceName
    2. nscontrol register -nameinstanceName-serverdatabaseServer
      使用 SQL Server 驗證或引數加密時,您需要提供其他參數。如需詳細資訊,請參閱<nscontrol register 命令>。
    3. **net start ns$**instanceName
      ms171400.note(zh-tw,SQL.90).gif附註:
      如果 Notification Services 執行個體向外延展到多部伺服器,請在每部伺服器上,重新註冊這個執行個體。
  7. 輸入下列命令來啟用執行個體:

    nscontrol enable -nameinstanceName

當您更新執行個體之後,您可能需要從應用程式資料庫刪除應用程式物件;或者,如果應用程式有它自己的資料庫,請卸除整個資料庫。

請參閱

工作

如何:從 Notification Services 執行個體移除應用程式 (命令提示字元)

概念

從執行個體移除應用程式

其他資源

DROP DATABASE (Transact-SQL)
更新執行個體及應用程式
管理執行個體與應用程式的如何主題 (Notification Services)

說明及資訊

取得 SQL Server 2005 協助