小编Nag*_*esh的帖子

当前事务无法提交,也无法支持写入日志文件的操作.回滚交易

从下面的代码中,我们在raiseerror中获得异常 - 当前事务无法提交,并且不能支持写入日志文件的操作.回滚交易.

IF @insertOrUdate = 'D'
BEGIN

    -- DescType depends on CorrectionType and is also a protected sync table, 
    --  it needs to be cleared out before we can remove this type
    IF EXISTS(
        SELECT TOP 1 * 
        FROM [dbo].[DescType]
        WHERE 
            [CorrectionTypeId] = @correctionTypeId

    )
    BEGIN
    PRINT 'raise error'
        RAISERROR('Dependent Desc Role Type Rollups must be removed prior to removing a type that they depend on', 16, 1)

        PRINT 'after raise error'
    END

    -- Delete protected Sync record
    DELETE …
Run Code Online (Sandbox Code Playgroud)

sql-server-2008

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

sql-server-2008 ×1