dsccommunity / dsccommunity/SqlServerDsc

SqlRSDatabase: New resource proposal

Open
#2,416 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted resource proposal
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

  1. Proposed File: source/Classes/020.SqlRSDatabase.ps1

  2. Inheritance: Inherits from ResourceBase (from DscResource.Base module), not SqlResourceBase since it doesn't interact with the SQL Server Database Engine via SMO.

  3. Database and initialization are coupled: Creating the database and initializing the report server are done together because initialization requires a configured database connection.

  4. RestartTimeout and SuppressServiceRestart: These properties are carried over from the old SqlRS pattern to handle slow initialization on resource-constrained systems.

  5. Recommended usage order: This resource should be used after SqlRSVirtualDirectory and SqlRSUrlReservation have configured the virtual directories and URL reservations.

  6. Integration tests: Should follow the patterns in Integration_Test_Commands_ReportingServices and Integration_Test_Commands_BIReportServer stages.

Contributor guide

Open the contributing guide

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.