dsccommunity / dsccommunity/SqlServerDsc
SqlRSDatabase: 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
Configures the Reporting Services database connection, including creating the database and initializing the report server. This resource replaces the core initialization functionality of the old SqlRS MOF-based resource.
Parent Issue: #2415
Features
- Creates the Reporting Services database on the specified SQL Server instance
- Configures database connection settings (authentication type, timeouts)
- Initializes the report server after database configuration
- Supports both SQL Server Reporting Services (SSRS) and Power BI Report Server (PBIRS)
- SQL Server 2019+ only
Commands Used
| Method | Commands |
|---|---|
| Get | Get-SqlDscRSConfiguration, Test-SqlDscRSInitialized, Get-SqlDscRSDatabaseInstallation |
| Test | Test-SqlDscRSInitialized, compare database settings |
| Set | Request-SqlDscRSDatabaseScript, Request-SqlDscRSDatabaseRightsScript, Invoke-SqlDscQuery, Set-SqlDscRSDatabaseConnection, Initialize-SqlDscRS, Restart-SqlDscRSService, Set-SqlDscRSDatabaseTimeout |
Proposed properties
| Property | Type qualifier | Data type | Description | Default value | Allowed values |
|---|---|---|---|---|---|
| InstanceName | Key | String | The RS instance name (SSRS or PBIRS) | None | None |
| Ensure | Write | String | Present to create/configure, Absent to remove | Present | Present, Absent |
| DatabaseServerName | Required | String | SQL Server name hosting the RS database | None | None |
| DatabaseInstanceName | Write | String | SQL instance name for the RS database | MSSQLSERVER | None |
| DatabaseName | Write | String | Name of the RS database | ReportServer | None |
| AuthenticationType | Write | String | How to authenticate to the database | ServiceAccount | ServiceAccount, Windows, SqlServer |
| Credential | Write | PSCredential | Credentials for Windows/SqlServer authentication | None | None |
| LogonTimeout | Write | UInt32 | Database connection timeout in seconds | None | None |
| QueryTimeout | Write | UInt32 | Database query timeout in seconds | None | None |
| RestartTimeout | Write | UInt32 | Seconds to wait after service restart | None | None |
| SuppressServiceRestart | Write | Boolean | Suppress automatic service restart | $false | None |
| Encrypt | Write | String | Encryption setting for database connection | None | None |
| IsInitialized | Read | Boolean | Whether the report server is initialized | None | None |
Special considerations or limitations
-
Proposed File:
source/Classes/020.SqlRSDatabase.ps1 -
Inheritance: Inherits from
ResourceBase(from DscResource.Base module), notSqlResourceBasesince it doesn't interact with the SQL Server Database Engine via SMO. -
Database and initialization are coupled: Creating the database and initializing the report server are done together because initialization requires a configured database connection.
-
RestartTimeout and SuppressServiceRestart: These properties are carried over from the old
SqlRSpattern to handle slow initialization on resource-constrained systems. -
Recommended usage order: This resource should be used after
SqlRSVirtualDirectoryandSqlRSUrlReservationhave configured the virtual directories and URL reservations. -
Integration tests: Should follow the patterns in
Integration_Test_Commands_ReportingServicesandIntegration_Test_Commands_BIReportServerstages.
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 proposed source/Classes/020.SqlRSDatabase.ps1 file and review the ResourceBase inheritance and the listed Get, Test, and Set commands. Compare the integration test patterns in Integration_Test_Commands_ReportingServices and Integration_Test_Commands_BIReportServer. Done means the resource supports the specified properties and SSRS/PBIRS database initialization scenarios with integration coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, sql
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100