microsoft / microsoft/sqlmanagementobjects

LogReuseWaitStatus enum is incomplete

Open
#105 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
143
Forks
28
PR merge metrics
No merged PRs in 30d

Description

LogReuseWaitStatus lists 10 valid statuses. This matches the documentation however both of these are incomplete and should include all possible values. Note the below example (from dbatools' Get-DbaDatabase) where this enum is surfaced but shows inconsistent values due to the incomplete enum.

image
image

https://github.com/microsoft/sqlmanagementobjects/blob/98093604e9ede97aa2a9b066279f0bd9d9557c4f/src/Microsoft/SqlServer/Management/SqlEnum/enumstructs.cs#L2194-L2216

Using the sys.databases documentation as a reference, types 10 through 17 are missing; although how the "Internal Use Only" types are exposed is perhaps not for me to suggest

log_reuse_wait log_reuse_wait_desc
10 For internal use only
11 For internal use only
12 For internal use only
13 Oldest page
14 Other
16 XTP_CHECKPOINT
17 sLog scanning

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Microsoft/SqlServer/Management/SqlEnum/enumstructs.cs at the LogReuseWaitStatus definition around lines 2194-2216, and compare it with the sys.databases documentation. Determine how the internal-use values should be represented, then ensure the enum covers the documented log_reuse_wait values and exposes consistent descriptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
database
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.