microsoft / microsoft/sqlmanagementobjects

Server.IsTraceFlagOn returns true for session scope flags when isGlobalTraceFlag param is true

未关闭
#13 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C#
星标
143
派生
28
PR 合并指标
30 天内没有已合并 PR

描述

Repro:

server.SetTraceFlag(1800, isOn: true);
var isOn = server.IsTraceFlagOn(1800, isGlobalTraceFlag: true);
// isOn is "true"

dbcc tracestatus() shows this:

TraceFlag Status Global Session
 
124       1      1      0
1800      1      0      1
4631      1      1      0
11100     1      1      0

I filed a doc bug at https://github.com/MicrosoftDocs/sql-docs/issues/4920 because it seems tracestatus() and tracestatus(-1) return the same table, even though (-1) is only supposed to return global flags according to the current docs. I think the SMO code was relying on that difference.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先使用标志 1800,通过 Server.SetTraceFlag、Server.IsTraceFlagOn 和 DBCC tracestatus() 重现该问题。比较全局范围与会话范围的 API 结果,并检查关联的 SQL 文档问题;当 IsTraceFlagOn 报告的范围与预期的全局标志行为一致时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp, sql
领域
databases
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。