dsccommunity / dsccommunity/SqlServerDsc
SqlScript: Resource refactoring 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 SqlScript resource would run idempotent T-SQL scripts or queries with Test enforcement, using Invoke-SqlDscQuery to ensure scripts are executed only when necessary.
Proposed properties
| Property | Type qualifier | Data type | Description | Default value | Allowed values |
|---|---|---|---|---|---|
| Script | Key | String | T-SQL script or query to execute | None | Any valid T-SQL |
| TestQuery | Write | String | Query to verify script was applied | None | Any valid T-SQL |
| 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 |
Special considerations or limitations
Should ensure scripts are truly idempotent, validate test queries, and handle errors gracefully. Contributors should document script requirements and avoid potentially destructive operations unless explicit.
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 with the existing Invoke-SqlDscQuery behavior and compare it with the proposed Script, TestQuery, ServerName, and InstanceName properties. Define how idempotence, validation, and error handling should be tested; the issue names no files or tests, so maintainer guidance is needed before implementation.
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
- Needs clarification
- Newbie friendliness
- 25/100