cs_Exceptions_Get
ALTER procedure [dbo].cs_Exceptions_Get
(
@SettingsID int,
@ExceptionType int = 0,
@MinFrequency int = 10
)
AS
SET Transaction Isolation Level Read UNCOMMITTED
/**//*设置事务隔离级别,Read UNCOMMITTED 执行脏读或 0 级隔离锁定,这表示不发出共享锁,
也不接受排它锁。当设置该选项时,可以对数据执行未提交读或脏读;在事务结束前可以更
改数据内的数值,行也可以出现在数据集中或从数据集消失。该选项的作用与在事务内所有
语句中的所有表上设置 NOLOCK 相同。这是四个隔离级别中限制最小的级别。*/
BEGIN
SELECT TOP 100
E.*
FROM
cs_Exceptions E
WHERE
E.SettingsID = @SettingsID AND
((@ExceptionType > 0 and E.Category = @ExceptionType ) or @ExceptionType <= 0 ) AND
E.Frequency >= @MinFrequency
ORDER BY
E.Frequency DESC
/**//*异常事件.查询前100条记录并按发生频率降序排列*/
END
GO
ALTER procedure [dbo].cs_Exceptions_Get
(
@SettingsID int,
@ExceptionType int = 0,
@MinFrequency int = 10
)
AS
SET Transaction Isolation Level Read UNCOMMITTED
/**//*设置事务隔离级别,Read UNCOMMITTED 执行脏读或 0 级隔离锁定,这表示不发出共享锁,
也不接受排它锁。当设置该选项时,可以对数据执行未提交读或脏读;在事务结束前可以更
改数据内的数值,行也可以出现在数据集中或从数据集消失。该选项的作用与在事务内所有
语句中的所有表上设置 NOLOCK 相同。这是四个隔离级别中限制最小的级别。*/
BEGIN
SELECT TOP 100
E.*
FROM
cs_Exceptions E
WHERE
E.SettingsID = @SettingsID AND
((@ExceptionType > 0 and E.Category = @ExceptionType ) or @ExceptionType <= 0 ) AND
E.Frequency >= @MinFrequency
ORDER BY
E.Frequency DESC
/**//*异常事件.查询前100条记录并按发生频率降序排列*/
END
GO