如何更新对 BAM Notification Services 数据库的引用

执行完将业务活动监视 (BAM) Notification Services 数据库还原到目标系统所需的步骤后,必须在 BizTalk Server 组中运行 Notification Services (NSservice.exe) 的所有计算机上重新注册 Notification Service。 这样可使 Notification Services 连接到新位置上的数据库。

注册 Notification Services 实例后会创建 NS$instance_name 服务,在本地服务器上创建性能计数器,并将信息添加到注册表中。 必须在以下服务器上注册该实例:

  • 运行 NS$instance_name 服务的所有服务器。 运行事件提供程序宿主、生成器和分发服务器组件的服务。 对于扩展配置,则为在多个服务器上运行的服务。

  • 运行订阅管理应用程序的所有服务器。 如果订阅管理应用程序在自己的服务器上运行,则注册该实例时不会创建 NS$instance_name 服务。

  • 运行独立事件提供程序的所有服务器。 如果独立事件提供程序在它自己的服务器上或数据库服务器上运行,则注册该实例时不会创建 NS$instance_name 服务。

    如果数据库服务器不同时运行 Notification Services 实例或客户端组件,则不会在此服务器上注册该实例。

必备条件

  • 必须以 Administrators 组成员的身份登录,才能执行此过程。

  • 将要还原 BAM Notification Services 数据库的计算机上必须安装 SQL Notification Services 的业务活动监视 (BAM) 警报提供程序。

更新对 BAM Notification Services 数据库的引用 (SQL Server 2008 R2/SP1)

  1. 单击 “开始”,单击“ 运行”,键入 cmd,然后单击“ 确定”。

  2. 在命令提示符下,导航到以下目录:\Program Files (x86) \Microsoft BizTalk Server <VERSION>Tracking。

  3. 类型: bm.exe get-config –filename:config.xml

    注意

    在支持用户帐户控制 (UAC) 的系统上,可能需要具有管理权限才能运行该工具。

  4. 打开在步骤 2 中创建的 xml 文件以获取必须重新注册 Notification Services 的计算机列表。

    计算机名称列在 xml 文件的 DeploymentUnit Name=“Alert”>部分中的 Property Name= 参数中<><

    -<DeploymentUnit Name="Alert">  
    <Property Name="GeneratorServerName" />  
    <Property Name="ProviderServerName" />  
    <Property Name="DistributorServerName" />  
      </DeploymentUnit>  
    
  5. 在 xml 文件列出的每台计算机上,停止 NS 服务,然后注销 Notification Services 实例:

    1. 依次单击“开始”、“程序”、“Microsoft SQL Server 2008 R2”、“配置工具”和“通知服务命令提示符”。

    2. 在命令提示符下,键入: net stop NS$BamAlerts

    3. 键入以下命令,注销该实例:

      nscontrol unregister -name BamAlerts

      注销实例会删除注册表项、NS$instance_name 服务(如果存在),还会删除该服务的性能计数器。

  6. 重新注册 Notification Service:

    1. 依次单击“开始”、“程序”、“Microsoft SQL Server 2008 R2”、“配置工具”和“通知服务命令提示符”。

    2. 在命令提示符下,键入:nscontrol register -name BamAlerts -server<ServerName-service>-serviceusername “<ServiceUserName>” -servicepassword “<ServicePassword>

      这样可使 Notification Services 登录到正确的数据库(此信息由 nscontrol 在服务所在计算机的注册表中维护)。

      重要

      重新注册服务时,请记得在 -server 选项中使用新的通知服务数据库服务器。 此外,新的 Notification Services 服务使用的用户名应与旧名称相同。

  7. 在承载 BAM 门户的计算机上,依次单击“开始”、“程序”、“Microsoft SQL Server 2008 R2”、“配置工具”和“通知服务命令提示符”。

  8. 在命令提示符处,键入:

    net stop NS$BamAlerts

  9. 在命令提示符处,键入:

    nscontrol unregister -name BamAlerts

  10. 在命令提示符处,键入:

    nscontrol register -name<BamAlerts-server><NotificationServicesDatabaseServer>

  11. 在命令提示符下,键入: net start NS$BamAlerts

  12. 单击 “开始”,单击“ 运行”,键入 cmd,然后单击“ 确定”。

  13. 在命令提示符下,导航到以下目录:\Program Files (x86) \Microsoft BizTalk Server <VERSION>Tracking。

  14. 在命令提示符处,键入:

    bm.exe update-config –FileName:config.xml

    注意

    在支持用户帐户控制 (UAC) 的系统上,可能需要具有管理权限才能运行该工具。

另请参阅

备份和还原 BAM