如何:新增應用程式到已部署的 Notification Services 執行個體 (命令提示字元)
若要將應用程式加入現有的執行個體中,您必須先修改執行個體組態,再更新執行個體。下列程序顯示要修改哪些項目,以及如何利用命令列公用程式來執行更新。
![]() |
---|
下列程序假設您要使用執行個體組態檔 (ICF) 和應用程式定義檔案 (ADF) 來設定 Notification Services 的執行個體。如果您在使用 Notification Services Management Objects (NMO),請利用 Microsoft.SqlServer.Management.Nmo.Instance 類別的方法來更新 Notification Services 執行個體。 |
若要將應用程式加入已部署的 Notification Services 執行個體中
建立或取得新應用程式的 ADF。
在 ICF 中,執行下列動作:
- 加入應用程式的 Application 節點。
- 將應用程式所用的任何自訂通訊協定加入 Protocols 節點中,將任何其他傳遞通道加入 DeliveryChannels 節點中。
- 依照需要來修改 ParameterDefaults 節點。
備份執行個體和應用程式資料庫。如需詳細資訊,請參閱<備份及復原 Notification Services>。
在 [開始] 功能表中,依序指向 [程式集]、[Microsoft SQL Server 2005] 和 [組態工具],再按一下 [Notification Services 命令提示字元] 來開啟 [命令提示字元] 視窗。
輸入下列命令來停用執行個體:
nscontrol disable -nameinstanceName
輸入下列命令,套用組態檔中所作的變更:
nscontrol update -inconfigurationFile
如果執行個體或應用程式需要命令列參數,您的 nscontrol update 命令會包含其他參數。如需詳細資訊,請參閱<nscontrol update 命令>。
若要更新效能計數器,請只使用 -name 和 -server 引數來重新註冊 Notification Services 的執行個體。如果您並未使用效能計數器,或不需要更新它們,請勿執行這個步驟。請輸入下列命令來重新註冊執行個體。
- **net stop ns$**instanceName
- nscontrol register -nameinstanceName-serverdatabaseServer
當使用 Microsoft SQL Server 驗證或引數加密時,您必須提供其他參數。如需詳細資訊,請參閱<nscontrol register 命令>。 - **net start ns$**instanceName
附註:
如果 Notification Services 執行個體向外延展到多部伺服器,請在每部伺服器上,重新註冊這個執行個體。
輸入下列命令來啟用執行個體:
nscontrol enable -nameinstanceName
請參閱
工作
如何:新增應用程式到已部署的 Notification Services 執行個體 (SQL Server Management Studio)
概念
其他資源
管理執行個體與應用程式的如何主題 (Notification Services)