我从https://support.microsoft.com/en-us/kb/2904712 查看相关描述并下载补丁进行安装。
Issues
Update Rollup 1 for System Center 2012 R2 Virtual Machine Manager resolves the following issues:Refresh job failed with error 2912: The requested operation cannot be performed on the virtual disk as it is currently used in shared mode (0xC05CFF0A)
Error (2904)
VMM could not find the specified path on the <Server name> server.
The system cannot find the path specified (0x80070003)
VMM server和控制台安装都正常。但是在执行文章中提供的SQL脚本:
/* script starts here */ALTER Procedure [dbo].[prc_RBS_UserRoleSharedObjectRelation_Insert]( @ID uniqueidentifier, @ObjectID uniqueidentifier, @ObjectType int, @RoleID uniqueidentifier, @UserOrGroup varbinary (85), @ForeignAccount nvarchar (256), @IsADGroup bit, @ExistingID uniqueidentifier = NULL OUTPUT)ASSET NOCOUNT ON SELECT @ExistingID = [ID] FROM [dbo].[tbl_RBS_UserRoleSharedObjectRelation] WHERE [ObjectID] = @ObjectID AND [RoleID] = @RoleID AND -- Select owner OR Select all which matches ForeignAccount or UserOrGroup OR -- both ForeignAccount and UserOrGroup is NULL (([UserOrGroup] = @UserOrGroup OR [ForeignAccount] = @ForeignAccount) OR ([UserOrGroup] IS NULL AND @UserOrGroup IS NULL AND [ForeignAccount] IS NULL AND @ForeignAccount IS NULL)) /* Ignore duplicate entries */ IF (@ExistingID IS NULL) BEGIN INSERT [dbo].[tbl_RBS_UserRoleSharedObjectRelation] ([ID] ,[ObjectID] ,[ObjectType] ,[RoleID] ,[UserOrGroup] ,[ForeignAccount] ,[IsADGroup] ,[IsOwner] ) VALUES ( @ID, @ObjectID, @ObjectType, @RoleID, @UserOrGroup, @ForeignAccount, @IsADGroup, 0 ) ENDSET NOCOUNT OFFRETURN @@ERROR/* script ends here */
时遇到如下错误
经检查发现是SQL语句有误,该空格没空格,该换行没换行。
我修改成下面这样后就可以正常执行了
/* script starts here */
ALTER Procedure [dbo].[prc_RBS_UserRoleSharedObjectRelation_Insert]
(
@ID uniqueidentifier,
@ObjectID uniqueidentifier,
@ObjectType int,
@RoleID uniqueidentifier,
@UserOrGroup varbinary (85),
@ForeignAccount nvarchar (256),
@IsADGroup bit,
@ExistingID uniqueidentifier = NULL OUTPUT
)
AS
SET NOCOUNT ON
SELECT @ExistingID = [ID]
FROM [dbo].[tbl_RBS_UserRoleSharedObjectRelation]
WHERE [ObjectID] = @ObjectID AND [RoleID] = @RoleID AND
-- Select owner OR Select all which matches ForeignAccount or UserOrGroup OR
-- both ForeignAccount and UserOrGroup is NULL
(([UserOrGroup] = @UserOrGroup OR [ForeignAccount] = @ForeignAccount) OR
([UserOrGroup] IS NULL AND @UserOrGroup IS NULL AND [ForeignAccount] IS NULL AND @ForeignAccount IS NULL))
/* Ignore duplicate entries */
IF (@ExistingID IS NULL)
BEGIN
INSERT [dbo].[tbl_RBS_UserRoleSharedObjectRelation]
([ID]
,[ObjectID]
,[ObjectType]
,[RoleID]
,[UserOrGroup]
,[ForeignAccount]
,[IsADGroup]
,[IsOwner]
)
VALUES
(
@ID,
@ObjectID,
@ObjectType,
@RoleID,
@UserOrGroup,
@ForeignAccount,
@IsADGroup,
0
)
END
SET NOCOUNT OFF
RETURN @@ERROR
/* script ends here */