使用 Microsoft 登录
登录或创建帐户。
你好,
使用其他帐户。
你有多个帐户
选择要登录的帐户。

症状

当多个客户端连接到 Microsoft BitLocker 管理和监视 2.5 恢复数据库时,SQL 死锁可能会出现在数据库中。因此,无法从帮助台门户或自我服务门户恢复密钥。当他们尝试加密 MBAM 服务变得无法访问时,新的客户端将收到错误。这会导致超时和其他错误。

此外,BitLocker 管理 Solution\Logs\Recovery c:\inetpub\Microsoft 和 Service\ 的硬件下 MBAM svc 跟踪日志中发生下列错误 *.svclogs:

交易记录 (进程 ID 63) 锁定资源与另一个进程已被死锁,已被选作死锁牺牲品。死锁牺牲品。 末尾的批次检测到 uncommittable 的交易记录。回滚事务。

解决方案

若要解决此问题,请更新与 MBAM 恢复数据库的存储的过程。若要执行此操作,请运行以下事务处理 SQL 脚本︰

USE [MBAM Recovery and Hardware]GO
/****** Object: StoredProcedure [RecoveryAndHardwareCore].[GetDomainId] Script Date: 05/09/2014 07:58:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Kirill Tropin>
-- Create date: <6/18/2010>
-- Description: <Returns DomainId for provided Domain Name. If domain isn't saved - will add it.>
-- =============================================
ALTER PROCEDURE [RecoveryAndHardwareCore].[GetDomainId]
@DomainName nvarchar(255)
WITH EXECUTE AS OWNER
AS
BEGIN
-- Validating input parameters
IF (@DomainName IS NULL)
BEGIN
RETURN -1
END
-- Adding domain if needed and returning DomainId
DECLARE @OrigTranCount int
SET @OrigTranCount = @@TRANCOUNT
IF @OrigTranCount > 0
SAVE TRAN myTran
ELSE
BEGIN TRAN
BEGIN TRY
DECLARE @DomainId int
SET @DomainId = (
SELECT Id
FROM Domains
WITH (READPAST) -- If a committed domain exists then get it, otherwise returns NULL
WHERE (Domains.DomainName = @DomainName)
)
-- Inserting Domain since it wasn't there
IF (@DomainId IS NULL)
BEGIN
/*
In the unlikely event that two clients simultaneously insert the same new domain,
we can end up with a race condition as they both attempt to insert the domain.
One of them will get an exception (error code 2627) due to the unique constraint
and should use this to trigger a re-read of the domain.
*/
WHILE @DomainId IS NULL
BEGIN
BEGIN TRY
INSERT INTO Domains WITH (ROWLOCK, UPDLOCK)
(DomainName)
VALUES (@DomainName)
SET @DomainId = @@IDENTITY
END TRY
BEGIN CATCH
DECLARE @ErrorNumber INT
DECLARE @ErrorSeverity INT
DECLARE @ErrorState INT
SELECT @ErrorNumber = ERROR_NUMBER(), @ErrorSeverity = ERROR_SEVERITY(), @ErrorState = ERROR_STATE()
IF @ErrorNumber = 2627
BEGIN
SET @DomainId = (
SELECT Id
FROM Domains
WITH (READCOMMITTED)
WHERE (Domains.DomainName = @DomainName)
)
END
ELSE
BEGIN
RAISERROR (@ErrorNumber, @ErrorSeverity, @ErrorState)
END
END CATCH
END
END

IF @OrigTranCount = 0
COMMIT TRAN
END TRY
BEGIN CATCH
IF @OrigTranCount = 0
ROLLBACK TRAN
ELSE
IF XACT_STATE() <> -1
ROLLBACK TRAN myTran
DECLARE @ErrorMessage1 NVARCHAR(4000);
DECLARE @ErrorSeverity1 INT;
DECLARE @ErrorState1 INT;
SELECT @ErrorMessage1 = ERROR_MESSAGE();
SELECT @ErrorSeverity1 = ERROR_SEVERITY();
SELECT @ErrorState1 = ERROR_STATE();
RAISERROR (@ErrorMessage1, -- Message text.
@ErrorSeverity1, -- Severity.
@ErrorState1 -- State.
);
END CATCH
RETURN @DomainId
END


USE [MBAM Recovery and Hardware]GO
/****** Object: StoredProcedure [RecoveryAndHardwareCore].[GetDomainId] Script Date: 05/09/2014 14:06:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Kirill Tropin>
-- Create date: <6/18/2010>
-- Description: <Returns DomainId for provided Domain Name. If domain isn't saved - will add it.>
-- =============================================
ALTER PROCEDURE [RecoveryAndHardwareCore].[GetDomainId]
@DomainName nvarchar(255)
WITH EXECUTE AS OWNER
AS
BEGIN
-- Validating input parameters
IF (@DomainName IS NULL)
BEGIN
RETURN -1
END
-- Adding domain if needed and returning DomainId
DECLARE @OrigTranCount int
SET @OrigTranCount = @@TRANCOUNT
IF @OrigTranCount > 0
SAVE TRAN myTran
ELSE
BEGIN TRAN
BEGIN TRY
SET NOCOUNT ON
-- Use a merge statement to guarantee that the domain will be in the table
-- when the SELECT statement is called to get it.
MERGE Domains WITH (HOLDLOCK)
USING (SELECT @DomainName as DomainName) AS NewDomain
ON Domains.DomainName = NewDomain.DomainName
WHEN NOT MATCHED THEN
INSERT (DomainName)
VALUES (NewDomain.DomainName)
;
DECLARE @DomainId int
SET @DomainId = (
SELECT Id
FROM Domains
WHERE Domains.DomainName = @DomainName
)
IF @OrigTranCount = 0
COMMIT TRAN
END TRY
BEGIN CATCH
IF @OrigTranCount = 0
ROLLBACK TRAN
ELSE
IF XACT_STATE() <> -1
ROLLBACK TRAN myTran
DECLARE @ErrorMessage1 NVARCHAR(4000);
DECLARE @ErrorSeverity1 INT;
DECLARE @ErrorState1 INT;
SELECT @ErrorMessage1 = ERROR_MESSAGE();
SELECT @ErrorSeverity1 = ERROR_SEVERITY();
SELECT @ErrorState1 = ERROR_STATE();
RAISERROR (@ErrorMessage1, -- Message text.
@ErrorSeverity1, -- Severity.
@ErrorState1 -- State.
);
END CATCH
RETURN @DomainId
END
GO


需要更多帮助?

需要更多选项?

了解订阅权益、浏览培训课程、了解如何保护设备等。

社区可帮助你提出和回答问题、提供反馈,并听取经验丰富专家的意见。

此信息是否有帮助?

你对语言质量的满意程度如何?
哪些因素影响了你的体验?
按“提交”即表示你的反馈将用于改进 Microsoft 产品和服务。 你的 IT 管理员将能够收集此数据。 隐私声明。

谢谢您的反馈!

×