如何重新安裝 Virtual Machine Manager 時保留資料庫

請注意--重要:本文是以 Microsoft 機器翻譯軟體翻譯而成,且可能由 Microsoft Community 利用 Community Translation Framework技術或人工進行事後編修。翻譯過程並無專業譯者參與。Microsoft 同時提供使用者人為翻譯、機器翻譯及社群編修後的機器翻譯三種版本的文章,讓使用者可以依其使用語言使用知識庫中的所有文章。但是,所有翻譯文章都可能不盡完美,內容都可能出現詞彙、語意或文法上的錯誤。就翻譯內容之不正確或錯誤,或客戶因使用翻譯內容所產生的任何損害,微軟不負擔任何責任。Microsoft將依合理的商業努力不斷地更新機器翻譯軟體和工具,以期能為使用者提供更好的服務。

按一下這裡查看此文章的英文版本:3132774
結論
當您有 Microsoft System Center 2012 R2 Virtual Machine Manager (VMM 2012 R2) 安裝時,您可能必須移除並重新安裝 VMM 但還是會保留目前安裝的所有資料庫資訊。
其他相關資訊
若要執行這項操作,請依照下列步驟執行:
  1. 當您啟動的移除 Virtual Machine Manager 程序時,請選取 [保留資料] 選項。
  2. 開啟 SQL Management Studio,並再連接到現有的 VMM 資料庫。
  3. 執行下列預存程序:
    /****** Object: StoredProcedure [dbo].[prc_WLC_GetVNetworkAdapterByNicId] Script Date: 12/16/2015 2:13:12 AM ******/ -- ========================================================= -- Create date: 08/31/2007 -- Description: Get VNetworkAdapter for a given NicId -- ========================================================= ALTER PROCEDURE [dbo].[prc_WLC_GetVNetworkAdapterByNicId]     @VNicId uniqueidentifier AS BEGIN     DECLARE @error int     SET @error = 0     SET NOCOUNT ON;     SELECT       [Name],       [Description],       [OwnerIdentifier],       [CreationTime],       vna.[ModifiedTime],       [Accessibility],       [ObjectState],       [VNicId],       [HWProfileId],       [ParentType],       [VirtualNetwork],       [MACAddressType],       [MACAddress],       [IPv4AddressType],       [IPv6AddressType],       [PortId],       [DeviceId],       [NetworkAdapterType],       [VMSubnetId],       [VMNetworkId],       [PortClassificationId],       [PortProfileSetId],       [VLanEnabled],       [VLanId],       [VmwAdapterIndex],       [VmwPortGroup],       [SlotId],       [MACSpoofingEnabled],       [EnableGuestIPNetworkVirtualizationUpdates],       [VMNetworkOptimizationEnabled],       [HostId],       [LogicalSwitchId],       [NetworkKBytesReadTieredPerfCounterID],       [NetworkKBytesWriteTieredPerfCounterID],       [VMNetworkServiceSetting],       [UsesSriov],       [IsUsedForHostManagement],       [IPv4Addresses],       [IPv6Addresses],       [DefaultGateways],       [DNSServers],       [TemplateNicName], compliance.PortClassificationComplianceErrors AS [PortClassificationComplianceErrors],       compliance.VMNetworkComplianceErrors AS [VMNetworkComplianceErrors]     FROM dbo.tbl_WLC_VNetworkAdapter vna     LEFT JOIN dbo.tbl_NetMan_VirtualNetworkAdapterCompliance compliance         ON vna.VNicId = compliance.VirtualNetworkAdapterId     WHERE VNicId = @VNicId     SET @error = @@ERROR     SET NOCOUNT OFF     RETURN @error END IF EXISTS (SELECT * FROM dbo.sysobjects            WHERE id = OBJECT_ID(N'[dbo].[prc_RBS_UserRole_Add]')            AND OBJECTPROPERTY(id, N'IsProcedure') = 1) SET NOEXEC OFF ELSE SET NOEXEC ON GO /****** Object:  StoredProcedure [dbo].[prc_RBS_UserRole_Add]    Script Date: 10/03/2007 12:13:45 ******/ ALTER PROCEDURE [dbo].[prc_RBS_UserRole_Add]     ( @RoleID uniqueidentifier,         @ProfileType tinyint,         @Description nvarchar(2048),         @Name nvarchar(256),         @OwnerIdentifier nvarchar(256),         @ParentUserRole uniqueidentifier,         @LastUpdatedTimestamp datetime,         @ShowPROTips bit,         @VMNetworkMaximum smallint,         @VMNetworkMaximumPerUser smallint,         @VPNConnectionMaximum smallint,         @VPNConnectionMaximumPerUser smallint,         @VMNetworkVPNMaximumBandwidthInKbps bigint,         @VMNetworkVPNMaximumBandwidthOutKbps bigint,         @NATConnectionMaximum smallint = NULL,         @NATConnectionMaximumPerUser smallint = NULL     ) AS BEGIN TRAN SET NOCOUNT ON DECLARE @error int DECLARE @IsDuplicateName bit DECLARE @IsRoleAlreadyPresent bit SELECT @IsDuplicateName = [dbo].[fn_RBS_UserRole_NameExists](@RoleID, @ParentUserRole, @Name) -- This is especially used in Upgrade scenarios where we are inserting Administrator role SELECT @IsRoleAlreadyPresent = Count(RoleID) FROM [dbo].[tbl_RBS_UserRole] WHERE RoleID = @RoleID IF (@IsDuplicateName = 0    AND @IsRoleAlreadyPresent = 0) BEGIN   INSERT INTO [dbo].[tbl_RBS_UserRole]            ([RoleID]            ,[ProfileType]            ,[Description]            ,[Name]            ,[OwnerIdentifier]            ,[ParentUserRole]            ,[LastUpdatedTimestamp]            ,[ShowPROTips]            ,[VMNetworkMaximum]            ,[VMNetworkMaximumPerUser]            ,[VPNConnectionMaximum]            ,[VPNConnectionMaximumPerUser] ,[VMNetworkVPNMaximumBandwidthInKbps]            ,[VMNetworkVPNMaximumBandwidthOutKbps]            ,[NATConnectionMaximum]            ,[NATConnectionMaximumPerUser] ) VALUES (         @RoleID,         @ProfileType,         @Description,         @Name,         @OwnerIdentifier,         @ParentUserRole,         @LastUpdatedTimestamp,         @ShowPROTips,         @VMNetworkMaximum,         @VMNetworkMaximumPerUser,         @VPNConnectionMaximum,         @VPNConnectionMaximumPerUser,         @VMNetworkVPNMaximumBandwidthInKbps,         @VMNetworkVPNMaximumBandwidthOutKbps,         @NATConnectionMaximum,         @NATConnectionMaximumPerUser )   -- Insert flattened tree of the hierarchy for this user role   INSERT INTO [dbo].[tbl_RBS_UserRoleHierarchy]   SELECT RoleId, ParentRoleId, hl   FROM view_RBS_UserRoleParentChildRelation ur where ur.RoleID = @RoleID   SELECT @error = @@ERROR END ELSE BEGIN   SET @error = 50008 END SET NOCOUNT OFF COMMIT TRAN RETURN @error Go SET NOEXEC OFF --------------------------------------------------------------------------------------------IF EXISTS (SELECT * FROM dbo.sysobjects            WHERE id = OBJECT_ID(N'[dbo].[prc_RBS_UserRole_CommonUpdate]')            AND OBJECTPROPERTY(id, N'IsProcedure') = 1) SET NOEXEC OFF ELSE SET NOEXEC ON GO /****** Object:  StoredProcedure [dbo].[prc_RBS_UserRole_CommonUpdate]    Script Date: 10/03/2007 12:13:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[prc_RBS_UserRole_CommonUpdate] (         @RoleID uniqueidentifier,         @Description nvarchar(2048),         @OwnerIdentifier nvarchar(256),         @Name nvarchar(256),         @LastUpdatedTimestamp datetime,         @ShowPROTips bit,         @VMNetworkMaximum smallint,         @VMNetworkMaximumPerUser smallint,         @VPNConnectionMaximum smallint,         @VPNConnectionMaximumPerUser smallint,         @VMNetworkVPNMaximumBandwidthInKbps bigint,         @VMNetworkVPNMaximumBandwidthOutKbps bigint,         @NATConnectionMaximum smallint = NULL,         @NATConnectionMaximumPerUser smallint = NULL     ) AS SET NOCOUNT ON DECLARE @error int DECLARE @ParentUserRole uniqueidentifier DECLARE @IsDuplicateName bit DECLARE @OldName nvarchar(256) SELECT @ParentUserRole = [ParentUserRole], @OldName = [Name] FROM [dbo].[tbl_RBS_UserRole] WHERE [RoleID] = @RoleID IF (@OldName = @Name) BEGIN    -- We are not changing role name. This is necessary if Admin has already an SSU1 and TA created SSU1, we should not error out here    SELECT @IsDuplicateName = 0 END ELSE BEGIN    SELECT @IsDuplicateName = [dbo].[fn_RBS_UserRole_NameExists](@RoleID, @ParentUserRole, @Name) END IF (@IsDuplicateName = 0) BEGIN UPDATE [dbo].[tbl_RBS_UserRole]            SET [Description] = @Description,            [OwnerIdentifier] = @OwnerIdentifier,            [Name] = @Name,            [LastUpdatedTimestamp] = @LastUpdatedTimestamp,            [ShowPROTips] = @ShowPROTips,            [VMNetworkMaximum] = @VMNetworkMaximum,            [VMNetworkMaximumPerUser] = @VMNetworkMaximumPerUser,            [VPNConnectionMaximum] = @VPNConnectionMaximum,            [VPNConnectionMaximumPerUser] = @VPNConnectionMaximumPerUser,            [VMNetworkVPNMaximumBandwidthInKbps] = @VMNetworkVPNMaximumBandwidthInKbps,            [VMNetworkVPNMaximumBandwidthOutKbps] = @VMNetworkVPNMaximumBandwidthOutKbps,            [NATConnectionMaximum] = @NATConnectionMaximum,            [NATConnectionMaximumPerUser] = @NATConnectionMaximumPerUser   WHERE [RoleID] = @RoleID SELECT @error = @@ERROR END ELSE BEGIN   SET @error = 50008 END SET NOCOUNT OFF RETURN @error GO SET NOEXEC OFF
  4. 從原始安裝媒體安裝 VMM 2012 R2。在某些情況下,可能無法正常啟動 VMM 服務。不過,這種行為可以放心忽略這個時候。
  5. 套用更新彙總套件 (例如,更新彙總套件 7 或 8) 對應到 VMM 2012 R2 先前安裝的版本。這是必要的資料庫才能正確運作。
  6. 您可以使用 SQL Management Studio VMM 資料庫上執行下列預存程序:
    /****** Object: StoredProcedure [dbo].[prc_WLC_GetVNetworkAdapterByNicId] Script Date: 12/16/2015 2:13:12 AM ******/ -- ========================================================= -- Create date: 08/31/2007 -- Description: Get VNetworkAdapter for a given NicId -- ========================================================= ALTER PROCEDURE [dbo].[prc_WLC_GetVNetworkAdapterByNicId]     @VNicId uniqueidentifier AS BEGIN     DECLARE @error int     SET @error = 0     SET NOCOUNT ON;     SELECT       [Name],       [Description],       [OwnerIdentifier],       [CreationTime],       vna.[ModifiedTime],       [Accessibility],       [ObjectState],       [VNicId],       [HWProfileId],       [ParentType],       [VirtualNetwork],       [MACAddressType],       [MACAddress],       [IPv4AddressType],       [IPv6AddressType],       [PortId],       [DeviceId],       [NetworkAdapterType],       [VMSubnetId],       [VMNetworkId],       [PortClassificationId],       [PortProfileSetId],       [VLanEnabled],       [VLanId],       [VmwAdapterIndex],       [VmwPortGroup],       [SlotId],       [MACSpoofingEnabled],       [EnableGuestIPNetworkVirtualizationUpdates],       [VMNetworkOptimizationEnabled],       [HostId],       [LogicalSwitchId],       [NetworkKBytesReadTieredPerfCounterID],       [NetworkKBytesWriteTieredPerfCounterID],       [VMNetworkServiceSetting],       [UsesSriov],       [IsUsedForHostManagement],       [IPv4Addresses],       [IPv6Addresses],       [DefaultGateways],       [DNSServers],       [TemplateNicName],       compliance.PortClassificationComplianceErrors AS [PortClassificationComplianceErrors],       compliance.VMNetworkComplianceErrors AS [VMNetworkComplianceErrors],       [AccessControlListID],       compliance.NetworkAccessControlListComplianceErrors AS [NetworkAccessControlListComplianceErrors]     FROM dbo.tbl_WLC_VNetworkAdapter vna     LEFT JOIN dbo.tbl_NetMan_VirtualNetworkAdapterCompliance compliance         ON vna.VNicId = compliance.VirtualNetworkAdapterId     WHERE VNicId = @VNicId     SET @error = @@ERROR     SET NOCOUNT OFF     RETURN @error END GO 
  7. 重新啟動 VMM 2012 R2 伺服器,並確定 VMM 服務成功啟動。


在高可用性的 VMM 安裝上安裝的特殊注意事項

在 VMM 的高可用性 (HA) 安裝中,請依照下列步驟執行:
  1. VMM 安裝所在的節點上停止 VMM 伺服器服務。
  2. 執行步驟 3 前一節 VMM 資料庫上的指令碼。
  3. 安裝 VMM 2012 R2 RTM 的第二個節點上,並選取要在安裝期間使用現有的資料庫。
  4. 在第二個節點上安裝 SC 2012 R2 VMM UR8。
  5. 執行後的安裝指令碼從 VMM 資料庫上前述的步驟 6。
  6. 您想要讓使用中,如果它並未自動啟動的節點上啟動 VMM 服務。

vmm ur8 安裝 vmm db

警告:本文為自動翻譯

內容

文章識別碼:3132774 - 最後檢閱時間:01/07/2016 07:07:00 - 修訂: 1.0

Microsoft System Center 2012 R2 Virtual Machine Manager

  • kbexpertiseadvanced kbsurveynew kbinfo kbhowto kbmt KB3132774 KbMtzh
意見反應