dsccommunity / dsccommunity/SqlServerDsc
SqlTraceFlag: New resource proposal
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 385
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Description
Resource proposal
A class-based SqlTraceFlag resource would manage the state of SQL Server trace flags, ensuring they are enabled or disabled as required. It would use Get-SqlDscTraceFlag, Add-SqlDscTraceFlag, Remove-SqlDscTraceFlag, and Set-SqlDscTraceFlag.
Proposed properties
| Property | Type qualifier | Data type | Description | Default value | Allowed values |
|---|---|---|---|---|---|
| Ensure | Key | String | Whether the trace flag should be Present or Absent | Present | Present, Absent |
| TraceFlag | Key | Int | The trace flag number | None | Valid trace flag numbers |
| ServerName | Key | String | The SQL Server host name | None | Any valid server name |
| InstanceName | Key | String | The SQL Server instance name | None | Any valid instance name |
| Persisted | Write | Boolean | If the trace flag should be persisted | False | True, False |
Special considerations or limitations
Should ensure trace flag changes do not disrupt production workloads and support persistence options. Contributors should handle version-specific trace flag behaviors and validation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing Get-SqlDscTraceFlag, Add-SqlDscTraceFlag, Remove-SqlDscTraceFlag, and Set-SqlDscTraceFlag entry points. Define how the proposed class-based resource should use them for Ensure, TraceFlag, ServerName, InstanceName, and Persisted, including validation and version-specific behavior; done means the resource manages enabled, disabled, and persisted trace-flag state safely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100